diff --git a/.librarian/state.yaml b/.librarian/state.yaml index 8b67bca9500c..34ae099a97de 100644 --- a/.librarian/state.yaml +++ b/.librarian/state.yaml @@ -2,7 +2,7 @@ image: us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-li libraries: - id: google-cloud-dlp version: 3.32.0 - last_generated_commit: 329ace5e3712a2e37d6159d4dcd998d8c73f261e + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/privacy/dlp/v2 service_config: dlp_v2.yaml @@ -21,7 +21,7 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-eventarc version: 1.16.0 - last_generated_commit: 329ace5e3712a2e37d6159d4dcd998d8c73f261e + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/eventarc/v1 service_config: eventarc_v1.yaml @@ -40,7 +40,7 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-video-live-stream version: 1.13.0 - last_generated_commit: 329ace5e3712a2e37d6159d4dcd998d8c73f261e + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/video/livestream/v1 service_config: livestream_v1.yaml @@ -59,7 +59,7 @@ libraries: tag_format: '{id}-v{version}' - id: google-ads-marketingplatform-admin version: 0.1.6 - last_generated_commit: 329ace5e3712a2e37d6159d4dcd998d8c73f261e + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/marketingplatform/admin/v1alpha service_config: marketingplatformadmin_v1alpha.yaml @@ -78,7 +78,7 @@ libraries: tag_format: '{id}-v{version}' - id: google-ai-generativelanguage version: 0.7.0 - last_generated_commit: 329ace5e3712a2e37d6159d4dcd998d8c73f261e + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/ai/generativelanguage/v1 service_config: generativelanguage_v1.yaml @@ -105,7 +105,7 @@ libraries: tag_format: '{id}-v{version}' - id: google-analytics-admin version: 0.25.0 - last_generated_commit: 329ace5e3712a2e37d6159d4dcd998d8c73f261e + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/analytics/admin/v1beta service_config: analyticsadmin_v1beta.yaml @@ -126,7 +126,7 @@ libraries: tag_format: '{id}-v{version}' - id: google-analytics-data version: 0.18.19 - last_generated_commit: 329ace5e3712a2e37d6159d4dcd998d8c73f261e + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/analytics/data/v1alpha service_config: analyticsdata_v1alpha.yaml @@ -147,7 +147,7 @@ libraries: tag_format: '{id}-v{version}' - id: google-ads-admanager version: 0.4.0 - last_generated_commit: 329ace5e3712a2e37d6159d4dcd998d8c73f261e + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/ads/admanager/v1 service_config: admanager_v1.yaml @@ -166,10 +166,10 @@ libraries: tag_format: '{id}-v{version}' - id: google-apps-card version: 0.1.8 - last_generated_commit: 329ace5e3712a2e37d6159d4dcd998d8c73f261e + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/apps/card/v1 - service_config: '' + service_config: "" source_roots: - packages/google-apps-card preserve_regex: @@ -186,7 +186,7 @@ libraries: tag_format: '{id}-v{version}' - id: google-apps-chat version: 0.2.9 - last_generated_commit: 329ace5e3712a2e37d6159d4dcd998d8c73f261e + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/chat/v1 service_config: chat_v1.yaml @@ -205,7 +205,7 @@ libraries: tag_format: '{id}-v{version}' - id: google-apps-events-subscriptions version: 0.2.2 - last_generated_commit: 329ace5e3712a2e37d6159d4dcd998d8c73f261e + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/apps/events/subscriptions/v1 service_config: workspaceevents_v1.yaml @@ -226,7 +226,7 @@ libraries: tag_format: '{id}-v{version}' - id: google-apps-meet version: 0.1.16 - last_generated_commit: 329ace5e3712a2e37d6159d4dcd998d8c73f261e + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/apps/meet/v2beta service_config: meet_v2beta.yaml @@ -247,7 +247,7 @@ libraries: tag_format: '{id}-v{version}' - id: google-area120-tables version: 0.11.17 - last_generated_commit: 329ace5e3712a2e37d6159d4dcd998d8c73f261e + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/area120/tables/v1alpha1 service_config: area120tables_v1alpha1.yaml @@ -266,7 +266,7 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-access-approval version: 1.16.2 - last_generated_commit: 329ace5e3712a2e37d6159d4dcd998d8c73f261e + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/accessapproval/v1 service_config: accessapproval_v1.yaml @@ -285,7 +285,7 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-advisorynotifications version: 0.3.16 - last_generated_commit: 329ace5e3712a2e37d6159d4dcd998d8c73f261e + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/advisorynotifications/v1 service_config: advisorynotifications_v1.yaml @@ -304,7 +304,7 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-alloydb version: 0.4.9 - last_generated_commit: 329ace5e3712a2e37d6159d4dcd998d8c73f261e + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/alloydb/v1beta service_config: alloydb_v1beta.yaml @@ -327,7 +327,7 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-alloydb-connectors version: 0.1.11 - last_generated_commit: 329ace5e3712a2e37d6159d4dcd998d8c73f261e + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/alloydb/connectors/v1 service_config: connectors_v1.yaml @@ -351,7 +351,7 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-api-gateway version: 1.12.2 - last_generated_commit: 329ace5e3712a2e37d6159d4dcd998d8c73f261e + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/apigateway/v1 service_config: apigateway_v1.yaml @@ -370,7 +370,7 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-api-keys version: 0.5.17 - last_generated_commit: 329ace5e3712a2e37d6159d4dcd998d8c73f261e + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/api/apikeys/v2 service_config: apikeys_v2.yaml @@ -389,9 +389,10 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-apigee-connect version: 1.12.2 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/apigeeconnect/v1 + service_config: apigeeconnect_v1.yaml source_roots: - packages/google-cloud-apigee-connect preserve_regex: @@ -407,9 +408,10 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-apigee-registry version: 0.6.18 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/apigeeregistry/v1 + service_config: apigeeregistry_v1.yaml source_roots: - packages/google-cloud-apigee-registry preserve_regex: @@ -425,9 +427,10 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-appengine-admin version: 1.14.2 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/appengine/v1 + service_config: appengine_v1.yaml source_roots: - packages/google-cloud-appengine-admin preserve_regex: @@ -443,9 +446,10 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-appengine-logging version: 1.6.2 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/appengine/logging/v1 + service_config: "" source_roots: - packages/google-cloud-appengine-logging preserve_regex: @@ -462,9 +466,10 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-apphub version: 0.1.10 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/apphub/v1 + service_config: apphub_v1.yaml source_roots: - packages/google-cloud-apphub preserve_regex: @@ -480,10 +485,12 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-artifact-registry version: 1.16.1 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/devtools/artifactregistry/v1 + service_config: artifactregistry_v1.yaml - path: google/devtools/artifactregistry/v1beta2 + service_config: artifactregistry_v1beta2.yaml source_roots: - packages/google-cloud-artifact-registry preserve_regex: @@ -499,10 +506,12 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-automl version: 2.16.4 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/automl/v1beta1 + service_config: automl_v1beta1.yaml - path: google/cloud/automl/v1 + service_config: automl_v1.yaml source_roots: - packages/google-cloud-automl preserve_regex: @@ -523,9 +532,10 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-backupdr version: 0.2.5 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/backupdr/v1 + service_config: backupdr_v1.yaml source_roots: - packages/google-cloud-backupdr preserve_regex: @@ -541,9 +551,10 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-bare-metal-solution version: 1.10.3 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/baremetalsolution/v2 + service_config: baremetalsolution_v2.yaml source_roots: - packages/google-cloud-bare-metal-solution preserve_regex: @@ -559,10 +570,12 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-batch version: 0.17.37 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/batch/v1alpha + service_config: batch_v1alpha.yaml - path: google/cloud/batch/v1 + service_config: batch_v1.yaml source_roots: - packages/google-cloud-batch preserve_regex: @@ -578,10 +591,12 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-support version: 0.1.19 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/support/v2beta + service_config: cloudsupport_v2beta.yaml - path: google/cloud/support/v2 + service_config: cloudsupport_v2.yaml source_roots: - packages/google-cloud-support preserve_regex: @@ -597,10 +612,12 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-talent version: 2.17.2 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/talent/v4beta1 + service_config: jobs_v4beta1.yaml - path: google/cloud/talent/v4 + service_config: jobs_v4.yaml source_roots: - packages/google-cloud-talent preserve_regex: @@ -616,11 +633,14 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-tpu version: 1.23.2 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/tpu/v2alpha1 + service_config: tpu_v2alpha1.yaml - path: google/cloud/tpu/v2 + service_config: tpu_v2.yaml - path: google/cloud/tpu/v1 + service_config: tpu_v1.yaml source_roots: - packages/google-cloud-tpu preserve_regex: @@ -636,9 +656,10 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-video-transcoder version: 1.17.0 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/video/transcoder/v1 + service_config: transcoder_v1.yaml source_roots: - packages/google-cloud-video-transcoder preserve_regex: @@ -654,10 +675,12 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-visionai version: 0.1.10 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/visionai/v1alpha1 + service_config: visionai_v1alpha1.yaml - path: google/cloud/visionai/v1 + service_config: visionai_v1.yaml source_roots: - packages/google-cloud-visionai preserve_regex: @@ -673,9 +696,10 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-vm-migration version: 1.12.0 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/vmmigration/v1 + service_config: vmmigration_v1.yaml source_roots: - packages/google-cloud-vm-migration preserve_regex: @@ -691,9 +715,10 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-vmwareengine version: 1.8.3 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/vmwareengine/v1 + service_config: vmwareengine_v1.yaml source_roots: - packages/google-cloud-vmwareengine preserve_regex: @@ -709,9 +734,10 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-vpc-access version: 1.13.2 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/vpcaccess/v1 + service_config: vpcaccess_v1.yaml source_roots: - packages/google-cloud-vpc-access preserve_regex: @@ -727,11 +753,14 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-websecurityscanner version: 1.17.3 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/websecurityscanner/v1alpha + service_config: websecurityscanner_v1alpha.yaml - path: google/cloud/websecurityscanner/v1beta + service_config: websecurityscanner_v1beta.yaml - path: google/cloud/websecurityscanner/v1 + service_config: websecurityscanner_v1.yaml source_roots: - packages/google-cloud-websecurityscanner preserve_regex: @@ -747,10 +776,12 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-workstations version: 0.5.15 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/workstations/v1beta + service_config: workstations_v1beta.yaml - path: google/cloud/workstations/v1 + service_config: workstations_v1.yaml source_roots: - packages/google-cloud-workstations preserve_regex: @@ -766,9 +797,10 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-apihub version: 0.2.7 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/apihub/v1 + service_config: apihub_v1.yaml source_roots: - packages/google-cloud-apihub preserve_regex: @@ -784,12 +816,16 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-asset version: 3.30.1 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/asset/v1p5beta1 + service_config: cloudasset_v1p5beta1.yaml - path: google/cloud/asset/v1 + service_config: cloudasset_v1.yaml - path: google/cloud/asset/v1p1beta1 + service_config: cloudasset_v1p1beta1.yaml - path: google/cloud/asset/v1p2beta1 + service_config: cloudasset_v1p2beta1.yaml source_roots: - packages/google-cloud-asset preserve_regex: @@ -805,10 +841,12 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-assured-workloads version: 1.15.2 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/assuredworkloads/v1 + service_config: assuredworkloads_v1.yaml - path: google/cloud/assuredworkloads/v1beta1 + service_config: assuredworkloads_v1beta1.yaml source_roots: - packages/google-cloud-assured-workloads preserve_regex: @@ -824,9 +862,10 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-beyondcorp-appconnections version: 0.4.18 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/beyondcorp/appconnections/v1 + service_config: beyondcorp_v1.yaml source_roots: - packages/google-cloud-beyondcorp-appconnections preserve_regex: @@ -842,9 +881,10 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-beyondcorp-appconnectors version: 0.4.18 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/beyondcorp/appconnectors/v1 + service_config: beyondcorp_v1.yaml source_roots: - packages/google-cloud-beyondcorp-appconnectors preserve_regex: @@ -860,9 +900,10 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-beyondcorp-appgateways version: 0.4.18 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/beyondcorp/appgateways/v1 + service_config: beyondcorp_v1.yaml source_roots: - packages/google-cloud-beyondcorp-appgateways preserve_regex: @@ -878,9 +919,10 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-beyondcorp-clientconnectorservices version: 0.4.18 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/beyondcorp/clientconnectorservices/v1 + service_config: beyondcorp_v1.yaml source_roots: - packages/google-cloud-beyondcorp-clientconnectorservices preserve_regex: @@ -896,9 +938,10 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-beyondcorp-clientgateways version: 0.4.17 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/beyondcorp/clientgateways/v1 + service_config: beyondcorp_v1.yaml source_roots: - packages/google-cloud-beyondcorp-clientgateways preserve_regex: @@ -914,9 +957,10 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-biglake version: 0.1.0 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/biglake/v1 + service_config: biglake_v1.yaml source_roots: - packages/google-cloud-biglake preserve_regex: @@ -932,9 +976,10 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-bigquery-analyticshub version: 0.4.20 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/bigquery/analyticshub/v1 + service_config: analyticshub_v1.yaml source_roots: - packages/google-cloud-bigquery-analyticshub preserve_regex: @@ -950,7 +995,7 @@ libraries: tag_format: '{id}-v{version}' - id: googleapis-common-protos version: 1.70.0 - last_generated_commit: 31b413bc4feb03f6849c718048c2b9998561b5fa + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/api service_config: serviceconfig.yaml @@ -972,9 +1017,10 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-storagebatchoperations version: 0.1.3 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/storagebatchoperations/v1 + service_config: storagebatchoperations_v1.yaml source_roots: - packages/google-cloud-storagebatchoperations preserve_regex: @@ -990,9 +1036,10 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-storageinsights version: 0.1.16 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/storageinsights/v1 + service_config: storageinsights_v1.yaml source_roots: - packages/google-cloud-storageinsights preserve_regex: @@ -1008,11 +1055,14 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-tasks version: 2.19.3 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/tasks/v2beta2 + service_config: cloudtasks_v2beta2.yaml - path: google/cloud/tasks/v2beta3 + service_config: cloudtasks_v2beta3.yaml - path: google/cloud/tasks/v2 + service_config: cloudtasks_v2.yaml source_roots: - packages/google-cloud-tasks preserve_regex: @@ -1029,10 +1079,12 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-telcoautomation version: 0.2.11 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/telcoautomation/v1 + service_config: telcoautomation_v1.yaml - path: google/cloud/telcoautomation/v1alpha1 + service_config: telcoautomation_v1alpha1.yaml source_roots: - packages/google-cloud-telcoautomation preserve_regex: @@ -1049,10 +1101,12 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-texttospeech version: 2.31.0 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/texttospeech/v1 + service_config: texttospeech_v1.yaml - path: google/cloud/texttospeech/v1beta1 + service_config: texttospeech_v1beta1.yaml source_roots: - packages/google-cloud-texttospeech preserve_regex: @@ -1068,10 +1122,12 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-trace version: 1.16.2 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/devtools/cloudtrace/v2 + service_config: cloudtrace_v2.yaml - path: google/devtools/cloudtrace/v1 + service_config: cloudtrace_v1.yaml source_roots: - packages/google-cloud-trace preserve_regex: @@ -1087,13 +1143,18 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-videointelligence version: 2.16.2 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/videointelligence/v1p3beta1 + service_config: videointelligence_v1p3beta1.yaml - path: google/cloud/videointelligence/v1 + service_config: videointelligence_v1.yaml - path: google/cloud/videointelligence/v1p2beta1 + service_config: videointelligence_v1p2beta1.yaml - path: google/cloud/videointelligence/v1p1beta1 + service_config: videointelligence_v1p1beta1.yaml - path: google/cloud/videointelligence/v1beta2 + service_config: videointelligence_v1beta2.yaml source_roots: - packages/google-cloud-videointelligence preserve_regex: @@ -1109,13 +1170,18 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-vision version: 3.10.2 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/vision/v1p3beta1 + service_config: vision_v1p3beta1.yaml - path: google/cloud/vision/v1 + service_config: vision_v1.yaml - path: google/cloud/vision/v1p1beta1 + service_config: vision_v1p1beta1.yaml - path: google/cloud/vision/v1p2beta1 + service_config: vision_v1p2beta1.yaml - path: google/cloud/vision/v1p4beta1 + service_config: vision_v1p4beta1.yaml source_roots: - packages/google-cloud-vision preserve_regex: @@ -1134,10 +1200,12 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-webrisk version: 1.18.1 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/webrisk/v1beta1 + service_config: webrisk_v1beta1.yaml - path: google/cloud/webrisk/v1 + service_config: webrisk_v1.yaml source_roots: - packages/google-cloud-webrisk preserve_regex: @@ -1153,7 +1221,7 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-access-context-manager version: 0.2.2 - last_generated_commit: 329ace5e3712a2e37d6159d4dcd998d8c73f261e + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/identity/accesscontextmanager/v1 service_config: accesscontextmanager_v1.yaml @@ -1167,9 +1235,10 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-audit-log version: 0.3.2 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/audit + service_config: cloudaudit.yaml source_roots: - packages/google-cloud-audit-log preserve_regex: [] @@ -1178,10 +1247,12 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-bigquery-biglake version: 0.4.15 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/bigquery/biglake/v1alpha1 + service_config: biglake_v1alpha1.yaml - path: google/cloud/bigquery/biglake/v1 + service_config: biglake_v1.yaml source_roots: - packages/google-cloud-bigquery-biglake preserve_regex: @@ -1197,9 +1268,10 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-bigquery-connection version: 1.18.3 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/bigquery/connection/v1 + service_config: bigqueryconnection_v1.yaml source_roots: - packages/google-cloud-bigquery-connection preserve_regex: @@ -1215,9 +1287,10 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-bigquery-data-exchange version: 0.5.20 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/bigquery/dataexchange/v1beta1 + service_config: analyticshub_v1beta1.yaml source_roots: - packages/google-cloud-bigquery-data-exchange preserve_regex: @@ -1233,12 +1306,16 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-bigquery-datapolicies version: 0.6.16 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/bigquery/datapolicies/v2beta1 + service_config: bigquerydatapolicy_v2beta1.yaml - path: google/cloud/bigquery/datapolicies/v2 + service_config: bigquerydatapolicy_v2.yaml - path: google/cloud/bigquery/datapolicies/v1beta1 + service_config: bigquerydatapolicy_v1beta1.yaml - path: google/cloud/bigquery/datapolicies/v1 + service_config: bigquerydatapolicy_v1.yaml source_roots: - packages/google-cloud-bigquery-datapolicies preserve_regex: @@ -1254,9 +1331,10 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-bigquery-datatransfer version: 3.19.2 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/bigquery/datatransfer/v1 + service_config: bigquerydatatransfer_v1.yaml source_roots: - packages/google-cloud-bigquery-datatransfer preserve_regex: @@ -1272,9 +1350,10 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-bigquery-logging version: 1.6.3 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/bigquery/logging/v1 + service_config: "" source_roots: - packages/google-cloud-bigquery-logging preserve_regex: @@ -1291,10 +1370,12 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-bigquery-migration version: 0.11.15 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/bigquery/migration/v2alpha + service_config: bigquerymigration_v2alpha.yaml - path: google/cloud/bigquery/migration/v2 + service_config: bigquerymigration_v2.yaml source_roots: - packages/google-cloud-bigquery-migration preserve_regex: @@ -1310,9 +1391,10 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-bigquery-reservation version: 1.19.0 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/bigquery/reservation/v1 + service_config: bigqueryreservation_v1.yaml source_roots: - packages/google-cloud-bigquery-reservation preserve_regex: @@ -1328,9 +1410,10 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-billing version: 1.16.3 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/billing/v1 + service_config: cloudbilling_v1.yaml source_roots: - packages/google-cloud-billing preserve_regex: @@ -1346,10 +1429,12 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-billing-budgets version: 1.17.2 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/billing/budgets/v1 + service_config: billingbudgets.yaml - path: google/cloud/billing/budgets/v1beta1 + service_config: billingbudgets.yaml source_roots: - packages/google-cloud-billing-budgets preserve_regex: @@ -1365,7 +1450,7 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-translate version: 3.21.1 - last_generated_commit: eab82ec804dfd76372ca369910ccd0766ee02e5c + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/translate/v3beta1 service_config: translate_v3beta1.yaml @@ -1390,10 +1475,12 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-binary-authorization version: 1.13.2 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/binaryauthorization/v1 + service_config: binaryauthorization_v1.yaml - path: google/cloud/binaryauthorization/v1beta1 + service_config: binaryauthorization_v1beta1.yaml source_roots: - packages/google-cloud-binary-authorization preserve_regex: @@ -1409,10 +1496,12 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-build version: 3.32.0 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/devtools/cloudbuild/v1 + service_config: cloudbuild_v1.yaml - path: google/devtools/cloudbuild/v2 + service_config: cloudbuild_v2.yaml source_roots: - packages/google-cloud-build preserve_regex: @@ -1428,9 +1517,10 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-capacityplanner version: 0.1.0 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/capacityplanner/v1beta + service_config: capacityplanner_v1beta.yaml source_roots: - packages/google-cloud-capacityplanner preserve_regex: @@ -1446,9 +1536,10 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-certificate-manager version: 1.10.2 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/certificatemanager/v1 + service_config: certificatemanager_v1.yaml source_roots: - packages/google-cloud-certificate-manager preserve_regex: @@ -1464,9 +1555,10 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-channel version: 1.23.0 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/channel/v1 + service_config: cloudchannel_v1.yaml source_roots: - packages/google-cloud-channel preserve_regex: @@ -1482,9 +1574,10 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-chronicle version: 0.1.0 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/chronicle/v1 + service_config: chronicle_v1.yaml source_roots: - packages/google-cloud-chronicle preserve_regex: @@ -1500,10 +1593,12 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-cloudcontrolspartner version: 0.2.7 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/cloudcontrolspartner/v1beta + service_config: cloudcontrolspartner_v1beta.yaml - path: google/cloud/cloudcontrolspartner/v1 + service_config: cloudcontrolspartner_v1.yaml source_roots: - packages/google-cloud-cloudcontrolspartner preserve_regex: @@ -1519,9 +1614,10 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-cloudsecuritycompliance version: 0.2.0 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/cloudsecuritycompliance/v1 + service_config: cloudsecuritycompliance_v1.yaml source_roots: - packages/google-cloud-cloudsecuritycompliance preserve_regex: @@ -1537,10 +1633,12 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-commerce-consumer-procurement version: 0.2.0 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/commerce/consumer/procurement/v1 + service_config: cloudcommerceconsumerprocurement_v1.yaml - path: google/cloud/commerce/consumer/procurement/v1alpha1 + service_config: cloudcommerceconsumerprocurement_v1alpha1.yaml source_roots: - packages/google-cloud-commerce-consumer-procurement preserve_regex: @@ -1556,9 +1654,10 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-common version: 1.5.2 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/common + service_config: common.yaml source_roots: - packages/google-cloud-common preserve_regex: @@ -1575,9 +1674,10 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-compute version: 1.38.0 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/compute/v1 + service_config: compute_v1.yaml source_roots: - packages/google-cloud-compute preserve_regex: @@ -1593,9 +1693,10 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-compute-v1beta version: 0.1.8 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/compute/v1beta + service_config: compute_v1beta.yaml source_roots: - packages/google-cloud-compute-v1beta preserve_regex: @@ -1611,9 +1712,10 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-confidentialcomputing version: 0.5.0 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/confidentialcomputing/v1 + service_config: confidentialcomputing_v1.yaml source_roots: - packages/google-cloud-confidentialcomputing preserve_regex: @@ -1629,9 +1731,10 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-config version: 0.1.21 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/config/v1 + service_config: config_v1.yaml source_roots: - packages/google-cloud-config preserve_regex: @@ -1647,11 +1750,14 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-configdelivery version: 0.1.3 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/configdelivery/v1beta + service_config: configdelivery_v1beta.yaml - path: google/cloud/configdelivery/v1alpha + service_config: configdelivery_v1alpha.yaml - path: google/cloud/configdelivery/v1 + service_config: configdelivery_v1.yaml source_roots: - packages/google-cloud-configdelivery preserve_regex: @@ -1667,9 +1773,10 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-contact-center-insights version: 1.23.3 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/contactcenterinsights/v1 + service_config: contactcenterinsights_v1.yaml source_roots: - packages/google-cloud-contact-center-insights preserve_regex: @@ -1685,10 +1792,12 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-container version: 2.59.0 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/container/v1 + service_config: container_v1.yaml - path: google/container/v1beta1 + service_config: container_v1beta1.yaml source_roots: - packages/google-cloud-container preserve_regex: @@ -1704,9 +1813,10 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-containeranalysis version: 2.18.1 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/devtools/containeranalysis/v1 + service_config: containeranalysis_v1.yaml source_roots: - packages/google-cloud-containeranalysis preserve_regex: @@ -1723,9 +1833,10 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-contentwarehouse version: 0.7.16 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/contentwarehouse/v1 + service_config: contentwarehouse_v1.yaml source_roots: - packages/google-cloud-contentwarehouse preserve_regex: @@ -1741,9 +1852,10 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-data-fusion version: 1.13.3 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/datafusion/v1 + service_config: datafusion_v1.yaml source_roots: - packages/google-cloud-data-fusion preserve_regex: @@ -1759,12 +1871,16 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-workflows version: 1.18.2 - last_generated_commit: d300b151a973ce0425ae4ad07b3de957ca31bec6 + last_generated_commit: 873119040f20c4c877d85456740079601b98d85d apis: - path: google/cloud/workflows/executions/v1 + service_config: workflowexecutions_v1.yaml - path: google/cloud/workflows/executions/v1beta + service_config: workflowexecutions_v1beta.yaml - path: google/cloud/workflows/v1 + service_config: workflows_v1.yaml - path: google/cloud/workflows/v1beta + service_config: workflows_v1beta.yaml source_roots: - packages/google-cloud-workflows preserve_regex: diff --git a/packages/google-ads-admanager/.repo-metadata.json b/packages/google-ads-admanager/.repo-metadata.json index 7453541f965b..50b4fd853043 100644 --- a/packages/google-ads-admanager/.repo-metadata.json +++ b/packages/google-ads-admanager/.repo-metadata.json @@ -13,4 +13,4 @@ "api_id": "admanager.googleapis.com", "default_version": "v1", "api_shortname": "admanager" -} +} \ No newline at end of file diff --git a/packages/google-ads-admanager/noxfile.py b/packages/google-ads-admanager/noxfile.py index 1d138ec515ce..731b2bb7bae6 100644 --- a/packages/google-ads-admanager/noxfile.py +++ b/packages/google-ads-admanager/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-ads-admanager/testing/constraints-3.14.txt b/packages/google-ads-admanager/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-ads-admanager/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-ads-marketingplatform-admin/.repo-metadata.json b/packages/google-ads-marketingplatform-admin/.repo-metadata.json index d10f90aff31c..43e0ec21bcf3 100644 --- a/packages/google-ads-marketingplatform-admin/.repo-metadata.json +++ b/packages/google-ads-marketingplatform-admin/.repo-metadata.json @@ -13,4 +13,4 @@ "api_id": "marketingplatformadmin.googleapis.com", "default_version": "v1alpha", "api_shortname": "marketingplatformadmin" -} +} \ No newline at end of file diff --git a/packages/google-ads-marketingplatform-admin/noxfile.py b/packages/google-ads-marketingplatform-admin/noxfile.py index 1a66e536b845..79b8099a0f57 100644 --- a/packages/google-ads-marketingplatform-admin/noxfile.py +++ b/packages/google-ads-marketingplatform-admin/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-ads-marketingplatform-admin/testing/constraints-3.14.txt b/packages/google-ads-marketingplatform-admin/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-ads-marketingplatform-admin/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-ai-generativelanguage/.repo-metadata.json b/packages/google-ai-generativelanguage/.repo-metadata.json index d9ac881572d0..2e20cadaad7f 100644 --- a/packages/google-ai-generativelanguage/.repo-metadata.json +++ b/packages/google-ai-generativelanguage/.repo-metadata.json @@ -13,4 +13,4 @@ "api_id": "generativelanguage.googleapis.com", "default_version": "v1beta", "api_shortname": "generativelanguage" -} +} \ No newline at end of file diff --git a/packages/google-ai-generativelanguage/noxfile.py b/packages/google-ai-generativelanguage/noxfile.py index e3c2729a479a..93820e99abd3 100644 --- a/packages/google-ai-generativelanguage/noxfile.py +++ b/packages/google-ai-generativelanguage/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-ai-generativelanguage/testing/constraints-3.14.txt b/packages/google-ai-generativelanguage/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-ai-generativelanguage/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-analytics-admin/.repo-metadata.json b/packages/google-analytics-admin/.repo-metadata.json index c39d26d03d00..5c2ea930199b 100644 --- a/packages/google-analytics-admin/.repo-metadata.json +++ b/packages/google-analytics-admin/.repo-metadata.json @@ -13,4 +13,4 @@ "default_version": "v1alpha", "api_shortname": "analyticsadmin", "api_description": "allows you to manage Google Analytics accounts and properties." -} +} \ No newline at end of file diff --git a/packages/google-analytics-admin/noxfile.py b/packages/google-analytics-admin/noxfile.py index 8edafd662438..facd555f17ce 100644 --- a/packages/google-analytics-admin/noxfile.py +++ b/packages/google-analytics-admin/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-analytics-admin/testing/constraints-3.14.txt b/packages/google-analytics-admin/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-analytics-admin/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-analytics-data/noxfile.py b/packages/google-analytics-data/noxfile.py index c3570ae7a66b..893557defdf6 100644 --- a/packages/google-analytics-data/noxfile.py +++ b/packages/google-analytics-data/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-analytics-data/testing/constraints-3.14.txt b/packages/google-analytics-data/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-analytics-data/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-apps-card/.repo-metadata.json b/packages/google-apps-card/.repo-metadata.json index 1e80f8ce7e2b..94dee361f53d 100644 --- a/packages/google-apps-card/.repo-metadata.json +++ b/packages/google-apps-card/.repo-metadata.json @@ -13,4 +13,4 @@ "api_id": "card.googleapis.com", "default_version": "v1", "api_shortname": "card" -} +} \ No newline at end of file diff --git a/packages/google-apps-card/noxfile.py b/packages/google-apps-card/noxfile.py index f1707a314a9e..8d49b65c1f12 100644 --- a/packages/google-apps-card/noxfile.py +++ b/packages/google-apps-card/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-apps-card/testing/constraints-3.14.txt b/packages/google-apps-card/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-apps-card/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-apps-chat/noxfile.py b/packages/google-apps-chat/noxfile.py index 12fab3af7582..92674d1f13a1 100644 --- a/packages/google-apps-chat/noxfile.py +++ b/packages/google-apps-chat/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-apps-chat/testing/constraints-3.14.txt b/packages/google-apps-chat/testing/constraints-3.14.txt new file mode 100644 index 000000000000..a9c6828926b9 --- /dev/null +++ b/packages/google-apps-chat/testing/constraints-3.14.txt @@ -0,0 +1,12 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 +google-apps-card>=0 diff --git a/packages/google-apps-events-subscriptions/noxfile.py b/packages/google-apps-events-subscriptions/noxfile.py index 32500d06d49b..e457bfb3ff94 100644 --- a/packages/google-apps-events-subscriptions/noxfile.py +++ b/packages/google-apps-events-subscriptions/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-apps-events-subscriptions/testing/constraints-3.14.txt b/packages/google-apps-events-subscriptions/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-apps-events-subscriptions/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-apps-meet/noxfile.py b/packages/google-apps-meet/noxfile.py index 861d58ec4928..0cbb0f83e90c 100644 --- a/packages/google-apps-meet/noxfile.py +++ b/packages/google-apps-meet/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-apps-meet/testing/constraints-3.14.txt b/packages/google-apps-meet/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-apps-meet/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-area120-tables/noxfile.py b/packages/google-area120-tables/noxfile.py index d701797b9af9..7853df3fac98 100644 --- a/packages/google-area120-tables/noxfile.py +++ b/packages/google-area120-tables/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-area120-tables/testing/constraints-3.14.txt b/packages/google-area120-tables/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-area120-tables/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-cloud-access-approval/noxfile.py b/packages/google-cloud-access-approval/noxfile.py index abead2a366a3..d711a34f9373 100644 --- a/packages/google-cloud-access-approval/noxfile.py +++ b/packages/google-cloud-access-approval/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-access-approval/testing/constraints-3.14.txt b/packages/google-cloud-access-approval/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-cloud-access-approval/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-cloud-access-context-manager/README.rst b/packages/google-cloud-access-context-manager/README.rst index beca9e68fdc2..6587f523d8f0 100644 --- a/packages/google-cloud-access-context-manager/README.rst +++ b/packages/google-cloud-access-context-manager/README.rst @@ -26,12 +26,12 @@ In order to use this library, you first need to go through the following steps: 1. `Select or create a Cloud Platform project.`_ 2. `Enable billing for your project.`_ 3. `Enable the Access Context Manager.`_ -4. `Setup Authentication.`_ +4. `Set up Authentication.`_ .. _Select or create a Cloud Platform project.: https://console.cloud.google.com/project .. _Enable billing for your project.: https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project .. _Enable the Access Context Manager.: https://cloud.google.com/access-context-manager/docs/overview -.. _Setup Authentication.: https://googleapis.dev/python/google-api-core/latest/auth.html +.. _Set up Authentication.: https://googleapis.dev/python/google-api-core/latest/auth.html Installation ~~~~~~~~~~~~ @@ -106,3 +106,92 @@ Next Steps .. _Access Context Manager Product documentation: https://cloud.google.com/access-context-manager/docs/overview .. _README: https://github.com/googleapis/google-cloud-python/blob/main/README.rst + +Logging +------- + +This library uses the standard Python :code:`logging` functionality to log some RPC events that could be of interest for debugging and monitoring purposes. +Note the following: + +#. Logs may contain sensitive information. Take care to **restrict access to the logs** if they are saved, whether it be on local storage or on Google Cloud Logging. +#. Google may refine the occurrence, level, and content of various log messages in this library without flagging such changes as breaking. **Do not depend on immutability of the logging events**. +#. By default, the logging events from this library are not handled. You must **explicitly configure log handling** using one of the mechanisms below. + +Simple, environment-based configuration +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +To enable logging for this library without any changes in your code, set the :code:`GOOGLE_SDK_PYTHON_LOGGING_SCOPE` environment variable to a valid Google +logging scope. This configures handling of logging events (at level :code:`logging.DEBUG` or higher) from this library in a default manner, emitting the logged +messages in a structured format. It does not currently allow customizing the logging levels captured nor the handlers, formatters, etc. used for any logging +event. + +A logging scope is a period-separated namespace that begins with :code:`google`, identifying the Python module or package to log. + +- Valid logging scopes: :code:`google`, :code:`google.cloud.asset.v1`, :code:`google.api`, :code:`google.auth`, etc. +- Invalid logging scopes: :code:`foo`, :code:`123`, etc. + +**NOTE**: If the logging scope is invalid, the library does not set up any logging handlers. + +Environment-Based Examples +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- Enabling the default handler for all Google-based loggers + +.. code-block:: console + + export GOOGLE_SDK_PYTHON_LOGGING_SCOPE=google + +- Enabling the default handler for a specific Google module (for a client library called :code:`library_v1`): + +.. code-block:: console + + export GOOGLE_SDK_PYTHON_LOGGING_SCOPE=google.cloud.library_v1 + + +Advanced, code-based configuration +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also configure a valid logging scope using Python's standard `logging` mechanism. + +Code-Based Examples +^^^^^^^^^^^^^^^^^^^ + +- Configuring a handler for all Google-based loggers + +.. code-block:: python + + import logging + + from google.cloud import library_v1 + + base_logger = logging.getLogger("google") + base_logger.addHandler(logging.StreamHandler()) + base_logger.setLevel(logging.DEBUG) + +- Configuring a handler for a specific Google module (for a client library called :code:`library_v1`): + +.. code-block:: python + + import logging + + from google.cloud import library_v1 + + base_logger = logging.getLogger("google.cloud.library_v1") + base_logger.addHandler(logging.StreamHandler()) + base_logger.setLevel(logging.DEBUG) + +Logging details +~~~~~~~~~~~~~~~ + +#. Regardless of which of the mechanisms above you use to configure logging for this library, by default logging events are not propagated up to the root + logger from the `google`-level logger. If you need the events to be propagated to the root logger, you must explicitly set + :code:`logging.getLogger("google").propagate = True` in your code. +#. You can mix the different logging configurations above for different Google modules. For example, you may want use a code-based logging configuration for + one library, but decide you need to also set up environment-based logging configuration for another library. + + #. If you attempt to use both code-based and environment-based configuration for the same module, the environment-based configuration will be ineffectual + if the code -based configuration gets applied first. + +#. The Google-specific logging configurations (default handlers for environment-based configuration; not propagating logging events to the root logger) get + executed the first time *any* client library is instantiated in your application, and only if the affected loggers have not been previously configured. + (This is the reason for 2.i. above.) diff --git a/packages/google-cloud-advisorynotifications/noxfile.py b/packages/google-cloud-advisorynotifications/noxfile.py index cf2047deeaaa..fdd4e61ebdb8 100644 --- a/packages/google-cloud-advisorynotifications/noxfile.py +++ b/packages/google-cloud-advisorynotifications/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-advisorynotifications/testing/constraints-3.14.txt b/packages/google-cloud-advisorynotifications/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-cloud-advisorynotifications/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-cloud-alloydb-connectors/.repo-metadata.json b/packages/google-cloud-alloydb-connectors/.repo-metadata.json index e3177f475f41..ee7eaa4fcd6b 100644 --- a/packages/google-cloud-alloydb-connectors/.repo-metadata.json +++ b/packages/google-cloud-alloydb-connectors/.repo-metadata.json @@ -13,4 +13,4 @@ "api_id": "connectors.googleapis.com", "default_version": "v1", "api_shortname": "connectors" -} +} \ No newline at end of file diff --git a/packages/google-cloud-alloydb-connectors/noxfile.py b/packages/google-cloud-alloydb-connectors/noxfile.py index 4860b4ff014b..2bae6e7dac0c 100644 --- a/packages/google-cloud-alloydb-connectors/noxfile.py +++ b/packages/google-cloud-alloydb-connectors/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-alloydb-connectors/testing/constraints-3.14.txt b/packages/google-cloud-alloydb-connectors/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-cloud-alloydb-connectors/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-cloud-alloydb/google/cloud/alloydb_v1/services/alloy_db_admin/async_client.py b/packages/google-cloud-alloydb/google/cloud/alloydb_v1/services/alloy_db_admin/async_client.py index 6cbd57878a89..dddd8e9b95d1 100644 --- a/packages/google-cloud-alloydb/google/cloud/alloydb_v1/services/alloy_db_admin/async_client.py +++ b/packages/google-cloud-alloydb/google/cloud/alloydb_v1/services/alloy_db_admin/async_client.py @@ -91,6 +91,8 @@ class AlloyDBAdminAsyncClient: parse_connection_info_path = staticmethod( AlloyDBAdminClient.parse_connection_info_path ) + crypto_key_path = staticmethod(AlloyDBAdminClient.crypto_key_path) + parse_crypto_key_path = staticmethod(AlloyDBAdminClient.parse_crypto_key_path) crypto_key_version_path = staticmethod(AlloyDBAdminClient.crypto_key_version_path) parse_crypto_key_version_path = staticmethod( AlloyDBAdminClient.parse_crypto_key_version_path @@ -101,6 +103,10 @@ class AlloyDBAdminAsyncClient: parse_instance_path = staticmethod(AlloyDBAdminClient.parse_instance_path) network_path = staticmethod(AlloyDBAdminClient.network_path) parse_network_path = staticmethod(AlloyDBAdminClient.parse_network_path) + service_attachment_path = staticmethod(AlloyDBAdminClient.service_attachment_path) + parse_service_attachment_path = staticmethod( + AlloyDBAdminClient.parse_service_attachment_path + ) supported_database_flag_path = staticmethod( AlloyDBAdminClient.supported_database_flag_path ) @@ -1243,7 +1249,7 @@ async def sample_upgrade_cluster(): # Initialize request argument(s) request = alloydb_v1.UpgradeClusterRequest( name="name_value", - version="POSTGRES_16", + version="POSTGRES_17", ) # Make the request @@ -5142,8 +5148,7 @@ async def sample_list_databases(): Args: request (Optional[Union[google.cloud.alloydb_v1.types.ListDatabasesRequest, dict]]): - The request object. Message for requesting list of - Databases. + The request object. Message for ListDatabases request. parent (:class:`str`): Required. Parent value for ListDatabasesRequest. @@ -5161,8 +5166,8 @@ async def sample_list_databases(): Returns: google.cloud.alloydb_v1.services.alloy_db_admin.pagers.ListDatabasesAsyncPager: - Message for response to listing - Databases. + Message for ListDatabases response. + Iterating over this object will yield results and resolve additional pages automatically. diff --git a/packages/google-cloud-alloydb/google/cloud/alloydb_v1/services/alloy_db_admin/client.py b/packages/google-cloud-alloydb/google/cloud/alloydb_v1/services/alloy_db_admin/client.py index db78adc65fcd..ed729794d70c 100644 --- a/packages/google-cloud-alloydb/google/cloud/alloydb_v1/services/alloy_db_admin/client.py +++ b/packages/google-cloud-alloydb/google/cloud/alloydb_v1/services/alloy_db_admin/client.py @@ -272,6 +272,30 @@ def parse_connection_info_path(path: str) -> Dict[str, str]: ) return m.groupdict() if m else {} + @staticmethod + def crypto_key_path( + project: str, + location: str, + key_ring: str, + crypto_key: str, + ) -> str: + """Returns a fully-qualified crypto_key string.""" + return "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}".format( + project=project, + location=location, + key_ring=key_ring, + crypto_key=crypto_key, + ) + + @staticmethod + def parse_crypto_key_path(path: str) -> Dict[str, str]: + """Parses a crypto_key path into its component segments.""" + m = re.match( + r"^projects/(?P.+?)/locations/(?P.+?)/keyRings/(?P.+?)/cryptoKeys/(?P.+?)$", + path, + ) + return m.groupdict() if m else {} + @staticmethod def crypto_key_version_path( project: str, @@ -365,6 +389,28 @@ def parse_network_path(path: str) -> Dict[str, str]: ) return m.groupdict() if m else {} + @staticmethod + def service_attachment_path( + project: str, + region: str, + service_attachment: str, + ) -> str: + """Returns a fully-qualified service_attachment string.""" + return "projects/{project}/regions/{region}/serviceAttachments/{service_attachment}".format( + project=project, + region=region, + service_attachment=service_attachment, + ) + + @staticmethod + def parse_service_attachment_path(path: str) -> Dict[str, str]: + """Parses a service_attachment path into its component segments.""" + m = re.match( + r"^projects/(?P.+?)/regions/(?P.+?)/serviceAttachments/(?P.+?)$", + path, + ) + return m.groupdict() if m else {} + @staticmethod def supported_database_flag_path( project: str, @@ -1808,7 +1854,7 @@ def sample_upgrade_cluster(): # Initialize request argument(s) request = alloydb_v1.UpgradeClusterRequest( name="name_value", - version="POSTGRES_16", + version="POSTGRES_17", ) # Make the request @@ -5627,8 +5673,7 @@ def sample_list_databases(): Args: request (Union[google.cloud.alloydb_v1.types.ListDatabasesRequest, dict]): - The request object. Message for requesting list of - Databases. + The request object. Message for ListDatabases request. parent (str): Required. Parent value for ListDatabasesRequest. @@ -5646,8 +5691,8 @@ def sample_list_databases(): Returns: google.cloud.alloydb_v1.services.alloy_db_admin.pagers.ListDatabasesPager: - Message for response to listing - Databases. + Message for ListDatabases response. + Iterating over this object will yield results and resolve additional pages automatically. diff --git a/packages/google-cloud-alloydb/google/cloud/alloydb_v1/services/alloy_db_admin/transports/rest.py b/packages/google-cloud-alloydb/google/cloud/alloydb_v1/services/alloy_db_admin/transports/rest.py index b7e3da27a774..ba5276f9572b 100644 --- a/packages/google-cloud-alloydb/google/cloud/alloydb_v1/services/alloy_db_admin/transports/rest.py +++ b/packages/google-cloud-alloydb/google/cloud/alloydb_v1/services/alloy_db_admin/transports/rest.py @@ -5985,8 +5985,7 @@ def __call__( Args: request (~.service.ListDatabasesRequest): - The request object. Message for requesting list of - Databases. + The request object. Message for ListDatabases request. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -5997,9 +5996,7 @@ def __call__( Returns: ~.service.ListDatabasesResponse: - Message for response to listing - Databases. - + Message for ListDatabases response. """ http_options = ( diff --git a/packages/google-cloud-alloydb/google/cloud/alloydb_v1/services/alloy_dbcsql_admin/async_client.py b/packages/google-cloud-alloydb/google/cloud/alloydb_v1/services/alloy_dbcsql_admin/async_client.py index ce04112e1a4e..6ba3260e8da6 100644 --- a/packages/google-cloud-alloydb/google/cloud/alloydb_v1/services/alloy_dbcsql_admin/async_client.py +++ b/packages/google-cloud-alloydb/google/cloud/alloydb_v1/services/alloy_dbcsql_admin/async_client.py @@ -83,6 +83,8 @@ class AlloyDBCSQLAdminAsyncClient: parse_backup_path = staticmethod(AlloyDBCSQLAdminClient.parse_backup_path) cluster_path = staticmethod(AlloyDBCSQLAdminClient.cluster_path) parse_cluster_path = staticmethod(AlloyDBCSQLAdminClient.parse_cluster_path) + crypto_key_path = staticmethod(AlloyDBCSQLAdminClient.crypto_key_path) + parse_crypto_key_path = staticmethod(AlloyDBCSQLAdminClient.parse_crypto_key_path) crypto_key_version_path = staticmethod( AlloyDBCSQLAdminClient.crypto_key_version_path ) diff --git a/packages/google-cloud-alloydb/google/cloud/alloydb_v1/services/alloy_dbcsql_admin/client.py b/packages/google-cloud-alloydb/google/cloud/alloydb_v1/services/alloy_dbcsql_admin/client.py index e39d34d16463..1354a08970ee 100644 --- a/packages/google-cloud-alloydb/google/cloud/alloydb_v1/services/alloy_dbcsql_admin/client.py +++ b/packages/google-cloud-alloydb/google/cloud/alloydb_v1/services/alloy_dbcsql_admin/client.py @@ -246,6 +246,30 @@ def parse_cluster_path(path: str) -> Dict[str, str]: ) return m.groupdict() if m else {} + @staticmethod + def crypto_key_path( + project: str, + location: str, + key_ring: str, + crypto_key: str, + ) -> str: + """Returns a fully-qualified crypto_key string.""" + return "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}".format( + project=project, + location=location, + key_ring=key_ring, + crypto_key=crypto_key, + ) + + @staticmethod + def parse_crypto_key_path(path: str) -> Dict[str, str]: + """Parses a crypto_key path into its component segments.""" + m = re.match( + r"^projects/(?P.+?)/locations/(?P.+?)/keyRings/(?P.+?)/cryptoKeys/(?P.+?)$", + path, + ) + return m.groupdict() if m else {} + @staticmethod def crypto_key_version_path( project: str, diff --git a/packages/google-cloud-alloydb/google/cloud/alloydb_v1/types/resources.py b/packages/google-cloud-alloydb/google/cloud/alloydb_v1/types/resources.py index d168894dc59d..497f8c73a573 100644 --- a/packages/google-cloud-alloydb/google/cloud/alloydb_v1/types/resources.py +++ b/packages/google-cloud-alloydb/google/cloud/alloydb_v1/types/resources.py @@ -119,12 +119,15 @@ class DatabaseVersion(proto.Enum): The database version is Postgres 15. POSTGRES_16 (4): The database version is Postgres 16. + POSTGRES_17 (5): + The database version is Postgres 17. """ DATABASE_VERSION_UNSPECIFIED = 0 POSTGRES_13 = 1 POSTGRES_14 = 2 POSTGRES_15 = 3 POSTGRES_16 = 4 + POSTGRES_17 = 5 class SubscriptionType(proto.Enum): @@ -939,14 +942,9 @@ class State(proto.Enum): READY (1): The cluster is active and running. STOPPED (2): - The cluster is stopped. All instances in the - cluster are stopped. Customers can start a - stopped cluster at any point and all their - instances will come back to life with same names - and IP resources. In this state, customer pays - for storage. - Associated backups could also be present in a - stopped cluster. + This is unused. Even when all instances in + the cluster are stopped, the cluster remains in + READY state. EMPTY (3): The cluster is empty and has no associated resources. All instances, associated storage and @@ -1427,6 +1425,9 @@ class Instance(proto.Message): can/cannot be activated (for example, a read pool instance should be stopped before stopping primary etc.). Please refer to the API documentation for more details. + connection_pool_config (google.cloud.alloydb_v1.types.Instance.ConnectionPoolConfig): + Optional. The configuration for Managed + Connection Pool (MCP). """ class State(proto.Enum): @@ -1994,6 +1995,35 @@ class AuthorizedNetwork(proto.Message): number=5, ) + class ConnectionPoolConfig(proto.Message): + r"""Configuration for Managed Connection Pool (MCP). + + Attributes: + enabled (bool): + Optional. Whether to enable Managed + Connection Pool (MCP). + flags (MutableMapping[str, str]): + Optional. Connection Pool flags, as a list of + "key": "value" pairs. + pooler_count (int): + Output only. The number of running poolers + per instance. + """ + + enabled: bool = proto.Field( + proto.BOOL, + number=12, + ) + flags: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=13, + ) + pooler_count: int = proto.Field( + proto.INT32, + number=14, + ) + name: str = proto.Field( proto.STRING, number=1, @@ -2129,6 +2159,11 @@ class AuthorizedNetwork(proto.Message): number=35, enum=ActivationPolicy, ) + connection_pool_config: ConnectionPoolConfig = proto.Field( + proto.MESSAGE, + number=37, + message=ConnectionPoolConfig, + ) class ConnectionInfo(proto.Message): @@ -2729,19 +2764,31 @@ class UserType(proto.Enum): class Database(proto.Message): r"""Message describing Database object. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Attributes: name (str): Identifier. Name of the resource in the form of ``projects/{project}/locations/{location}/clusters/{cluster}/databases/{database}``. charset (str): - Optional. Charset for the database. This field can contain - any PostgreSQL supported charset name. Example values - include "UTF8", "SQL_ASCII", etc. + Optional. Immutable. Charset for the database. This field + can contain any PostgreSQL supported charset name. Example + values include "UTF8", "SQL_ASCII", etc. collation (str): - Optional. Collation for the database. - Name of the custom or native collation for - postgres. Example values include "C", "POSIX", - etc + Optional. Immutable. lc_collate for the database. String + sort order. Example values include "C", "POSIX", etc. + character_type (str): + Optional. Immutable. lc_ctype for the database. Character + classification (What is a letter? The upper-case + equivalent?). Example values include "C", "POSIX", etc. + database_template (str): + Input only. Immutable. Template of the + database to be used for creating a new database. + is_template_database (bool): + Optional. Whether the database is a template + database. + + This field is a member of `oneof`_ ``_is_template_database``. """ name: str = proto.Field( @@ -2756,6 +2803,19 @@ class Database(proto.Message): proto.STRING, number=3, ) + character_type: str = proto.Field( + proto.STRING, + number=4, + ) + database_template: str = proto.Field( + proto.STRING, + number=6, + ) + is_template_database: bool = proto.Field( + proto.BOOL, + number=7, + optional=True, + ) __all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/packages/google-cloud-alloydb/google/cloud/alloydb_v1/types/service.py b/packages/google-cloud-alloydb/google/cloud/alloydb_v1/types/service.py index 33858f024591..47abef01327c 100644 --- a/packages/google-cloud-alloydb/google/cloud/alloydb_v1/types/service.py +++ b/packages/google-cloud-alloydb/google/cloud/alloydb_v1/types/service.py @@ -2023,6 +2023,10 @@ class ExecuteSqlRequest(proto.Message): Required. SQL statement to execute on database. Any valid statement is permitted, including DDL, DML, DQL statements. + validate_only (bool): + Optional. If set, validates the sql statement + by performing syntax and semantic validation and + doesn't execute the query. """ password: str = proto.Field( @@ -2046,6 +2050,10 @@ class ExecuteSqlRequest(proto.Message): proto.STRING, number=4, ) + validate_only: bool = proto.Field( + proto.BOOL, + number=6, + ) class ExecuteSqlResponse(proto.Message): @@ -2747,8 +2755,50 @@ class StageStatus(proto.Message): Upgrade stage. state (google.cloud.alloydb_v1.types.UpgradeClusterResponse.Status): State of this stage. + schedule (google.cloud.alloydb_v1.types.UpgradeClusterStatus.StageStatus.StageSchedule): + Output only. Timing information for the stage + execution. """ + class StageSchedule(proto.Message): + r"""Timing information for the stage execution. + + Attributes: + estimated_start_time (google.protobuf.timestamp_pb2.Timestamp): + When the stage is expected to start. Set only + if the stage has not started yet. + actual_start_time (google.protobuf.timestamp_pb2.Timestamp): + Actual start time of the stage. Set only if + the stage has started. + estimated_end_time (google.protobuf.timestamp_pb2.Timestamp): + When the stage is expected to end. Set only + if the stage has not completed yet. + actual_end_time (google.protobuf.timestamp_pb2.Timestamp): + Actual end time of the stage. Set only if the + stage has completed. + """ + + estimated_start_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=1, + message=timestamp_pb2.Timestamp, + ) + actual_start_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=2, + message=timestamp_pb2.Timestamp, + ) + estimated_end_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=3, + message=timestamp_pb2.Timestamp, + ) + actual_end_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=4, + message=timestamp_pb2.Timestamp, + ) + read_pool_instances_upgrade: "UpgradeClusterStatus.ReadPoolInstancesUpgradeStageStatus" = proto.Field( proto.MESSAGE, number=11, @@ -2765,6 +2815,11 @@ class StageStatus(proto.Message): number=2, enum="UpgradeClusterResponse.Status", ) + schedule: "UpgradeClusterStatus.StageStatus.StageSchedule" = proto.Field( + proto.MESSAGE, + number=3, + message="UpgradeClusterStatus.StageStatus.StageSchedule", + ) class ReadPoolInstancesUpgradeStageStatus(proto.Message): r"""Read pool instances upgrade specific status. @@ -3102,7 +3157,7 @@ class DeleteUserRequest(proto.Message): class ListDatabasesRequest(proto.Message): - r"""Message for requesting list of Databases. + r"""Message for ListDatabases request. Attributes: parent (str): @@ -3143,11 +3198,11 @@ class ListDatabasesRequest(proto.Message): class ListDatabasesResponse(proto.Message): - r"""Message for response to listing Databases. + r"""Message for ListDatabases response. Attributes: databases (MutableSequence[google.cloud.alloydb_v1.types.Database]): - The list of databases + The list of databases. next_page_token (str): A token identifying the next page of results the server should return. If this field is diff --git a/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/__init__.py b/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/__init__.py index 0e19b602a91b..adf3b6ba1e0e 100644 --- a/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/__init__.py +++ b/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/__init__.py @@ -64,6 +64,7 @@ BatchCreateInstanceStatus, CreateBackupRequest, CreateClusterRequest, + CreateDatabaseRequest, CreateInstanceRequest, CreateInstanceRequests, CreateSecondaryClusterRequest, @@ -138,6 +139,7 @@ "ContinuousBackupSource", "CreateBackupRequest", "CreateClusterRequest", + "CreateDatabaseRequest", "CreateInstanceRequest", "CreateInstanceRequests", "CreateSecondaryClusterRequest", diff --git a/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/gapic_metadata.json b/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/gapic_metadata.json index 337a9a99b02d..57b3cfc7d1f5 100644 --- a/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/gapic_metadata.json +++ b/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/gapic_metadata.json @@ -25,6 +25,11 @@ "create_cluster" ] }, + "CreateDatabase": { + "methods": [ + "create_database" + ] + }, "CreateInstance": { "methods": [ "create_instance" @@ -215,6 +220,11 @@ "create_cluster" ] }, + "CreateDatabase": { + "methods": [ + "create_database" + ] + }, "CreateInstance": { "methods": [ "create_instance" @@ -405,6 +415,11 @@ "create_cluster" ] }, + "CreateDatabase": { + "methods": [ + "create_database" + ] + }, "CreateInstance": { "methods": [ "create_instance" diff --git a/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/services/alloy_db_admin/async_client.py b/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/services/alloy_db_admin/async_client.py index 4ee7c40fa04a..8fd1652816c5 100644 --- a/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/services/alloy_db_admin/async_client.py +++ b/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/services/alloy_db_admin/async_client.py @@ -97,6 +97,8 @@ class AlloyDBAdminAsyncClient: parse_connection_info_path = staticmethod( AlloyDBAdminClient.parse_connection_info_path ) + crypto_key_path = staticmethod(AlloyDBAdminClient.crypto_key_path) + parse_crypto_key_path = staticmethod(AlloyDBAdminClient.parse_crypto_key_path) crypto_key_version_path = staticmethod(AlloyDBAdminClient.crypto_key_version_path) parse_crypto_key_version_path = staticmethod( AlloyDBAdminClient.parse_crypto_key_version_path @@ -107,6 +109,10 @@ class AlloyDBAdminAsyncClient: parse_instance_path = staticmethod(AlloyDBAdminClient.parse_instance_path) network_path = staticmethod(AlloyDBAdminClient.network_path) parse_network_path = staticmethod(AlloyDBAdminClient.parse_network_path) + service_attachment_path = staticmethod(AlloyDBAdminClient.service_attachment_path) + parse_service_attachment_path = staticmethod( + AlloyDBAdminClient.parse_service_attachment_path + ) supported_database_flag_path = staticmethod( AlloyDBAdminClient.supported_database_flag_path ) @@ -1249,7 +1255,7 @@ async def sample_upgrade_cluster(): # Initialize request argument(s) request = alloydb_v1alpha.UpgradeClusterRequest( name="name_value", - version="POSTGRES_16", + version="POSTGRES_17", ) # Make the request @@ -5149,8 +5155,7 @@ async def sample_list_databases(): Args: request (Optional[Union[google.cloud.alloydb_v1alpha.types.ListDatabasesRequest, dict]]): - The request object. Message for requesting list of - Databases. + The request object. Message for ListDatabases request. parent (:class:`str`): Required. Parent value for ListDatabasesRequest. @@ -5168,8 +5173,8 @@ async def sample_list_databases(): Returns: google.cloud.alloydb_v1alpha.services.alloy_db_admin.pagers.ListDatabasesAsyncPager: - Message for response to listing - Databases. + Message for ListDatabases response. + Iterating over this object will yield results and resolve additional pages automatically. @@ -5235,6 +5240,132 @@ async def sample_list_databases(): # Done; return the response. return response + async def create_database( + self, + request: Optional[Union[service.CreateDatabaseRequest, dict]] = None, + *, + parent: Optional[str] = None, + database: Optional[resources.Database] = None, + database_id: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> resources.Database: + r"""Creates a new Database in a given project, location, + and cluster. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import alloydb_v1alpha + + async def sample_create_database(): + # Create a client + client = alloydb_v1alpha.AlloyDBAdminAsyncClient() + + # Initialize request argument(s) + request = alloydb_v1alpha.CreateDatabaseRequest( + parent="parent_value", + database_id="database_id_value", + ) + + # Make the request + response = await client.create_database(request=request) + + # Handle the response + print(response) + + Args: + request (Optional[Union[google.cloud.alloydb_v1alpha.types.CreateDatabaseRequest, dict]]): + The request object. Message for CreateDatabase request. + parent (:class:`str`): + Required. Value for parent. + This corresponds to the ``parent`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + database (:class:`google.cloud.alloydb_v1alpha.types.Database`): + Required. The resource being created. + This corresponds to the ``database`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + database_id (:class:`str`): + Required. ID of the requesting + object. + + This corresponds to the ``database_id`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.alloydb_v1alpha.types.Database: + Message describing Database object. + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [parent, database, database_id] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, service.CreateDatabaseRequest): + request = service.CreateDatabaseRequest(request) + + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if parent is not None: + request.parent = parent + if database is not None: + request.database = database + if database_id is not None: + request.database_id = database_id + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._client._transport._wrapped_methods[ + self._client._transport.create_database + ] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata((("parent", request.parent),)), + ) + + # Validate the universe domain. + self._client._validate_universe_domain() + + # Send the request. + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + async def list_operations( self, request: Optional[operations_pb2.ListOperationsRequest] = None, diff --git a/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/services/alloy_db_admin/client.py b/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/services/alloy_db_admin/client.py index 0495060a2b43..dec2ce2e6d5d 100644 --- a/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/services/alloy_db_admin/client.py +++ b/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/services/alloy_db_admin/client.py @@ -278,6 +278,30 @@ def parse_connection_info_path(path: str) -> Dict[str, str]: ) return m.groupdict() if m else {} + @staticmethod + def crypto_key_path( + project: str, + location: str, + key_ring: str, + crypto_key: str, + ) -> str: + """Returns a fully-qualified crypto_key string.""" + return "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}".format( + project=project, + location=location, + key_ring=key_ring, + crypto_key=crypto_key, + ) + + @staticmethod + def parse_crypto_key_path(path: str) -> Dict[str, str]: + """Parses a crypto_key path into its component segments.""" + m = re.match( + r"^projects/(?P.+?)/locations/(?P.+?)/keyRings/(?P.+?)/cryptoKeys/(?P.+?)$", + path, + ) + return m.groupdict() if m else {} + @staticmethod def crypto_key_version_path( project: str, @@ -371,6 +395,28 @@ def parse_network_path(path: str) -> Dict[str, str]: ) return m.groupdict() if m else {} + @staticmethod + def service_attachment_path( + project: str, + region: str, + service_attachment: str, + ) -> str: + """Returns a fully-qualified service_attachment string.""" + return "projects/{project}/regions/{region}/serviceAttachments/{service_attachment}".format( + project=project, + region=region, + service_attachment=service_attachment, + ) + + @staticmethod + def parse_service_attachment_path(path: str) -> Dict[str, str]: + """Parses a service_attachment path into its component segments.""" + m = re.match( + r"^projects/(?P.+?)/regions/(?P.+?)/serviceAttachments/(?P.+?)$", + path, + ) + return m.groupdict() if m else {} + @staticmethod def supported_database_flag_path( project: str, @@ -1814,7 +1860,7 @@ def sample_upgrade_cluster(): # Initialize request argument(s) request = alloydb_v1alpha.UpgradeClusterRequest( name="name_value", - version="POSTGRES_16", + version="POSTGRES_17", ) # Make the request @@ -5634,8 +5680,7 @@ def sample_list_databases(): Args: request (Union[google.cloud.alloydb_v1alpha.types.ListDatabasesRequest, dict]): - The request object. Message for requesting list of - Databases. + The request object. Message for ListDatabases request. parent (str): Required. Parent value for ListDatabasesRequest. @@ -5653,8 +5698,8 @@ def sample_list_databases(): Returns: google.cloud.alloydb_v1alpha.services.alloy_db_admin.pagers.ListDatabasesPager: - Message for response to listing - Databases. + Message for ListDatabases response. + Iterating over this object will yield results and resolve additional pages automatically. @@ -5717,6 +5762,129 @@ def sample_list_databases(): # Done; return the response. return response + def create_database( + self, + request: Optional[Union[service.CreateDatabaseRequest, dict]] = None, + *, + parent: Optional[str] = None, + database: Optional[resources.Database] = None, + database_id: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> resources.Database: + r"""Creates a new Database in a given project, location, + and cluster. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import alloydb_v1alpha + + def sample_create_database(): + # Create a client + client = alloydb_v1alpha.AlloyDBAdminClient() + + # Initialize request argument(s) + request = alloydb_v1alpha.CreateDatabaseRequest( + parent="parent_value", + database_id="database_id_value", + ) + + # Make the request + response = client.create_database(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.alloydb_v1alpha.types.CreateDatabaseRequest, dict]): + The request object. Message for CreateDatabase request. + parent (str): + Required. Value for parent. + This corresponds to the ``parent`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + database (google.cloud.alloydb_v1alpha.types.Database): + Required. The resource being created. + This corresponds to the ``database`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + database_id (str): + Required. ID of the requesting + object. + + This corresponds to the ``database_id`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.alloydb_v1alpha.types.Database: + Message describing Database object. + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [parent, database, database_id] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, service.CreateDatabaseRequest): + request = service.CreateDatabaseRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if parent is not None: + request.parent = parent + if database is not None: + request.database = database + if database_id is not None: + request.database_id = database_id + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.create_database] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata((("parent", request.parent),)), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + def __enter__(self) -> "AlloyDBAdminClient": return self diff --git a/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/services/alloy_db_admin/transports/base.py b/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/services/alloy_db_admin/transports/base.py index 12f1b160346a..bf0ec81c060e 100644 --- a/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/services/alloy_db_admin/transports/base.py +++ b/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/services/alloy_db_admin/transports/base.py @@ -421,6 +421,20 @@ def _prep_wrapped_messages(self, client_info): default_timeout=None, client_info=client_info, ), + self.create_database: gapic_v1.method.wrap_method( + self.create_database, + default_retry=retries.Retry( + initial=1.0, + maximum=60.0, + multiplier=1.3, + predicate=retries.if_exception_type( + core_exceptions.ServiceUnavailable, + ), + deadline=60.0, + ), + default_timeout=60.0, + client_info=client_info, + ), self.get_location: gapic_v1.method.wrap_method( self.get_location, default_timeout=None, @@ -801,6 +815,15 @@ def list_databases( ]: raise NotImplementedError() + @property + def create_database( + self, + ) -> Callable[ + [service.CreateDatabaseRequest], + Union[resources.Database, Awaitable[resources.Database]], + ]: + raise NotImplementedError() + @property def list_operations( self, diff --git a/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/services/alloy_db_admin/transports/grpc.py b/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/services/alloy_db_admin/transports/grpc.py index 56ea36ebb111..055b741be364 100644 --- a/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/services/alloy_db_admin/transports/grpc.py +++ b/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/services/alloy_db_admin/transports/grpc.py @@ -1342,6 +1342,33 @@ def list_databases( ) return self._stubs["list_databases"] + @property + def create_database( + self, + ) -> Callable[[service.CreateDatabaseRequest], resources.Database]: + r"""Return a callable for the create database method over gRPC. + + Creates a new Database in a given project, location, + and cluster. + + Returns: + Callable[[~.CreateDatabaseRequest], + ~.Database]: + A function that, when called, will call the underlying RPC + on the server. + """ + # Generate a "stub function" on-the-fly which will actually make + # the request. + # gRPC handles serialization and deserialization, so we just need + # to pass in the functions for each. + if "create_database" not in self._stubs: + self._stubs["create_database"] = self._logged_channel.unary_unary( + "/google.cloud.alloydb.v1alpha.AlloyDBAdmin/CreateDatabase", + request_serializer=service.CreateDatabaseRequest.serialize, + response_deserializer=resources.Database.deserialize, + ) + return self._stubs["create_database"] + def close(self): self._logged_channel.close() diff --git a/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/services/alloy_db_admin/transports/grpc_asyncio.py b/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/services/alloy_db_admin/transports/grpc_asyncio.py index daaeba70ef5b..241661c22145 100644 --- a/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/services/alloy_db_admin/transports/grpc_asyncio.py +++ b/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/services/alloy_db_admin/transports/grpc_asyncio.py @@ -1380,6 +1380,33 @@ def list_databases( ) return self._stubs["list_databases"] + @property + def create_database( + self, + ) -> Callable[[service.CreateDatabaseRequest], Awaitable[resources.Database]]: + r"""Return a callable for the create database method over gRPC. + + Creates a new Database in a given project, location, + and cluster. + + Returns: + Callable[[~.CreateDatabaseRequest], + Awaitable[~.Database]]: + A function that, when called, will call the underlying RPC + on the server. + """ + # Generate a "stub function" on-the-fly which will actually make + # the request. + # gRPC handles serialization and deserialization, so we just need + # to pass in the functions for each. + if "create_database" not in self._stubs: + self._stubs["create_database"] = self._logged_channel.unary_unary( + "/google.cloud.alloydb.v1alpha.AlloyDBAdmin/CreateDatabase", + request_serializer=service.CreateDatabaseRequest.serialize, + response_deserializer=resources.Database.deserialize, + ) + return self._stubs["create_database"] + def _prep_wrapped_messages(self, client_info): """Precompute the wrapped methods, overriding the base class method to use async wrappers.""" self._wrapped_methods = { @@ -1667,6 +1694,20 @@ def _prep_wrapped_messages(self, client_info): default_timeout=None, client_info=client_info, ), + self.create_database: self._wrap_method( + self.create_database, + default_retry=retries.AsyncRetry( + initial=1.0, + maximum=60.0, + multiplier=1.3, + predicate=retries.if_exception_type( + core_exceptions.ServiceUnavailable, + ), + deadline=60.0, + ), + default_timeout=60.0, + client_info=client_info, + ), self.get_location: self._wrap_method( self.get_location, default_timeout=None, diff --git a/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/services/alloy_db_admin/transports/rest.py b/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/services/alloy_db_admin/transports/rest.py index 0411a7be7bff..3703f604cfd8 100644 --- a/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/services/alloy_db_admin/transports/rest.py +++ b/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/services/alloy_db_admin/transports/rest.py @@ -101,6 +101,14 @@ def post_create_cluster(self, response): logging.log(f"Received response: {response}") return response + def pre_create_database(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_create_database(self, response): + logging.log(f"Received response: {response}") + return response + def pre_create_instance(self, request, metadata): logging.log(f"Received request: {request}") return request, metadata @@ -515,6 +523,50 @@ def post_create_cluster_with_metadata( """ return response, metadata + def pre_create_database( + self, + request: service.CreateDatabaseRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[service.CreateDatabaseRequest, Sequence[Tuple[str, Union[str, bytes]]]]: + """Pre-rpc interceptor for create_database + + Override in a subclass to manipulate the request or metadata + before they are sent to the AlloyDBAdmin server. + """ + return request, metadata + + def post_create_database(self, response: resources.Database) -> resources.Database: + """Post-rpc interceptor for create_database + + DEPRECATED. Please use the `post_create_database_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the AlloyDBAdmin server but before + it is returned to user code. This `post_create_database` interceptor runs + before the `post_create_database_with_metadata` interceptor. + """ + return response + + def post_create_database_with_metadata( + self, + response: resources.Database, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[resources.Database, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for create_database + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the AlloyDBAdmin server but before it is returned to user code. + + We recommend only using this `post_create_database_with_metadata` + interceptor in new development instead of the `post_create_database` interceptor. + When both interceptors are used, this `post_create_database_with_metadata` interceptor runs after the + `post_create_database` interceptor. The (possibly modified) response returned by + `post_create_database` will be passed to + `post_create_database_with_metadata`. + """ + return response, metadata + def pre_create_instance( self, request: service.CreateInstanceRequest, @@ -2802,6 +2854,156 @@ def __call__( ) return resp + class _CreateDatabase( + _BaseAlloyDBAdminRestTransport._BaseCreateDatabase, AlloyDBAdminRestStub + ): + def __hash__(self): + return hash("AlloyDBAdminRestTransport.CreateDatabase") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + data=body, + ) + return response + + def __call__( + self, + request: service.CreateDatabaseRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> resources.Database: + r"""Call the create database method over HTTP. + + Args: + request (~.service.CreateDatabaseRequest): + The request object. Message for CreateDatabase request. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.resources.Database: + Message describing Database object. + """ + + http_options = ( + _BaseAlloyDBAdminRestTransport._BaseCreateDatabase._get_http_options() + ) + + request, metadata = self._interceptor.pre_create_database(request, metadata) + transcoded_request = _BaseAlloyDBAdminRestTransport._BaseCreateDatabase._get_transcoded_request( + http_options, request + ) + + body = _BaseAlloyDBAdminRestTransport._BaseCreateDatabase._get_request_body_json( + transcoded_request + ) + + # Jsonify the query params + query_params = _BaseAlloyDBAdminRestTransport._BaseCreateDatabase._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.alloydb_v1alpha.AlloyDBAdminClient.CreateDatabase", + extra={ + "serviceName": "google.cloud.alloydb.v1alpha.AlloyDBAdmin", + "rpcName": "CreateDatabase", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = AlloyDBAdminRestTransport._CreateDatabase._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + body, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = resources.Database() + pb_resp = resources.Database.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_create_database(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_create_database_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = resources.Database.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.alloydb_v1alpha.AlloyDBAdminClient.create_database", + extra={ + "serviceName": "google.cloud.alloydb.v1alpha.AlloyDBAdmin", + "rpcName": "CreateDatabase", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + class _CreateInstance( _BaseAlloyDBAdminRestTransport._BaseCreateInstance, AlloyDBAdminRestStub ): @@ -5985,8 +6187,7 @@ def __call__( Args: request (~.service.ListDatabasesRequest): - The request object. Message for requesting list of - Databases. + The request object. Message for ListDatabases request. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -5997,9 +6198,7 @@ def __call__( Returns: ~.service.ListDatabasesResponse: - Message for response to listing - Databases. - + Message for ListDatabases response. """ http_options = ( @@ -7943,6 +8142,14 @@ def create_cluster( # In C++ this would require a dynamic_cast return self._CreateCluster(self._session, self._host, self._interceptor) # type: ignore + @property + def create_database( + self, + ) -> Callable[[service.CreateDatabaseRequest], resources.Database]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._CreateDatabase(self._session, self._host, self._interceptor) # type: ignore + @property def create_instance( self, diff --git a/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/services/alloy_db_admin/transports/rest_base.py b/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/services/alloy_db_admin/transports/rest_base.py index 35b150d68ced..bcac90f9df8e 100644 --- a/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/services/alloy_db_admin/transports/rest_base.py +++ b/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/services/alloy_db_admin/transports/rest_base.py @@ -267,6 +267,65 @@ def _get_query_params_json(transcoded_request): query_params["$alt"] = "json;enum-encoding=int" return query_params + class _BaseCreateDatabase: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { + "databaseId": "", + } + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "post", + "uri": "/v1alpha/{parent=projects/*/locations/*/clusters/*}/databases", + "body": "database", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = service.CreateDatabaseRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_request_body_json(transcoded_request): + # Jsonify the request body + + body = json_format.MessageToJson( + transcoded_request["body"], use_integers_for_enums=True + ) + return body + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=True, + ) + ) + query_params.update( + _BaseAlloyDBAdminRestTransport._BaseCreateDatabase._get_unset_required_fields( + query_params + ) + ) + + query_params["$alt"] = "json;enum-encoding=int" + return query_params + class _BaseCreateInstance: def __hash__(self): # pragma: NO COVER return NotImplementedError("__hash__ must be implemented.") diff --git a/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/services/alloy_dbcsql_admin/async_client.py b/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/services/alloy_dbcsql_admin/async_client.py index ab49f9ad3b68..fb1f49ffb1bc 100644 --- a/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/services/alloy_dbcsql_admin/async_client.py +++ b/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/services/alloy_dbcsql_admin/async_client.py @@ -83,6 +83,8 @@ class AlloyDBCSQLAdminAsyncClient: parse_backup_path = staticmethod(AlloyDBCSQLAdminClient.parse_backup_path) cluster_path = staticmethod(AlloyDBCSQLAdminClient.cluster_path) parse_cluster_path = staticmethod(AlloyDBCSQLAdminClient.parse_cluster_path) + crypto_key_path = staticmethod(AlloyDBCSQLAdminClient.crypto_key_path) + parse_crypto_key_path = staticmethod(AlloyDBCSQLAdminClient.parse_crypto_key_path) crypto_key_version_path = staticmethod( AlloyDBCSQLAdminClient.crypto_key_version_path ) diff --git a/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/services/alloy_dbcsql_admin/client.py b/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/services/alloy_dbcsql_admin/client.py index 16dca9c2e7ac..cab4b18dc095 100644 --- a/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/services/alloy_dbcsql_admin/client.py +++ b/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/services/alloy_dbcsql_admin/client.py @@ -246,6 +246,30 @@ def parse_cluster_path(path: str) -> Dict[str, str]: ) return m.groupdict() if m else {} + @staticmethod + def crypto_key_path( + project: str, + location: str, + key_ring: str, + crypto_key: str, + ) -> str: + """Returns a fully-qualified crypto_key string.""" + return "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}".format( + project=project, + location=location, + key_ring=key_ring, + crypto_key=crypto_key, + ) + + @staticmethod + def parse_crypto_key_path(path: str) -> Dict[str, str]: + """Parses a crypto_key path into its component segments.""" + m = re.match( + r"^projects/(?P.+?)/locations/(?P.+?)/keyRings/(?P.+?)/cryptoKeys/(?P.+?)$", + path, + ) + return m.groupdict() if m else {} + @staticmethod def crypto_key_version_path( project: str, diff --git a/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/types/__init__.py b/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/types/__init__.py index 2cc30d73cb54..2b5e40149a56 100644 --- a/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/types/__init__.py +++ b/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/types/__init__.py @@ -54,6 +54,7 @@ BatchCreateInstanceStatus, CreateBackupRequest, CreateClusterRequest, + CreateDatabaseRequest, CreateInstanceRequest, CreateInstanceRequests, CreateSecondaryClusterRequest, @@ -147,6 +148,7 @@ "BatchCreateInstanceStatus", "CreateBackupRequest", "CreateClusterRequest", + "CreateDatabaseRequest", "CreateInstanceRequest", "CreateInstanceRequests", "CreateSecondaryClusterRequest", diff --git a/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/types/resources.py b/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/types/resources.py index 174446710581..afa122a10797 100644 --- a/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/types/resources.py +++ b/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/types/resources.py @@ -119,12 +119,15 @@ class DatabaseVersion(proto.Enum): The database version is Postgres 15. POSTGRES_16 (4): The database version is Postgres 16. + POSTGRES_17 (5): + The database version is Postgres 17. """ DATABASE_VERSION_UNSPECIFIED = 0 POSTGRES_13 = 1 POSTGRES_14 = 2 POSTGRES_15 = 3 POSTGRES_16 = 4 + POSTGRES_17 = 5 class SubscriptionType(proto.Enum): @@ -935,11 +938,11 @@ class Cluster(proto.Message): "123/costCenter": "marketing". service_account_email (str): Output only. AlloyDB per-cluster service - agent email. This service account is created + account. This service account is created per-cluster per-project, and is different from - that of the primary service agent which is - created per-project. The service account naming - format is subject to change. + the per-project service account. The per-cluster + service account naming format is subject to + change. """ class State(proto.Enum): @@ -951,14 +954,9 @@ class State(proto.Enum): READY (1): The cluster is active and running. STOPPED (2): - The cluster is stopped. All instances in the - cluster are stopped. Customers can start a - stopped cluster at any point and all their - instances will come back to life with same names - and IP resources. In this state, customer pays - for storage. - Associated backups could also be present in a - stopped cluster. + This is unused. Even when all instances in + the cluster are stopped, the cluster remains in + READY state. EMPTY (3): The cluster is empty and has no associated resources. All instances, associated storage and @@ -2094,30 +2092,27 @@ class ConnectionPoolConfig(proto.Message): enabled (bool): Optional. Whether to enable Managed Connection Pool (MCP). + flags (MutableMapping[str, str]): + Optional. Connection Pool flags, as a list of + "key": "value" pairs. + pooler_count (int): + Output only. The number of running poolers + per instance. """ - class PoolMode(proto.Enum): - r"""The pool mode. Defaults to ``POOL_MODE_TRANSACTION``. - - Values: - POOL_MODE_UNSPECIFIED (0): - The pool mode is not specified. Defaults to - ``POOL_MODE_TRANSACTION``. - POOL_MODE_SESSION (1): - Server is released back to pool after a - client disconnects. - POOL_MODE_TRANSACTION (2): - Server is released back to pool after a - transaction finishes. - """ - POOL_MODE_UNSPECIFIED = 0 - POOL_MODE_SESSION = 1 - POOL_MODE_TRANSACTION = 2 - enabled: bool = proto.Field( proto.BOOL, number=12, ) + flags: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=13, + ) + pooler_count: int = proto.Field( + proto.INT32, + number=14, + ) name: str = proto.Field( proto.STRING, @@ -2900,19 +2895,34 @@ class UserType(proto.Enum): class Database(proto.Message): r"""Message describing Database object. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Attributes: name (str): Identifier. Name of the resource in the form of ``projects/{project}/locations/{location}/clusters/{cluster}/databases/{database}``. charset (str): - Optional. Charset for the database. This field can contain - any PostgreSQL supported charset name. Example values - include "UTF8", "SQL_ASCII", etc. + Optional. Immutable. Charset for the database. This field + can contain any PostgreSQL supported charset name. Example + values include "UTF8", "SQL_ASCII", etc. collation (str): - Optional. Collation for the database. - Name of the custom or native collation for - postgres. Example values include "C", "POSIX", - etc + Optional. Immutable. lc_collate for the database. String + sort order. Example values include "C", "POSIX", etc. + character_type (str): + Optional. Immutable. lc_ctype for the database. Character + classification (What is a letter? The upper-case + equivalent?). Example values include "C", "POSIX", etc. + is_template (bool): + Optional. Whether the database is a template database. + Deprecated in favor of is_template_database. + database_template (str): + Input only. Immutable. Template of the + database to be used for creating a new database. + is_template_database (bool): + Optional. Whether the database is a template + database. + + This field is a member of `oneof`_ ``_is_template_database``. """ name: str = proto.Field( @@ -2927,6 +2937,23 @@ class Database(proto.Message): proto.STRING, number=3, ) + character_type: str = proto.Field( + proto.STRING, + number=4, + ) + is_template: bool = proto.Field( + proto.BOOL, + number=5, + ) + database_template: str = proto.Field( + proto.STRING, + number=6, + ) + is_template_database: bool = proto.Field( + proto.BOOL, + number=7, + optional=True, + ) __all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/types/service.py b/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/types/service.py index 33be35df99e0..73bd04b2f542 100644 --- a/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/types/service.py +++ b/packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/types/service.py @@ -85,6 +85,7 @@ "DeleteUserRequest", "ListDatabasesRequest", "ListDatabasesResponse", + "CreateDatabaseRequest", }, ) @@ -2024,6 +2025,10 @@ class ExecuteSqlRequest(proto.Message): Required. SQL statement to execute on database. Any valid statement is permitted, including DDL, DML, DQL statements. + validate_only (bool): + Optional. If set, validates the sql statement + by performing syntax and semantic validation and + doesn't execute the query. """ password: str = proto.Field( @@ -2047,6 +2052,10 @@ class ExecuteSqlRequest(proto.Message): proto.STRING, number=4, ) + validate_only: bool = proto.Field( + proto.BOOL, + number=6, + ) class ExecuteSqlResponse(proto.Message): @@ -2820,8 +2829,50 @@ class StageStatus(proto.Message): Upgrade stage. state (google.cloud.alloydb_v1alpha.types.UpgradeClusterResponse.Status): State of this stage. + schedule (google.cloud.alloydb_v1alpha.types.UpgradeClusterStatus.StageStatus.StageSchedule): + Output only. Timing information for the stage + execution. """ + class StageSchedule(proto.Message): + r"""Timing information for the stage execution. + + Attributes: + estimated_start_time (google.protobuf.timestamp_pb2.Timestamp): + When the stage is expected to start. Set only + if the stage has not started yet. + actual_start_time (google.protobuf.timestamp_pb2.Timestamp): + Actual start time of the stage. Set only if + the stage has started. + estimated_end_time (google.protobuf.timestamp_pb2.Timestamp): + When the stage is expected to end. Set only + if the stage has not completed yet. + actual_end_time (google.protobuf.timestamp_pb2.Timestamp): + Actual end time of the stage. Set only if the + stage has completed. + """ + + estimated_start_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=1, + message=timestamp_pb2.Timestamp, + ) + actual_start_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=2, + message=timestamp_pb2.Timestamp, + ) + estimated_end_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=3, + message=timestamp_pb2.Timestamp, + ) + actual_end_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=4, + message=timestamp_pb2.Timestamp, + ) + read_pool_instances_upgrade: "UpgradeClusterStatus.ReadPoolInstancesUpgradeStageStatus" = proto.Field( proto.MESSAGE, number=11, @@ -2838,6 +2889,11 @@ class StageStatus(proto.Message): number=2, enum="UpgradeClusterResponse.Status", ) + schedule: "UpgradeClusterStatus.StageStatus.StageSchedule" = proto.Field( + proto.MESSAGE, + number=3, + message="UpgradeClusterStatus.StageStatus.StageSchedule", + ) class ReadPoolInstancesUpgradeStageStatus(proto.Message): r"""Read pool instances upgrade specific status. @@ -3175,7 +3231,7 @@ class DeleteUserRequest(proto.Message): class ListDatabasesRequest(proto.Message): - r"""Message for requesting list of Databases. + r"""Message for ListDatabases request. Attributes: parent (str): @@ -3216,11 +3272,11 @@ class ListDatabasesRequest(proto.Message): class ListDatabasesResponse(proto.Message): - r"""Message for response to listing Databases. + r"""Message for ListDatabases response. Attributes: databases (MutableSequence[google.cloud.alloydb_v1alpha.types.Database]): - The list of databases + The list of databases. next_page_token (str): A token identifying the next page of results the server should return. If this field is @@ -3242,4 +3298,31 @@ def raw_page(self): ) +class CreateDatabaseRequest(proto.Message): + r"""Message for CreateDatabase request. + + Attributes: + parent (str): + Required. Value for parent. + database_id (str): + Required. ID of the requesting object. + database (google.cloud.alloydb_v1alpha.types.Database): + Required. The resource being created. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + database_id: str = proto.Field( + proto.STRING, + number=2, + ) + database: resources.Database = proto.Field( + proto.MESSAGE, + number=3, + message=resources.Database, + ) + + __all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/__init__.py b/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/__init__.py index 65b194bd5676..b2185a5859e2 100644 --- a/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/__init__.py +++ b/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/__init__.py @@ -64,6 +64,7 @@ BatchCreateInstanceStatus, CreateBackupRequest, CreateClusterRequest, + CreateDatabaseRequest, CreateInstanceRequest, CreateInstanceRequests, CreateSecondaryClusterRequest, @@ -138,6 +139,7 @@ "ContinuousBackupSource", "CreateBackupRequest", "CreateClusterRequest", + "CreateDatabaseRequest", "CreateInstanceRequest", "CreateInstanceRequests", "CreateSecondaryClusterRequest", diff --git a/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/gapic_metadata.json b/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/gapic_metadata.json index 2cdc98f9b8f2..4e57c2cb1a62 100644 --- a/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/gapic_metadata.json +++ b/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/gapic_metadata.json @@ -25,6 +25,11 @@ "create_cluster" ] }, + "CreateDatabase": { + "methods": [ + "create_database" + ] + }, "CreateInstance": { "methods": [ "create_instance" @@ -215,6 +220,11 @@ "create_cluster" ] }, + "CreateDatabase": { + "methods": [ + "create_database" + ] + }, "CreateInstance": { "methods": [ "create_instance" @@ -405,6 +415,11 @@ "create_cluster" ] }, + "CreateDatabase": { + "methods": [ + "create_database" + ] + }, "CreateInstance": { "methods": [ "create_instance" diff --git a/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/services/alloy_db_admin/async_client.py b/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/services/alloy_db_admin/async_client.py index 2be9fcea5c1d..9a6fe0b23b01 100644 --- a/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/services/alloy_db_admin/async_client.py +++ b/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/services/alloy_db_admin/async_client.py @@ -97,6 +97,8 @@ class AlloyDBAdminAsyncClient: parse_connection_info_path = staticmethod( AlloyDBAdminClient.parse_connection_info_path ) + crypto_key_path = staticmethod(AlloyDBAdminClient.crypto_key_path) + parse_crypto_key_path = staticmethod(AlloyDBAdminClient.parse_crypto_key_path) crypto_key_version_path = staticmethod(AlloyDBAdminClient.crypto_key_version_path) parse_crypto_key_version_path = staticmethod( AlloyDBAdminClient.parse_crypto_key_version_path @@ -107,6 +109,10 @@ class AlloyDBAdminAsyncClient: parse_instance_path = staticmethod(AlloyDBAdminClient.parse_instance_path) network_path = staticmethod(AlloyDBAdminClient.network_path) parse_network_path = staticmethod(AlloyDBAdminClient.parse_network_path) + service_attachment_path = staticmethod(AlloyDBAdminClient.service_attachment_path) + parse_service_attachment_path = staticmethod( + AlloyDBAdminClient.parse_service_attachment_path + ) supported_database_flag_path = staticmethod( AlloyDBAdminClient.supported_database_flag_path ) @@ -1249,7 +1255,7 @@ async def sample_upgrade_cluster(): # Initialize request argument(s) request = alloydb_v1beta.UpgradeClusterRequest( name="name_value", - version="POSTGRES_16", + version="POSTGRES_17", ) # Make the request @@ -5149,8 +5155,7 @@ async def sample_list_databases(): Args: request (Optional[Union[google.cloud.alloydb_v1beta.types.ListDatabasesRequest, dict]]): - The request object. Message for requesting list of - Databases. + The request object. Message for ListDatabases request. parent (:class:`str`): Required. Parent value for ListDatabasesRequest. @@ -5168,8 +5173,8 @@ async def sample_list_databases(): Returns: google.cloud.alloydb_v1beta.services.alloy_db_admin.pagers.ListDatabasesAsyncPager: - Message for response to listing - Databases. + Message for ListDatabases response. + Iterating over this object will yield results and resolve additional pages automatically. @@ -5235,6 +5240,132 @@ async def sample_list_databases(): # Done; return the response. return response + async def create_database( + self, + request: Optional[Union[service.CreateDatabaseRequest, dict]] = None, + *, + parent: Optional[str] = None, + database: Optional[resources.Database] = None, + database_id: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> resources.Database: + r"""Creates a new Database in a given project, location, + and cluster. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import alloydb_v1beta + + async def sample_create_database(): + # Create a client + client = alloydb_v1beta.AlloyDBAdminAsyncClient() + + # Initialize request argument(s) + request = alloydb_v1beta.CreateDatabaseRequest( + parent="parent_value", + database_id="database_id_value", + ) + + # Make the request + response = await client.create_database(request=request) + + # Handle the response + print(response) + + Args: + request (Optional[Union[google.cloud.alloydb_v1beta.types.CreateDatabaseRequest, dict]]): + The request object. Message for CreateDatabase request. + parent (:class:`str`): + Required. Value for parent. + This corresponds to the ``parent`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + database (:class:`google.cloud.alloydb_v1beta.types.Database`): + Required. The resource being created. + This corresponds to the ``database`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + database_id (:class:`str`): + Required. ID of the requesting + object. + + This corresponds to the ``database_id`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.alloydb_v1beta.types.Database: + Message describing Database object. + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [parent, database, database_id] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, service.CreateDatabaseRequest): + request = service.CreateDatabaseRequest(request) + + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if parent is not None: + request.parent = parent + if database is not None: + request.database = database + if database_id is not None: + request.database_id = database_id + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._client._transport._wrapped_methods[ + self._client._transport.create_database + ] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata((("parent", request.parent),)), + ) + + # Validate the universe domain. + self._client._validate_universe_domain() + + # Send the request. + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + async def list_operations( self, request: Optional[operations_pb2.ListOperationsRequest] = None, diff --git a/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/services/alloy_db_admin/client.py b/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/services/alloy_db_admin/client.py index 5925bb0c1230..fb2b7201c9b3 100644 --- a/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/services/alloy_db_admin/client.py +++ b/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/services/alloy_db_admin/client.py @@ -278,6 +278,30 @@ def parse_connection_info_path(path: str) -> Dict[str, str]: ) return m.groupdict() if m else {} + @staticmethod + def crypto_key_path( + project: str, + location: str, + key_ring: str, + crypto_key: str, + ) -> str: + """Returns a fully-qualified crypto_key string.""" + return "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}".format( + project=project, + location=location, + key_ring=key_ring, + crypto_key=crypto_key, + ) + + @staticmethod + def parse_crypto_key_path(path: str) -> Dict[str, str]: + """Parses a crypto_key path into its component segments.""" + m = re.match( + r"^projects/(?P.+?)/locations/(?P.+?)/keyRings/(?P.+?)/cryptoKeys/(?P.+?)$", + path, + ) + return m.groupdict() if m else {} + @staticmethod def crypto_key_version_path( project: str, @@ -371,6 +395,28 @@ def parse_network_path(path: str) -> Dict[str, str]: ) return m.groupdict() if m else {} + @staticmethod + def service_attachment_path( + project: str, + region: str, + service_attachment: str, + ) -> str: + """Returns a fully-qualified service_attachment string.""" + return "projects/{project}/regions/{region}/serviceAttachments/{service_attachment}".format( + project=project, + region=region, + service_attachment=service_attachment, + ) + + @staticmethod + def parse_service_attachment_path(path: str) -> Dict[str, str]: + """Parses a service_attachment path into its component segments.""" + m = re.match( + r"^projects/(?P.+?)/regions/(?P.+?)/serviceAttachments/(?P.+?)$", + path, + ) + return m.groupdict() if m else {} + @staticmethod def supported_database_flag_path( project: str, @@ -1814,7 +1860,7 @@ def sample_upgrade_cluster(): # Initialize request argument(s) request = alloydb_v1beta.UpgradeClusterRequest( name="name_value", - version="POSTGRES_16", + version="POSTGRES_17", ) # Make the request @@ -5634,8 +5680,7 @@ def sample_list_databases(): Args: request (Union[google.cloud.alloydb_v1beta.types.ListDatabasesRequest, dict]): - The request object. Message for requesting list of - Databases. + The request object. Message for ListDatabases request. parent (str): Required. Parent value for ListDatabasesRequest. @@ -5653,8 +5698,8 @@ def sample_list_databases(): Returns: google.cloud.alloydb_v1beta.services.alloy_db_admin.pagers.ListDatabasesPager: - Message for response to listing - Databases. + Message for ListDatabases response. + Iterating over this object will yield results and resolve additional pages automatically. @@ -5717,6 +5762,129 @@ def sample_list_databases(): # Done; return the response. return response + def create_database( + self, + request: Optional[Union[service.CreateDatabaseRequest, dict]] = None, + *, + parent: Optional[str] = None, + database: Optional[resources.Database] = None, + database_id: Optional[str] = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> resources.Database: + r"""Creates a new Database in a given project, location, + and cluster. + + .. code-block:: python + + # This snippet has been automatically generated and should be regarded as a + # code template only. + # It will require modifications to work: + # - It may require correct/in-range values for request initialization. + # - It may require specifying regional endpoints when creating the service + # client as shown in: + # https://googleapis.dev/python/google-api-core/latest/client_options.html + from google.cloud import alloydb_v1beta + + def sample_create_database(): + # Create a client + client = alloydb_v1beta.AlloyDBAdminClient() + + # Initialize request argument(s) + request = alloydb_v1beta.CreateDatabaseRequest( + parent="parent_value", + database_id="database_id_value", + ) + + # Make the request + response = client.create_database(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.alloydb_v1beta.types.CreateDatabaseRequest, dict]): + The request object. Message for CreateDatabase request. + parent (str): + Required. Value for parent. + This corresponds to the ``parent`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + database (google.cloud.alloydb_v1beta.types.Database): + Required. The resource being created. + This corresponds to the ``database`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + database_id (str): + Required. ID of the requesting + object. + + This corresponds to the ``database_id`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + google.cloud.alloydb_v1beta.types.Database: + Message describing Database object. + """ + # Create or coerce a protobuf request object. + # - Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + flattened_params = [parent, database, database_id] + has_flattened_params = ( + len([param for param in flattened_params if param is not None]) > 0 + ) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # - Use the request object if provided (there's no risk of modifying the input as + # there are no flattened fields), or create one. + if not isinstance(request, service.CreateDatabaseRequest): + request = service.CreateDatabaseRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if parent is not None: + request.parent = parent + if database is not None: + request.database = database + if database_id is not None: + request.database_id = database_id + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[self._transport.create_database] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata((("parent", request.parent),)), + ) + + # Validate the universe domain. + self._validate_universe_domain() + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + def __enter__(self) -> "AlloyDBAdminClient": return self diff --git a/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/services/alloy_db_admin/transports/base.py b/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/services/alloy_db_admin/transports/base.py index d02841acc473..7eb685d62ae8 100644 --- a/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/services/alloy_db_admin/transports/base.py +++ b/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/services/alloy_db_admin/transports/base.py @@ -430,6 +430,20 @@ def _prep_wrapped_messages(self, client_info): default_timeout=60.0, client_info=client_info, ), + self.create_database: gapic_v1.method.wrap_method( + self.create_database, + default_retry=retries.Retry( + initial=1.0, + maximum=60.0, + multiplier=1.3, + predicate=retries.if_exception_type( + core_exceptions.ServiceUnavailable, + ), + deadline=60.0, + ), + default_timeout=60.0, + client_info=client_info, + ), self.get_location: gapic_v1.method.wrap_method( self.get_location, default_timeout=None, @@ -810,6 +824,15 @@ def list_databases( ]: raise NotImplementedError() + @property + def create_database( + self, + ) -> Callable[ + [service.CreateDatabaseRequest], + Union[resources.Database, Awaitable[resources.Database]], + ]: + raise NotImplementedError() + @property def list_operations( self, diff --git a/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/services/alloy_db_admin/transports/grpc.py b/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/services/alloy_db_admin/transports/grpc.py index 5f67e4d4d55c..054bd05869c4 100644 --- a/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/services/alloy_db_admin/transports/grpc.py +++ b/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/services/alloy_db_admin/transports/grpc.py @@ -1342,6 +1342,33 @@ def list_databases( ) return self._stubs["list_databases"] + @property + def create_database( + self, + ) -> Callable[[service.CreateDatabaseRequest], resources.Database]: + r"""Return a callable for the create database method over gRPC. + + Creates a new Database in a given project, location, + and cluster. + + Returns: + Callable[[~.CreateDatabaseRequest], + ~.Database]: + A function that, when called, will call the underlying RPC + on the server. + """ + # Generate a "stub function" on-the-fly which will actually make + # the request. + # gRPC handles serialization and deserialization, so we just need + # to pass in the functions for each. + if "create_database" not in self._stubs: + self._stubs["create_database"] = self._logged_channel.unary_unary( + "/google.cloud.alloydb.v1beta.AlloyDBAdmin/CreateDatabase", + request_serializer=service.CreateDatabaseRequest.serialize, + response_deserializer=resources.Database.deserialize, + ) + return self._stubs["create_database"] + def close(self): self._logged_channel.close() diff --git a/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/services/alloy_db_admin/transports/grpc_asyncio.py b/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/services/alloy_db_admin/transports/grpc_asyncio.py index 56f05d02eda9..305dc1327cba 100644 --- a/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/services/alloy_db_admin/transports/grpc_asyncio.py +++ b/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/services/alloy_db_admin/transports/grpc_asyncio.py @@ -1380,6 +1380,33 @@ def list_databases( ) return self._stubs["list_databases"] + @property + def create_database( + self, + ) -> Callable[[service.CreateDatabaseRequest], Awaitable[resources.Database]]: + r"""Return a callable for the create database method over gRPC. + + Creates a new Database in a given project, location, + and cluster. + + Returns: + Callable[[~.CreateDatabaseRequest], + Awaitable[~.Database]]: + A function that, when called, will call the underlying RPC + on the server. + """ + # Generate a "stub function" on-the-fly which will actually make + # the request. + # gRPC handles serialization and deserialization, so we just need + # to pass in the functions for each. + if "create_database" not in self._stubs: + self._stubs["create_database"] = self._logged_channel.unary_unary( + "/google.cloud.alloydb.v1beta.AlloyDBAdmin/CreateDatabase", + request_serializer=service.CreateDatabaseRequest.serialize, + response_deserializer=resources.Database.deserialize, + ) + return self._stubs["create_database"] + def _prep_wrapped_messages(self, client_info): """Precompute the wrapped methods, overriding the base class method to use async wrappers.""" self._wrapped_methods = { @@ -1676,6 +1703,20 @@ def _prep_wrapped_messages(self, client_info): default_timeout=60.0, client_info=client_info, ), + self.create_database: self._wrap_method( + self.create_database, + default_retry=retries.AsyncRetry( + initial=1.0, + maximum=60.0, + multiplier=1.3, + predicate=retries.if_exception_type( + core_exceptions.ServiceUnavailable, + ), + deadline=60.0, + ), + default_timeout=60.0, + client_info=client_info, + ), self.get_location: self._wrap_method( self.get_location, default_timeout=None, diff --git a/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/services/alloy_db_admin/transports/rest.py b/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/services/alloy_db_admin/transports/rest.py index c30aa5bebb56..38ceb1f2ec50 100644 --- a/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/services/alloy_db_admin/transports/rest.py +++ b/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/services/alloy_db_admin/transports/rest.py @@ -101,6 +101,14 @@ def post_create_cluster(self, response): logging.log(f"Received response: {response}") return response + def pre_create_database(self, request, metadata): + logging.log(f"Received request: {request}") + return request, metadata + + def post_create_database(self, response): + logging.log(f"Received response: {response}") + return response + def pre_create_instance(self, request, metadata): logging.log(f"Received request: {request}") return request, metadata @@ -515,6 +523,50 @@ def post_create_cluster_with_metadata( """ return response, metadata + def pre_create_database( + self, + request: service.CreateDatabaseRequest, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[service.CreateDatabaseRequest, Sequence[Tuple[str, Union[str, bytes]]]]: + """Pre-rpc interceptor for create_database + + Override in a subclass to manipulate the request or metadata + before they are sent to the AlloyDBAdmin server. + """ + return request, metadata + + def post_create_database(self, response: resources.Database) -> resources.Database: + """Post-rpc interceptor for create_database + + DEPRECATED. Please use the `post_create_database_with_metadata` + interceptor instead. + + Override in a subclass to read or manipulate the response + after it is returned by the AlloyDBAdmin server but before + it is returned to user code. This `post_create_database` interceptor runs + before the `post_create_database_with_metadata` interceptor. + """ + return response + + def post_create_database_with_metadata( + self, + response: resources.Database, + metadata: Sequence[Tuple[str, Union[str, bytes]]], + ) -> Tuple[resources.Database, Sequence[Tuple[str, Union[str, bytes]]]]: + """Post-rpc interceptor for create_database + + Override in a subclass to read or manipulate the response or metadata after it + is returned by the AlloyDBAdmin server but before it is returned to user code. + + We recommend only using this `post_create_database_with_metadata` + interceptor in new development instead of the `post_create_database` interceptor. + When both interceptors are used, this `post_create_database_with_metadata` interceptor runs after the + `post_create_database` interceptor. The (possibly modified) response returned by + `post_create_database` will be passed to + `post_create_database_with_metadata`. + """ + return response, metadata + def pre_create_instance( self, request: service.CreateInstanceRequest, @@ -2801,6 +2853,156 @@ def __call__( ) return resp + class _CreateDatabase( + _BaseAlloyDBAdminRestTransport._BaseCreateDatabase, AlloyDBAdminRestStub + ): + def __hash__(self): + return hash("AlloyDBAdminRestTransport.CreateDatabase") + + @staticmethod + def _get_response( + host, + metadata, + query_params, + session, + timeout, + transcoded_request, + body=None, + ): + uri = transcoded_request["uri"] + method = transcoded_request["method"] + headers = dict(metadata) + headers["Content-Type"] = "application/json" + response = getattr(session, method)( + "{host}{uri}".format(host=host, uri=uri), + timeout=timeout, + headers=headers, + params=rest_helpers.flatten_query_params(query_params, strict=True), + data=body, + ) + return response + + def __call__( + self, + request: service.CreateDatabaseRequest, + *, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: Optional[float] = None, + metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), + ) -> resources.Database: + r"""Call the create database method over HTTP. + + Args: + request (~.service.CreateDatabaseRequest): + The request object. Message for CreateDatabase request. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be + sent along with the request as metadata. Normally, each value must be of type `str`, + but for metadata keys ending with the suffix `-bin`, the corresponding values must + be of type `bytes`. + + Returns: + ~.resources.Database: + Message describing Database object. + """ + + http_options = ( + _BaseAlloyDBAdminRestTransport._BaseCreateDatabase._get_http_options() + ) + + request, metadata = self._interceptor.pre_create_database(request, metadata) + transcoded_request = _BaseAlloyDBAdminRestTransport._BaseCreateDatabase._get_transcoded_request( + http_options, request + ) + + body = _BaseAlloyDBAdminRestTransport._BaseCreateDatabase._get_request_body_json( + transcoded_request + ) + + # Jsonify the query params + query_params = _BaseAlloyDBAdminRestTransport._BaseCreateDatabase._get_query_params_json( + transcoded_request + ) + + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + request_url = "{host}{uri}".format( + host=self._host, uri=transcoded_request["uri"] + ) + method = transcoded_request["method"] + try: + request_payload = type(request).to_json(request) + except: + request_payload = None + http_request = { + "payload": request_payload, + "requestMethod": method, + "requestUrl": request_url, + "headers": dict(metadata), + } + _LOGGER.debug( + f"Sending request for google.cloud.alloydb_v1beta.AlloyDBAdminClient.CreateDatabase", + extra={ + "serviceName": "google.cloud.alloydb.v1beta.AlloyDBAdmin", + "rpcName": "CreateDatabase", + "httpRequest": http_request, + "metadata": http_request["headers"], + }, + ) + + # Send the request + response = AlloyDBAdminRestTransport._CreateDatabase._get_response( + self._host, + metadata, + query_params, + self._session, + timeout, + transcoded_request, + body, + ) + + # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception + # subclass. + if response.status_code >= 400: + raise core_exceptions.from_http_response(response) + + # Return the response + resp = resources.Database() + pb_resp = resources.Database.pb(resp) + + json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True) + + resp = self._interceptor.post_create_database(resp) + response_metadata = [(k, str(v)) for k, v in response.headers.items()] + resp, _ = self._interceptor.post_create_database_with_metadata( + resp, response_metadata + ) + if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + logging.DEBUG + ): # pragma: NO COVER + try: + response_payload = resources.Database.to_json(response) + except: + response_payload = None + http_response = { + "payload": response_payload, + "headers": dict(response.headers), + "status": response.status_code, + } + _LOGGER.debug( + "Received response for google.cloud.alloydb_v1beta.AlloyDBAdminClient.create_database", + extra={ + "serviceName": "google.cloud.alloydb.v1beta.AlloyDBAdmin", + "rpcName": "CreateDatabase", + "metadata": http_response["headers"], + "httpResponse": http_response, + }, + ) + return resp + class _CreateInstance( _BaseAlloyDBAdminRestTransport._BaseCreateInstance, AlloyDBAdminRestStub ): @@ -5984,8 +6186,7 @@ def __call__( Args: request (~.service.ListDatabasesRequest): - The request object. Message for requesting list of - Databases. + The request object. Message for ListDatabases request. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -5996,9 +6197,7 @@ def __call__( Returns: ~.service.ListDatabasesResponse: - Message for response to listing - Databases. - + Message for ListDatabases response. """ http_options = ( @@ -7942,6 +8141,14 @@ def create_cluster( # In C++ this would require a dynamic_cast return self._CreateCluster(self._session, self._host, self._interceptor) # type: ignore + @property + def create_database( + self, + ) -> Callable[[service.CreateDatabaseRequest], resources.Database]: + # The return type is fine, but mypy isn't sophisticated enough to determine what's going on here. + # In C++ this would require a dynamic_cast + return self._CreateDatabase(self._session, self._host, self._interceptor) # type: ignore + @property def create_instance( self, diff --git a/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/services/alloy_db_admin/transports/rest_base.py b/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/services/alloy_db_admin/transports/rest_base.py index 28cd9f7f9f0e..b1b21fb06944 100644 --- a/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/services/alloy_db_admin/transports/rest_base.py +++ b/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/services/alloy_db_admin/transports/rest_base.py @@ -267,6 +267,65 @@ def _get_query_params_json(transcoded_request): query_params["$alt"] = "json;enum-encoding=int" return query_params + class _BaseCreateDatabase: + def __hash__(self): # pragma: NO COVER + return NotImplementedError("__hash__ must be implemented.") + + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { + "databaseId": "", + } + + @classmethod + def _get_unset_required_fields(cls, message_dict): + return { + k: v + for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items() + if k not in message_dict + } + + @staticmethod + def _get_http_options(): + http_options: List[Dict[str, str]] = [ + { + "method": "post", + "uri": "/v1beta/{parent=projects/*/locations/*/clusters/*}/databases", + "body": "database", + }, + ] + return http_options + + @staticmethod + def _get_transcoded_request(http_options, request): + pb_request = service.CreateDatabaseRequest.pb(request) + transcoded_request = path_template.transcode(http_options, pb_request) + return transcoded_request + + @staticmethod + def _get_request_body_json(transcoded_request): + # Jsonify the request body + + body = json_format.MessageToJson( + transcoded_request["body"], use_integers_for_enums=True + ) + return body + + @staticmethod + def _get_query_params_json(transcoded_request): + query_params = json.loads( + json_format.MessageToJson( + transcoded_request["query_params"], + use_integers_for_enums=True, + ) + ) + query_params.update( + _BaseAlloyDBAdminRestTransport._BaseCreateDatabase._get_unset_required_fields( + query_params + ) + ) + + query_params["$alt"] = "json;enum-encoding=int" + return query_params + class _BaseCreateInstance: def __hash__(self): # pragma: NO COVER return NotImplementedError("__hash__ must be implemented.") diff --git a/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/services/alloy_dbcsql_admin/async_client.py b/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/services/alloy_dbcsql_admin/async_client.py index e90a4d977cec..924dc8b77cce 100644 --- a/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/services/alloy_dbcsql_admin/async_client.py +++ b/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/services/alloy_dbcsql_admin/async_client.py @@ -83,6 +83,8 @@ class AlloyDBCSQLAdminAsyncClient: parse_backup_path = staticmethod(AlloyDBCSQLAdminClient.parse_backup_path) cluster_path = staticmethod(AlloyDBCSQLAdminClient.cluster_path) parse_cluster_path = staticmethod(AlloyDBCSQLAdminClient.parse_cluster_path) + crypto_key_path = staticmethod(AlloyDBCSQLAdminClient.crypto_key_path) + parse_crypto_key_path = staticmethod(AlloyDBCSQLAdminClient.parse_crypto_key_path) crypto_key_version_path = staticmethod( AlloyDBCSQLAdminClient.crypto_key_version_path ) diff --git a/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/services/alloy_dbcsql_admin/client.py b/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/services/alloy_dbcsql_admin/client.py index 3564157670d0..a94e06d4e7f2 100644 --- a/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/services/alloy_dbcsql_admin/client.py +++ b/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/services/alloy_dbcsql_admin/client.py @@ -246,6 +246,30 @@ def parse_cluster_path(path: str) -> Dict[str, str]: ) return m.groupdict() if m else {} + @staticmethod + def crypto_key_path( + project: str, + location: str, + key_ring: str, + crypto_key: str, + ) -> str: + """Returns a fully-qualified crypto_key string.""" + return "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}".format( + project=project, + location=location, + key_ring=key_ring, + crypto_key=crypto_key, + ) + + @staticmethod + def parse_crypto_key_path(path: str) -> Dict[str, str]: + """Parses a crypto_key path into its component segments.""" + m = re.match( + r"^projects/(?P.+?)/locations/(?P.+?)/keyRings/(?P.+?)/cryptoKeys/(?P.+?)$", + path, + ) + return m.groupdict() if m else {} + @staticmethod def crypto_key_version_path( project: str, diff --git a/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/types/__init__.py b/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/types/__init__.py index 2cc30d73cb54..2b5e40149a56 100644 --- a/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/types/__init__.py +++ b/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/types/__init__.py @@ -54,6 +54,7 @@ BatchCreateInstanceStatus, CreateBackupRequest, CreateClusterRequest, + CreateDatabaseRequest, CreateInstanceRequest, CreateInstanceRequests, CreateSecondaryClusterRequest, @@ -147,6 +148,7 @@ "BatchCreateInstanceStatus", "CreateBackupRequest", "CreateClusterRequest", + "CreateDatabaseRequest", "CreateInstanceRequest", "CreateInstanceRequests", "CreateSecondaryClusterRequest", diff --git a/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/types/resources.py b/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/types/resources.py index bd6e76a59956..57af831c16e4 100644 --- a/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/types/resources.py +++ b/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/types/resources.py @@ -119,12 +119,15 @@ class DatabaseVersion(proto.Enum): The database version is Postgres 15. POSTGRES_16 (4): The database version is Postgres 16. + POSTGRES_17 (5): + The database version is Postgres 17. """ DATABASE_VERSION_UNSPECIFIED = 0 POSTGRES_13 = 1 POSTGRES_14 = 2 POSTGRES_15 = 3 POSTGRES_16 = 4 + POSTGRES_17 = 5 class SubscriptionType(proto.Enum): @@ -933,11 +936,11 @@ class Cluster(proto.Message): "123/costCenter": "marketing". service_account_email (str): Output only. AlloyDB per-cluster service - agent email. This service account is created + account. This service account is created per-cluster per-project, and is different from - that of the primary service agent which is - created per-project. The service account naming - format is subject to change. + the per-project service account. The per-cluster + service account naming format is subject to + change. """ class State(proto.Enum): @@ -949,14 +952,9 @@ class State(proto.Enum): READY (1): The cluster is active and running. STOPPED (2): - The cluster is stopped. All instances in the - cluster are stopped. Customers can start a - stopped cluster at any point and all their - instances will come back to life with same names - and IP resources. In this state, customer pays - for storage. - Associated backups could also be present in a - stopped cluster. + This is unused. Even when all instances in + the cluster are stopped, the cluster remains in + READY state. EMPTY (3): The cluster is empty and has no associated resources. All instances, associated storage and @@ -2089,26 +2087,11 @@ class ConnectionPoolConfig(proto.Message): flags (MutableMapping[str, str]): Optional. Connection Pool flags, as a list of "key": "value" pairs. + pooler_count (int): + Output only. The number of running poolers + per instance. """ - class PoolMode(proto.Enum): - r"""The pool mode. Defaults to ``POOL_MODE_TRANSACTION``. - - Values: - POOL_MODE_UNSPECIFIED (0): - The pool mode is not specified. Defaults to - ``POOL_MODE_TRANSACTION``. - POOL_MODE_SESSION (1): - Server is released back to pool after a - client disconnects. - POOL_MODE_TRANSACTION (2): - Server is released back to pool after a - transaction finishes. - """ - POOL_MODE_UNSPECIFIED = 0 - POOL_MODE_SESSION = 1 - POOL_MODE_TRANSACTION = 2 - enabled: bool = proto.Field( proto.BOOL, number=12, @@ -2118,6 +2101,10 @@ class PoolMode(proto.Enum): proto.STRING, number=13, ) + pooler_count: int = proto.Field( + proto.INT32, + number=14, + ) name: str = proto.Field( proto.STRING, @@ -2890,19 +2877,34 @@ class UserType(proto.Enum): class Database(proto.Message): r"""Message describing Database object. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Attributes: name (str): Identifier. Name of the resource in the form of ``projects/{project}/locations/{location}/clusters/{cluster}/databases/{database}``. charset (str): - Optional. Charset for the database. This field can contain - any PostgreSQL supported charset name. Example values - include "UTF8", "SQL_ASCII", etc. + Optional. Immutable. Charset for the database. This field + can contain any PostgreSQL supported charset name. Example + values include "UTF8", "SQL_ASCII", etc. collation (str): - Optional. Collation for the database. - Name of the custom or native collation for - postgres. Example values include "C", "POSIX", - etc + Optional. Immutable. lc_collate for the database. String + sort order. Example values include "C", "POSIX", etc. + character_type (str): + Optional. Immutable. lc_ctype for the database. Character + classification (What is a letter? The upper-case + equivalent?). Example values include "C", "POSIX", etc. + is_template (bool): + Optional. Whether the database is a template database. + Deprecated in favor of is_template_database. + database_template (str): + Input only. Immutable. Template of the + database to be used for creating a new database. + is_template_database (bool): + Optional. Whether the database is a template + database. + + This field is a member of `oneof`_ ``_is_template_database``. """ name: str = proto.Field( @@ -2917,6 +2919,23 @@ class Database(proto.Message): proto.STRING, number=3, ) + character_type: str = proto.Field( + proto.STRING, + number=4, + ) + is_template: bool = proto.Field( + proto.BOOL, + number=5, + ) + database_template: str = proto.Field( + proto.STRING, + number=6, + ) + is_template_database: bool = proto.Field( + proto.BOOL, + number=7, + optional=True, + ) __all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/types/service.py b/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/types/service.py index 36e66bd48724..753af81c3709 100644 --- a/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/types/service.py +++ b/packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/types/service.py @@ -85,6 +85,7 @@ "DeleteUserRequest", "ListDatabasesRequest", "ListDatabasesResponse", + "CreateDatabaseRequest", }, ) @@ -2024,6 +2025,10 @@ class ExecuteSqlRequest(proto.Message): Required. SQL statement to execute on database. Any valid statement is permitted, including DDL, DML, DQL statements. + validate_only (bool): + Optional. If set, validates the sql statement + by performing syntax and semantic validation and + doesn't execute the query. """ password: str = proto.Field( @@ -2047,6 +2052,10 @@ class ExecuteSqlRequest(proto.Message): proto.STRING, number=4, ) + validate_only: bool = proto.Field( + proto.BOOL, + number=6, + ) class ExecuteSqlResponse(proto.Message): @@ -2820,8 +2829,50 @@ class StageStatus(proto.Message): Upgrade stage. state (google.cloud.alloydb_v1beta.types.UpgradeClusterResponse.Status): State of this stage. + schedule (google.cloud.alloydb_v1beta.types.UpgradeClusterStatus.StageStatus.StageSchedule): + Output only. Timing information for the stage + execution. """ + class StageSchedule(proto.Message): + r"""Timing information for the stage execution. + + Attributes: + estimated_start_time (google.protobuf.timestamp_pb2.Timestamp): + When the stage is expected to start. Set only + if the stage has not started yet. + actual_start_time (google.protobuf.timestamp_pb2.Timestamp): + Actual start time of the stage. Set only if + the stage has started. + estimated_end_time (google.protobuf.timestamp_pb2.Timestamp): + When the stage is expected to end. Set only + if the stage has not completed yet. + actual_end_time (google.protobuf.timestamp_pb2.Timestamp): + Actual end time of the stage. Set only if the + stage has completed. + """ + + estimated_start_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=1, + message=timestamp_pb2.Timestamp, + ) + actual_start_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=2, + message=timestamp_pb2.Timestamp, + ) + estimated_end_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=3, + message=timestamp_pb2.Timestamp, + ) + actual_end_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=4, + message=timestamp_pb2.Timestamp, + ) + read_pool_instances_upgrade: "UpgradeClusterStatus.ReadPoolInstancesUpgradeStageStatus" = proto.Field( proto.MESSAGE, number=11, @@ -2838,6 +2889,11 @@ class StageStatus(proto.Message): number=2, enum="UpgradeClusterResponse.Status", ) + schedule: "UpgradeClusterStatus.StageStatus.StageSchedule" = proto.Field( + proto.MESSAGE, + number=3, + message="UpgradeClusterStatus.StageStatus.StageSchedule", + ) class ReadPoolInstancesUpgradeStageStatus(proto.Message): r"""Read pool instances upgrade specific status. @@ -3175,7 +3231,7 @@ class DeleteUserRequest(proto.Message): class ListDatabasesRequest(proto.Message): - r"""Message for requesting list of Databases. + r"""Message for ListDatabases request. Attributes: parent (str): @@ -3216,11 +3272,11 @@ class ListDatabasesRequest(proto.Message): class ListDatabasesResponse(proto.Message): - r"""Message for response to listing Databases. + r"""Message for ListDatabases response. Attributes: databases (MutableSequence[google.cloud.alloydb_v1beta.types.Database]): - The list of databases + The list of databases. next_page_token (str): A token identifying the next page of results the server should return. If this field is @@ -3242,4 +3298,31 @@ def raw_page(self): ) +class CreateDatabaseRequest(proto.Message): + r"""Message for CreateDatabase request. + + Attributes: + parent (str): + Required. Value for parent. + database_id (str): + Required. ID of the requesting object. + database (google.cloud.alloydb_v1beta.types.Database): + Required. The resource being created. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + database_id: str = proto.Field( + proto.STRING, + number=2, + ) + database: resources.Database = proto.Field( + proto.MESSAGE, + number=3, + message=resources.Database, + ) + + __all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/packages/google-cloud-alloydb/noxfile.py b/packages/google-cloud-alloydb/noxfile.py index 6041bf3384e2..a995c1394ddc 100644 --- a/packages/google-cloud-alloydb/noxfile.py +++ b/packages/google-cloud-alloydb/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-alloydb/samples/generated_samples/alloydb_v1_generated_alloy_db_admin_upgrade_cluster_async.py b/packages/google-cloud-alloydb/samples/generated_samples/alloydb_v1_generated_alloy_db_admin_upgrade_cluster_async.py index b37df6c78db3..bc4576c08edb 100644 --- a/packages/google-cloud-alloydb/samples/generated_samples/alloydb_v1_generated_alloy_db_admin_upgrade_cluster_async.py +++ b/packages/google-cloud-alloydb/samples/generated_samples/alloydb_v1_generated_alloy_db_admin_upgrade_cluster_async.py @@ -41,7 +41,7 @@ async def sample_upgrade_cluster(): # Initialize request argument(s) request = alloydb_v1.UpgradeClusterRequest( name="name_value", - version="POSTGRES_16", + version="POSTGRES_17", ) # Make the request diff --git a/packages/google-cloud-alloydb/samples/generated_samples/alloydb_v1_generated_alloy_db_admin_upgrade_cluster_sync.py b/packages/google-cloud-alloydb/samples/generated_samples/alloydb_v1_generated_alloy_db_admin_upgrade_cluster_sync.py index bcd34b8a4bf3..bce3a7cd9046 100644 --- a/packages/google-cloud-alloydb/samples/generated_samples/alloydb_v1_generated_alloy_db_admin_upgrade_cluster_sync.py +++ b/packages/google-cloud-alloydb/samples/generated_samples/alloydb_v1_generated_alloy_db_admin_upgrade_cluster_sync.py @@ -41,7 +41,7 @@ def sample_upgrade_cluster(): # Initialize request argument(s) request = alloydb_v1.UpgradeClusterRequest( name="name_value", - version="POSTGRES_16", + version="POSTGRES_17", ) # Make the request diff --git a/packages/google-cloud-alloydb/samples/generated_samples/alloydb_v1alpha_generated_alloy_db_admin_create_database_async.py b/packages/google-cloud-alloydb/samples/generated_samples/alloydb_v1alpha_generated_alloy_db_admin_create_database_async.py new file mode 100644 index 000000000000..cbc37bc92d21 --- /dev/null +++ b/packages/google-cloud-alloydb/samples/generated_samples/alloydb_v1alpha_generated_alloy_db_admin_create_database_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateDatabase +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-alloydb + + +# [START alloydb_v1alpha_generated_AlloyDBAdmin_CreateDatabase_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import alloydb_v1alpha + + +async def sample_create_database(): + # Create a client + client = alloydb_v1alpha.AlloyDBAdminAsyncClient() + + # Initialize request argument(s) + request = alloydb_v1alpha.CreateDatabaseRequest( + parent="parent_value", + database_id="database_id_value", + ) + + # Make the request + response = await client.create_database(request=request) + + # Handle the response + print(response) + +# [END alloydb_v1alpha_generated_AlloyDBAdmin_CreateDatabase_async] diff --git a/packages/google-cloud-alloydb/samples/generated_samples/alloydb_v1alpha_generated_alloy_db_admin_create_database_sync.py b/packages/google-cloud-alloydb/samples/generated_samples/alloydb_v1alpha_generated_alloy_db_admin_create_database_sync.py new file mode 100644 index 000000000000..06abaad1ac38 --- /dev/null +++ b/packages/google-cloud-alloydb/samples/generated_samples/alloydb_v1alpha_generated_alloy_db_admin_create_database_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateDatabase +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-alloydb + + +# [START alloydb_v1alpha_generated_AlloyDBAdmin_CreateDatabase_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import alloydb_v1alpha + + +def sample_create_database(): + # Create a client + client = alloydb_v1alpha.AlloyDBAdminClient() + + # Initialize request argument(s) + request = alloydb_v1alpha.CreateDatabaseRequest( + parent="parent_value", + database_id="database_id_value", + ) + + # Make the request + response = client.create_database(request=request) + + # Handle the response + print(response) + +# [END alloydb_v1alpha_generated_AlloyDBAdmin_CreateDatabase_sync] diff --git a/packages/google-cloud-alloydb/samples/generated_samples/alloydb_v1alpha_generated_alloy_db_admin_upgrade_cluster_async.py b/packages/google-cloud-alloydb/samples/generated_samples/alloydb_v1alpha_generated_alloy_db_admin_upgrade_cluster_async.py index 8570afc3d6f2..96ceec40ce83 100644 --- a/packages/google-cloud-alloydb/samples/generated_samples/alloydb_v1alpha_generated_alloy_db_admin_upgrade_cluster_async.py +++ b/packages/google-cloud-alloydb/samples/generated_samples/alloydb_v1alpha_generated_alloy_db_admin_upgrade_cluster_async.py @@ -41,7 +41,7 @@ async def sample_upgrade_cluster(): # Initialize request argument(s) request = alloydb_v1alpha.UpgradeClusterRequest( name="name_value", - version="POSTGRES_16", + version="POSTGRES_17", ) # Make the request diff --git a/packages/google-cloud-alloydb/samples/generated_samples/alloydb_v1alpha_generated_alloy_db_admin_upgrade_cluster_sync.py b/packages/google-cloud-alloydb/samples/generated_samples/alloydb_v1alpha_generated_alloy_db_admin_upgrade_cluster_sync.py index 14cf4326094d..47b17fe0f05a 100644 --- a/packages/google-cloud-alloydb/samples/generated_samples/alloydb_v1alpha_generated_alloy_db_admin_upgrade_cluster_sync.py +++ b/packages/google-cloud-alloydb/samples/generated_samples/alloydb_v1alpha_generated_alloy_db_admin_upgrade_cluster_sync.py @@ -41,7 +41,7 @@ def sample_upgrade_cluster(): # Initialize request argument(s) request = alloydb_v1alpha.UpgradeClusterRequest( name="name_value", - version="POSTGRES_16", + version="POSTGRES_17", ) # Make the request diff --git a/packages/google-cloud-alloydb/samples/generated_samples/alloydb_v1beta_generated_alloy_db_admin_create_database_async.py b/packages/google-cloud-alloydb/samples/generated_samples/alloydb_v1beta_generated_alloy_db_admin_create_database_async.py new file mode 100644 index 000000000000..3f1d71de5488 --- /dev/null +++ b/packages/google-cloud-alloydb/samples/generated_samples/alloydb_v1beta_generated_alloy_db_admin_create_database_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateDatabase +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-alloydb + + +# [START alloydb_v1beta_generated_AlloyDBAdmin_CreateDatabase_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import alloydb_v1beta + + +async def sample_create_database(): + # Create a client + client = alloydb_v1beta.AlloyDBAdminAsyncClient() + + # Initialize request argument(s) + request = alloydb_v1beta.CreateDatabaseRequest( + parent="parent_value", + database_id="database_id_value", + ) + + # Make the request + response = await client.create_database(request=request) + + # Handle the response + print(response) + +# [END alloydb_v1beta_generated_AlloyDBAdmin_CreateDatabase_async] diff --git a/packages/google-cloud-alloydb/samples/generated_samples/alloydb_v1beta_generated_alloy_db_admin_create_database_sync.py b/packages/google-cloud-alloydb/samples/generated_samples/alloydb_v1beta_generated_alloy_db_admin_create_database_sync.py new file mode 100644 index 000000000000..532cd0aacd82 --- /dev/null +++ b/packages/google-cloud-alloydb/samples/generated_samples/alloydb_v1beta_generated_alloy_db_admin_create_database_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateDatabase +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-alloydb + + +# [START alloydb_v1beta_generated_AlloyDBAdmin_CreateDatabase_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import alloydb_v1beta + + +def sample_create_database(): + # Create a client + client = alloydb_v1beta.AlloyDBAdminClient() + + # Initialize request argument(s) + request = alloydb_v1beta.CreateDatabaseRequest( + parent="parent_value", + database_id="database_id_value", + ) + + # Make the request + response = client.create_database(request=request) + + # Handle the response + print(response) + +# [END alloydb_v1beta_generated_AlloyDBAdmin_CreateDatabase_sync] diff --git a/packages/google-cloud-alloydb/samples/generated_samples/alloydb_v1beta_generated_alloy_db_admin_upgrade_cluster_async.py b/packages/google-cloud-alloydb/samples/generated_samples/alloydb_v1beta_generated_alloy_db_admin_upgrade_cluster_async.py index a50a5c29ba63..d33787d047a1 100644 --- a/packages/google-cloud-alloydb/samples/generated_samples/alloydb_v1beta_generated_alloy_db_admin_upgrade_cluster_async.py +++ b/packages/google-cloud-alloydb/samples/generated_samples/alloydb_v1beta_generated_alloy_db_admin_upgrade_cluster_async.py @@ -41,7 +41,7 @@ async def sample_upgrade_cluster(): # Initialize request argument(s) request = alloydb_v1beta.UpgradeClusterRequest( name="name_value", - version="POSTGRES_16", + version="POSTGRES_17", ) # Make the request diff --git a/packages/google-cloud-alloydb/samples/generated_samples/alloydb_v1beta_generated_alloy_db_admin_upgrade_cluster_sync.py b/packages/google-cloud-alloydb/samples/generated_samples/alloydb_v1beta_generated_alloy_db_admin_upgrade_cluster_sync.py index ee7582d04c9e..ac8912f7a571 100644 --- a/packages/google-cloud-alloydb/samples/generated_samples/alloydb_v1beta_generated_alloy_db_admin_upgrade_cluster_sync.py +++ b/packages/google-cloud-alloydb/samples/generated_samples/alloydb_v1beta_generated_alloy_db_admin_upgrade_cluster_sync.py @@ -41,7 +41,7 @@ def sample_upgrade_cluster(): # Initialize request argument(s) request = alloydb_v1beta.UpgradeClusterRequest( name="name_value", - version="POSTGRES_16", + version="POSTGRES_17", ) # Make the request diff --git a/packages/google-cloud-alloydb/samples/generated_samples/snippet_metadata_google.cloud.alloydb.v1alpha.json b/packages/google-cloud-alloydb/samples/generated_samples/snippet_metadata_google.cloud.alloydb.v1alpha.json index 1cafd27a4879..aeb6349f4055 100644 --- a/packages/google-cloud-alloydb/samples/generated_samples/snippet_metadata_google.cloud.alloydb.v1alpha.json +++ b/packages/google-cloud-alloydb/samples/generated_samples/snippet_metadata_google.cloud.alloydb.v1alpha.json @@ -518,6 +518,183 @@ ], "title": "alloydb_v1alpha_generated_alloy_db_admin_create_cluster_sync.py" }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.alloydb_v1alpha.AlloyDBAdminAsyncClient", + "shortName": "AlloyDBAdminAsyncClient" + }, + "fullName": "google.cloud.alloydb_v1alpha.AlloyDBAdminAsyncClient.create_database", + "method": { + "fullName": "google.cloud.alloydb.v1alpha.AlloyDBAdmin.CreateDatabase", + "service": { + "fullName": "google.cloud.alloydb.v1alpha.AlloyDBAdmin", + "shortName": "AlloyDBAdmin" + }, + "shortName": "CreateDatabase" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.alloydb_v1alpha.types.CreateDatabaseRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "database", + "type": "google.cloud.alloydb_v1alpha.types.Database" + }, + { + "name": "database_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.alloydb_v1alpha.types.Database", + "shortName": "create_database" + }, + "description": "Sample for CreateDatabase", + "file": "alloydb_v1alpha_generated_alloy_db_admin_create_database_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "alloydb_v1alpha_generated_AlloyDBAdmin_CreateDatabase_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "alloydb_v1alpha_generated_alloy_db_admin_create_database_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.alloydb_v1alpha.AlloyDBAdminClient", + "shortName": "AlloyDBAdminClient" + }, + "fullName": "google.cloud.alloydb_v1alpha.AlloyDBAdminClient.create_database", + "method": { + "fullName": "google.cloud.alloydb.v1alpha.AlloyDBAdmin.CreateDatabase", + "service": { + "fullName": "google.cloud.alloydb.v1alpha.AlloyDBAdmin", + "shortName": "AlloyDBAdmin" + }, + "shortName": "CreateDatabase" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.alloydb_v1alpha.types.CreateDatabaseRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "database", + "type": "google.cloud.alloydb_v1alpha.types.Database" + }, + { + "name": "database_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.alloydb_v1alpha.types.Database", + "shortName": "create_database" + }, + "description": "Sample for CreateDatabase", + "file": "alloydb_v1alpha_generated_alloy_db_admin_create_database_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "alloydb_v1alpha_generated_AlloyDBAdmin_CreateDatabase_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "alloydb_v1alpha_generated_alloy_db_admin_create_database_sync.py" + }, { "canonical": true, "clientMethod": { diff --git a/packages/google-cloud-alloydb/samples/generated_samples/snippet_metadata_google.cloud.alloydb.v1beta.json b/packages/google-cloud-alloydb/samples/generated_samples/snippet_metadata_google.cloud.alloydb.v1beta.json index 3e961c3e9d48..9e0e47501ef4 100644 --- a/packages/google-cloud-alloydb/samples/generated_samples/snippet_metadata_google.cloud.alloydb.v1beta.json +++ b/packages/google-cloud-alloydb/samples/generated_samples/snippet_metadata_google.cloud.alloydb.v1beta.json @@ -518,6 +518,183 @@ ], "title": "alloydb_v1beta_generated_alloy_db_admin_create_cluster_sync.py" }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.alloydb_v1beta.AlloyDBAdminAsyncClient", + "shortName": "AlloyDBAdminAsyncClient" + }, + "fullName": "google.cloud.alloydb_v1beta.AlloyDBAdminAsyncClient.create_database", + "method": { + "fullName": "google.cloud.alloydb.v1beta.AlloyDBAdmin.CreateDatabase", + "service": { + "fullName": "google.cloud.alloydb.v1beta.AlloyDBAdmin", + "shortName": "AlloyDBAdmin" + }, + "shortName": "CreateDatabase" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.alloydb_v1beta.types.CreateDatabaseRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "database", + "type": "google.cloud.alloydb_v1beta.types.Database" + }, + { + "name": "database_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.alloydb_v1beta.types.Database", + "shortName": "create_database" + }, + "description": "Sample for CreateDatabase", + "file": "alloydb_v1beta_generated_alloy_db_admin_create_database_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "alloydb_v1beta_generated_AlloyDBAdmin_CreateDatabase_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "alloydb_v1beta_generated_alloy_db_admin_create_database_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.alloydb_v1beta.AlloyDBAdminClient", + "shortName": "AlloyDBAdminClient" + }, + "fullName": "google.cloud.alloydb_v1beta.AlloyDBAdminClient.create_database", + "method": { + "fullName": "google.cloud.alloydb.v1beta.AlloyDBAdmin.CreateDatabase", + "service": { + "fullName": "google.cloud.alloydb.v1beta.AlloyDBAdmin", + "shortName": "AlloyDBAdmin" + }, + "shortName": "CreateDatabase" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.alloydb_v1beta.types.CreateDatabaseRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "database", + "type": "google.cloud.alloydb_v1beta.types.Database" + }, + { + "name": "database_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, Union[str, bytes]]]" + } + ], + "resultType": "google.cloud.alloydb_v1beta.types.Database", + "shortName": "create_database" + }, + "description": "Sample for CreateDatabase", + "file": "alloydb_v1beta_generated_alloy_db_admin_create_database_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "alloydb_v1beta_generated_AlloyDBAdmin_CreateDatabase_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "alloydb_v1beta_generated_alloy_db_admin_create_database_sync.py" + }, { "canonical": true, "clientMethod": { diff --git a/packages/google-cloud-alloydb/scripts/fixup_alloydb_v1_keywords.py b/packages/google-cloud-alloydb/scripts/fixup_alloydb_v1_keywords.py index 2b7ad0f47590..d47703c5e3e2 100644 --- a/packages/google-cloud-alloydb/scripts/fixup_alloydb_v1_keywords.py +++ b/packages/google-cloud-alloydb/scripts/fixup_alloydb_v1_keywords.py @@ -50,7 +50,7 @@ class alloydbCallTransformer(cst.CSTTransformer): 'delete_cluster': ('name', 'request_id', 'etag', 'validate_only', 'force', ), 'delete_instance': ('name', 'request_id', 'etag', 'validate_only', ), 'delete_user': ('name', 'request_id', 'validate_only', ), - 'execute_sql': ('instance', 'database', 'sql_statement', 'password', 'user', ), + 'execute_sql': ('instance', 'database', 'sql_statement', 'password', 'user', 'validate_only', ), 'export_cluster': ('gcs_destination', 'name', 'database', 'csv_export_options', 'sql_export_options', ), 'failover_instance': ('name', 'request_id', 'validate_only', ), 'generate_client_certificate': ('parent', 'request_id', 'cert_duration', 'public_key', 'use_metadata_exchange', ), diff --git a/packages/google-cloud-alloydb/scripts/fixup_alloydb_v1alpha_keywords.py b/packages/google-cloud-alloydb/scripts/fixup_alloydb_v1alpha_keywords.py index 537931f9ebf9..591f7aef2826 100644 --- a/packages/google-cloud-alloydb/scripts/fixup_alloydb_v1alpha_keywords.py +++ b/packages/google-cloud-alloydb/scripts/fixup_alloydb_v1alpha_keywords.py @@ -42,6 +42,7 @@ class alloydbCallTransformer(cst.CSTTransformer): 'batch_create_instances': ('parent', 'requests', 'request_id', ), 'create_backup': ('parent', 'backup_id', 'backup', 'request_id', 'validate_only', ), 'create_cluster': ('parent', 'cluster_id', 'cluster', 'request_id', 'validate_only', ), + 'create_database': ('parent', 'database_id', 'database', ), 'create_instance': ('parent', 'instance_id', 'instance', 'request_id', 'validate_only', ), 'create_secondary_cluster': ('parent', 'cluster_id', 'cluster', 'request_id', 'validate_only', ), 'create_secondary_instance': ('parent', 'instance_id', 'instance', 'request_id', 'validate_only', ), @@ -50,7 +51,7 @@ class alloydbCallTransformer(cst.CSTTransformer): 'delete_cluster': ('name', 'request_id', 'etag', 'validate_only', 'force', ), 'delete_instance': ('name', 'request_id', 'etag', 'validate_only', ), 'delete_user': ('name', 'request_id', 'validate_only', ), - 'execute_sql': ('instance', 'database', 'user', 'sql_statement', 'password', ), + 'execute_sql': ('instance', 'database', 'user', 'sql_statement', 'password', 'validate_only', ), 'export_cluster': ('gcs_destination', 'name', 'database', 'csv_export_options', 'sql_export_options', ), 'failover_instance': ('name', 'request_id', 'validate_only', ), 'generate_client_certificate': ('parent', 'request_id', 'pem_csr', 'cert_duration', 'public_key', 'use_metadata_exchange', ), diff --git a/packages/google-cloud-alloydb/scripts/fixup_alloydb_v1beta_keywords.py b/packages/google-cloud-alloydb/scripts/fixup_alloydb_v1beta_keywords.py index 537931f9ebf9..591f7aef2826 100644 --- a/packages/google-cloud-alloydb/scripts/fixup_alloydb_v1beta_keywords.py +++ b/packages/google-cloud-alloydb/scripts/fixup_alloydb_v1beta_keywords.py @@ -42,6 +42,7 @@ class alloydbCallTransformer(cst.CSTTransformer): 'batch_create_instances': ('parent', 'requests', 'request_id', ), 'create_backup': ('parent', 'backup_id', 'backup', 'request_id', 'validate_only', ), 'create_cluster': ('parent', 'cluster_id', 'cluster', 'request_id', 'validate_only', ), + 'create_database': ('parent', 'database_id', 'database', ), 'create_instance': ('parent', 'instance_id', 'instance', 'request_id', 'validate_only', ), 'create_secondary_cluster': ('parent', 'cluster_id', 'cluster', 'request_id', 'validate_only', ), 'create_secondary_instance': ('parent', 'instance_id', 'instance', 'request_id', 'validate_only', ), @@ -50,7 +51,7 @@ class alloydbCallTransformer(cst.CSTTransformer): 'delete_cluster': ('name', 'request_id', 'etag', 'validate_only', 'force', ), 'delete_instance': ('name', 'request_id', 'etag', 'validate_only', ), 'delete_user': ('name', 'request_id', 'validate_only', ), - 'execute_sql': ('instance', 'database', 'user', 'sql_statement', 'password', ), + 'execute_sql': ('instance', 'database', 'user', 'sql_statement', 'password', 'validate_only', ), 'export_cluster': ('gcs_destination', 'name', 'database', 'csv_export_options', 'sql_export_options', ), 'failover_instance': ('name', 'request_id', 'validate_only', ), 'generate_client_certificate': ('parent', 'request_id', 'pem_csr', 'cert_duration', 'public_key', 'use_metadata_exchange', ), diff --git a/packages/google-cloud-alloydb/testing/constraints-3.14.txt b/packages/google-cloud-alloydb/testing/constraints-3.14.txt new file mode 100644 index 000000000000..2010e549cceb --- /dev/null +++ b/packages/google-cloud-alloydb/testing/constraints-3.14.txt @@ -0,0 +1,12 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 +grpc-google-iam-v1>=0 diff --git a/packages/google-cloud-alloydb/tests/unit/gapic/alloydb_v1/test_alloy_db_admin.py b/packages/google-cloud-alloydb/tests/unit/gapic/alloydb_v1/test_alloy_db_admin.py index 79b17526adab..d5be9f6d6769 100644 --- a/packages/google-cloud-alloydb/tests/unit/gapic/alloydb_v1/test_alloy_db_admin.py +++ b/packages/google-cloud-alloydb/tests/unit/gapic/alloydb_v1/test_alloy_db_admin.py @@ -26706,6 +26706,7 @@ def test_create_instance_rest_call_success(request_type): "outbound_public_ip_addresses_value2", ], "activation_policy": 1, + "connection_pool_config": {"enabled": True, "flags": {}, "pooler_count": 1305}, } # The version of a generated dependency at test runtime may differ from the version used during generation. # Delete any fields which are not present in the current runtime dependency @@ -26975,6 +26976,7 @@ def test_create_secondary_instance_rest_call_success(request_type): "outbound_public_ip_addresses_value2", ], "activation_policy": 1, + "connection_pool_config": {"enabled": True, "flags": {}, "pooler_count": 1305}, } # The version of a generated dependency at test runtime may differ from the version used during generation. # Delete any fields which are not present in the current runtime dependency @@ -27259,6 +27261,11 @@ def test_batch_create_instances_rest_call_success(request_type): "outbound_public_ip_addresses_value2", ], "activation_policy": 1, + "connection_pool_config": { + "enabled": True, + "flags": {}, + "pooler_count": 1305, + }, }, "request_id": "request_id_value", "validate_only": True, @@ -27542,6 +27549,7 @@ def test_update_instance_rest_call_success(request_type): "outbound_public_ip_addresses_value2", ], "activation_policy": 1, + "connection_pool_config": {"enabled": True, "flags": {}, "pooler_count": 1305}, } # The version of a generated dependency at test runtime may differ from the version used during generation. # Delete any fields which are not present in the current runtime dependency @@ -32288,12 +32296,41 @@ def test_parse_connection_info_path(): assert expected == actual -def test_crypto_key_version_path(): +def test_crypto_key_path(): project = "winkle" location = "nautilus" key_ring = "scallop" crypto_key = "abalone" - crypto_key_version = "squid" + expected = "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}".format( + project=project, + location=location, + key_ring=key_ring, + crypto_key=crypto_key, + ) + actual = AlloyDBAdminClient.crypto_key_path(project, location, key_ring, crypto_key) + assert expected == actual + + +def test_parse_crypto_key_path(): + expected = { + "project": "squid", + "location": "clam", + "key_ring": "whelk", + "crypto_key": "octopus", + } + path = AlloyDBAdminClient.crypto_key_path(**expected) + + # Check that the path construction is reversible. + actual = AlloyDBAdminClient.parse_crypto_key_path(path) + assert expected == actual + + +def test_crypto_key_version_path(): + project = "oyster" + location = "nudibranch" + key_ring = "cuttlefish" + crypto_key = "mussel" + crypto_key_version = "winkle" expected = "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}".format( project=project, location=location, @@ -32309,11 +32346,11 @@ def test_crypto_key_version_path(): def test_parse_crypto_key_version_path(): expected = { - "project": "clam", - "location": "whelk", - "key_ring": "octopus", - "crypto_key": "oyster", - "crypto_key_version": "nudibranch", + "project": "nautilus", + "location": "scallop", + "key_ring": "abalone", + "crypto_key": "squid", + "crypto_key_version": "clam", } path = AlloyDBAdminClient.crypto_key_version_path(**expected) @@ -32323,10 +32360,10 @@ def test_parse_crypto_key_version_path(): def test_database_path(): - project = "cuttlefish" - location = "mussel" - cluster = "winkle" - database = "nautilus" + project = "whelk" + location = "octopus" + cluster = "oyster" + database = "nudibranch" expected = "projects/{project}/locations/{location}/clusters/{cluster}/databases/{database}".format( project=project, location=location, @@ -32339,10 +32376,10 @@ def test_database_path(): def test_parse_database_path(): expected = { - "project": "scallop", - "location": "abalone", - "cluster": "squid", - "database": "clam", + "project": "cuttlefish", + "location": "mussel", + "cluster": "winkle", + "database": "nautilus", } path = AlloyDBAdminClient.database_path(**expected) @@ -32352,10 +32389,10 @@ def test_parse_database_path(): def test_instance_path(): - project = "whelk" - location = "octopus" - cluster = "oyster" - instance = "nudibranch" + project = "scallop" + location = "abalone" + cluster = "squid" + instance = "clam" expected = "projects/{project}/locations/{location}/clusters/{cluster}/instances/{instance}".format( project=project, location=location, @@ -32368,10 +32405,10 @@ def test_instance_path(): def test_parse_instance_path(): expected = { - "project": "cuttlefish", - "location": "mussel", - "cluster": "winkle", - "instance": "nautilus", + "project": "whelk", + "location": "octopus", + "cluster": "oyster", + "instance": "nudibranch", } path = AlloyDBAdminClient.instance_path(**expected) @@ -32381,8 +32418,8 @@ def test_parse_instance_path(): def test_network_path(): - project = "scallop" - network = "abalone" + project = "cuttlefish" + network = "mussel" expected = "projects/{project}/global/networks/{network}".format( project=project, network=network, @@ -32393,8 +32430,8 @@ def test_network_path(): def test_parse_network_path(): expected = { - "project": "squid", - "network": "clam", + "project": "winkle", + "network": "nautilus", } path = AlloyDBAdminClient.network_path(**expected) @@ -32403,10 +32440,38 @@ def test_parse_network_path(): assert expected == actual +def test_service_attachment_path(): + project = "scallop" + region = "abalone" + service_attachment = "squid" + expected = "projects/{project}/regions/{region}/serviceAttachments/{service_attachment}".format( + project=project, + region=region, + service_attachment=service_attachment, + ) + actual = AlloyDBAdminClient.service_attachment_path( + project, region, service_attachment + ) + assert expected == actual + + +def test_parse_service_attachment_path(): + expected = { + "project": "clam", + "region": "whelk", + "service_attachment": "octopus", + } + path = AlloyDBAdminClient.service_attachment_path(**expected) + + # Check that the path construction is reversible. + actual = AlloyDBAdminClient.parse_service_attachment_path(path) + assert expected == actual + + def test_supported_database_flag_path(): - project = "whelk" - location = "octopus" - flag = "oyster" + project = "oyster" + location = "nudibranch" + flag = "cuttlefish" expected = "projects/{project}/locations/{location}/flags/{flag}".format( project=project, location=location, @@ -32418,9 +32483,9 @@ def test_supported_database_flag_path(): def test_parse_supported_database_flag_path(): expected = { - "project": "nudibranch", - "location": "cuttlefish", - "flag": "mussel", + "project": "mussel", + "location": "winkle", + "flag": "nautilus", } path = AlloyDBAdminClient.supported_database_flag_path(**expected) @@ -32430,10 +32495,10 @@ def test_parse_supported_database_flag_path(): def test_user_path(): - project = "winkle" - location = "nautilus" - cluster = "scallop" - user = "abalone" + project = "scallop" + location = "abalone" + cluster = "squid" + user = "clam" expected = "projects/{project}/locations/{location}/clusters/{cluster}/users/{user}".format( project=project, location=location, @@ -32446,10 +32511,10 @@ def test_user_path(): def test_parse_user_path(): expected = { - "project": "squid", - "location": "clam", - "cluster": "whelk", - "user": "octopus", + "project": "whelk", + "location": "octopus", + "cluster": "oyster", + "user": "nudibranch", } path = AlloyDBAdminClient.user_path(**expected) @@ -32459,7 +32524,7 @@ def test_parse_user_path(): def test_common_billing_account_path(): - billing_account = "oyster" + billing_account = "cuttlefish" expected = "billingAccounts/{billing_account}".format( billing_account=billing_account, ) @@ -32469,7 +32534,7 @@ def test_common_billing_account_path(): def test_parse_common_billing_account_path(): expected = { - "billing_account": "nudibranch", + "billing_account": "mussel", } path = AlloyDBAdminClient.common_billing_account_path(**expected) @@ -32479,7 +32544,7 @@ def test_parse_common_billing_account_path(): def test_common_folder_path(): - folder = "cuttlefish" + folder = "winkle" expected = "folders/{folder}".format( folder=folder, ) @@ -32489,7 +32554,7 @@ def test_common_folder_path(): def test_parse_common_folder_path(): expected = { - "folder": "mussel", + "folder": "nautilus", } path = AlloyDBAdminClient.common_folder_path(**expected) @@ -32499,7 +32564,7 @@ def test_parse_common_folder_path(): def test_common_organization_path(): - organization = "winkle" + organization = "scallop" expected = "organizations/{organization}".format( organization=organization, ) @@ -32509,7 +32574,7 @@ def test_common_organization_path(): def test_parse_common_organization_path(): expected = { - "organization": "nautilus", + "organization": "abalone", } path = AlloyDBAdminClient.common_organization_path(**expected) @@ -32519,7 +32584,7 @@ def test_parse_common_organization_path(): def test_common_project_path(): - project = "scallop" + project = "squid" expected = "projects/{project}".format( project=project, ) @@ -32529,7 +32594,7 @@ def test_common_project_path(): def test_parse_common_project_path(): expected = { - "project": "abalone", + "project": "clam", } path = AlloyDBAdminClient.common_project_path(**expected) @@ -32539,8 +32604,8 @@ def test_parse_common_project_path(): def test_common_location_path(): - project = "squid" - location = "clam" + project = "whelk" + location = "octopus" expected = "projects/{project}/locations/{location}".format( project=project, location=location, @@ -32551,8 +32616,8 @@ def test_common_location_path(): def test_parse_common_location_path(): expected = { - "project": "whelk", - "location": "octopus", + "project": "oyster", + "location": "nudibranch", } path = AlloyDBAdminClient.common_location_path(**expected) diff --git a/packages/google-cloud-alloydb/tests/unit/gapic/alloydb_v1/test_alloy_dbcsql_admin.py b/packages/google-cloud-alloydb/tests/unit/gapic/alloydb_v1/test_alloy_dbcsql_admin.py index 4535190ea2c8..e772a46d4b9f 100644 --- a/packages/google-cloud-alloydb/tests/unit/gapic/alloydb_v1/test_alloy_dbcsql_admin.py +++ b/packages/google-cloud-alloydb/tests/unit/gapic/alloydb_v1/test_alloy_dbcsql_admin.py @@ -2955,12 +2955,43 @@ def test_parse_cluster_path(): assert expected == actual -def test_crypto_key_version_path(): +def test_crypto_key_path(): project = "squid" location = "clam" key_ring = "whelk" crypto_key = "octopus" - crypto_key_version = "oyster" + expected = "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}".format( + project=project, + location=location, + key_ring=key_ring, + crypto_key=crypto_key, + ) + actual = AlloyDBCSQLAdminClient.crypto_key_path( + project, location, key_ring, crypto_key + ) + assert expected == actual + + +def test_parse_crypto_key_path(): + expected = { + "project": "oyster", + "location": "nudibranch", + "key_ring": "cuttlefish", + "crypto_key": "mussel", + } + path = AlloyDBCSQLAdminClient.crypto_key_path(**expected) + + # Check that the path construction is reversible. + actual = AlloyDBCSQLAdminClient.parse_crypto_key_path(path) + assert expected == actual + + +def test_crypto_key_version_path(): + project = "winkle" + location = "nautilus" + key_ring = "scallop" + crypto_key = "abalone" + crypto_key_version = "squid" expected = "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}".format( project=project, location=location, @@ -2976,11 +3007,11 @@ def test_crypto_key_version_path(): def test_parse_crypto_key_version_path(): expected = { - "project": "nudibranch", - "location": "cuttlefish", - "key_ring": "mussel", - "crypto_key": "winkle", - "crypto_key_version": "nautilus", + "project": "clam", + "location": "whelk", + "key_ring": "octopus", + "crypto_key": "oyster", + "crypto_key_version": "nudibranch", } path = AlloyDBCSQLAdminClient.crypto_key_version_path(**expected) @@ -2990,8 +3021,8 @@ def test_parse_crypto_key_version_path(): def test_network_path(): - project = "scallop" - network = "abalone" + project = "cuttlefish" + network = "mussel" expected = "projects/{project}/global/networks/{network}".format( project=project, network=network, @@ -3002,8 +3033,8 @@ def test_network_path(): def test_parse_network_path(): expected = { - "project": "squid", - "network": "clam", + "project": "winkle", + "network": "nautilus", } path = AlloyDBCSQLAdminClient.network_path(**expected) @@ -3013,7 +3044,7 @@ def test_parse_network_path(): def test_common_billing_account_path(): - billing_account = "whelk" + billing_account = "scallop" expected = "billingAccounts/{billing_account}".format( billing_account=billing_account, ) @@ -3023,7 +3054,7 @@ def test_common_billing_account_path(): def test_parse_common_billing_account_path(): expected = { - "billing_account": "octopus", + "billing_account": "abalone", } path = AlloyDBCSQLAdminClient.common_billing_account_path(**expected) @@ -3033,7 +3064,7 @@ def test_parse_common_billing_account_path(): def test_common_folder_path(): - folder = "oyster" + folder = "squid" expected = "folders/{folder}".format( folder=folder, ) @@ -3043,7 +3074,7 @@ def test_common_folder_path(): def test_parse_common_folder_path(): expected = { - "folder": "nudibranch", + "folder": "clam", } path = AlloyDBCSQLAdminClient.common_folder_path(**expected) @@ -3053,7 +3084,7 @@ def test_parse_common_folder_path(): def test_common_organization_path(): - organization = "cuttlefish" + organization = "whelk" expected = "organizations/{organization}".format( organization=organization, ) @@ -3063,7 +3094,7 @@ def test_common_organization_path(): def test_parse_common_organization_path(): expected = { - "organization": "mussel", + "organization": "octopus", } path = AlloyDBCSQLAdminClient.common_organization_path(**expected) @@ -3073,7 +3104,7 @@ def test_parse_common_organization_path(): def test_common_project_path(): - project = "winkle" + project = "oyster" expected = "projects/{project}".format( project=project, ) @@ -3083,7 +3114,7 @@ def test_common_project_path(): def test_parse_common_project_path(): expected = { - "project": "nautilus", + "project": "nudibranch", } path = AlloyDBCSQLAdminClient.common_project_path(**expected) @@ -3093,8 +3124,8 @@ def test_parse_common_project_path(): def test_common_location_path(): - project = "scallop" - location = "abalone" + project = "cuttlefish" + location = "mussel" expected = "projects/{project}/locations/{location}".format( project=project, location=location, @@ -3105,8 +3136,8 @@ def test_common_location_path(): def test_parse_common_location_path(): expected = { - "project": "squid", - "location": "clam", + "project": "winkle", + "location": "nautilus", } path = AlloyDBCSQLAdminClient.common_location_path(**expected) diff --git a/packages/google-cloud-alloydb/tests/unit/gapic/alloydb_v1alpha/test_alloy_db_admin.py b/packages/google-cloud-alloydb/tests/unit/gapic/alloydb_v1alpha/test_alloy_db_admin.py index d19585249983..48134743e11d 100644 --- a/packages/google-cloud-alloydb/tests/unit/gapic/alloydb_v1alpha/test_alloy_db_admin.py +++ b/packages/google-cloud-alloydb/tests/unit/gapic/alloydb_v1alpha/test_alloy_db_admin.py @@ -14954,6 +14954,371 @@ async def test_list_databases_async_pages(): assert page_.raw_page.next_page_token == token +@pytest.mark.parametrize( + "request_type", + [ + service.CreateDatabaseRequest, + dict, + ], +) +def test_create_database(request_type, transport: str = "grpc"): + client = AlloyDBAdminClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Everything is optional in proto3 as far as the runtime is concerned, + # and we are mocking out the actual API, so just send an empty request. + request = request_type() + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object(type(client.transport.create_database), "__call__") as call: + # Designate an appropriate return value for the call. + call.return_value = resources.Database( + name="name_value", + charset="charset_value", + collation="collation_value", + character_type="character_type_value", + is_template=True, + database_template="database_template_value", + is_template_database=True, + ) + response = client.create_database(request) + + # Establish that the underlying gRPC stub method was called. + assert len(call.mock_calls) == 1 + _, args, _ = call.mock_calls[0] + request = service.CreateDatabaseRequest() + assert args[0] == request + + # Establish that the response is the type that we expect. + assert isinstance(response, resources.Database) + assert response.name == "name_value" + assert response.charset == "charset_value" + assert response.collation == "collation_value" + assert response.character_type == "character_type_value" + assert response.is_template is True + assert response.database_template == "database_template_value" + assert response.is_template_database is True + + +def test_create_database_non_empty_request_with_auto_populated_field(): + # This test is a coverage failsafe to make sure that UUID4 fields are + # automatically populated, according to AIP-4235, with non-empty requests. + client = AlloyDBAdminClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", + ) + + # Populate all string fields in the request which are not UUID4 + # since we want to check that UUID4 are populated automatically + # if they meet the requirements of AIP 4235. + request = service.CreateDatabaseRequest( + parent="parent_value", + database_id="database_id_value", + ) + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object(type(client.transport.create_database), "__call__") as call: + call.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client.create_database(request=request) + call.assert_called() + _, args, _ = call.mock_calls[0] + assert args[0] == service.CreateDatabaseRequest( + parent="parent_value", + database_id="database_id_value", + ) + + +def test_create_database_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = AlloyDBAdminClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.create_database in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.create_database] = mock_rpc + request = {} + client.create_database(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.create_database(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +@pytest.mark.asyncio +async def test_create_database_async_use_cached_wrapped_rpc( + transport: str = "grpc_asyncio", +): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method_async.wrap_method") as wrapper_fn: + client = AlloyDBAdminAsyncClient( + credentials=async_anonymous_credentials(), + transport=transport, + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert ( + client._client._transport.create_database + in client._client._transport._wrapped_methods + ) + + # Replace cached wrapped function with mock + mock_rpc = mock.AsyncMock() + mock_rpc.return_value = mock.Mock() + client._client._transport._wrapped_methods[ + client._client._transport.create_database + ] = mock_rpc + + request = {} + await client.create_database(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + await client.create_database(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +@pytest.mark.asyncio +async def test_create_database_async( + transport: str = "grpc_asyncio", request_type=service.CreateDatabaseRequest +): + client = AlloyDBAdminAsyncClient( + credentials=async_anonymous_credentials(), + transport=transport, + ) + + # Everything is optional in proto3 as far as the runtime is concerned, + # and we are mocking out the actual API, so just send an empty request. + request = request_type() + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object(type(client.transport.create_database), "__call__") as call: + # Designate an appropriate return value for the call. + call.return_value = grpc_helpers_async.FakeUnaryUnaryCall( + resources.Database( + name="name_value", + charset="charset_value", + collation="collation_value", + character_type="character_type_value", + is_template=True, + database_template="database_template_value", + is_template_database=True, + ) + ) + response = await client.create_database(request) + + # Establish that the underlying gRPC stub method was called. + assert len(call.mock_calls) + _, args, _ = call.mock_calls[0] + request = service.CreateDatabaseRequest() + assert args[0] == request + + # Establish that the response is the type that we expect. + assert isinstance(response, resources.Database) + assert response.name == "name_value" + assert response.charset == "charset_value" + assert response.collation == "collation_value" + assert response.character_type == "character_type_value" + assert response.is_template is True + assert response.database_template == "database_template_value" + assert response.is_template_database is True + + +@pytest.mark.asyncio +async def test_create_database_async_from_dict(): + await test_create_database_async(request_type=dict) + + +def test_create_database_field_headers(): + client = AlloyDBAdminClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Any value that is part of the HTTP/1.1 URI should be sent as + # a field header. Set these to a non-empty value. + request = service.CreateDatabaseRequest() + + request.parent = "parent_value" + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object(type(client.transport.create_database), "__call__") as call: + call.return_value = resources.Database() + client.create_database(request) + + # Establish that the underlying gRPC stub method was called. + assert len(call.mock_calls) == 1 + _, args, _ = call.mock_calls[0] + assert args[0] == request + + # Establish that the field header was sent. + _, _, kw = call.mock_calls[0] + assert ( + "x-goog-request-params", + "parent=parent_value", + ) in kw["metadata"] + + +@pytest.mark.asyncio +async def test_create_database_field_headers_async(): + client = AlloyDBAdminAsyncClient( + credentials=async_anonymous_credentials(), + ) + + # Any value that is part of the HTTP/1.1 URI should be sent as + # a field header. Set these to a non-empty value. + request = service.CreateDatabaseRequest() + + request.parent = "parent_value" + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object(type(client.transport.create_database), "__call__") as call: + call.return_value = grpc_helpers_async.FakeUnaryUnaryCall(resources.Database()) + await client.create_database(request) + + # Establish that the underlying gRPC stub method was called. + assert len(call.mock_calls) + _, args, _ = call.mock_calls[0] + assert args[0] == request + + # Establish that the field header was sent. + _, _, kw = call.mock_calls[0] + assert ( + "x-goog-request-params", + "parent=parent_value", + ) in kw["metadata"] + + +def test_create_database_flattened(): + client = AlloyDBAdminClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object(type(client.transport.create_database), "__call__") as call: + # Designate an appropriate return value for the call. + call.return_value = resources.Database() + # Call the method with a truthy value for each flattened field, + # using the keyword arguments to the method. + client.create_database( + parent="parent_value", + database=resources.Database(name="name_value"), + database_id="database_id_value", + ) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(call.mock_calls) == 1 + _, args, _ = call.mock_calls[0] + arg = args[0].parent + mock_val = "parent_value" + assert arg == mock_val + arg = args[0].database + mock_val = resources.Database(name="name_value") + assert arg == mock_val + arg = args[0].database_id + mock_val = "database_id_value" + assert arg == mock_val + + +def test_create_database_flattened_error(): + client = AlloyDBAdminClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.create_database( + service.CreateDatabaseRequest(), + parent="parent_value", + database=resources.Database(name="name_value"), + database_id="database_id_value", + ) + + +@pytest.mark.asyncio +async def test_create_database_flattened_async(): + client = AlloyDBAdminAsyncClient( + credentials=async_anonymous_credentials(), + ) + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object(type(client.transport.create_database), "__call__") as call: + # Designate an appropriate return value for the call. + call.return_value = resources.Database() + + call.return_value = grpc_helpers_async.FakeUnaryUnaryCall(resources.Database()) + # Call the method with a truthy value for each flattened field, + # using the keyword arguments to the method. + response = await client.create_database( + parent="parent_value", + database=resources.Database(name="name_value"), + database_id="database_id_value", + ) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(call.mock_calls) + _, args, _ = call.mock_calls[0] + arg = args[0].parent + mock_val = "parent_value" + assert arg == mock_val + arg = args[0].database + mock_val = resources.Database(name="name_value") + assert arg == mock_val + arg = args[0].database_id + mock_val = "database_id_value" + assert arg == mock_val + + +@pytest.mark.asyncio +async def test_create_database_flattened_error_async(): + client = AlloyDBAdminAsyncClient( + credentials=async_anonymous_credentials(), + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + await client.create_database( + service.CreateDatabaseRequest(), + parent="parent_value", + database=resources.Database(name="name_value"), + database_id="database_id_value", + ) + + def test_list_clusters_rest_use_cached_wrapped_rpc(): # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, # instead of constructing them on each call @@ -22227,11 +22592,272 @@ def test_list_databases_rest_use_cached_wrapped_rpc(): assert mock_rpc.call_count == 2 -def test_list_databases_rest_required_fields(request_type=service.ListDatabasesRequest): +def test_list_databases_rest_required_fields(request_type=service.ListDatabasesRequest): + transport_class = transports.AlloyDBAdminRestTransport + + request_init = {} + request_init["parent"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).list_databases._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["parent"] = "parent_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).list_databases._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set( + ( + "filter", + "page_size", + "page_token", + ) + ) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "parent" in jsonified_request + assert jsonified_request["parent"] == "parent_value" + + client = AlloyDBAdminClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = service.ListDatabasesResponse() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "get", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = service.ListDatabasesResponse.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.list_databases(request) + + expected_params = [("$alt", "json;enum-encoding=int")] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_list_databases_rest_unset_required_fields(): + transport = transports.AlloyDBAdminRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.list_databases._get_unset_required_fields({}) + assert set(unset_fields) == ( + set( + ( + "filter", + "pageSize", + "pageToken", + ) + ) + & set(("parent",)) + ) + + +def test_list_databases_rest_flattened(): + client = AlloyDBAdminClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = service.ListDatabasesResponse() + + # get arguments that satisfy an http rule for this method + sample_request = { + "parent": "projects/sample1/locations/sample2/clusters/sample3" + } + + # get truthy value for each flattened field + mock_args = dict( + parent="parent_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = service.ListDatabasesResponse.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.list_databases(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/v1alpha/{parent=projects/*/locations/*/clusters/*}/databases" + % client.transport._host, + args[1], + ) + + +def test_list_databases_rest_flattened_error(transport: str = "rest"): + client = AlloyDBAdminClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.list_databases( + service.ListDatabasesRequest(), + parent="parent_value", + ) + + +def test_list_databases_rest_pager(transport: str = "rest"): + client = AlloyDBAdminClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # TODO(kbandes): remove this mock unless there's a good reason for it. + # with mock.patch.object(path_template, 'transcode') as transcode: + # Set the response as a series of pages + response = ( + service.ListDatabasesResponse( + databases=[ + resources.Database(), + resources.Database(), + resources.Database(), + ], + next_page_token="abc", + ), + service.ListDatabasesResponse( + databases=[], + next_page_token="def", + ), + service.ListDatabasesResponse( + databases=[ + resources.Database(), + ], + next_page_token="ghi", + ), + service.ListDatabasesResponse( + databases=[ + resources.Database(), + resources.Database(), + ], + ), + ) + # Two responses for two calls + response = response + response + + # Wrap the values into proper Response objs + response = tuple(service.ListDatabasesResponse.to_json(x) for x in response) + return_values = tuple(Response() for i in response) + for return_val, response_val in zip(return_values, response): + return_val._content = response_val.encode("UTF-8") + return_val.status_code = 200 + req.side_effect = return_values + + sample_request = { + "parent": "projects/sample1/locations/sample2/clusters/sample3" + } + + pager = client.list_databases(request=sample_request) + + results = list(pager) + assert len(results) == 6 + assert all(isinstance(i, resources.Database) for i in results) + + pages = list(client.list_databases(request=sample_request).pages) + for page_, token in zip(pages, ["abc", "def", "ghi", ""]): + assert page_.raw_page.next_page_token == token + + +def test_create_database_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = AlloyDBAdminClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.create_database in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.create_database] = mock_rpc + + request = {} + client.create_database(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.create_database(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_create_database_rest_required_fields( + request_type=service.CreateDatabaseRequest, +): transport_class = transports.AlloyDBAdminRestTransport request_init = {} request_init["parent"] = "" + request_init["database_id"] = "" request = request_type(**request_init) pb_request = request_type.pb(request) jsonified_request = json.loads( @@ -22239,32 +22865,32 @@ def test_list_databases_rest_required_fields(request_type=service.ListDatabasesR ) # verify fields with default values are dropped + assert "databaseId" not in jsonified_request unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).list_databases._get_unset_required_fields(jsonified_request) + ).create_database._get_unset_required_fields(jsonified_request) jsonified_request.update(unset_fields) # verify required fields with default values are now present + assert "databaseId" in jsonified_request + assert jsonified_request["databaseId"] == request_init["database_id"] jsonified_request["parent"] = "parent_value" + jsonified_request["databaseId"] = "database_id_value" unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).list_databases._get_unset_required_fields(jsonified_request) + ).create_database._get_unset_required_fields(jsonified_request) # Check that path parameters and body parameters are not mixing in. - assert not set(unset_fields) - set( - ( - "filter", - "page_size", - "page_token", - ) - ) + assert not set(unset_fields) - set(("database_id",)) jsonified_request.update(unset_fields) # verify required fields with non-default values are left alone assert "parent" in jsonified_request assert jsonified_request["parent"] == "parent_value" + assert "databaseId" in jsonified_request + assert jsonified_request["databaseId"] == "database_id_value" client = AlloyDBAdminClient( credentials=ga_credentials.AnonymousCredentials(), @@ -22273,7 +22899,7 @@ def test_list_databases_rest_required_fields(request_type=service.ListDatabasesR request = request_type(**request_init) # Designate an appropriate value for the returned response. - return_value = service.ListDatabasesResponse() + return_value = resources.Database() # Mock the http request call within the method and fake a response. with mock.patch.object(Session, "request") as req: # We need to mock transcode() because providing default values @@ -22285,48 +22911,55 @@ def test_list_databases_rest_required_fields(request_type=service.ListDatabasesR pb_request = request_type.pb(request) transcode_result = { "uri": "v1/sample_method", - "method": "get", + "method": "post", "query_params": pb_request, } + transcode_result["body"] = pb_request transcode.return_value = transcode_result response_value = Response() response_value.status_code = 200 # Convert return value to protobuf type - return_value = service.ListDatabasesResponse.pb(return_value) + return_value = resources.Database.pb(return_value) json_return_value = json_format.MessageToJson(return_value) response_value._content = json_return_value.encode("UTF-8") req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.list_databases(request) + response = client.create_database(request) - expected_params = [("$alt", "json;enum-encoding=int")] + expected_params = [ + ( + "databaseId", + "", + ), + ("$alt", "json;enum-encoding=int"), + ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params -def test_list_databases_rest_unset_required_fields(): +def test_create_database_rest_unset_required_fields(): transport = transports.AlloyDBAdminRestTransport( credentials=ga_credentials.AnonymousCredentials ) - unset_fields = transport.list_databases._get_unset_required_fields({}) + unset_fields = transport.create_database._get_unset_required_fields({}) assert set(unset_fields) == ( - set( + set(("databaseId",)) + & set( ( - "filter", - "pageSize", - "pageToken", + "parent", + "databaseId", + "database", ) ) - & set(("parent",)) ) -def test_list_databases_rest_flattened(): +def test_create_database_rest_flattened(): client = AlloyDBAdminClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest", @@ -22335,7 +22968,7 @@ def test_list_databases_rest_flattened(): # Mock the http request call within the method and fake a response. with mock.patch.object(type(client.transport._session), "request") as req: # Designate an appropriate value for the returned response. - return_value = service.ListDatabasesResponse() + return_value = resources.Database() # get arguments that satisfy an http rule for this method sample_request = { @@ -22345,6 +22978,8 @@ def test_list_databases_rest_flattened(): # get truthy value for each flattened field mock_args = dict( parent="parent_value", + database=resources.Database(name="name_value"), + database_id="database_id_value", ) mock_args.update(sample_request) @@ -22352,13 +22987,13 @@ def test_list_databases_rest_flattened(): response_value = Response() response_value.status_code = 200 # Convert return value to protobuf type - return_value = service.ListDatabasesResponse.pb(return_value) + return_value = resources.Database.pb(return_value) json_return_value = json_format.MessageToJson(return_value) response_value._content = json_return_value.encode("UTF-8") req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.list_databases(**mock_args) + client.create_database(**mock_args) # Establish that the underlying call was made with the expected # request object values. @@ -22371,7 +23006,7 @@ def test_list_databases_rest_flattened(): ) -def test_list_databases_rest_flattened_error(transport: str = "rest"): +def test_create_database_rest_flattened_error(transport: str = "rest"): client = AlloyDBAdminClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, @@ -22380,75 +23015,14 @@ def test_list_databases_rest_flattened_error(transport: str = "rest"): # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): - client.list_databases( - service.ListDatabasesRequest(), + client.create_database( + service.CreateDatabaseRequest(), parent="parent_value", + database=resources.Database(name="name_value"), + database_id="database_id_value", ) -def test_list_databases_rest_pager(transport: str = "rest"): - client = AlloyDBAdminClient( - credentials=ga_credentials.AnonymousCredentials(), - transport=transport, - ) - - # Mock the http request call within the method and fake a response. - with mock.patch.object(Session, "request") as req: - # TODO(kbandes): remove this mock unless there's a good reason for it. - # with mock.patch.object(path_template, 'transcode') as transcode: - # Set the response as a series of pages - response = ( - service.ListDatabasesResponse( - databases=[ - resources.Database(), - resources.Database(), - resources.Database(), - ], - next_page_token="abc", - ), - service.ListDatabasesResponse( - databases=[], - next_page_token="def", - ), - service.ListDatabasesResponse( - databases=[ - resources.Database(), - ], - next_page_token="ghi", - ), - service.ListDatabasesResponse( - databases=[ - resources.Database(), - resources.Database(), - ], - ), - ) - # Two responses for two calls - response = response + response - - # Wrap the values into proper Response objs - response = tuple(service.ListDatabasesResponse.to_json(x) for x in response) - return_values = tuple(Response() for i in response) - for return_val, response_val in zip(return_values, response): - return_val._content = response_val.encode("UTF-8") - return_val.status_code = 200 - req.side_effect = return_values - - sample_request = { - "parent": "projects/sample1/locations/sample2/clusters/sample3" - } - - pager = client.list_databases(request=sample_request) - - results = list(pager) - assert len(results) == 6 - assert all(isinstance(i, resources.Database) for i in results) - - pages = list(client.list_databases(request=sample_request).pages) - for page_, token in zip(pages, ["abc", "def", "ghi", ""]): - assert page_.raw_page.next_page_token == token - - def test_credentials_transport_error(): # It is an error to provide credentials and a transport instance. transport = transports.AlloyDBAdminGrpcTransport( @@ -23348,6 +23922,27 @@ def test_list_databases_empty_call_grpc(): assert args[0] == request_msg +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_create_database_empty_call_grpc(): + client = AlloyDBAdminClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.create_database), "__call__") as call: + call.return_value = resources.Database() + client.create_database(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = service.CreateDatabaseRequest() + + assert args[0] == request_msg + + def test_transport_kind_grpc_asyncio(): transport = AlloyDBAdminAsyncClient.get_transport_class("grpc_asyncio")( credentials=async_anonymous_credentials() @@ -24391,6 +24986,39 @@ async def test_list_databases_empty_call_grpc_asyncio(): assert args[0] == request_msg +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +@pytest.mark.asyncio +async def test_create_database_empty_call_grpc_asyncio(): + client = AlloyDBAdminAsyncClient( + credentials=async_anonymous_credentials(), + transport="grpc_asyncio", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.create_database), "__call__") as call: + # Designate an appropriate return value for the call. + call.return_value = grpc_helpers_async.FakeUnaryUnaryCall( + resources.Database( + name="name_value", + charset="charset_value", + collation="collation_value", + character_type="character_type_value", + is_template=True, + database_template="database_template_value", + is_template_database=True, + ) + ) + await client.create_database(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = service.CreateDatabaseRequest() + + assert args[0] == request_msg + + def test_transport_kind_rest(): transport = AlloyDBAdminClient.get_transport_class("rest")( credentials=ga_credentials.AnonymousCredentials() @@ -26782,7 +27410,7 @@ def test_create_instance_rest_call_success(request_type): "outbound_public_ip_addresses_value2", ], "activation_policy": 1, - "connection_pool_config": {"enabled": True}, + "connection_pool_config": {"enabled": True, "flags": {}, "pooler_count": 1305}, "gca_config": {"gca_entitlement": 1}, } # The version of a generated dependency at test runtime may differ from the version used during generation. @@ -27058,7 +27686,7 @@ def test_create_secondary_instance_rest_call_success(request_type): "outbound_public_ip_addresses_value2", ], "activation_policy": 1, - "connection_pool_config": {"enabled": True}, + "connection_pool_config": {"enabled": True, "flags": {}, "pooler_count": 1305}, "gca_config": {"gca_entitlement": 1}, } # The version of a generated dependency at test runtime may differ from the version used during generation. @@ -27349,7 +27977,11 @@ def test_batch_create_instances_rest_call_success(request_type): "outbound_public_ip_addresses_value2", ], "activation_policy": 1, - "connection_pool_config": {"enabled": True}, + "connection_pool_config": { + "enabled": True, + "flags": {}, + "pooler_count": 1305, + }, "gca_config": {"gca_entitlement": 1}, }, "request_id": "request_id_value", @@ -27639,7 +28271,7 @@ def test_update_instance_rest_call_success(request_type): "outbound_public_ip_addresses_value2", ], "activation_policy": 1, - "connection_pool_config": {"enabled": True}, + "connection_pool_config": {"enabled": True, "flags": {}, "pooler_count": 1305}, "gca_config": {"gca_entitlement": 1}, } # The version of a generated dependency at test runtime may differ from the version used during generation. @@ -30293,9 +30925,124 @@ def test_update_user_rest_interceptors(null_interceptor): transports.AlloyDBAdminRestInterceptor, "pre_update_user" ) as pre: pre.assert_not_called() - post.assert_not_called() - post_with_metadata.assert_not_called() - pb_message = service.UpdateUserRequest.pb(service.UpdateUserRequest()) + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = service.UpdateUserRequest.pb(service.UpdateUserRequest()) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = resources.User.to_json(resources.User()) + req.return_value.content = return_value + + request = service.UpdateUserRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = resources.User() + post_with_metadata.return_value = resources.User(), metadata + + client.update_user( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_delete_user_rest_bad_request(request_type=service.DeleteUserRequest): + client = AlloyDBAdminClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = { + "name": "projects/sample1/locations/sample2/clusters/sample3/users/sample4" + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.delete_user(request) + + +@pytest.mark.parametrize( + "request_type", + [ + service.DeleteUserRequest, + dict, + ], +) +def test_delete_user_rest_call_success(request_type): + client = AlloyDBAdminClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = { + "name": "projects/sample1/locations/sample2/clusters/sample3/users/sample4" + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = None + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + json_return_value = "" + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.delete_user(request) + + # Establish that the response is the type that we expect. + assert response is None + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_delete_user_rest_interceptors(null_interceptor): + transport = transports.AlloyDBAdminRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.AlloyDBAdminRestInterceptor(), + ) + client = AlloyDBAdminClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.AlloyDBAdminRestInterceptor, "pre_delete_user" + ) as pre: + pre.assert_not_called() + pb_message = service.DeleteUserRequest.pb(service.DeleteUserRequest()) transcode.return_value = { "method": "post", "uri": "my_uri", @@ -30306,19 +31053,15 @@ def test_update_user_rest_interceptors(null_interceptor): req.return_value = mock.Mock() req.return_value.status_code = 200 req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - return_value = resources.User.to_json(resources.User()) - req.return_value.content = return_value - request = service.UpdateUserRequest() + request = service.DeleteUserRequest() metadata = [ ("key", "val"), ("cephalopod", "squid"), ] pre.return_value = request, metadata - post.return_value = resources.User() - post_with_metadata.return_value = resources.User(), metadata - client.update_user( + client.delete_user( request, metadata=[ ("key", "val"), @@ -30327,18 +31070,14 @@ def test_update_user_rest_interceptors(null_interceptor): ) pre.assert_called_once() - post.assert_called_once() - post_with_metadata.assert_called_once() -def test_delete_user_rest_bad_request(request_type=service.DeleteUserRequest): +def test_list_databases_rest_bad_request(request_type=service.ListDatabasesRequest): client = AlloyDBAdminClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest" ) # send a request that will satisfy transcoding - request_init = { - "name": "projects/sample1/locations/sample2/clusters/sample3/users/sample4" - } + request_init = {"parent": "projects/sample1/locations/sample2/clusters/sample3"} request = request_type(**request_init) # Mock the http request call within the method and fake a BadRequest error. @@ -30353,47 +31092,51 @@ def test_delete_user_rest_bad_request(request_type=service.DeleteUserRequest): response_value.request = mock.Mock() req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.delete_user(request) + client.list_databases(request) @pytest.mark.parametrize( "request_type", [ - service.DeleteUserRequest, + service.ListDatabasesRequest, dict, ], ) -def test_delete_user_rest_call_success(request_type): +def test_list_databases_rest_call_success(request_type): client = AlloyDBAdminClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest" ) # send a request that will satisfy transcoding - request_init = { - "name": "projects/sample1/locations/sample2/clusters/sample3/users/sample4" - } + request_init = {"parent": "projects/sample1/locations/sample2/clusters/sample3"} request = request_type(**request_init) # Mock the http request call within the method and fake a response. with mock.patch.object(type(client.transport._session), "request") as req: # Designate an appropriate value for the returned response. - return_value = None + return_value = service.ListDatabasesResponse( + next_page_token="next_page_token_value", + ) # Wrap the value into a proper Response obj response_value = mock.Mock() response_value.status_code = 200 - json_return_value = "" + + # Convert return value to protobuf type + return_value = service.ListDatabasesResponse.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) response_value.content = json_return_value.encode("UTF-8") req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.delete_user(request) + response = client.list_databases(request) # Establish that the response is the type that we expect. - assert response is None + assert isinstance(response, pagers.ListDatabasesPager) + assert response.next_page_token == "next_page_token_value" @pytest.mark.parametrize("null_interceptor", [True, False]) -def test_delete_user_rest_interceptors(null_interceptor): +def test_list_databases_rest_interceptors(null_interceptor): transport = transports.AlloyDBAdminRestTransport( credentials=ga_credentials.AnonymousCredentials(), interceptor=None @@ -30407,10 +31150,16 @@ def test_delete_user_rest_interceptors(null_interceptor): ) as req, mock.patch.object( path_template, "transcode" ) as transcode, mock.patch.object( - transports.AlloyDBAdminRestInterceptor, "pre_delete_user" + transports.AlloyDBAdminRestInterceptor, "post_list_databases" + ) as post, mock.patch.object( + transports.AlloyDBAdminRestInterceptor, "post_list_databases_with_metadata" + ) as post_with_metadata, mock.patch.object( + transports.AlloyDBAdminRestInterceptor, "pre_list_databases" ) as pre: pre.assert_not_called() - pb_message = service.DeleteUserRequest.pb(service.DeleteUserRequest()) + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = service.ListDatabasesRequest.pb(service.ListDatabasesRequest()) transcode.return_value = { "method": "post", "uri": "my_uri", @@ -30421,15 +31170,21 @@ def test_delete_user_rest_interceptors(null_interceptor): req.return_value = mock.Mock() req.return_value.status_code = 200 req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = service.ListDatabasesResponse.to_json( + service.ListDatabasesResponse() + ) + req.return_value.content = return_value - request = service.DeleteUserRequest() + request = service.ListDatabasesRequest() metadata = [ ("key", "val"), ("cephalopod", "squid"), ] pre.return_value = request, metadata + post.return_value = service.ListDatabasesResponse() + post_with_metadata.return_value = service.ListDatabasesResponse(), metadata - client.delete_user( + client.list_databases( request, metadata=[ ("key", "val"), @@ -30438,9 +31193,11 @@ def test_delete_user_rest_interceptors(null_interceptor): ) pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() -def test_list_databases_rest_bad_request(request_type=service.ListDatabasesRequest): +def test_create_database_rest_bad_request(request_type=service.CreateDatabaseRequest): client = AlloyDBAdminClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest" ) @@ -30460,30 +31217,112 @@ def test_list_databases_rest_bad_request(request_type=service.ListDatabasesReque response_value.request = mock.Mock() req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.list_databases(request) + client.create_database(request) @pytest.mark.parametrize( "request_type", [ - service.ListDatabasesRequest, + service.CreateDatabaseRequest, dict, ], ) -def test_list_databases_rest_call_success(request_type): +def test_create_database_rest_call_success(request_type): client = AlloyDBAdminClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest" ) # send a request that will satisfy transcoding request_init = {"parent": "projects/sample1/locations/sample2/clusters/sample3"} + request_init["database"] = { + "name": "name_value", + "charset": "charset_value", + "collation": "collation_value", + "character_type": "character_type_value", + "is_template": True, + "database_template": "database_template_value", + "is_template_database": True, + } + # The version of a generated dependency at test runtime may differ from the version used during generation. + # Delete any fields which are not present in the current runtime dependency + # See https://github.com/googleapis/gapic-generator-python/issues/1748 + + # Determine if the message type is proto-plus or protobuf + test_field = service.CreateDatabaseRequest.meta.fields["database"] + + def get_message_fields(field): + # Given a field which is a message (composite type), return a list with + # all the fields of the message. + # If the field is not a composite type, return an empty list. + message_fields = [] + + if hasattr(field, "message") and field.message: + is_field_type_proto_plus_type = not hasattr(field.message, "DESCRIPTOR") + + if is_field_type_proto_plus_type: + message_fields = field.message.meta.fields.values() + # Add `# pragma: NO COVER` because there may not be any `*_pb2` field types + else: # pragma: NO COVER + message_fields = field.message.DESCRIPTOR.fields + return message_fields + + runtime_nested_fields = [ + (field.name, nested_field.name) + for field in get_message_fields(test_field) + for nested_field in get_message_fields(field) + ] + + subfields_not_in_runtime = [] + + # For each item in the sample request, create a list of sub fields which are not present at runtime + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for field, value in request_init["database"].items(): # pragma: NO COVER + result = None + is_repeated = False + # For repeated fields + if isinstance(value, list) and len(value): + is_repeated = True + result = value[0] + # For fields where the type is another message + if isinstance(value, dict): + result = value + + if result and hasattr(result, "keys"): + for subfield in result.keys(): + if (field, subfield) not in runtime_nested_fields: + subfields_not_in_runtime.append( + { + "field": field, + "subfield": subfield, + "is_repeated": is_repeated, + } + ) + + # Remove fields from the sample request which are not present in the runtime version of the dependency + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for subfield_to_delete in subfields_not_in_runtime: # pragma: NO COVER + field = subfield_to_delete.get("field") + field_repeated = subfield_to_delete.get("is_repeated") + subfield = subfield_to_delete.get("subfield") + if subfield: + if field_repeated: + for i in range(0, len(request_init["database"][field])): + del request_init["database"][field][i][subfield] + else: + del request_init["database"][field][subfield] request = request_type(**request_init) # Mock the http request call within the method and fake a response. with mock.patch.object(type(client.transport._session), "request") as req: # Designate an appropriate value for the returned response. - return_value = service.ListDatabasesResponse( - next_page_token="next_page_token_value", + return_value = resources.Database( + name="name_value", + charset="charset_value", + collation="collation_value", + character_type="character_type_value", + is_template=True, + database_template="database_template_value", + is_template_database=True, ) # Wrap the value into a proper Response obj @@ -30491,20 +31330,26 @@ def test_list_databases_rest_call_success(request_type): response_value.status_code = 200 # Convert return value to protobuf type - return_value = service.ListDatabasesResponse.pb(return_value) + return_value = resources.Database.pb(return_value) json_return_value = json_format.MessageToJson(return_value) response_value.content = json_return_value.encode("UTF-8") req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.list_databases(request) + response = client.create_database(request) # Establish that the response is the type that we expect. - assert isinstance(response, pagers.ListDatabasesPager) - assert response.next_page_token == "next_page_token_value" + assert isinstance(response, resources.Database) + assert response.name == "name_value" + assert response.charset == "charset_value" + assert response.collation == "collation_value" + assert response.character_type == "character_type_value" + assert response.is_template is True + assert response.database_template == "database_template_value" + assert response.is_template_database is True @pytest.mark.parametrize("null_interceptor", [True, False]) -def test_list_databases_rest_interceptors(null_interceptor): +def test_create_database_rest_interceptors(null_interceptor): transport = transports.AlloyDBAdminRestTransport( credentials=ga_credentials.AnonymousCredentials(), interceptor=None @@ -30518,16 +31363,16 @@ def test_list_databases_rest_interceptors(null_interceptor): ) as req, mock.patch.object( path_template, "transcode" ) as transcode, mock.patch.object( - transports.AlloyDBAdminRestInterceptor, "post_list_databases" + transports.AlloyDBAdminRestInterceptor, "post_create_database" ) as post, mock.patch.object( - transports.AlloyDBAdminRestInterceptor, "post_list_databases_with_metadata" + transports.AlloyDBAdminRestInterceptor, "post_create_database_with_metadata" ) as post_with_metadata, mock.patch.object( - transports.AlloyDBAdminRestInterceptor, "pre_list_databases" + transports.AlloyDBAdminRestInterceptor, "pre_create_database" ) as pre: pre.assert_not_called() post.assert_not_called() post_with_metadata.assert_not_called() - pb_message = service.ListDatabasesRequest.pb(service.ListDatabasesRequest()) + pb_message = service.CreateDatabaseRequest.pb(service.CreateDatabaseRequest()) transcode.return_value = { "method": "post", "uri": "my_uri", @@ -30538,21 +31383,19 @@ def test_list_databases_rest_interceptors(null_interceptor): req.return_value = mock.Mock() req.return_value.status_code = 200 req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - return_value = service.ListDatabasesResponse.to_json( - service.ListDatabasesResponse() - ) + return_value = resources.Database.to_json(resources.Database()) req.return_value.content = return_value - request = service.ListDatabasesRequest() + request = service.CreateDatabaseRequest() metadata = [ ("key", "val"), ("cephalopod", "squid"), ] pre.return_value = request, metadata - post.return_value = service.ListDatabasesResponse() - post_with_metadata.return_value = service.ListDatabasesResponse(), metadata + post.return_value = resources.Database() + post_with_metadata.return_value = resources.Database(), metadata - client.list_databases( + client.create_database( request, metadata=[ ("key", "val"), @@ -31696,6 +32539,26 @@ def test_list_databases_empty_call_rest(): assert args[0] == request_msg +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_create_database_empty_call_rest(): + client = AlloyDBAdminClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.create_database), "__call__") as call: + client.create_database(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = service.CreateDatabaseRequest() + + assert args[0] == request_msg + + def test_alloy_db_admin_rest_lro_client(): client = AlloyDBAdminClient( credentials=ga_credentials.AnonymousCredentials(), @@ -31783,6 +32646,7 @@ def test_alloy_db_admin_base_transport(): "update_user", "delete_user", "list_databases", + "create_database", "get_location", "list_locations", "get_operation", @@ -32160,6 +33024,9 @@ def test_alloy_db_admin_client_transport_session_collision(transport_name): session1 = client1.transport.list_databases._session session2 = client2.transport.list_databases._session assert session1 != session2 + session1 = client1.transport.create_database._session + session2 = client2.transport.create_database._session + assert session1 != session2 def test_alloy_db_admin_grpc_transport_channel(): @@ -32397,12 +33264,41 @@ def test_parse_connection_info_path(): assert expected == actual -def test_crypto_key_version_path(): +def test_crypto_key_path(): project = "winkle" location = "nautilus" key_ring = "scallop" crypto_key = "abalone" - crypto_key_version = "squid" + expected = "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}".format( + project=project, + location=location, + key_ring=key_ring, + crypto_key=crypto_key, + ) + actual = AlloyDBAdminClient.crypto_key_path(project, location, key_ring, crypto_key) + assert expected == actual + + +def test_parse_crypto_key_path(): + expected = { + "project": "squid", + "location": "clam", + "key_ring": "whelk", + "crypto_key": "octopus", + } + path = AlloyDBAdminClient.crypto_key_path(**expected) + + # Check that the path construction is reversible. + actual = AlloyDBAdminClient.parse_crypto_key_path(path) + assert expected == actual + + +def test_crypto_key_version_path(): + project = "oyster" + location = "nudibranch" + key_ring = "cuttlefish" + crypto_key = "mussel" + crypto_key_version = "winkle" expected = "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}".format( project=project, location=location, @@ -32418,11 +33314,11 @@ def test_crypto_key_version_path(): def test_parse_crypto_key_version_path(): expected = { - "project": "clam", - "location": "whelk", - "key_ring": "octopus", - "crypto_key": "oyster", - "crypto_key_version": "nudibranch", + "project": "nautilus", + "location": "scallop", + "key_ring": "abalone", + "crypto_key": "squid", + "crypto_key_version": "clam", } path = AlloyDBAdminClient.crypto_key_version_path(**expected) @@ -32432,10 +33328,10 @@ def test_parse_crypto_key_version_path(): def test_database_path(): - project = "cuttlefish" - location = "mussel" - cluster = "winkle" - database = "nautilus" + project = "whelk" + location = "octopus" + cluster = "oyster" + database = "nudibranch" expected = "projects/{project}/locations/{location}/clusters/{cluster}/databases/{database}".format( project=project, location=location, @@ -32448,10 +33344,10 @@ def test_database_path(): def test_parse_database_path(): expected = { - "project": "scallop", - "location": "abalone", - "cluster": "squid", - "database": "clam", + "project": "cuttlefish", + "location": "mussel", + "cluster": "winkle", + "database": "nautilus", } path = AlloyDBAdminClient.database_path(**expected) @@ -32461,10 +33357,10 @@ def test_parse_database_path(): def test_instance_path(): - project = "whelk" - location = "octopus" - cluster = "oyster" - instance = "nudibranch" + project = "scallop" + location = "abalone" + cluster = "squid" + instance = "clam" expected = "projects/{project}/locations/{location}/clusters/{cluster}/instances/{instance}".format( project=project, location=location, @@ -32477,10 +33373,10 @@ def test_instance_path(): def test_parse_instance_path(): expected = { - "project": "cuttlefish", - "location": "mussel", - "cluster": "winkle", - "instance": "nautilus", + "project": "whelk", + "location": "octopus", + "cluster": "oyster", + "instance": "nudibranch", } path = AlloyDBAdminClient.instance_path(**expected) @@ -32490,8 +33386,8 @@ def test_parse_instance_path(): def test_network_path(): - project = "scallop" - network = "abalone" + project = "cuttlefish" + network = "mussel" expected = "projects/{project}/global/networks/{network}".format( project=project, network=network, @@ -32502,8 +33398,8 @@ def test_network_path(): def test_parse_network_path(): expected = { - "project": "squid", - "network": "clam", + "project": "winkle", + "network": "nautilus", } path = AlloyDBAdminClient.network_path(**expected) @@ -32512,10 +33408,38 @@ def test_parse_network_path(): assert expected == actual +def test_service_attachment_path(): + project = "scallop" + region = "abalone" + service_attachment = "squid" + expected = "projects/{project}/regions/{region}/serviceAttachments/{service_attachment}".format( + project=project, + region=region, + service_attachment=service_attachment, + ) + actual = AlloyDBAdminClient.service_attachment_path( + project, region, service_attachment + ) + assert expected == actual + + +def test_parse_service_attachment_path(): + expected = { + "project": "clam", + "region": "whelk", + "service_attachment": "octopus", + } + path = AlloyDBAdminClient.service_attachment_path(**expected) + + # Check that the path construction is reversible. + actual = AlloyDBAdminClient.parse_service_attachment_path(path) + assert expected == actual + + def test_supported_database_flag_path(): - project = "whelk" - location = "octopus" - flag = "oyster" + project = "oyster" + location = "nudibranch" + flag = "cuttlefish" expected = "projects/{project}/locations/{location}/flags/{flag}".format( project=project, location=location, @@ -32527,9 +33451,9 @@ def test_supported_database_flag_path(): def test_parse_supported_database_flag_path(): expected = { - "project": "nudibranch", - "location": "cuttlefish", - "flag": "mussel", + "project": "mussel", + "location": "winkle", + "flag": "nautilus", } path = AlloyDBAdminClient.supported_database_flag_path(**expected) @@ -32539,10 +33463,10 @@ def test_parse_supported_database_flag_path(): def test_user_path(): - project = "winkle" - location = "nautilus" - cluster = "scallop" - user = "abalone" + project = "scallop" + location = "abalone" + cluster = "squid" + user = "clam" expected = "projects/{project}/locations/{location}/clusters/{cluster}/users/{user}".format( project=project, location=location, @@ -32555,10 +33479,10 @@ def test_user_path(): def test_parse_user_path(): expected = { - "project": "squid", - "location": "clam", - "cluster": "whelk", - "user": "octopus", + "project": "whelk", + "location": "octopus", + "cluster": "oyster", + "user": "nudibranch", } path = AlloyDBAdminClient.user_path(**expected) @@ -32568,7 +33492,7 @@ def test_parse_user_path(): def test_common_billing_account_path(): - billing_account = "oyster" + billing_account = "cuttlefish" expected = "billingAccounts/{billing_account}".format( billing_account=billing_account, ) @@ -32578,7 +33502,7 @@ def test_common_billing_account_path(): def test_parse_common_billing_account_path(): expected = { - "billing_account": "nudibranch", + "billing_account": "mussel", } path = AlloyDBAdminClient.common_billing_account_path(**expected) @@ -32588,7 +33512,7 @@ def test_parse_common_billing_account_path(): def test_common_folder_path(): - folder = "cuttlefish" + folder = "winkle" expected = "folders/{folder}".format( folder=folder, ) @@ -32598,7 +33522,7 @@ def test_common_folder_path(): def test_parse_common_folder_path(): expected = { - "folder": "mussel", + "folder": "nautilus", } path = AlloyDBAdminClient.common_folder_path(**expected) @@ -32608,7 +33532,7 @@ def test_parse_common_folder_path(): def test_common_organization_path(): - organization = "winkle" + organization = "scallop" expected = "organizations/{organization}".format( organization=organization, ) @@ -32618,7 +33542,7 @@ def test_common_organization_path(): def test_parse_common_organization_path(): expected = { - "organization": "nautilus", + "organization": "abalone", } path = AlloyDBAdminClient.common_organization_path(**expected) @@ -32628,7 +33552,7 @@ def test_parse_common_organization_path(): def test_common_project_path(): - project = "scallop" + project = "squid" expected = "projects/{project}".format( project=project, ) @@ -32638,7 +33562,7 @@ def test_common_project_path(): def test_parse_common_project_path(): expected = { - "project": "abalone", + "project": "clam", } path = AlloyDBAdminClient.common_project_path(**expected) @@ -32648,8 +33572,8 @@ def test_parse_common_project_path(): def test_common_location_path(): - project = "squid" - location = "clam" + project = "whelk" + location = "octopus" expected = "projects/{project}/locations/{location}".format( project=project, location=location, @@ -32660,8 +33584,8 @@ def test_common_location_path(): def test_parse_common_location_path(): expected = { - "project": "whelk", - "location": "octopus", + "project": "oyster", + "location": "nudibranch", } path = AlloyDBAdminClient.common_location_path(**expected) diff --git a/packages/google-cloud-alloydb/tests/unit/gapic/alloydb_v1alpha/test_alloy_dbcsql_admin.py b/packages/google-cloud-alloydb/tests/unit/gapic/alloydb_v1alpha/test_alloy_dbcsql_admin.py index 979ddd5ee99d..4bb77ef23364 100644 --- a/packages/google-cloud-alloydb/tests/unit/gapic/alloydb_v1alpha/test_alloy_dbcsql_admin.py +++ b/packages/google-cloud-alloydb/tests/unit/gapic/alloydb_v1alpha/test_alloy_dbcsql_admin.py @@ -2956,12 +2956,43 @@ def test_parse_cluster_path(): assert expected == actual -def test_crypto_key_version_path(): +def test_crypto_key_path(): project = "squid" location = "clam" key_ring = "whelk" crypto_key = "octopus" - crypto_key_version = "oyster" + expected = "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}".format( + project=project, + location=location, + key_ring=key_ring, + crypto_key=crypto_key, + ) + actual = AlloyDBCSQLAdminClient.crypto_key_path( + project, location, key_ring, crypto_key + ) + assert expected == actual + + +def test_parse_crypto_key_path(): + expected = { + "project": "oyster", + "location": "nudibranch", + "key_ring": "cuttlefish", + "crypto_key": "mussel", + } + path = AlloyDBCSQLAdminClient.crypto_key_path(**expected) + + # Check that the path construction is reversible. + actual = AlloyDBCSQLAdminClient.parse_crypto_key_path(path) + assert expected == actual + + +def test_crypto_key_version_path(): + project = "winkle" + location = "nautilus" + key_ring = "scallop" + crypto_key = "abalone" + crypto_key_version = "squid" expected = "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}".format( project=project, location=location, @@ -2977,11 +3008,11 @@ def test_crypto_key_version_path(): def test_parse_crypto_key_version_path(): expected = { - "project": "nudibranch", - "location": "cuttlefish", - "key_ring": "mussel", - "crypto_key": "winkle", - "crypto_key_version": "nautilus", + "project": "clam", + "location": "whelk", + "key_ring": "octopus", + "crypto_key": "oyster", + "crypto_key_version": "nudibranch", } path = AlloyDBCSQLAdminClient.crypto_key_version_path(**expected) @@ -2991,8 +3022,8 @@ def test_parse_crypto_key_version_path(): def test_network_path(): - project = "scallop" - network = "abalone" + project = "cuttlefish" + network = "mussel" expected = "projects/{project}/global/networks/{network}".format( project=project, network=network, @@ -3003,8 +3034,8 @@ def test_network_path(): def test_parse_network_path(): expected = { - "project": "squid", - "network": "clam", + "project": "winkle", + "network": "nautilus", } path = AlloyDBCSQLAdminClient.network_path(**expected) @@ -3014,7 +3045,7 @@ def test_parse_network_path(): def test_common_billing_account_path(): - billing_account = "whelk" + billing_account = "scallop" expected = "billingAccounts/{billing_account}".format( billing_account=billing_account, ) @@ -3024,7 +3055,7 @@ def test_common_billing_account_path(): def test_parse_common_billing_account_path(): expected = { - "billing_account": "octopus", + "billing_account": "abalone", } path = AlloyDBCSQLAdminClient.common_billing_account_path(**expected) @@ -3034,7 +3065,7 @@ def test_parse_common_billing_account_path(): def test_common_folder_path(): - folder = "oyster" + folder = "squid" expected = "folders/{folder}".format( folder=folder, ) @@ -3044,7 +3075,7 @@ def test_common_folder_path(): def test_parse_common_folder_path(): expected = { - "folder": "nudibranch", + "folder": "clam", } path = AlloyDBCSQLAdminClient.common_folder_path(**expected) @@ -3054,7 +3085,7 @@ def test_parse_common_folder_path(): def test_common_organization_path(): - organization = "cuttlefish" + organization = "whelk" expected = "organizations/{organization}".format( organization=organization, ) @@ -3064,7 +3095,7 @@ def test_common_organization_path(): def test_parse_common_organization_path(): expected = { - "organization": "mussel", + "organization": "octopus", } path = AlloyDBCSQLAdminClient.common_organization_path(**expected) @@ -3074,7 +3105,7 @@ def test_parse_common_organization_path(): def test_common_project_path(): - project = "winkle" + project = "oyster" expected = "projects/{project}".format( project=project, ) @@ -3084,7 +3115,7 @@ def test_common_project_path(): def test_parse_common_project_path(): expected = { - "project": "nautilus", + "project": "nudibranch", } path = AlloyDBCSQLAdminClient.common_project_path(**expected) @@ -3094,8 +3125,8 @@ def test_parse_common_project_path(): def test_common_location_path(): - project = "scallop" - location = "abalone" + project = "cuttlefish" + location = "mussel" expected = "projects/{project}/locations/{location}".format( project=project, location=location, @@ -3106,8 +3137,8 @@ def test_common_location_path(): def test_parse_common_location_path(): expected = { - "project": "squid", - "location": "clam", + "project": "winkle", + "location": "nautilus", } path = AlloyDBCSQLAdminClient.common_location_path(**expected) diff --git a/packages/google-cloud-alloydb/tests/unit/gapic/alloydb_v1beta/test_alloy_db_admin.py b/packages/google-cloud-alloydb/tests/unit/gapic/alloydb_v1beta/test_alloy_db_admin.py index 0241b0866dd5..b24df828a260 100644 --- a/packages/google-cloud-alloydb/tests/unit/gapic/alloydb_v1beta/test_alloy_db_admin.py +++ b/packages/google-cloud-alloydb/tests/unit/gapic/alloydb_v1beta/test_alloy_db_admin.py @@ -14942,6 +14942,371 @@ async def test_list_databases_async_pages(): assert page_.raw_page.next_page_token == token +@pytest.mark.parametrize( + "request_type", + [ + service.CreateDatabaseRequest, + dict, + ], +) +def test_create_database(request_type, transport: str = "grpc"): + client = AlloyDBAdminClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Everything is optional in proto3 as far as the runtime is concerned, + # and we are mocking out the actual API, so just send an empty request. + request = request_type() + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object(type(client.transport.create_database), "__call__") as call: + # Designate an appropriate return value for the call. + call.return_value = resources.Database( + name="name_value", + charset="charset_value", + collation="collation_value", + character_type="character_type_value", + is_template=True, + database_template="database_template_value", + is_template_database=True, + ) + response = client.create_database(request) + + # Establish that the underlying gRPC stub method was called. + assert len(call.mock_calls) == 1 + _, args, _ = call.mock_calls[0] + request = service.CreateDatabaseRequest() + assert args[0] == request + + # Establish that the response is the type that we expect. + assert isinstance(response, resources.Database) + assert response.name == "name_value" + assert response.charset == "charset_value" + assert response.collation == "collation_value" + assert response.character_type == "character_type_value" + assert response.is_template is True + assert response.database_template == "database_template_value" + assert response.is_template_database is True + + +def test_create_database_non_empty_request_with_auto_populated_field(): + # This test is a coverage failsafe to make sure that UUID4 fields are + # automatically populated, according to AIP-4235, with non-empty requests. + client = AlloyDBAdminClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", + ) + + # Populate all string fields in the request which are not UUID4 + # since we want to check that UUID4 are populated automatically + # if they meet the requirements of AIP 4235. + request = service.CreateDatabaseRequest( + parent="parent_value", + database_id="database_id_value", + ) + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object(type(client.transport.create_database), "__call__") as call: + call.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client.create_database(request=request) + call.assert_called() + _, args, _ = call.mock_calls[0] + assert args[0] == service.CreateDatabaseRequest( + parent="parent_value", + database_id="database_id_value", + ) + + +def test_create_database_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = AlloyDBAdminClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.create_database in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.create_database] = mock_rpc + request = {} + client.create_database(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.create_database(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +@pytest.mark.asyncio +async def test_create_database_async_use_cached_wrapped_rpc( + transport: str = "grpc_asyncio", +): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method_async.wrap_method") as wrapper_fn: + client = AlloyDBAdminAsyncClient( + credentials=async_anonymous_credentials(), + transport=transport, + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert ( + client._client._transport.create_database + in client._client._transport._wrapped_methods + ) + + # Replace cached wrapped function with mock + mock_rpc = mock.AsyncMock() + mock_rpc.return_value = mock.Mock() + client._client._transport._wrapped_methods[ + client._client._transport.create_database + ] = mock_rpc + + request = {} + await client.create_database(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + await client.create_database(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +@pytest.mark.asyncio +async def test_create_database_async( + transport: str = "grpc_asyncio", request_type=service.CreateDatabaseRequest +): + client = AlloyDBAdminAsyncClient( + credentials=async_anonymous_credentials(), + transport=transport, + ) + + # Everything is optional in proto3 as far as the runtime is concerned, + # and we are mocking out the actual API, so just send an empty request. + request = request_type() + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object(type(client.transport.create_database), "__call__") as call: + # Designate an appropriate return value for the call. + call.return_value = grpc_helpers_async.FakeUnaryUnaryCall( + resources.Database( + name="name_value", + charset="charset_value", + collation="collation_value", + character_type="character_type_value", + is_template=True, + database_template="database_template_value", + is_template_database=True, + ) + ) + response = await client.create_database(request) + + # Establish that the underlying gRPC stub method was called. + assert len(call.mock_calls) + _, args, _ = call.mock_calls[0] + request = service.CreateDatabaseRequest() + assert args[0] == request + + # Establish that the response is the type that we expect. + assert isinstance(response, resources.Database) + assert response.name == "name_value" + assert response.charset == "charset_value" + assert response.collation == "collation_value" + assert response.character_type == "character_type_value" + assert response.is_template is True + assert response.database_template == "database_template_value" + assert response.is_template_database is True + + +@pytest.mark.asyncio +async def test_create_database_async_from_dict(): + await test_create_database_async(request_type=dict) + + +def test_create_database_field_headers(): + client = AlloyDBAdminClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Any value that is part of the HTTP/1.1 URI should be sent as + # a field header. Set these to a non-empty value. + request = service.CreateDatabaseRequest() + + request.parent = "parent_value" + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object(type(client.transport.create_database), "__call__") as call: + call.return_value = resources.Database() + client.create_database(request) + + # Establish that the underlying gRPC stub method was called. + assert len(call.mock_calls) == 1 + _, args, _ = call.mock_calls[0] + assert args[0] == request + + # Establish that the field header was sent. + _, _, kw = call.mock_calls[0] + assert ( + "x-goog-request-params", + "parent=parent_value", + ) in kw["metadata"] + + +@pytest.mark.asyncio +async def test_create_database_field_headers_async(): + client = AlloyDBAdminAsyncClient( + credentials=async_anonymous_credentials(), + ) + + # Any value that is part of the HTTP/1.1 URI should be sent as + # a field header. Set these to a non-empty value. + request = service.CreateDatabaseRequest() + + request.parent = "parent_value" + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object(type(client.transport.create_database), "__call__") as call: + call.return_value = grpc_helpers_async.FakeUnaryUnaryCall(resources.Database()) + await client.create_database(request) + + # Establish that the underlying gRPC stub method was called. + assert len(call.mock_calls) + _, args, _ = call.mock_calls[0] + assert args[0] == request + + # Establish that the field header was sent. + _, _, kw = call.mock_calls[0] + assert ( + "x-goog-request-params", + "parent=parent_value", + ) in kw["metadata"] + + +def test_create_database_flattened(): + client = AlloyDBAdminClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object(type(client.transport.create_database), "__call__") as call: + # Designate an appropriate return value for the call. + call.return_value = resources.Database() + # Call the method with a truthy value for each flattened field, + # using the keyword arguments to the method. + client.create_database( + parent="parent_value", + database=resources.Database(name="name_value"), + database_id="database_id_value", + ) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(call.mock_calls) == 1 + _, args, _ = call.mock_calls[0] + arg = args[0].parent + mock_val = "parent_value" + assert arg == mock_val + arg = args[0].database + mock_val = resources.Database(name="name_value") + assert arg == mock_val + arg = args[0].database_id + mock_val = "database_id_value" + assert arg == mock_val + + +def test_create_database_flattened_error(): + client = AlloyDBAdminClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.create_database( + service.CreateDatabaseRequest(), + parent="parent_value", + database=resources.Database(name="name_value"), + database_id="database_id_value", + ) + + +@pytest.mark.asyncio +async def test_create_database_flattened_async(): + client = AlloyDBAdminAsyncClient( + credentials=async_anonymous_credentials(), + ) + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object(type(client.transport.create_database), "__call__") as call: + # Designate an appropriate return value for the call. + call.return_value = resources.Database() + + call.return_value = grpc_helpers_async.FakeUnaryUnaryCall(resources.Database()) + # Call the method with a truthy value for each flattened field, + # using the keyword arguments to the method. + response = await client.create_database( + parent="parent_value", + database=resources.Database(name="name_value"), + database_id="database_id_value", + ) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(call.mock_calls) + _, args, _ = call.mock_calls[0] + arg = args[0].parent + mock_val = "parent_value" + assert arg == mock_val + arg = args[0].database + mock_val = resources.Database(name="name_value") + assert arg == mock_val + arg = args[0].database_id + mock_val = "database_id_value" + assert arg == mock_val + + +@pytest.mark.asyncio +async def test_create_database_flattened_error_async(): + client = AlloyDBAdminAsyncClient( + credentials=async_anonymous_credentials(), + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + await client.create_database( + service.CreateDatabaseRequest(), + parent="parent_value", + database=resources.Database(name="name_value"), + database_id="database_id_value", + ) + + def test_list_clusters_rest_use_cached_wrapped_rpc(): # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, # instead of constructing them on each call @@ -22215,11 +22580,272 @@ def test_list_databases_rest_use_cached_wrapped_rpc(): assert mock_rpc.call_count == 2 -def test_list_databases_rest_required_fields(request_type=service.ListDatabasesRequest): +def test_list_databases_rest_required_fields(request_type=service.ListDatabasesRequest): + transport_class = transports.AlloyDBAdminRestTransport + + request_init = {} + request_init["parent"] = "" + request = request_type(**request_init) + pb_request = request_type.pb(request) + jsonified_request = json.loads( + json_format.MessageToJson(pb_request, use_integers_for_enums=False) + ) + + # verify fields with default values are dropped + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).list_databases._get_unset_required_fields(jsonified_request) + jsonified_request.update(unset_fields) + + # verify required fields with default values are now present + + jsonified_request["parent"] = "parent_value" + + unset_fields = transport_class( + credentials=ga_credentials.AnonymousCredentials() + ).list_databases._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set( + ( + "filter", + "page_size", + "page_token", + ) + ) + jsonified_request.update(unset_fields) + + # verify required fields with non-default values are left alone + assert "parent" in jsonified_request + assert jsonified_request["parent"] == "parent_value" + + client = AlloyDBAdminClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + request = request_type(**request_init) + + # Designate an appropriate value for the returned response. + return_value = service.ListDatabasesResponse() + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # We need to mock transcode() because providing default values + # for required fields will fail the real version if the http_options + # expect actual values for those fields. + with mock.patch.object(path_template, "transcode") as transcode: + # A uri without fields and an empty body will force all the + # request fields to show up in the query_params. + pb_request = request_type.pb(request) + transcode_result = { + "uri": "v1/sample_method", + "method": "get", + "query_params": pb_request, + } + transcode.return_value = transcode_result + + response_value = Response() + response_value.status_code = 200 + + # Convert return value to protobuf type + return_value = service.ListDatabasesResponse.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + response = client.list_databases(request) + + expected_params = [("$alt", "json;enum-encoding=int")] + actual_params = req.call_args.kwargs["params"] + assert expected_params == actual_params + + +def test_list_databases_rest_unset_required_fields(): + transport = transports.AlloyDBAdminRestTransport( + credentials=ga_credentials.AnonymousCredentials + ) + + unset_fields = transport.list_databases._get_unset_required_fields({}) + assert set(unset_fields) == ( + set( + ( + "filter", + "pageSize", + "pageToken", + ) + ) + & set(("parent",)) + ) + + +def test_list_databases_rest_flattened(): + client = AlloyDBAdminClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = service.ListDatabasesResponse() + + # get arguments that satisfy an http rule for this method + sample_request = { + "parent": "projects/sample1/locations/sample2/clusters/sample3" + } + + # get truthy value for each flattened field + mock_args = dict( + parent="parent_value", + ) + mock_args.update(sample_request) + + # Wrap the value into a proper Response obj + response_value = Response() + response_value.status_code = 200 + # Convert return value to protobuf type + return_value = service.ListDatabasesResponse.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) + response_value._content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + + client.list_databases(**mock_args) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(req.mock_calls) == 1 + _, args, _ = req.mock_calls[0] + assert path_template.validate( + "%s/v1beta/{parent=projects/*/locations/*/clusters/*}/databases" + % client.transport._host, + args[1], + ) + + +def test_list_databases_rest_flattened_error(transport: str = "rest"): + client = AlloyDBAdminClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.list_databases( + service.ListDatabasesRequest(), + parent="parent_value", + ) + + +def test_list_databases_rest_pager(transport: str = "rest"): + client = AlloyDBAdminClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(Session, "request") as req: + # TODO(kbandes): remove this mock unless there's a good reason for it. + # with mock.patch.object(path_template, 'transcode') as transcode: + # Set the response as a series of pages + response = ( + service.ListDatabasesResponse( + databases=[ + resources.Database(), + resources.Database(), + resources.Database(), + ], + next_page_token="abc", + ), + service.ListDatabasesResponse( + databases=[], + next_page_token="def", + ), + service.ListDatabasesResponse( + databases=[ + resources.Database(), + ], + next_page_token="ghi", + ), + service.ListDatabasesResponse( + databases=[ + resources.Database(), + resources.Database(), + ], + ), + ) + # Two responses for two calls + response = response + response + + # Wrap the values into proper Response objs + response = tuple(service.ListDatabasesResponse.to_json(x) for x in response) + return_values = tuple(Response() for i in response) + for return_val, response_val in zip(return_values, response): + return_val._content = response_val.encode("UTF-8") + return_val.status_code = 200 + req.side_effect = return_values + + sample_request = { + "parent": "projects/sample1/locations/sample2/clusters/sample3" + } + + pager = client.list_databases(request=sample_request) + + results = list(pager) + assert len(results) == 6 + assert all(isinstance(i, resources.Database) for i in results) + + pages = list(client.list_databases(request=sample_request).pages) + for page_, token in zip(pages, ["abc", "def", "ghi", ""]): + assert page_.raw_page.next_page_token == token + + +def test_create_database_rest_use_cached_wrapped_rpc(): + # Clients should use _prep_wrapped_messages to create cached wrapped rpcs, + # instead of constructing them on each call + with mock.patch("google.api_core.gapic_v1.method.wrap_method") as wrapper_fn: + client = AlloyDBAdminClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Should wrap all calls on client creation + assert wrapper_fn.call_count > 0 + wrapper_fn.reset_mock() + + # Ensure method has been cached + assert client._transport.create_database in client._transport._wrapped_methods + + # Replace cached wrapped function with mock + mock_rpc = mock.Mock() + mock_rpc.return_value.name = ( + "foo" # operation_request.operation in compute client(s) expect a string. + ) + client._transport._wrapped_methods[client._transport.create_database] = mock_rpc + + request = {} + client.create_database(request) + + # Establish that the underlying gRPC stub method was called. + assert mock_rpc.call_count == 1 + + client.create_database(request) + + # Establish that a new wrapper was not created for this call + assert wrapper_fn.call_count == 0 + assert mock_rpc.call_count == 2 + + +def test_create_database_rest_required_fields( + request_type=service.CreateDatabaseRequest, +): transport_class = transports.AlloyDBAdminRestTransport request_init = {} request_init["parent"] = "" + request_init["database_id"] = "" request = request_type(**request_init) pb_request = request_type.pb(request) jsonified_request = json.loads( @@ -22227,32 +22853,32 @@ def test_list_databases_rest_required_fields(request_type=service.ListDatabasesR ) # verify fields with default values are dropped + assert "databaseId" not in jsonified_request unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).list_databases._get_unset_required_fields(jsonified_request) + ).create_database._get_unset_required_fields(jsonified_request) jsonified_request.update(unset_fields) # verify required fields with default values are now present + assert "databaseId" in jsonified_request + assert jsonified_request["databaseId"] == request_init["database_id"] jsonified_request["parent"] = "parent_value" + jsonified_request["databaseId"] = "database_id_value" unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() - ).list_databases._get_unset_required_fields(jsonified_request) + ).create_database._get_unset_required_fields(jsonified_request) # Check that path parameters and body parameters are not mixing in. - assert not set(unset_fields) - set( - ( - "filter", - "page_size", - "page_token", - ) - ) + assert not set(unset_fields) - set(("database_id",)) jsonified_request.update(unset_fields) # verify required fields with non-default values are left alone assert "parent" in jsonified_request assert jsonified_request["parent"] == "parent_value" + assert "databaseId" in jsonified_request + assert jsonified_request["databaseId"] == "database_id_value" client = AlloyDBAdminClient( credentials=ga_credentials.AnonymousCredentials(), @@ -22261,7 +22887,7 @@ def test_list_databases_rest_required_fields(request_type=service.ListDatabasesR request = request_type(**request_init) # Designate an appropriate value for the returned response. - return_value = service.ListDatabasesResponse() + return_value = resources.Database() # Mock the http request call within the method and fake a response. with mock.patch.object(Session, "request") as req: # We need to mock transcode() because providing default values @@ -22273,48 +22899,55 @@ def test_list_databases_rest_required_fields(request_type=service.ListDatabasesR pb_request = request_type.pb(request) transcode_result = { "uri": "v1/sample_method", - "method": "get", + "method": "post", "query_params": pb_request, } + transcode_result["body"] = pb_request transcode.return_value = transcode_result response_value = Response() response_value.status_code = 200 # Convert return value to protobuf type - return_value = service.ListDatabasesResponse.pb(return_value) + return_value = resources.Database.pb(return_value) json_return_value = json_format.MessageToJson(return_value) response_value._content = json_return_value.encode("UTF-8") req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.list_databases(request) + response = client.create_database(request) - expected_params = [("$alt", "json;enum-encoding=int")] + expected_params = [ + ( + "databaseId", + "", + ), + ("$alt", "json;enum-encoding=int"), + ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params -def test_list_databases_rest_unset_required_fields(): +def test_create_database_rest_unset_required_fields(): transport = transports.AlloyDBAdminRestTransport( credentials=ga_credentials.AnonymousCredentials ) - unset_fields = transport.list_databases._get_unset_required_fields({}) + unset_fields = transport.create_database._get_unset_required_fields({}) assert set(unset_fields) == ( - set( + set(("databaseId",)) + & set( ( - "filter", - "pageSize", - "pageToken", + "parent", + "databaseId", + "database", ) ) - & set(("parent",)) ) -def test_list_databases_rest_flattened(): +def test_create_database_rest_flattened(): client = AlloyDBAdminClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest", @@ -22323,7 +22956,7 @@ def test_list_databases_rest_flattened(): # Mock the http request call within the method and fake a response. with mock.patch.object(type(client.transport._session), "request") as req: # Designate an appropriate value for the returned response. - return_value = service.ListDatabasesResponse() + return_value = resources.Database() # get arguments that satisfy an http rule for this method sample_request = { @@ -22333,6 +22966,8 @@ def test_list_databases_rest_flattened(): # get truthy value for each flattened field mock_args = dict( parent="parent_value", + database=resources.Database(name="name_value"), + database_id="database_id_value", ) mock_args.update(sample_request) @@ -22340,13 +22975,13 @@ def test_list_databases_rest_flattened(): response_value = Response() response_value.status_code = 200 # Convert return value to protobuf type - return_value = service.ListDatabasesResponse.pb(return_value) + return_value = resources.Database.pb(return_value) json_return_value = json_format.MessageToJson(return_value) response_value._content = json_return_value.encode("UTF-8") req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.list_databases(**mock_args) + client.create_database(**mock_args) # Establish that the underlying call was made with the expected # request object values. @@ -22359,7 +22994,7 @@ def test_list_databases_rest_flattened(): ) -def test_list_databases_rest_flattened_error(transport: str = "rest"): +def test_create_database_rest_flattened_error(transport: str = "rest"): client = AlloyDBAdminClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, @@ -22368,75 +23003,14 @@ def test_list_databases_rest_flattened_error(transport: str = "rest"): # Attempting to call a method with both a request object and flattened # fields is an error. with pytest.raises(ValueError): - client.list_databases( - service.ListDatabasesRequest(), + client.create_database( + service.CreateDatabaseRequest(), parent="parent_value", + database=resources.Database(name="name_value"), + database_id="database_id_value", ) -def test_list_databases_rest_pager(transport: str = "rest"): - client = AlloyDBAdminClient( - credentials=ga_credentials.AnonymousCredentials(), - transport=transport, - ) - - # Mock the http request call within the method and fake a response. - with mock.patch.object(Session, "request") as req: - # TODO(kbandes): remove this mock unless there's a good reason for it. - # with mock.patch.object(path_template, 'transcode') as transcode: - # Set the response as a series of pages - response = ( - service.ListDatabasesResponse( - databases=[ - resources.Database(), - resources.Database(), - resources.Database(), - ], - next_page_token="abc", - ), - service.ListDatabasesResponse( - databases=[], - next_page_token="def", - ), - service.ListDatabasesResponse( - databases=[ - resources.Database(), - ], - next_page_token="ghi", - ), - service.ListDatabasesResponse( - databases=[ - resources.Database(), - resources.Database(), - ], - ), - ) - # Two responses for two calls - response = response + response - - # Wrap the values into proper Response objs - response = tuple(service.ListDatabasesResponse.to_json(x) for x in response) - return_values = tuple(Response() for i in response) - for return_val, response_val in zip(return_values, response): - return_val._content = response_val.encode("UTF-8") - return_val.status_code = 200 - req.side_effect = return_values - - sample_request = { - "parent": "projects/sample1/locations/sample2/clusters/sample3" - } - - pager = client.list_databases(request=sample_request) - - results = list(pager) - assert len(results) == 6 - assert all(isinstance(i, resources.Database) for i in results) - - pages = list(client.list_databases(request=sample_request).pages) - for page_, token in zip(pages, ["abc", "def", "ghi", ""]): - assert page_.raw_page.next_page_token == token - - def test_credentials_transport_error(): # It is an error to provide credentials and a transport instance. transport = transports.AlloyDBAdminGrpcTransport( @@ -23336,6 +23910,27 @@ def test_list_databases_empty_call_grpc(): assert args[0] == request_msg +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_create_database_empty_call_grpc(): + client = AlloyDBAdminClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.create_database), "__call__") as call: + call.return_value = resources.Database() + client.create_database(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = service.CreateDatabaseRequest() + + assert args[0] == request_msg + + def test_transport_kind_grpc_asyncio(): transport = AlloyDBAdminAsyncClient.get_transport_class("grpc_asyncio")( credentials=async_anonymous_credentials() @@ -24376,6 +24971,39 @@ async def test_list_databases_empty_call_grpc_asyncio(): assert args[0] == request_msg +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +@pytest.mark.asyncio +async def test_create_database_empty_call_grpc_asyncio(): + client = AlloyDBAdminAsyncClient( + credentials=async_anonymous_credentials(), + transport="grpc_asyncio", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.create_database), "__call__") as call: + # Designate an appropriate return value for the call. + call.return_value = grpc_helpers_async.FakeUnaryUnaryCall( + resources.Database( + name="name_value", + charset="charset_value", + collation="collation_value", + character_type="character_type_value", + is_template=True, + database_template="database_template_value", + is_template_database=True, + ) + ) + await client.create_database(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = service.CreateDatabaseRequest() + + assert args[0] == request_msg + + def test_transport_kind_rest(): transport = AlloyDBAdminClient.get_transport_class("rest")( credentials=ga_credentials.AnonymousCredentials() @@ -26759,7 +27387,7 @@ def test_create_instance_rest_call_success(request_type): "outbound_public_ip_addresses_value2", ], "activation_policy": 1, - "connection_pool_config": {"enabled": True, "flags": {}}, + "connection_pool_config": {"enabled": True, "flags": {}, "pooler_count": 1305}, "gca_config": {"gca_entitlement": 1}, } # The version of a generated dependency at test runtime may differ from the version used during generation. @@ -27034,7 +27662,7 @@ def test_create_secondary_instance_rest_call_success(request_type): "outbound_public_ip_addresses_value2", ], "activation_policy": 1, - "connection_pool_config": {"enabled": True, "flags": {}}, + "connection_pool_config": {"enabled": True, "flags": {}, "pooler_count": 1305}, "gca_config": {"gca_entitlement": 1}, } # The version of a generated dependency at test runtime may differ from the version used during generation. @@ -27324,7 +27952,11 @@ def test_batch_create_instances_rest_call_success(request_type): "outbound_public_ip_addresses_value2", ], "activation_policy": 1, - "connection_pool_config": {"enabled": True, "flags": {}}, + "connection_pool_config": { + "enabled": True, + "flags": {}, + "pooler_count": 1305, + }, "gca_config": {"gca_entitlement": 1}, }, "request_id": "request_id_value", @@ -27613,7 +28245,7 @@ def test_update_instance_rest_call_success(request_type): "outbound_public_ip_addresses_value2", ], "activation_policy": 1, - "connection_pool_config": {"enabled": True, "flags": {}}, + "connection_pool_config": {"enabled": True, "flags": {}, "pooler_count": 1305}, "gca_config": {"gca_entitlement": 1}, } # The version of a generated dependency at test runtime may differ from the version used during generation. @@ -30263,9 +30895,124 @@ def test_update_user_rest_interceptors(null_interceptor): transports.AlloyDBAdminRestInterceptor, "pre_update_user" ) as pre: pre.assert_not_called() - post.assert_not_called() - post_with_metadata.assert_not_called() - pb_message = service.UpdateUserRequest.pb(service.UpdateUserRequest()) + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = service.UpdateUserRequest.pb(service.UpdateUserRequest()) + transcode.return_value = { + "method": "post", + "uri": "my_uri", + "body": pb_message, + "query_params": pb_message, + } + + req.return_value = mock.Mock() + req.return_value.status_code = 200 + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = resources.User.to_json(resources.User()) + req.return_value.content = return_value + + request = service.UpdateUserRequest() + metadata = [ + ("key", "val"), + ("cephalopod", "squid"), + ] + pre.return_value = request, metadata + post.return_value = resources.User() + post_with_metadata.return_value = resources.User(), metadata + + client.update_user( + request, + metadata=[ + ("key", "val"), + ("cephalopod", "squid"), + ], + ) + + pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() + + +def test_delete_user_rest_bad_request(request_type=service.DeleteUserRequest): + client = AlloyDBAdminClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + # send a request that will satisfy transcoding + request_init = { + "name": "projects/sample1/locations/sample2/clusters/sample3/users/sample4" + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a BadRequest error. + with mock.patch.object(Session, "request") as req, pytest.raises( + core_exceptions.BadRequest + ): + # Wrap the value into a proper Response obj + response_value = mock.Mock() + json_return_value = "" + response_value.json = mock.Mock(return_value={}) + response_value.status_code = 400 + response_value.request = mock.Mock() + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + client.delete_user(request) + + +@pytest.mark.parametrize( + "request_type", + [ + service.DeleteUserRequest, + dict, + ], +) +def test_delete_user_rest_call_success(request_type): + client = AlloyDBAdminClient( + credentials=ga_credentials.AnonymousCredentials(), transport="rest" + ) + + # send a request that will satisfy transcoding + request_init = { + "name": "projects/sample1/locations/sample2/clusters/sample3/users/sample4" + } + request = request_type(**request_init) + + # Mock the http request call within the method and fake a response. + with mock.patch.object(type(client.transport._session), "request") as req: + # Designate an appropriate value for the returned response. + return_value = None + + # Wrap the value into a proper Response obj + response_value = mock.Mock() + response_value.status_code = 200 + json_return_value = "" + response_value.content = json_return_value.encode("UTF-8") + req.return_value = response_value + req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + response = client.delete_user(request) + + # Establish that the response is the type that we expect. + assert response is None + + +@pytest.mark.parametrize("null_interceptor", [True, False]) +def test_delete_user_rest_interceptors(null_interceptor): + transport = transports.AlloyDBAdminRestTransport( + credentials=ga_credentials.AnonymousCredentials(), + interceptor=None + if null_interceptor + else transports.AlloyDBAdminRestInterceptor(), + ) + client = AlloyDBAdminClient(transport=transport) + + with mock.patch.object( + type(client.transport._session), "request" + ) as req, mock.patch.object( + path_template, "transcode" + ) as transcode, mock.patch.object( + transports.AlloyDBAdminRestInterceptor, "pre_delete_user" + ) as pre: + pre.assert_not_called() + pb_message = service.DeleteUserRequest.pb(service.DeleteUserRequest()) transcode.return_value = { "method": "post", "uri": "my_uri", @@ -30276,19 +31023,15 @@ def test_update_user_rest_interceptors(null_interceptor): req.return_value = mock.Mock() req.return_value.status_code = 200 req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - return_value = resources.User.to_json(resources.User()) - req.return_value.content = return_value - request = service.UpdateUserRequest() + request = service.DeleteUserRequest() metadata = [ ("key", "val"), ("cephalopod", "squid"), ] pre.return_value = request, metadata - post.return_value = resources.User() - post_with_metadata.return_value = resources.User(), metadata - client.update_user( + client.delete_user( request, metadata=[ ("key", "val"), @@ -30297,18 +31040,14 @@ def test_update_user_rest_interceptors(null_interceptor): ) pre.assert_called_once() - post.assert_called_once() - post_with_metadata.assert_called_once() -def test_delete_user_rest_bad_request(request_type=service.DeleteUserRequest): +def test_list_databases_rest_bad_request(request_type=service.ListDatabasesRequest): client = AlloyDBAdminClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest" ) # send a request that will satisfy transcoding - request_init = { - "name": "projects/sample1/locations/sample2/clusters/sample3/users/sample4" - } + request_init = {"parent": "projects/sample1/locations/sample2/clusters/sample3"} request = request_type(**request_init) # Mock the http request call within the method and fake a BadRequest error. @@ -30323,47 +31062,51 @@ def test_delete_user_rest_bad_request(request_type=service.DeleteUserRequest): response_value.request = mock.Mock() req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.delete_user(request) + client.list_databases(request) @pytest.mark.parametrize( "request_type", [ - service.DeleteUserRequest, + service.ListDatabasesRequest, dict, ], ) -def test_delete_user_rest_call_success(request_type): +def test_list_databases_rest_call_success(request_type): client = AlloyDBAdminClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest" ) # send a request that will satisfy transcoding - request_init = { - "name": "projects/sample1/locations/sample2/clusters/sample3/users/sample4" - } + request_init = {"parent": "projects/sample1/locations/sample2/clusters/sample3"} request = request_type(**request_init) # Mock the http request call within the method and fake a response. with mock.patch.object(type(client.transport._session), "request") as req: # Designate an appropriate value for the returned response. - return_value = None + return_value = service.ListDatabasesResponse( + next_page_token="next_page_token_value", + ) # Wrap the value into a proper Response obj response_value = mock.Mock() response_value.status_code = 200 - json_return_value = "" + + # Convert return value to protobuf type + return_value = service.ListDatabasesResponse.pb(return_value) + json_return_value = json_format.MessageToJson(return_value) response_value.content = json_return_value.encode("UTF-8") req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.delete_user(request) + response = client.list_databases(request) # Establish that the response is the type that we expect. - assert response is None + assert isinstance(response, pagers.ListDatabasesPager) + assert response.next_page_token == "next_page_token_value" @pytest.mark.parametrize("null_interceptor", [True, False]) -def test_delete_user_rest_interceptors(null_interceptor): +def test_list_databases_rest_interceptors(null_interceptor): transport = transports.AlloyDBAdminRestTransport( credentials=ga_credentials.AnonymousCredentials(), interceptor=None @@ -30377,10 +31120,16 @@ def test_delete_user_rest_interceptors(null_interceptor): ) as req, mock.patch.object( path_template, "transcode" ) as transcode, mock.patch.object( - transports.AlloyDBAdminRestInterceptor, "pre_delete_user" + transports.AlloyDBAdminRestInterceptor, "post_list_databases" + ) as post, mock.patch.object( + transports.AlloyDBAdminRestInterceptor, "post_list_databases_with_metadata" + ) as post_with_metadata, mock.patch.object( + transports.AlloyDBAdminRestInterceptor, "pre_list_databases" ) as pre: pre.assert_not_called() - pb_message = service.DeleteUserRequest.pb(service.DeleteUserRequest()) + post.assert_not_called() + post_with_metadata.assert_not_called() + pb_message = service.ListDatabasesRequest.pb(service.ListDatabasesRequest()) transcode.return_value = { "method": "post", "uri": "my_uri", @@ -30391,15 +31140,21 @@ def test_delete_user_rest_interceptors(null_interceptor): req.return_value = mock.Mock() req.return_value.status_code = 200 req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} + return_value = service.ListDatabasesResponse.to_json( + service.ListDatabasesResponse() + ) + req.return_value.content = return_value - request = service.DeleteUserRequest() + request = service.ListDatabasesRequest() metadata = [ ("key", "val"), ("cephalopod", "squid"), ] pre.return_value = request, metadata + post.return_value = service.ListDatabasesResponse() + post_with_metadata.return_value = service.ListDatabasesResponse(), metadata - client.delete_user( + client.list_databases( request, metadata=[ ("key", "val"), @@ -30408,9 +31163,11 @@ def test_delete_user_rest_interceptors(null_interceptor): ) pre.assert_called_once() + post.assert_called_once() + post_with_metadata.assert_called_once() -def test_list_databases_rest_bad_request(request_type=service.ListDatabasesRequest): +def test_create_database_rest_bad_request(request_type=service.CreateDatabaseRequest): client = AlloyDBAdminClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest" ) @@ -30430,30 +31187,112 @@ def test_list_databases_rest_bad_request(request_type=service.ListDatabasesReque response_value.request = mock.Mock() req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - client.list_databases(request) + client.create_database(request) @pytest.mark.parametrize( "request_type", [ - service.ListDatabasesRequest, + service.CreateDatabaseRequest, dict, ], ) -def test_list_databases_rest_call_success(request_type): +def test_create_database_rest_call_success(request_type): client = AlloyDBAdminClient( credentials=ga_credentials.AnonymousCredentials(), transport="rest" ) # send a request that will satisfy transcoding request_init = {"parent": "projects/sample1/locations/sample2/clusters/sample3"} + request_init["database"] = { + "name": "name_value", + "charset": "charset_value", + "collation": "collation_value", + "character_type": "character_type_value", + "is_template": True, + "database_template": "database_template_value", + "is_template_database": True, + } + # The version of a generated dependency at test runtime may differ from the version used during generation. + # Delete any fields which are not present in the current runtime dependency + # See https://github.com/googleapis/gapic-generator-python/issues/1748 + + # Determine if the message type is proto-plus or protobuf + test_field = service.CreateDatabaseRequest.meta.fields["database"] + + def get_message_fields(field): + # Given a field which is a message (composite type), return a list with + # all the fields of the message. + # If the field is not a composite type, return an empty list. + message_fields = [] + + if hasattr(field, "message") and field.message: + is_field_type_proto_plus_type = not hasattr(field.message, "DESCRIPTOR") + + if is_field_type_proto_plus_type: + message_fields = field.message.meta.fields.values() + # Add `# pragma: NO COVER` because there may not be any `*_pb2` field types + else: # pragma: NO COVER + message_fields = field.message.DESCRIPTOR.fields + return message_fields + + runtime_nested_fields = [ + (field.name, nested_field.name) + for field in get_message_fields(test_field) + for nested_field in get_message_fields(field) + ] + + subfields_not_in_runtime = [] + + # For each item in the sample request, create a list of sub fields which are not present at runtime + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for field, value in request_init["database"].items(): # pragma: NO COVER + result = None + is_repeated = False + # For repeated fields + if isinstance(value, list) and len(value): + is_repeated = True + result = value[0] + # For fields where the type is another message + if isinstance(value, dict): + result = value + + if result and hasattr(result, "keys"): + for subfield in result.keys(): + if (field, subfield) not in runtime_nested_fields: + subfields_not_in_runtime.append( + { + "field": field, + "subfield": subfield, + "is_repeated": is_repeated, + } + ) + + # Remove fields from the sample request which are not present in the runtime version of the dependency + # Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime + for subfield_to_delete in subfields_not_in_runtime: # pragma: NO COVER + field = subfield_to_delete.get("field") + field_repeated = subfield_to_delete.get("is_repeated") + subfield = subfield_to_delete.get("subfield") + if subfield: + if field_repeated: + for i in range(0, len(request_init["database"][field])): + del request_init["database"][field][i][subfield] + else: + del request_init["database"][field][subfield] request = request_type(**request_init) # Mock the http request call within the method and fake a response. with mock.patch.object(type(client.transport._session), "request") as req: # Designate an appropriate value for the returned response. - return_value = service.ListDatabasesResponse( - next_page_token="next_page_token_value", + return_value = resources.Database( + name="name_value", + charset="charset_value", + collation="collation_value", + character_type="character_type_value", + is_template=True, + database_template="database_template_value", + is_template_database=True, ) # Wrap the value into a proper Response obj @@ -30461,20 +31300,26 @@ def test_list_databases_rest_call_success(request_type): response_value.status_code = 200 # Convert return value to protobuf type - return_value = service.ListDatabasesResponse.pb(return_value) + return_value = resources.Database.pb(return_value) json_return_value = json_format.MessageToJson(return_value) response_value.content = json_return_value.encode("UTF-8") req.return_value = response_value req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - response = client.list_databases(request) + response = client.create_database(request) # Establish that the response is the type that we expect. - assert isinstance(response, pagers.ListDatabasesPager) - assert response.next_page_token == "next_page_token_value" + assert isinstance(response, resources.Database) + assert response.name == "name_value" + assert response.charset == "charset_value" + assert response.collation == "collation_value" + assert response.character_type == "character_type_value" + assert response.is_template is True + assert response.database_template == "database_template_value" + assert response.is_template_database is True @pytest.mark.parametrize("null_interceptor", [True, False]) -def test_list_databases_rest_interceptors(null_interceptor): +def test_create_database_rest_interceptors(null_interceptor): transport = transports.AlloyDBAdminRestTransport( credentials=ga_credentials.AnonymousCredentials(), interceptor=None @@ -30488,16 +31333,16 @@ def test_list_databases_rest_interceptors(null_interceptor): ) as req, mock.patch.object( path_template, "transcode" ) as transcode, mock.patch.object( - transports.AlloyDBAdminRestInterceptor, "post_list_databases" + transports.AlloyDBAdminRestInterceptor, "post_create_database" ) as post, mock.patch.object( - transports.AlloyDBAdminRestInterceptor, "post_list_databases_with_metadata" + transports.AlloyDBAdminRestInterceptor, "post_create_database_with_metadata" ) as post_with_metadata, mock.patch.object( - transports.AlloyDBAdminRestInterceptor, "pre_list_databases" + transports.AlloyDBAdminRestInterceptor, "pre_create_database" ) as pre: pre.assert_not_called() post.assert_not_called() post_with_metadata.assert_not_called() - pb_message = service.ListDatabasesRequest.pb(service.ListDatabasesRequest()) + pb_message = service.CreateDatabaseRequest.pb(service.CreateDatabaseRequest()) transcode.return_value = { "method": "post", "uri": "my_uri", @@ -30508,21 +31353,19 @@ def test_list_databases_rest_interceptors(null_interceptor): req.return_value = mock.Mock() req.return_value.status_code = 200 req.return_value.headers = {"header-1": "value-1", "header-2": "value-2"} - return_value = service.ListDatabasesResponse.to_json( - service.ListDatabasesResponse() - ) + return_value = resources.Database.to_json(resources.Database()) req.return_value.content = return_value - request = service.ListDatabasesRequest() + request = service.CreateDatabaseRequest() metadata = [ ("key", "val"), ("cephalopod", "squid"), ] pre.return_value = request, metadata - post.return_value = service.ListDatabasesResponse() - post_with_metadata.return_value = service.ListDatabasesResponse(), metadata + post.return_value = resources.Database() + post_with_metadata.return_value = resources.Database(), metadata - client.list_databases( + client.create_database( request, metadata=[ ("key", "val"), @@ -31666,6 +32509,26 @@ def test_list_databases_empty_call_rest(): assert args[0] == request_msg +# This test is a coverage failsafe to make sure that totally empty calls, +# i.e. request == None and no flattened fields passed, work. +def test_create_database_empty_call_rest(): + client = AlloyDBAdminClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="rest", + ) + + # Mock the actual call, and fake the request. + with mock.patch.object(type(client.transport.create_database), "__call__") as call: + client.create_database(request=None) + + # Establish that the underlying stub method was called. + call.assert_called() + _, args, _ = call.mock_calls[0] + request_msg = service.CreateDatabaseRequest() + + assert args[0] == request_msg + + def test_alloy_db_admin_rest_lro_client(): client = AlloyDBAdminClient( credentials=ga_credentials.AnonymousCredentials(), @@ -31753,6 +32616,7 @@ def test_alloy_db_admin_base_transport(): "update_user", "delete_user", "list_databases", + "create_database", "get_location", "list_locations", "get_operation", @@ -32130,6 +32994,9 @@ def test_alloy_db_admin_client_transport_session_collision(transport_name): session1 = client1.transport.list_databases._session session2 = client2.transport.list_databases._session assert session1 != session2 + session1 = client1.transport.create_database._session + session2 = client2.transport.create_database._session + assert session1 != session2 def test_alloy_db_admin_grpc_transport_channel(): @@ -32367,12 +33234,41 @@ def test_parse_connection_info_path(): assert expected == actual -def test_crypto_key_version_path(): +def test_crypto_key_path(): project = "winkle" location = "nautilus" key_ring = "scallop" crypto_key = "abalone" - crypto_key_version = "squid" + expected = "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}".format( + project=project, + location=location, + key_ring=key_ring, + crypto_key=crypto_key, + ) + actual = AlloyDBAdminClient.crypto_key_path(project, location, key_ring, crypto_key) + assert expected == actual + + +def test_parse_crypto_key_path(): + expected = { + "project": "squid", + "location": "clam", + "key_ring": "whelk", + "crypto_key": "octopus", + } + path = AlloyDBAdminClient.crypto_key_path(**expected) + + # Check that the path construction is reversible. + actual = AlloyDBAdminClient.parse_crypto_key_path(path) + assert expected == actual + + +def test_crypto_key_version_path(): + project = "oyster" + location = "nudibranch" + key_ring = "cuttlefish" + crypto_key = "mussel" + crypto_key_version = "winkle" expected = "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}".format( project=project, location=location, @@ -32388,11 +33284,11 @@ def test_crypto_key_version_path(): def test_parse_crypto_key_version_path(): expected = { - "project": "clam", - "location": "whelk", - "key_ring": "octopus", - "crypto_key": "oyster", - "crypto_key_version": "nudibranch", + "project": "nautilus", + "location": "scallop", + "key_ring": "abalone", + "crypto_key": "squid", + "crypto_key_version": "clam", } path = AlloyDBAdminClient.crypto_key_version_path(**expected) @@ -32402,10 +33298,10 @@ def test_parse_crypto_key_version_path(): def test_database_path(): - project = "cuttlefish" - location = "mussel" - cluster = "winkle" - database = "nautilus" + project = "whelk" + location = "octopus" + cluster = "oyster" + database = "nudibranch" expected = "projects/{project}/locations/{location}/clusters/{cluster}/databases/{database}".format( project=project, location=location, @@ -32418,10 +33314,10 @@ def test_database_path(): def test_parse_database_path(): expected = { - "project": "scallop", - "location": "abalone", - "cluster": "squid", - "database": "clam", + "project": "cuttlefish", + "location": "mussel", + "cluster": "winkle", + "database": "nautilus", } path = AlloyDBAdminClient.database_path(**expected) @@ -32431,10 +33327,10 @@ def test_parse_database_path(): def test_instance_path(): - project = "whelk" - location = "octopus" - cluster = "oyster" - instance = "nudibranch" + project = "scallop" + location = "abalone" + cluster = "squid" + instance = "clam" expected = "projects/{project}/locations/{location}/clusters/{cluster}/instances/{instance}".format( project=project, location=location, @@ -32447,10 +33343,10 @@ def test_instance_path(): def test_parse_instance_path(): expected = { - "project": "cuttlefish", - "location": "mussel", - "cluster": "winkle", - "instance": "nautilus", + "project": "whelk", + "location": "octopus", + "cluster": "oyster", + "instance": "nudibranch", } path = AlloyDBAdminClient.instance_path(**expected) @@ -32460,8 +33356,8 @@ def test_parse_instance_path(): def test_network_path(): - project = "scallop" - network = "abalone" + project = "cuttlefish" + network = "mussel" expected = "projects/{project}/global/networks/{network}".format( project=project, network=network, @@ -32472,8 +33368,8 @@ def test_network_path(): def test_parse_network_path(): expected = { - "project": "squid", - "network": "clam", + "project": "winkle", + "network": "nautilus", } path = AlloyDBAdminClient.network_path(**expected) @@ -32482,10 +33378,38 @@ def test_parse_network_path(): assert expected == actual +def test_service_attachment_path(): + project = "scallop" + region = "abalone" + service_attachment = "squid" + expected = "projects/{project}/regions/{region}/serviceAttachments/{service_attachment}".format( + project=project, + region=region, + service_attachment=service_attachment, + ) + actual = AlloyDBAdminClient.service_attachment_path( + project, region, service_attachment + ) + assert expected == actual + + +def test_parse_service_attachment_path(): + expected = { + "project": "clam", + "region": "whelk", + "service_attachment": "octopus", + } + path = AlloyDBAdminClient.service_attachment_path(**expected) + + # Check that the path construction is reversible. + actual = AlloyDBAdminClient.parse_service_attachment_path(path) + assert expected == actual + + def test_supported_database_flag_path(): - project = "whelk" - location = "octopus" - flag = "oyster" + project = "oyster" + location = "nudibranch" + flag = "cuttlefish" expected = "projects/{project}/locations/{location}/flags/{flag}".format( project=project, location=location, @@ -32497,9 +33421,9 @@ def test_supported_database_flag_path(): def test_parse_supported_database_flag_path(): expected = { - "project": "nudibranch", - "location": "cuttlefish", - "flag": "mussel", + "project": "mussel", + "location": "winkle", + "flag": "nautilus", } path = AlloyDBAdminClient.supported_database_flag_path(**expected) @@ -32509,10 +33433,10 @@ def test_parse_supported_database_flag_path(): def test_user_path(): - project = "winkle" - location = "nautilus" - cluster = "scallop" - user = "abalone" + project = "scallop" + location = "abalone" + cluster = "squid" + user = "clam" expected = "projects/{project}/locations/{location}/clusters/{cluster}/users/{user}".format( project=project, location=location, @@ -32525,10 +33449,10 @@ def test_user_path(): def test_parse_user_path(): expected = { - "project": "squid", - "location": "clam", - "cluster": "whelk", - "user": "octopus", + "project": "whelk", + "location": "octopus", + "cluster": "oyster", + "user": "nudibranch", } path = AlloyDBAdminClient.user_path(**expected) @@ -32538,7 +33462,7 @@ def test_parse_user_path(): def test_common_billing_account_path(): - billing_account = "oyster" + billing_account = "cuttlefish" expected = "billingAccounts/{billing_account}".format( billing_account=billing_account, ) @@ -32548,7 +33472,7 @@ def test_common_billing_account_path(): def test_parse_common_billing_account_path(): expected = { - "billing_account": "nudibranch", + "billing_account": "mussel", } path = AlloyDBAdminClient.common_billing_account_path(**expected) @@ -32558,7 +33482,7 @@ def test_parse_common_billing_account_path(): def test_common_folder_path(): - folder = "cuttlefish" + folder = "winkle" expected = "folders/{folder}".format( folder=folder, ) @@ -32568,7 +33492,7 @@ def test_common_folder_path(): def test_parse_common_folder_path(): expected = { - "folder": "mussel", + "folder": "nautilus", } path = AlloyDBAdminClient.common_folder_path(**expected) @@ -32578,7 +33502,7 @@ def test_parse_common_folder_path(): def test_common_organization_path(): - organization = "winkle" + organization = "scallop" expected = "organizations/{organization}".format( organization=organization, ) @@ -32588,7 +33512,7 @@ def test_common_organization_path(): def test_parse_common_organization_path(): expected = { - "organization": "nautilus", + "organization": "abalone", } path = AlloyDBAdminClient.common_organization_path(**expected) @@ -32598,7 +33522,7 @@ def test_parse_common_organization_path(): def test_common_project_path(): - project = "scallop" + project = "squid" expected = "projects/{project}".format( project=project, ) @@ -32608,7 +33532,7 @@ def test_common_project_path(): def test_parse_common_project_path(): expected = { - "project": "abalone", + "project": "clam", } path = AlloyDBAdminClient.common_project_path(**expected) @@ -32618,8 +33542,8 @@ def test_parse_common_project_path(): def test_common_location_path(): - project = "squid" - location = "clam" + project = "whelk" + location = "octopus" expected = "projects/{project}/locations/{location}".format( project=project, location=location, @@ -32630,8 +33554,8 @@ def test_common_location_path(): def test_parse_common_location_path(): expected = { - "project": "whelk", - "location": "octopus", + "project": "oyster", + "location": "nudibranch", } path = AlloyDBAdminClient.common_location_path(**expected) diff --git a/packages/google-cloud-alloydb/tests/unit/gapic/alloydb_v1beta/test_alloy_dbcsql_admin.py b/packages/google-cloud-alloydb/tests/unit/gapic/alloydb_v1beta/test_alloy_dbcsql_admin.py index b8d51794444d..d659a36634c7 100644 --- a/packages/google-cloud-alloydb/tests/unit/gapic/alloydb_v1beta/test_alloy_dbcsql_admin.py +++ b/packages/google-cloud-alloydb/tests/unit/gapic/alloydb_v1beta/test_alloy_dbcsql_admin.py @@ -2956,12 +2956,43 @@ def test_parse_cluster_path(): assert expected == actual -def test_crypto_key_version_path(): +def test_crypto_key_path(): project = "squid" location = "clam" key_ring = "whelk" crypto_key = "octopus" - crypto_key_version = "oyster" + expected = "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}".format( + project=project, + location=location, + key_ring=key_ring, + crypto_key=crypto_key, + ) + actual = AlloyDBCSQLAdminClient.crypto_key_path( + project, location, key_ring, crypto_key + ) + assert expected == actual + + +def test_parse_crypto_key_path(): + expected = { + "project": "oyster", + "location": "nudibranch", + "key_ring": "cuttlefish", + "crypto_key": "mussel", + } + path = AlloyDBCSQLAdminClient.crypto_key_path(**expected) + + # Check that the path construction is reversible. + actual = AlloyDBCSQLAdminClient.parse_crypto_key_path(path) + assert expected == actual + + +def test_crypto_key_version_path(): + project = "winkle" + location = "nautilus" + key_ring = "scallop" + crypto_key = "abalone" + crypto_key_version = "squid" expected = "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}".format( project=project, location=location, @@ -2977,11 +3008,11 @@ def test_crypto_key_version_path(): def test_parse_crypto_key_version_path(): expected = { - "project": "nudibranch", - "location": "cuttlefish", - "key_ring": "mussel", - "crypto_key": "winkle", - "crypto_key_version": "nautilus", + "project": "clam", + "location": "whelk", + "key_ring": "octopus", + "crypto_key": "oyster", + "crypto_key_version": "nudibranch", } path = AlloyDBCSQLAdminClient.crypto_key_version_path(**expected) @@ -2991,8 +3022,8 @@ def test_parse_crypto_key_version_path(): def test_network_path(): - project = "scallop" - network = "abalone" + project = "cuttlefish" + network = "mussel" expected = "projects/{project}/global/networks/{network}".format( project=project, network=network, @@ -3003,8 +3034,8 @@ def test_network_path(): def test_parse_network_path(): expected = { - "project": "squid", - "network": "clam", + "project": "winkle", + "network": "nautilus", } path = AlloyDBCSQLAdminClient.network_path(**expected) @@ -3014,7 +3045,7 @@ def test_parse_network_path(): def test_common_billing_account_path(): - billing_account = "whelk" + billing_account = "scallop" expected = "billingAccounts/{billing_account}".format( billing_account=billing_account, ) @@ -3024,7 +3055,7 @@ def test_common_billing_account_path(): def test_parse_common_billing_account_path(): expected = { - "billing_account": "octopus", + "billing_account": "abalone", } path = AlloyDBCSQLAdminClient.common_billing_account_path(**expected) @@ -3034,7 +3065,7 @@ def test_parse_common_billing_account_path(): def test_common_folder_path(): - folder = "oyster" + folder = "squid" expected = "folders/{folder}".format( folder=folder, ) @@ -3044,7 +3075,7 @@ def test_common_folder_path(): def test_parse_common_folder_path(): expected = { - "folder": "nudibranch", + "folder": "clam", } path = AlloyDBCSQLAdminClient.common_folder_path(**expected) @@ -3054,7 +3085,7 @@ def test_parse_common_folder_path(): def test_common_organization_path(): - organization = "cuttlefish" + organization = "whelk" expected = "organizations/{organization}".format( organization=organization, ) @@ -3064,7 +3095,7 @@ def test_common_organization_path(): def test_parse_common_organization_path(): expected = { - "organization": "mussel", + "organization": "octopus", } path = AlloyDBCSQLAdminClient.common_organization_path(**expected) @@ -3074,7 +3105,7 @@ def test_parse_common_organization_path(): def test_common_project_path(): - project = "winkle" + project = "oyster" expected = "projects/{project}".format( project=project, ) @@ -3084,7 +3115,7 @@ def test_common_project_path(): def test_parse_common_project_path(): expected = { - "project": "nautilus", + "project": "nudibranch", } path = AlloyDBCSQLAdminClient.common_project_path(**expected) @@ -3094,8 +3125,8 @@ def test_parse_common_project_path(): def test_common_location_path(): - project = "scallop" - location = "abalone" + project = "cuttlefish" + location = "mussel" expected = "projects/{project}/locations/{location}".format( project=project, location=location, @@ -3106,8 +3137,8 @@ def test_common_location_path(): def test_parse_common_location_path(): expected = { - "project": "squid", - "location": "clam", + "project": "winkle", + "location": "nautilus", } path = AlloyDBCSQLAdminClient.common_location_path(**expected) diff --git a/packages/google-cloud-api-gateway/noxfile.py b/packages/google-cloud-api-gateway/noxfile.py index e4cfde489d15..501dcc9c479f 100644 --- a/packages/google-cloud-api-gateway/noxfile.py +++ b/packages/google-cloud-api-gateway/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-api-gateway/testing/constraints-3.14.txt b/packages/google-cloud-api-gateway/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-cloud-api-gateway/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-cloud-api-keys/noxfile.py b/packages/google-cloud-api-keys/noxfile.py index afd48594de34..46305ff06c6d 100644 --- a/packages/google-cloud-api-keys/noxfile.py +++ b/packages/google-cloud-api-keys/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-api-keys/testing/constraints-3.14.txt b/packages/google-cloud-api-keys/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-cloud-api-keys/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-cloud-apigee-connect/.OwlBot.yaml b/packages/google-cloud-apigee-connect/.OwlBot.yaml deleted file mode 100644 index 593c2abab000..000000000000 --- a/packages/google-cloud-apigee-connect/.OwlBot.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright 2021 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -deep-remove-regex: - - /owl-bot-staging - -deep-copy-regex: - - source: /google/cloud/apigeeconnect/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-apigee-connect/$1 - -begin-after-commit-hash: 70f7f0525414fe4dfeb2fc2e81546b073f83a621 -api-name: google-cloud-apigee-connect diff --git a/packages/google-cloud-apigee-connect/google/cloud/apigeeconnect/gapic_version.py b/packages/google-cloud-apigee-connect/google/cloud/apigeeconnect/gapic_version.py index 20a9cd975b02..173714aec920 100644 --- a/packages/google-cloud-apigee-connect/google/cloud/apigeeconnect/gapic_version.py +++ b/packages/google-cloud-apigee-connect/google/cloud/apigeeconnect/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.12.2" # {x-release-please-version} diff --git a/packages/google-cloud-apigee-connect/google/cloud/apigeeconnect_v1/gapic_version.py b/packages/google-cloud-apigee-connect/google/cloud/apigeeconnect_v1/gapic_version.py index 20a9cd975b02..173714aec920 100644 --- a/packages/google-cloud-apigee-connect/google/cloud/apigeeconnect_v1/gapic_version.py +++ b/packages/google-cloud-apigee-connect/google/cloud/apigeeconnect_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.12.2" # {x-release-please-version} diff --git a/packages/google-cloud-apigee-connect/noxfile.py b/packages/google-cloud-apigee-connect/noxfile.py index c235c4568636..b3ae73334d67 100644 --- a/packages/google-cloud-apigee-connect/noxfile.py +++ b/packages/google-cloud-apigee-connect/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-apigee-connect/samples/generated_samples/snippet_metadata_google.cloud.apigeeconnect.v1.json b/packages/google-cloud-apigee-connect/samples/generated_samples/snippet_metadata_google.cloud.apigeeconnect.v1.json index ce1973950a71..219b369df5ef 100644 --- a/packages/google-cloud-apigee-connect/samples/generated_samples/snippet_metadata_google.cloud.apigeeconnect.v1.json +++ b/packages/google-cloud-apigee-connect/samples/generated_samples/snippet_metadata_google.cloud.apigeeconnect.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-apigee-connect", - "version": "0.1.0" + "version": "1.12.2" }, "snippets": [ { diff --git a/packages/google-cloud-apigee-connect/testing/constraints-3.14.txt b/packages/google-cloud-apigee-connect/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-cloud-apigee-connect/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-cloud-apigee-registry/.OwlBot.yaml b/packages/google-cloud-apigee-registry/.OwlBot.yaml deleted file mode 100644 index 2ae415f5faba..000000000000 --- a/packages/google-cloud-apigee-registry/.OwlBot.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# 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-remove-regex: - - /owl-bot-staging - -deep-copy-regex: - - source: /google/cloud/apigeeregistry/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-apigee-registry/$1 - -begin-after-commit-hash: 70f7f0525414fe4dfeb2fc2e81546b073f83a621 -api-name: google-cloud-apigee-registry diff --git a/packages/google-cloud-apigee-registry/google/cloud/apigee_registry/gapic_version.py b/packages/google-cloud-apigee-registry/google/cloud/apigee_registry/gapic_version.py index 20a9cd975b02..20709ed1a2ae 100644 --- a/packages/google-cloud-apigee-registry/google/cloud/apigee_registry/gapic_version.py +++ b/packages/google-cloud-apigee-registry/google/cloud/apigee_registry/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.6.18" # {x-release-please-version} diff --git a/packages/google-cloud-apigee-registry/google/cloud/apigee_registry_v1/gapic_version.py b/packages/google-cloud-apigee-registry/google/cloud/apigee_registry_v1/gapic_version.py index 20a9cd975b02..20709ed1a2ae 100644 --- a/packages/google-cloud-apigee-registry/google/cloud/apigee_registry_v1/gapic_version.py +++ b/packages/google-cloud-apigee-registry/google/cloud/apigee_registry_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.6.18" # {x-release-please-version} diff --git a/packages/google-cloud-apigee-registry/noxfile.py b/packages/google-cloud-apigee-registry/noxfile.py index e1ff90d38086..87be36ea4934 100644 --- a/packages/google-cloud-apigee-registry/noxfile.py +++ b/packages/google-cloud-apigee-registry/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-apigee-registry/samples/generated_samples/snippet_metadata_google.cloud.apigeeregistry.v1.json b/packages/google-cloud-apigee-registry/samples/generated_samples/snippet_metadata_google.cloud.apigeeregistry.v1.json index b2c5df756020..4b594d3725d6 100644 --- a/packages/google-cloud-apigee-registry/samples/generated_samples/snippet_metadata_google.cloud.apigeeregistry.v1.json +++ b/packages/google-cloud-apigee-registry/samples/generated_samples/snippet_metadata_google.cloud.apigeeregistry.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-apigee-registry", - "version": "0.1.0" + "version": "0.6.18" }, "snippets": [ { diff --git a/packages/google-cloud-apigee-registry/testing/constraints-3.14.txt b/packages/google-cloud-apigee-registry/testing/constraints-3.14.txt new file mode 100644 index 000000000000..2010e549cceb --- /dev/null +++ b/packages/google-cloud-apigee-registry/testing/constraints-3.14.txt @@ -0,0 +1,12 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 +grpc-google-iam-v1>=0 diff --git a/packages/google-cloud-apihub/.OwlBot.yaml b/packages/google-cloud-apihub/.OwlBot.yaml deleted file mode 100644 index a4fe33a60a86..000000000000 --- a/packages/google-cloud-apihub/.OwlBot.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# 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/apihub/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-apihub/$1 -api-name: google-cloud-apihub diff --git a/packages/google-cloud-apihub/google/cloud/apihub/gapic_version.py b/packages/google-cloud-apihub/google/cloud/apihub/gapic_version.py index 20a9cd975b02..5e9f73f4e3f5 100644 --- a/packages/google-cloud-apihub/google/cloud/apihub/gapic_version.py +++ b/packages/google-cloud-apihub/google/cloud/apihub/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.2.7" # {x-release-please-version} diff --git a/packages/google-cloud-apihub/google/cloud/apihub_v1/gapic_version.py b/packages/google-cloud-apihub/google/cloud/apihub_v1/gapic_version.py index 20a9cd975b02..5e9f73f4e3f5 100644 --- a/packages/google-cloud-apihub/google/cloud/apihub_v1/gapic_version.py +++ b/packages/google-cloud-apihub/google/cloud/apihub_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.2.7" # {x-release-please-version} diff --git a/packages/google-cloud-apihub/noxfile.py b/packages/google-cloud-apihub/noxfile.py index bd8fb2f2acd3..f0d0e6ec2ec3 100644 --- a/packages/google-cloud-apihub/noxfile.py +++ b/packages/google-cloud-apihub/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-apihub/samples/generated_samples/snippet_metadata_google.cloud.apihub.v1.json b/packages/google-cloud-apihub/samples/generated_samples/snippet_metadata_google.cloud.apihub.v1.json index 3bd5c6e4bb59..90a40638745a 100644 --- a/packages/google-cloud-apihub/samples/generated_samples/snippet_metadata_google.cloud.apihub.v1.json +++ b/packages/google-cloud-apihub/samples/generated_samples/snippet_metadata_google.cloud.apihub.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-apihub", - "version": "0.1.0" + "version": "0.2.7" }, "snippets": [ { diff --git a/packages/google-cloud-apihub/testing/constraints-3.14.txt b/packages/google-cloud-apihub/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-cloud-apihub/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-cloud-appengine-admin/.OwlBot.yaml b/packages/google-cloud-appengine-admin/.OwlBot.yaml deleted file mode 100644 index ab84013084b0..000000000000 --- a/packages/google-cloud-appengine-admin/.OwlBot.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 2021 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -deep-remove-regex: - - /owl-bot-staging - -deep-copy-regex: - - source: /google/appengine/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-appengine-admin/$1 - -begin-after-commit-hash: 5f1b96948e61e31e6bb4b586238ad79d6c24cdc3 - -api-name: google-cloud-appengine-admin diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin/gapic_version.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin/gapic_version.py index 20a9cd975b02..c36cb2cf2a03 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin/gapic_version.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.14.2" # {x-release-please-version} diff --git a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/gapic_version.py b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/gapic_version.py index 20a9cd975b02..c36cb2cf2a03 100644 --- a/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/gapic_version.py +++ b/packages/google-cloud-appengine-admin/google/cloud/appengine_admin_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.14.2" # {x-release-please-version} diff --git a/packages/google-cloud-appengine-admin/noxfile.py b/packages/google-cloud-appengine-admin/noxfile.py index f20332ad94c2..54c46ecfc90e 100644 --- a/packages/google-cloud-appengine-admin/noxfile.py +++ b/packages/google-cloud-appengine-admin/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-appengine-admin/samples/generated_samples/snippet_metadata_google.appengine.v1.json b/packages/google-cloud-appengine-admin/samples/generated_samples/snippet_metadata_google.appengine.v1.json index a039900680d7..f1d77fd5fa44 100644 --- a/packages/google-cloud-appengine-admin/samples/generated_samples/snippet_metadata_google.appengine.v1.json +++ b/packages/google-cloud-appengine-admin/samples/generated_samples/snippet_metadata_google.appengine.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-appengine-admin", - "version": "0.1.0" + "version": "1.14.2" }, "snippets": [ { diff --git a/packages/google-cloud-appengine-admin/testing/constraints-3.14.txt b/packages/google-cloud-appengine-admin/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-cloud-appengine-admin/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-cloud-appengine-logging/.OwlBot.yaml b/packages/google-cloud-appengine-logging/.OwlBot.yaml deleted file mode 100644 index 752abf96125b..000000000000 --- a/packages/google-cloud-appengine-logging/.OwlBot.yaml +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright 2021 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -deep-remove-regex: - - /owl-bot-staging - -deep-copy-regex: - - source: /google/appengine/logging/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-appengine-logging/$1 - -begin-after-commit-hash: b06c9034cfcbce180ba732d03be6526e5c8ea1bc -api-name: google-cloud-appengine-logging diff --git a/packages/google-cloud-appengine-logging/.repo-metadata.json b/packages/google-cloud-appengine-logging/.repo-metadata.json index a65369c34dae..a8c9b8b6c888 100644 --- a/packages/google-cloud-appengine-logging/.repo-metadata.json +++ b/packages/google-cloud-appengine-logging/.repo-metadata.json @@ -11,4 +11,4 @@ "distribution_name": "google-cloud-appengine-logging", "api_id": "", "default_version": "v1" -} +} \ No newline at end of file diff --git a/packages/google-cloud-appengine-logging/google/cloud/appengine_logging/gapic_version.py b/packages/google-cloud-appengine-logging/google/cloud/appengine_logging/gapic_version.py index 20a9cd975b02..0276accd3d1a 100644 --- a/packages/google-cloud-appengine-logging/google/cloud/appengine_logging/gapic_version.py +++ b/packages/google-cloud-appengine-logging/google/cloud/appengine_logging/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.6.2" # {x-release-please-version} diff --git a/packages/google-cloud-appengine-logging/google/cloud/appengine_logging_v1/gapic_version.py b/packages/google-cloud-appengine-logging/google/cloud/appengine_logging_v1/gapic_version.py index 20a9cd975b02..0276accd3d1a 100644 --- a/packages/google-cloud-appengine-logging/google/cloud/appengine_logging_v1/gapic_version.py +++ b/packages/google-cloud-appengine-logging/google/cloud/appengine_logging_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.6.2" # {x-release-please-version} diff --git a/packages/google-cloud-appengine-logging/noxfile.py b/packages/google-cloud-appengine-logging/noxfile.py index 6dea18ad68d0..179f3c585122 100644 --- a/packages/google-cloud-appengine-logging/noxfile.py +++ b/packages/google-cloud-appengine-logging/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-appengine-logging/testing/constraints-3.14.txt b/packages/google-cloud-appengine-logging/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-cloud-appengine-logging/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-cloud-apphub/.OwlBot.yaml b/packages/google-cloud-apphub/.OwlBot.yaml deleted file mode 100644 index a9e737010ee5..000000000000 --- a/packages/google-cloud-apphub/.OwlBot.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# 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/apphub/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-apphub/$1 -api-name: google-cloud-apphub diff --git a/packages/google-cloud-apphub/google/cloud/apphub/gapic_version.py b/packages/google-cloud-apphub/google/cloud/apphub/gapic_version.py index 20a9cd975b02..e83d2be0b25c 100644 --- a/packages/google-cloud-apphub/google/cloud/apphub/gapic_version.py +++ b/packages/google-cloud-apphub/google/cloud/apphub/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.1.10" # {x-release-please-version} diff --git a/packages/google-cloud-apphub/google/cloud/apphub_v1/gapic_version.py b/packages/google-cloud-apphub/google/cloud/apphub_v1/gapic_version.py index 20a9cd975b02..e83d2be0b25c 100644 --- a/packages/google-cloud-apphub/google/cloud/apphub_v1/gapic_version.py +++ b/packages/google-cloud-apphub/google/cloud/apphub_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.1.10" # {x-release-please-version} diff --git a/packages/google-cloud-apphub/noxfile.py b/packages/google-cloud-apphub/noxfile.py index 271d8e8e2fe4..5c6ed057e2bd 100644 --- a/packages/google-cloud-apphub/noxfile.py +++ b/packages/google-cloud-apphub/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-apphub/samples/generated_samples/snippet_metadata_google.cloud.apphub.v1.json b/packages/google-cloud-apphub/samples/generated_samples/snippet_metadata_google.cloud.apphub.v1.json index 161a57517820..bb1fd32d5ab8 100644 --- a/packages/google-cloud-apphub/samples/generated_samples/snippet_metadata_google.cloud.apphub.v1.json +++ b/packages/google-cloud-apphub/samples/generated_samples/snippet_metadata_google.cloud.apphub.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-apphub", - "version": "0.1.0" + "version": "0.1.10" }, "snippets": [ { diff --git a/packages/google-cloud-apphub/testing/constraints-3.14.txt b/packages/google-cloud-apphub/testing/constraints-3.14.txt new file mode 100644 index 000000000000..2010e549cceb --- /dev/null +++ b/packages/google-cloud-apphub/testing/constraints-3.14.txt @@ -0,0 +1,12 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 +grpc-google-iam-v1>=0 diff --git a/packages/google-cloud-artifact-registry/.OwlBot.yaml b/packages/google-cloud-artifact-registry/.OwlBot.yaml deleted file mode 100644 index 0c6f93f327a7..000000000000 --- a/packages/google-cloud-artifact-registry/.OwlBot.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 2021 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -deep-remove-regex: - - /owl-bot-staging - -deep-copy-regex: - - source: /google/devtools/artifactregistry/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-artifact-registry/$1 - -begin-after-commit-hash: 40278112d2922ec917140dcb5cc6d5ef2923aeb2 - -api-name: google-cloud-artifact-registry diff --git a/packages/google-cloud-artifact-registry/.repo-metadata.json b/packages/google-cloud-artifact-registry/.repo-metadata.json index a3dc2a24f14b..cb96fe7bfc64 100644 --- a/packages/google-cloud-artifact-registry/.repo-metadata.json +++ b/packages/google-cloud-artifact-registry/.repo-metadata.json @@ -13,4 +13,4 @@ "default_version": "v1", "api_shortname": "artifactregistry", "api_description": "provides a single place for your organization to manage container images and language packages (such as Maven and npm). It is fully integrated with Google Cloud's tooling and runtimes and comes with support for native artifact protocols. This makes it simple to integrate it with your CI/CD tooling to set up automated pipelines." -} +} \ No newline at end of file diff --git a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry/gapic_version.py b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry/gapic_version.py index 20a9cd975b02..1a363fe3aaab 100644 --- a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry/gapic_version.py +++ b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.16.1" # {x-release-please-version} diff --git a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/gapic_version.py b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/gapic_version.py index 20a9cd975b02..1a363fe3aaab 100644 --- a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/gapic_version.py +++ b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.16.1" # {x-release-please-version} diff --git a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1beta2/gapic_version.py b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1beta2/gapic_version.py index 20a9cd975b02..1a363fe3aaab 100644 --- a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1beta2/gapic_version.py +++ b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1beta2/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.16.1" # {x-release-please-version} diff --git a/packages/google-cloud-artifact-registry/noxfile.py b/packages/google-cloud-artifact-registry/noxfile.py index 0ff4edb2d410..2edbfbf6d875 100644 --- a/packages/google-cloud-artifact-registry/noxfile.py +++ b/packages/google-cloud-artifact-registry/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/snippet_metadata_google.devtools.artifactregistry.v1.json b/packages/google-cloud-artifact-registry/samples/generated_samples/snippet_metadata_google.devtools.artifactregistry.v1.json index 43448eb993ec..915ebd94898b 100644 --- a/packages/google-cloud-artifact-registry/samples/generated_samples/snippet_metadata_google.devtools.artifactregistry.v1.json +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/snippet_metadata_google.devtools.artifactregistry.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-artifact-registry", - "version": "0.1.0" + "version": "1.16.1" }, "snippets": [ { diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/snippet_metadata_google.devtools.artifactregistry.v1beta2.json b/packages/google-cloud-artifact-registry/samples/generated_samples/snippet_metadata_google.devtools.artifactregistry.v1beta2.json index 914e581f4fb1..bad567c0acc9 100644 --- a/packages/google-cloud-artifact-registry/samples/generated_samples/snippet_metadata_google.devtools.artifactregistry.v1beta2.json +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/snippet_metadata_google.devtools.artifactregistry.v1beta2.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-artifact-registry", - "version": "0.1.0" + "version": "1.16.1" }, "snippets": [ { diff --git a/packages/google-cloud-artifact-registry/testing/constraints-3.14.txt b/packages/google-cloud-artifact-registry/testing/constraints-3.14.txt new file mode 100644 index 000000000000..2010e549cceb --- /dev/null +++ b/packages/google-cloud-artifact-registry/testing/constraints-3.14.txt @@ -0,0 +1,12 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 +grpc-google-iam-v1>=0 diff --git a/packages/google-cloud-asset/.OwlBot.yaml b/packages/google-cloud-asset/.OwlBot.yaml deleted file mode 100644 index a658b3e1d2f3..000000000000 --- a/packages/google-cloud-asset/.OwlBot.yaml +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright 2021 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -deep-remove-regex: - - /owl-bot-staging - -deep-preserve-regex: - - /owl-bot-staging/google-cloud-asset/v1p7beta1 - -deep-copy-regex: - - source: /google/cloud/asset/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-asset/$1 - -begin-after-commit-hash: ee56c3493ec6aeb237ff515ecea949710944a20f - -api-name: google-cloud-asset diff --git a/packages/google-cloud-asset/google/cloud/asset/gapic_version.py b/packages/google-cloud-asset/google/cloud/asset/gapic_version.py index 20a9cd975b02..01c18040251b 100644 --- a/packages/google-cloud-asset/google/cloud/asset/gapic_version.py +++ b/packages/google-cloud-asset/google/cloud/asset/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "3.30.1" # {x-release-please-version} diff --git a/packages/google-cloud-asset/google/cloud/asset_v1/gapic_version.py b/packages/google-cloud-asset/google/cloud/asset_v1/gapic_version.py index 20a9cd975b02..01c18040251b 100644 --- a/packages/google-cloud-asset/google/cloud/asset_v1/gapic_version.py +++ b/packages/google-cloud-asset/google/cloud/asset_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "3.30.1" # {x-release-please-version} diff --git a/packages/google-cloud-asset/google/cloud/asset_v1p1beta1/gapic_version.py b/packages/google-cloud-asset/google/cloud/asset_v1p1beta1/gapic_version.py index 20a9cd975b02..01c18040251b 100644 --- a/packages/google-cloud-asset/google/cloud/asset_v1p1beta1/gapic_version.py +++ b/packages/google-cloud-asset/google/cloud/asset_v1p1beta1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "3.30.1" # {x-release-please-version} diff --git a/packages/google-cloud-asset/google/cloud/asset_v1p2beta1/gapic_version.py b/packages/google-cloud-asset/google/cloud/asset_v1p2beta1/gapic_version.py index 20a9cd975b02..01c18040251b 100644 --- a/packages/google-cloud-asset/google/cloud/asset_v1p2beta1/gapic_version.py +++ b/packages/google-cloud-asset/google/cloud/asset_v1p2beta1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "3.30.1" # {x-release-please-version} diff --git a/packages/google-cloud-asset/google/cloud/asset_v1p5beta1/gapic_version.py b/packages/google-cloud-asset/google/cloud/asset_v1p5beta1/gapic_version.py index 20a9cd975b02..01c18040251b 100644 --- a/packages/google-cloud-asset/google/cloud/asset_v1p5beta1/gapic_version.py +++ b/packages/google-cloud-asset/google/cloud/asset_v1p5beta1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "3.30.1" # {x-release-please-version} diff --git a/packages/google-cloud-asset/noxfile.py b/packages/google-cloud-asset/noxfile.py index 68aa7d44e0f5..b288b6adc87d 100644 --- a/packages/google-cloud-asset/noxfile.py +++ b/packages/google-cloud-asset/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-asset/samples/generated_samples/snippet_metadata_google.cloud.asset.v1.json b/packages/google-cloud-asset/samples/generated_samples/snippet_metadata_google.cloud.asset.v1.json index 211efb19c2ad..127b414cf047 100644 --- a/packages/google-cloud-asset/samples/generated_samples/snippet_metadata_google.cloud.asset.v1.json +++ b/packages/google-cloud-asset/samples/generated_samples/snippet_metadata_google.cloud.asset.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-asset", - "version": "0.1.0" + "version": "3.30.1" }, "snippets": [ { diff --git a/packages/google-cloud-asset/samples/generated_samples/snippet_metadata_google.cloud.asset.v1p1beta1.json b/packages/google-cloud-asset/samples/generated_samples/snippet_metadata_google.cloud.asset.v1p1beta1.json index 13d603d43770..d4a1b7cbb8fd 100644 --- a/packages/google-cloud-asset/samples/generated_samples/snippet_metadata_google.cloud.asset.v1p1beta1.json +++ b/packages/google-cloud-asset/samples/generated_samples/snippet_metadata_google.cloud.asset.v1p1beta1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-asset", - "version": "0.1.0" + "version": "3.30.1" }, "snippets": [ { diff --git a/packages/google-cloud-asset/samples/generated_samples/snippet_metadata_google.cloud.asset.v1p2beta1.json b/packages/google-cloud-asset/samples/generated_samples/snippet_metadata_google.cloud.asset.v1p2beta1.json index abb0badfbf70..1340bf6fd140 100644 --- a/packages/google-cloud-asset/samples/generated_samples/snippet_metadata_google.cloud.asset.v1p2beta1.json +++ b/packages/google-cloud-asset/samples/generated_samples/snippet_metadata_google.cloud.asset.v1p2beta1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-asset", - "version": "0.1.0" + "version": "3.30.1" }, "snippets": [ { diff --git a/packages/google-cloud-asset/samples/generated_samples/snippet_metadata_google.cloud.asset.v1p5beta1.json b/packages/google-cloud-asset/samples/generated_samples/snippet_metadata_google.cloud.asset.v1p5beta1.json index 2b27b5681d7c..e9d07c7164ca 100644 --- a/packages/google-cloud-asset/samples/generated_samples/snippet_metadata_google.cloud.asset.v1p5beta1.json +++ b/packages/google-cloud-asset/samples/generated_samples/snippet_metadata_google.cloud.asset.v1p5beta1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-asset", - "version": "0.1.0" + "version": "3.30.1" }, "snippets": [ { diff --git a/packages/google-cloud-asset/testing/constraints-3.14.txt b/packages/google-cloud-asset/testing/constraints-3.14.txt new file mode 100644 index 000000000000..763099d82412 --- /dev/null +++ b/packages/google-cloud-asset/testing/constraints-3.14.txt @@ -0,0 +1,14 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 +google-cloud-access-context-manager>=0 +google-cloud-os-config>=1 +grpc-google-iam-v1>=0 diff --git a/packages/google-cloud-assured-workloads/.OwlBot.yaml b/packages/google-cloud-assured-workloads/.OwlBot.yaml deleted file mode 100644 index b2c8b7ec5dad..000000000000 --- a/packages/google-cloud-assured-workloads/.OwlBot.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 2021 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -deep-remove-regex: - - /owl-bot-staging - -deep-copy-regex: - - source: /google/cloud/assuredworkloads/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-assured-workloads/$1 - -begin-after-commit-hash: 6a5da3f1274b088752f074da5bc9e30bd1beb27e - -api-name: google-cloud-assured-workloads diff --git a/packages/google-cloud-assured-workloads/google/cloud/assuredworkloads/gapic_version.py b/packages/google-cloud-assured-workloads/google/cloud/assuredworkloads/gapic_version.py index 20a9cd975b02..51ded3216b5d 100644 --- a/packages/google-cloud-assured-workloads/google/cloud/assuredworkloads/gapic_version.py +++ b/packages/google-cloud-assured-workloads/google/cloud/assuredworkloads/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.15.2" # {x-release-please-version} diff --git a/packages/google-cloud-assured-workloads/google/cloud/assuredworkloads_v1/gapic_version.py b/packages/google-cloud-assured-workloads/google/cloud/assuredworkloads_v1/gapic_version.py index 20a9cd975b02..51ded3216b5d 100644 --- a/packages/google-cloud-assured-workloads/google/cloud/assuredworkloads_v1/gapic_version.py +++ b/packages/google-cloud-assured-workloads/google/cloud/assuredworkloads_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.15.2" # {x-release-please-version} diff --git a/packages/google-cloud-assured-workloads/google/cloud/assuredworkloads_v1beta1/gapic_version.py b/packages/google-cloud-assured-workloads/google/cloud/assuredworkloads_v1beta1/gapic_version.py index 20a9cd975b02..51ded3216b5d 100644 --- a/packages/google-cloud-assured-workloads/google/cloud/assuredworkloads_v1beta1/gapic_version.py +++ b/packages/google-cloud-assured-workloads/google/cloud/assuredworkloads_v1beta1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.15.2" # {x-release-please-version} diff --git a/packages/google-cloud-assured-workloads/noxfile.py b/packages/google-cloud-assured-workloads/noxfile.py index 3b52f07acd31..af92a09c3ae4 100644 --- a/packages/google-cloud-assured-workloads/noxfile.py +++ b/packages/google-cloud-assured-workloads/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-assured-workloads/samples/generated_samples/snippet_metadata_google.cloud.assuredworkloads.v1.json b/packages/google-cloud-assured-workloads/samples/generated_samples/snippet_metadata_google.cloud.assuredworkloads.v1.json index 15061dde8248..93f63fb8cf09 100644 --- a/packages/google-cloud-assured-workloads/samples/generated_samples/snippet_metadata_google.cloud.assuredworkloads.v1.json +++ b/packages/google-cloud-assured-workloads/samples/generated_samples/snippet_metadata_google.cloud.assuredworkloads.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-assured-workloads", - "version": "0.1.0" + "version": "1.15.2" }, "snippets": [ { diff --git a/packages/google-cloud-assured-workloads/samples/generated_samples/snippet_metadata_google.cloud.assuredworkloads.v1beta1.json b/packages/google-cloud-assured-workloads/samples/generated_samples/snippet_metadata_google.cloud.assuredworkloads.v1beta1.json index d4f3e3793a9e..77d2f4f1e6e9 100644 --- a/packages/google-cloud-assured-workloads/samples/generated_samples/snippet_metadata_google.cloud.assuredworkloads.v1beta1.json +++ b/packages/google-cloud-assured-workloads/samples/generated_samples/snippet_metadata_google.cloud.assuredworkloads.v1beta1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-assured-workloads", - "version": "0.1.0" + "version": "1.15.2" }, "snippets": [ { diff --git a/packages/google-cloud-assured-workloads/testing/constraints-3.14.txt b/packages/google-cloud-assured-workloads/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-cloud-assured-workloads/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-cloud-audit-log/README.rst b/packages/google-cloud-audit-log/README.rst index fe047f347d04..2bc511ee701e 100644 --- a/packages/google-cloud-audit-log/README.rst +++ b/packages/google-cloud-audit-log/README.rst @@ -162,7 +162,7 @@ Code-Based Examples import logging - from google.cloud.translate_v3 import translate + from google.cloud import library_v1 base_logger = logging.getLogger("google") base_logger.addHandler(logging.StreamHandler()) @@ -174,7 +174,7 @@ Code-Based Examples import logging - from google.cloud.translate_v3 import translate + from google.cloud import library_v1 base_logger = logging.getLogger("google.cloud.library_v1") base_logger.addHandler(logging.StreamHandler()) diff --git a/packages/google-cloud-automl/.OwlBot.yaml b/packages/google-cloud-automl/.OwlBot.yaml deleted file mode 100644 index 6c761ae62450..000000000000 --- a/packages/google-cloud-automl/.OwlBot.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 2021 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -deep-remove-regex: - - /owl-bot-staging - -deep-copy-regex: - - source: /google/cloud/automl/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-automl/$1 - -begin-after-commit-hash: 6a5da3f1274b088752f074da5bc9e30bd1beb27e - -api-name: google-cloud-automl diff --git a/packages/google-cloud-automl/.repo-metadata.json b/packages/google-cloud-automl/.repo-metadata.json index 475264f08761..885d41d21e08 100644 --- a/packages/google-cloud-automl/.repo-metadata.json +++ b/packages/google-cloud-automl/.repo-metadata.json @@ -14,4 +14,4 @@ "default_version": "v1", "api_shortname": "automl", "api_description": "**AutoML API Python Client is now available in Vertex AI. Please visit** `Vertex SDK for Python `_ **for the new Python Vertex AI client.** Vertex AI is our next generation AI Platform, with many new features that are unavailable in the current platform. `Migrate your resources to Vertex AI `_ to get the latest machine learning features, simplify end-to-end journeys, and productionize models with MLOps. The `Cloud AutoML API `_ is a suite of machine learning products that enables developers with limited machine learning expertise to train high-quality models specific to their business needs, by leveraging Google's state-of-the-art transfer learning, and Neural Architecture Search technology." -} +} \ No newline at end of file diff --git a/packages/google-cloud-automl/google/cloud/automl/gapic_version.py b/packages/google-cloud-automl/google/cloud/automl/gapic_version.py index 20a9cd975b02..b7e73ab9b22b 100644 --- a/packages/google-cloud-automl/google/cloud/automl/gapic_version.py +++ b/packages/google-cloud-automl/google/cloud/automl/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "2.16.4" # {x-release-please-version} diff --git a/packages/google-cloud-automl/google/cloud/automl_v1/gapic_version.py b/packages/google-cloud-automl/google/cloud/automl_v1/gapic_version.py index 20a9cd975b02..b7e73ab9b22b 100644 --- a/packages/google-cloud-automl/google/cloud/automl_v1/gapic_version.py +++ b/packages/google-cloud-automl/google/cloud/automl_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "2.16.4" # {x-release-please-version} diff --git a/packages/google-cloud-automl/google/cloud/automl_v1beta1/gapic_version.py b/packages/google-cloud-automl/google/cloud/automl_v1beta1/gapic_version.py index 20a9cd975b02..b7e73ab9b22b 100644 --- a/packages/google-cloud-automl/google/cloud/automl_v1beta1/gapic_version.py +++ b/packages/google-cloud-automl/google/cloud/automl_v1beta1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "2.16.4" # {x-release-please-version} diff --git a/packages/google-cloud-automl/noxfile.py b/packages/google-cloud-automl/noxfile.py index a7ff2dc9a1ab..4e20e7daedd0 100644 --- a/packages/google-cloud-automl/noxfile.py +++ b/packages/google-cloud-automl/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = ["pandas", "storage"] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-automl/samples/generated_samples/snippet_metadata_google.cloud.automl.v1.json b/packages/google-cloud-automl/samples/generated_samples/snippet_metadata_google.cloud.automl.v1.json index 0d8816baffc0..8095973cacfd 100644 --- a/packages/google-cloud-automl/samples/generated_samples/snippet_metadata_google.cloud.automl.v1.json +++ b/packages/google-cloud-automl/samples/generated_samples/snippet_metadata_google.cloud.automl.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-automl", - "version": "0.1.0" + "version": "2.16.4" }, "snippets": [ { diff --git a/packages/google-cloud-automl/samples/generated_samples/snippet_metadata_google.cloud.automl.v1beta1.json b/packages/google-cloud-automl/samples/generated_samples/snippet_metadata_google.cloud.automl.v1beta1.json index 3957ec9b1b9f..2aaf1787da77 100644 --- a/packages/google-cloud-automl/samples/generated_samples/snippet_metadata_google.cloud.automl.v1beta1.json +++ b/packages/google-cloud-automl/samples/generated_samples/snippet_metadata_google.cloud.automl.v1beta1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-automl", - "version": "0.1.0" + "version": "2.16.4" }, "snippets": [ { diff --git a/packages/google-cloud-automl/testing/constraints-3.14.txt b/packages/google-cloud-automl/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-cloud-automl/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-cloud-backupdr/.OwlBot.yaml b/packages/google-cloud-backupdr/.OwlBot.yaml deleted file mode 100644 index d13e013b74de..000000000000 --- a/packages/google-cloud-backupdr/.OwlBot.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# 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/backupdr/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-backupdr/$1 -api-name: google-cloud-backupdr diff --git a/packages/google-cloud-backupdr/google/cloud/backupdr/gapic_version.py b/packages/google-cloud-backupdr/google/cloud/backupdr/gapic_version.py index 20a9cd975b02..6f945fba720d 100644 --- a/packages/google-cloud-backupdr/google/cloud/backupdr/gapic_version.py +++ b/packages/google-cloud-backupdr/google/cloud/backupdr/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.2.5" # {x-release-please-version} diff --git a/packages/google-cloud-backupdr/google/cloud/backupdr_v1/gapic_version.py b/packages/google-cloud-backupdr/google/cloud/backupdr_v1/gapic_version.py index 20a9cd975b02..6f945fba720d 100644 --- a/packages/google-cloud-backupdr/google/cloud/backupdr_v1/gapic_version.py +++ b/packages/google-cloud-backupdr/google/cloud/backupdr_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.2.5" # {x-release-please-version} diff --git a/packages/google-cloud-backupdr/noxfile.py b/packages/google-cloud-backupdr/noxfile.py index 16a914c7beda..7d526ed960f4 100644 --- a/packages/google-cloud-backupdr/noxfile.py +++ b/packages/google-cloud-backupdr/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-backupdr/samples/generated_samples/snippet_metadata_google.cloud.backupdr.v1.json b/packages/google-cloud-backupdr/samples/generated_samples/snippet_metadata_google.cloud.backupdr.v1.json index 681d1fa60eec..bd170d70d991 100644 --- a/packages/google-cloud-backupdr/samples/generated_samples/snippet_metadata_google.cloud.backupdr.v1.json +++ b/packages/google-cloud-backupdr/samples/generated_samples/snippet_metadata_google.cloud.backupdr.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-backupdr", - "version": "0.1.0" + "version": "0.2.5" }, "snippets": [ { diff --git a/packages/google-cloud-backupdr/testing/constraints-3.14.txt b/packages/google-cloud-backupdr/testing/constraints-3.14.txt new file mode 100644 index 000000000000..2010e549cceb --- /dev/null +++ b/packages/google-cloud-backupdr/testing/constraints-3.14.txt @@ -0,0 +1,12 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 +grpc-google-iam-v1>=0 diff --git a/packages/google-cloud-bare-metal-solution/.OwlBot.yaml b/packages/google-cloud-bare-metal-solution/.OwlBot.yaml deleted file mode 100644 index b2bd2f024d79..000000000000 --- a/packages/google-cloud-bare-metal-solution/.OwlBot.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# 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-remove-regex: - - /owl-bot-staging - -deep-copy-regex: - - source: /google/cloud/baremetalsolution/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-bare-metal-solution/$1 - -begin-after-commit-hash: 70f7f0525414fe4dfeb2fc2e81546b073f83a621 -api-name: google-cloud-bare-metal-solution diff --git a/packages/google-cloud-bare-metal-solution/.repo-metadata.json b/packages/google-cloud-bare-metal-solution/.repo-metadata.json index 8eaff345ce90..fd42df680990 100644 --- a/packages/google-cloud-bare-metal-solution/.repo-metadata.json +++ b/packages/google-cloud-bare-metal-solution/.repo-metadata.json @@ -13,4 +13,4 @@ "default_version": "v2", "api_shortname": "baremetalsolution", "api_description": "Bring your Oracle workloads to Google Cloud with Bare Metal Solution and jumpstart your cloud journey with minimal risk." -} +} \ No newline at end of file diff --git a/packages/google-cloud-bare-metal-solution/google/cloud/bare_metal_solution/gapic_version.py b/packages/google-cloud-bare-metal-solution/google/cloud/bare_metal_solution/gapic_version.py index 20a9cd975b02..34db2aac060b 100644 --- a/packages/google-cloud-bare-metal-solution/google/cloud/bare_metal_solution/gapic_version.py +++ b/packages/google-cloud-bare-metal-solution/google/cloud/bare_metal_solution/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.10.3" # {x-release-please-version} diff --git a/packages/google-cloud-bare-metal-solution/google/cloud/bare_metal_solution_v2/gapic_version.py b/packages/google-cloud-bare-metal-solution/google/cloud/bare_metal_solution_v2/gapic_version.py index 20a9cd975b02..34db2aac060b 100644 --- a/packages/google-cloud-bare-metal-solution/google/cloud/bare_metal_solution_v2/gapic_version.py +++ b/packages/google-cloud-bare-metal-solution/google/cloud/bare_metal_solution_v2/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.10.3" # {x-release-please-version} diff --git a/packages/google-cloud-bare-metal-solution/noxfile.py b/packages/google-cloud-bare-metal-solution/noxfile.py index a222b22efb86..9318a74042f7 100644 --- a/packages/google-cloud-bare-metal-solution/noxfile.py +++ b/packages/google-cloud-bare-metal-solution/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-bare-metal-solution/samples/generated_samples/snippet_metadata_google.cloud.baremetalsolution.v2.json b/packages/google-cloud-bare-metal-solution/samples/generated_samples/snippet_metadata_google.cloud.baremetalsolution.v2.json index 2e341fc16178..ce72289f1ae5 100644 --- a/packages/google-cloud-bare-metal-solution/samples/generated_samples/snippet_metadata_google.cloud.baremetalsolution.v2.json +++ b/packages/google-cloud-bare-metal-solution/samples/generated_samples/snippet_metadata_google.cloud.baremetalsolution.v2.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-bare-metal-solution", - "version": "0.1.0" + "version": "1.10.3" }, "snippets": [ { diff --git a/packages/google-cloud-bare-metal-solution/testing/constraints-3.14.txt b/packages/google-cloud-bare-metal-solution/testing/constraints-3.14.txt new file mode 100644 index 000000000000..2010e549cceb --- /dev/null +++ b/packages/google-cloud-bare-metal-solution/testing/constraints-3.14.txt @@ -0,0 +1,12 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 +grpc-google-iam-v1>=0 diff --git a/packages/google-cloud-batch/.OwlBot.yaml b/packages/google-cloud-batch/.OwlBot.yaml deleted file mode 100644 index 8c74680de2cd..000000000000 --- a/packages/google-cloud-batch/.OwlBot.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# 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-remove-regex: - - /owl-bot-staging - -deep-copy-regex: - - source: /google/cloud/batch/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-batch/$1 - -begin-after-commit-hash: 70f7f0525414fe4dfeb2fc2e81546b073f83a621 -api-name: google-cloud-batch diff --git a/packages/google-cloud-batch/noxfile.py b/packages/google-cloud-batch/noxfile.py index 19bff0938e65..9bbb64c0b161 100644 --- a/packages/google-cloud-batch/noxfile.py +++ b/packages/google-cloud-batch/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-batch/testing/constraints-3.14.txt b/packages/google-cloud-batch/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-cloud-batch/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-cloud-beyondcorp-appconnections/.OwlBot.yaml b/packages/google-cloud-beyondcorp-appconnections/.OwlBot.yaml deleted file mode 100644 index 8e5276de0db2..000000000000 --- a/packages/google-cloud-beyondcorp-appconnections/.OwlBot.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# 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-remove-regex: - - /owl-bot-staging - -deep-copy-regex: - - source: /google/cloud/beyondcorp/appconnections/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-beyondcorp-appconnections/$1 - -begin-after-commit-hash: 70f7f0525414fe4dfeb2fc2e81546b073f83a621 -api-name: google-cloud-beyondcorp-appconnections diff --git a/packages/google-cloud-beyondcorp-appconnections/google/cloud/beyondcorp_appconnections/gapic_version.py b/packages/google-cloud-beyondcorp-appconnections/google/cloud/beyondcorp_appconnections/gapic_version.py index 20a9cd975b02..16737390b1df 100644 --- a/packages/google-cloud-beyondcorp-appconnections/google/cloud/beyondcorp_appconnections/gapic_version.py +++ b/packages/google-cloud-beyondcorp-appconnections/google/cloud/beyondcorp_appconnections/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.4.18" # {x-release-please-version} diff --git a/packages/google-cloud-beyondcorp-appconnections/google/cloud/beyondcorp_appconnections_v1/gapic_version.py b/packages/google-cloud-beyondcorp-appconnections/google/cloud/beyondcorp_appconnections_v1/gapic_version.py index 20a9cd975b02..16737390b1df 100644 --- a/packages/google-cloud-beyondcorp-appconnections/google/cloud/beyondcorp_appconnections_v1/gapic_version.py +++ b/packages/google-cloud-beyondcorp-appconnections/google/cloud/beyondcorp_appconnections_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.4.18" # {x-release-please-version} diff --git a/packages/google-cloud-beyondcorp-appconnections/noxfile.py b/packages/google-cloud-beyondcorp-appconnections/noxfile.py index 1d4eb7b6178c..506044339182 100644 --- a/packages/google-cloud-beyondcorp-appconnections/noxfile.py +++ b/packages/google-cloud-beyondcorp-appconnections/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-beyondcorp-appconnections/samples/generated_samples/snippet_metadata_google.cloud.beyondcorp.appconnections.v1.json b/packages/google-cloud-beyondcorp-appconnections/samples/generated_samples/snippet_metadata_google.cloud.beyondcorp.appconnections.v1.json index f730a69adfa5..34a15881a1a0 100644 --- a/packages/google-cloud-beyondcorp-appconnections/samples/generated_samples/snippet_metadata_google.cloud.beyondcorp.appconnections.v1.json +++ b/packages/google-cloud-beyondcorp-appconnections/samples/generated_samples/snippet_metadata_google.cloud.beyondcorp.appconnections.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-beyondcorp-appconnections", - "version": "0.1.0" + "version": "0.4.18" }, "snippets": [ { diff --git a/packages/google-cloud-beyondcorp-appconnections/testing/constraints-3.14.txt b/packages/google-cloud-beyondcorp-appconnections/testing/constraints-3.14.txt new file mode 100644 index 000000000000..2010e549cceb --- /dev/null +++ b/packages/google-cloud-beyondcorp-appconnections/testing/constraints-3.14.txt @@ -0,0 +1,12 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 +grpc-google-iam-v1>=0 diff --git a/packages/google-cloud-beyondcorp-appconnectors/.OwlBot.yaml b/packages/google-cloud-beyondcorp-appconnectors/.OwlBot.yaml deleted file mode 100644 index 731d3339171d..000000000000 --- a/packages/google-cloud-beyondcorp-appconnectors/.OwlBot.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# 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-remove-regex: - - /owl-bot-staging - -deep-copy-regex: - - source: /google/cloud/beyondcorp/appconnectors/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-beyondcorp-appconnectors/$1 - -begin-after-commit-hash: 70f7f0525414fe4dfeb2fc2e81546b073f83a621 -api-name: google-cloud-beyondcorp-appconnectors diff --git a/packages/google-cloud-beyondcorp-appconnectors/.repo-metadata.json b/packages/google-cloud-beyondcorp-appconnectors/.repo-metadata.json index c7c3e03d5beb..6b3d63241dc2 100644 --- a/packages/google-cloud-beyondcorp-appconnectors/.repo-metadata.json +++ b/packages/google-cloud-beyondcorp-appconnectors/.repo-metadata.json @@ -13,4 +13,4 @@ "api_id": "beyondcorp.googleapis.com", "default_version": "v1", "api_shortname": "beyondcorp" -} +} \ No newline at end of file diff --git a/packages/google-cloud-beyondcorp-appconnectors/google/cloud/beyondcorp_appconnectors/gapic_version.py b/packages/google-cloud-beyondcorp-appconnectors/google/cloud/beyondcorp_appconnectors/gapic_version.py index 20a9cd975b02..16737390b1df 100644 --- a/packages/google-cloud-beyondcorp-appconnectors/google/cloud/beyondcorp_appconnectors/gapic_version.py +++ b/packages/google-cloud-beyondcorp-appconnectors/google/cloud/beyondcorp_appconnectors/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.4.18" # {x-release-please-version} diff --git a/packages/google-cloud-beyondcorp-appconnectors/google/cloud/beyondcorp_appconnectors_v1/gapic_version.py b/packages/google-cloud-beyondcorp-appconnectors/google/cloud/beyondcorp_appconnectors_v1/gapic_version.py index 20a9cd975b02..16737390b1df 100644 --- a/packages/google-cloud-beyondcorp-appconnectors/google/cloud/beyondcorp_appconnectors_v1/gapic_version.py +++ b/packages/google-cloud-beyondcorp-appconnectors/google/cloud/beyondcorp_appconnectors_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.4.18" # {x-release-please-version} diff --git a/packages/google-cloud-beyondcorp-appconnectors/noxfile.py b/packages/google-cloud-beyondcorp-appconnectors/noxfile.py index d1321b3b7a44..dc8e734a2818 100644 --- a/packages/google-cloud-beyondcorp-appconnectors/noxfile.py +++ b/packages/google-cloud-beyondcorp-appconnectors/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-beyondcorp-appconnectors/samples/generated_samples/snippet_metadata_google.cloud.beyondcorp.appconnectors.v1.json b/packages/google-cloud-beyondcorp-appconnectors/samples/generated_samples/snippet_metadata_google.cloud.beyondcorp.appconnectors.v1.json index e1535607b299..689ada49b8bf 100644 --- a/packages/google-cloud-beyondcorp-appconnectors/samples/generated_samples/snippet_metadata_google.cloud.beyondcorp.appconnectors.v1.json +++ b/packages/google-cloud-beyondcorp-appconnectors/samples/generated_samples/snippet_metadata_google.cloud.beyondcorp.appconnectors.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-beyondcorp-appconnectors", - "version": "0.1.0" + "version": "0.4.18" }, "snippets": [ { diff --git a/packages/google-cloud-beyondcorp-appconnectors/testing/constraints-3.14.txt b/packages/google-cloud-beyondcorp-appconnectors/testing/constraints-3.14.txt new file mode 100644 index 000000000000..2010e549cceb --- /dev/null +++ b/packages/google-cloud-beyondcorp-appconnectors/testing/constraints-3.14.txt @@ -0,0 +1,12 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 +grpc-google-iam-v1>=0 diff --git a/packages/google-cloud-beyondcorp-appgateways/.OwlBot.yaml b/packages/google-cloud-beyondcorp-appgateways/.OwlBot.yaml deleted file mode 100644 index f8d0494c6bfd..000000000000 --- a/packages/google-cloud-beyondcorp-appgateways/.OwlBot.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# 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-remove-regex: - - /owl-bot-staging - -deep-copy-regex: - - source: /google/cloud/beyondcorp/appgateways/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-beyondcorp-appgateways/$1 - -begin-after-commit-hash: 70f7f0525414fe4dfeb2fc2e81546b073f83a621 -api-name: google-cloud-beyondcorp-appgateways diff --git a/packages/google-cloud-beyondcorp-appgateways/google/cloud/beyondcorp_appgateways/gapic_version.py b/packages/google-cloud-beyondcorp-appgateways/google/cloud/beyondcorp_appgateways/gapic_version.py index 20a9cd975b02..16737390b1df 100644 --- a/packages/google-cloud-beyondcorp-appgateways/google/cloud/beyondcorp_appgateways/gapic_version.py +++ b/packages/google-cloud-beyondcorp-appgateways/google/cloud/beyondcorp_appgateways/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.4.18" # {x-release-please-version} diff --git a/packages/google-cloud-beyondcorp-appgateways/google/cloud/beyondcorp_appgateways_v1/gapic_version.py b/packages/google-cloud-beyondcorp-appgateways/google/cloud/beyondcorp_appgateways_v1/gapic_version.py index 20a9cd975b02..16737390b1df 100644 --- a/packages/google-cloud-beyondcorp-appgateways/google/cloud/beyondcorp_appgateways_v1/gapic_version.py +++ b/packages/google-cloud-beyondcorp-appgateways/google/cloud/beyondcorp_appgateways_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.4.18" # {x-release-please-version} diff --git a/packages/google-cloud-beyondcorp-appgateways/noxfile.py b/packages/google-cloud-beyondcorp-appgateways/noxfile.py index ae297f1d6c5a..1b7618726888 100644 --- a/packages/google-cloud-beyondcorp-appgateways/noxfile.py +++ b/packages/google-cloud-beyondcorp-appgateways/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-beyondcorp-appgateways/samples/generated_samples/snippet_metadata_google.cloud.beyondcorp.appgateways.v1.json b/packages/google-cloud-beyondcorp-appgateways/samples/generated_samples/snippet_metadata_google.cloud.beyondcorp.appgateways.v1.json index 0b3067b40e2b..7d3c5dec9809 100644 --- a/packages/google-cloud-beyondcorp-appgateways/samples/generated_samples/snippet_metadata_google.cloud.beyondcorp.appgateways.v1.json +++ b/packages/google-cloud-beyondcorp-appgateways/samples/generated_samples/snippet_metadata_google.cloud.beyondcorp.appgateways.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-beyondcorp-appgateways", - "version": "0.1.0" + "version": "0.4.18" }, "snippets": [ { diff --git a/packages/google-cloud-beyondcorp-appgateways/testing/constraints-3.14.txt b/packages/google-cloud-beyondcorp-appgateways/testing/constraints-3.14.txt new file mode 100644 index 000000000000..2010e549cceb --- /dev/null +++ b/packages/google-cloud-beyondcorp-appgateways/testing/constraints-3.14.txt @@ -0,0 +1,12 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 +grpc-google-iam-v1>=0 diff --git a/packages/google-cloud-beyondcorp-clientconnectorservices/.OwlBot.yaml b/packages/google-cloud-beyondcorp-clientconnectorservices/.OwlBot.yaml deleted file mode 100644 index 740e0a5d02f7..000000000000 --- a/packages/google-cloud-beyondcorp-clientconnectorservices/.OwlBot.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# 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-remove-regex: - - /owl-bot-staging - -deep-copy-regex: - - source: /google/cloud/beyondcorp/clientconnectorservices/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-beyondcorp-clientconnectorservices/$1 - -begin-after-commit-hash: 70f7f0525414fe4dfeb2fc2e81546b073f83a621 -api-name: google-cloud-beyondcorp-clientconnectorservices diff --git a/packages/google-cloud-beyondcorp-clientconnectorservices/google/cloud/beyondcorp_clientconnectorservices/gapic_version.py b/packages/google-cloud-beyondcorp-clientconnectorservices/google/cloud/beyondcorp_clientconnectorservices/gapic_version.py index 20a9cd975b02..16737390b1df 100644 --- a/packages/google-cloud-beyondcorp-clientconnectorservices/google/cloud/beyondcorp_clientconnectorservices/gapic_version.py +++ b/packages/google-cloud-beyondcorp-clientconnectorservices/google/cloud/beyondcorp_clientconnectorservices/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.4.18" # {x-release-please-version} diff --git a/packages/google-cloud-beyondcorp-clientconnectorservices/google/cloud/beyondcorp_clientconnectorservices_v1/gapic_version.py b/packages/google-cloud-beyondcorp-clientconnectorservices/google/cloud/beyondcorp_clientconnectorservices_v1/gapic_version.py index 20a9cd975b02..16737390b1df 100644 --- a/packages/google-cloud-beyondcorp-clientconnectorservices/google/cloud/beyondcorp_clientconnectorservices_v1/gapic_version.py +++ b/packages/google-cloud-beyondcorp-clientconnectorservices/google/cloud/beyondcorp_clientconnectorservices_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.4.18" # {x-release-please-version} diff --git a/packages/google-cloud-beyondcorp-clientconnectorservices/noxfile.py b/packages/google-cloud-beyondcorp-clientconnectorservices/noxfile.py index 32ca3dfe530c..9d9a9f5aeed9 100644 --- a/packages/google-cloud-beyondcorp-clientconnectorservices/noxfile.py +++ b/packages/google-cloud-beyondcorp-clientconnectorservices/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated_samples/snippet_metadata_google.cloud.beyondcorp.clientconnectorservices.v1.json b/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated_samples/snippet_metadata_google.cloud.beyondcorp.clientconnectorservices.v1.json index e2e2d8f829d9..72bf6b0e5df2 100644 --- a/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated_samples/snippet_metadata_google.cloud.beyondcorp.clientconnectorservices.v1.json +++ b/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated_samples/snippet_metadata_google.cloud.beyondcorp.clientconnectorservices.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-beyondcorp-clientconnectorservices", - "version": "0.1.0" + "version": "0.4.18" }, "snippets": [ { diff --git a/packages/google-cloud-beyondcorp-clientconnectorservices/testing/constraints-3.14.txt b/packages/google-cloud-beyondcorp-clientconnectorservices/testing/constraints-3.14.txt new file mode 100644 index 000000000000..2010e549cceb --- /dev/null +++ b/packages/google-cloud-beyondcorp-clientconnectorservices/testing/constraints-3.14.txt @@ -0,0 +1,12 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 +grpc-google-iam-v1>=0 diff --git a/packages/google-cloud-beyondcorp-clientgateways/.OwlBot.yaml b/packages/google-cloud-beyondcorp-clientgateways/.OwlBot.yaml deleted file mode 100644 index 94a7dbf3188a..000000000000 --- a/packages/google-cloud-beyondcorp-clientgateways/.OwlBot.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# 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-remove-regex: - - /owl-bot-staging - -deep-copy-regex: - - source: /google/cloud/beyondcorp/clientgateways/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-beyondcorp-clientgateways/$1 - -begin-after-commit-hash: 70f7f0525414fe4dfeb2fc2e81546b073f83a621 -api-name: google-cloud-beyondcorp-clientgateways diff --git a/packages/google-cloud-beyondcorp-clientgateways/google/cloud/beyondcorp_clientgateways/gapic_version.py b/packages/google-cloud-beyondcorp-clientgateways/google/cloud/beyondcorp_clientgateways/gapic_version.py index 20a9cd975b02..76519cd7cd22 100644 --- a/packages/google-cloud-beyondcorp-clientgateways/google/cloud/beyondcorp_clientgateways/gapic_version.py +++ b/packages/google-cloud-beyondcorp-clientgateways/google/cloud/beyondcorp_clientgateways/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.4.17" # {x-release-please-version} diff --git a/packages/google-cloud-beyondcorp-clientgateways/google/cloud/beyondcorp_clientgateways_v1/gapic_version.py b/packages/google-cloud-beyondcorp-clientgateways/google/cloud/beyondcorp_clientgateways_v1/gapic_version.py index 20a9cd975b02..76519cd7cd22 100644 --- a/packages/google-cloud-beyondcorp-clientgateways/google/cloud/beyondcorp_clientgateways_v1/gapic_version.py +++ b/packages/google-cloud-beyondcorp-clientgateways/google/cloud/beyondcorp_clientgateways_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.4.17" # {x-release-please-version} diff --git a/packages/google-cloud-beyondcorp-clientgateways/noxfile.py b/packages/google-cloud-beyondcorp-clientgateways/noxfile.py index a5813f245d93..314814102c9c 100644 --- a/packages/google-cloud-beyondcorp-clientgateways/noxfile.py +++ b/packages/google-cloud-beyondcorp-clientgateways/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-beyondcorp-clientgateways/samples/generated_samples/snippet_metadata_google.cloud.beyondcorp.clientgateways.v1.json b/packages/google-cloud-beyondcorp-clientgateways/samples/generated_samples/snippet_metadata_google.cloud.beyondcorp.clientgateways.v1.json index 1aa87eed26ed..bd62ed528e17 100644 --- a/packages/google-cloud-beyondcorp-clientgateways/samples/generated_samples/snippet_metadata_google.cloud.beyondcorp.clientgateways.v1.json +++ b/packages/google-cloud-beyondcorp-clientgateways/samples/generated_samples/snippet_metadata_google.cloud.beyondcorp.clientgateways.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-beyondcorp-clientgateways", - "version": "0.1.0" + "version": "0.4.17" }, "snippets": [ { diff --git a/packages/google-cloud-beyondcorp-clientgateways/testing/constraints-3.14.txt b/packages/google-cloud-beyondcorp-clientgateways/testing/constraints-3.14.txt new file mode 100644 index 000000000000..2010e549cceb --- /dev/null +++ b/packages/google-cloud-beyondcorp-clientgateways/testing/constraints-3.14.txt @@ -0,0 +1,12 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 +grpc-google-iam-v1>=0 diff --git a/packages/google-cloud-biglake/.OwlBot.yaml b/packages/google-cloud-biglake/.OwlBot.yaml deleted file mode 100644 index a4e1f2c46b31..000000000000 --- a/packages/google-cloud-biglake/.OwlBot.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# 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/biglake/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-biglake/$1 -api-name: google-cloud-biglake diff --git a/packages/google-cloud-biglake/google/cloud/biglake/gapic_version.py b/packages/google-cloud-biglake/google/cloud/biglake/gapic_version.py index ce52f107f367..20a9cd975b02 100644 --- a/packages/google-cloud-biglake/google/cloud/biglake/gapic_version.py +++ b/packages/google-cloud-biglake/google/cloud/biglake/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.1.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-biglake/google/cloud/biglake_v1/gapic_version.py b/packages/google-cloud-biglake/google/cloud/biglake_v1/gapic_version.py index ce52f107f367..20a9cd975b02 100644 --- a/packages/google-cloud-biglake/google/cloud/biglake_v1/gapic_version.py +++ b/packages/google-cloud-biglake/google/cloud/biglake_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.1.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-biglake/noxfile.py b/packages/google-cloud-biglake/noxfile.py index d1fb29ae27c5..c8712d26d5f9 100644 --- a/packages/google-cloud-biglake/noxfile.py +++ b/packages/google-cloud-biglake/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-biglake/samples/generated_samples/snippet_metadata_google.cloud.biglake.v1.json b/packages/google-cloud-biglake/samples/generated_samples/snippet_metadata_google.cloud.biglake.v1.json index 39dbf761c0a8..41638f06a322 100644 --- a/packages/google-cloud-biglake/samples/generated_samples/snippet_metadata_google.cloud.biglake.v1.json +++ b/packages/google-cloud-biglake/samples/generated_samples/snippet_metadata_google.cloud.biglake.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-biglake", - "version": "0.1.0" + "version": "0.0.0" }, "snippets": [ { diff --git a/packages/google-cloud-biglake/testing/constraints-3.14.txt b/packages/google-cloud-biglake/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-cloud-biglake/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-cloud-bigquery-analyticshub/.OwlBot.yaml b/packages/google-cloud-bigquery-analyticshub/.OwlBot.yaml deleted file mode 100644 index 6c5940c5f601..000000000000 --- a/packages/google-cloud-bigquery-analyticshub/.OwlBot.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# 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-remove-regex: - - /owl-bot-staging - -deep-copy-regex: - - source: /google/cloud/bigquery/analyticshub/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-bigquery-analyticshub/$1 - -begin-after-commit-hash: 70f7f0525414fe4dfeb2fc2e81546b073f83a621 -api-name: google-cloud-bigquery-analyticshub diff --git a/packages/google-cloud-bigquery-analyticshub/noxfile.py b/packages/google-cloud-bigquery-analyticshub/noxfile.py index 5166b659db41..c44004ae4bfc 100644 --- a/packages/google-cloud-bigquery-analyticshub/noxfile.py +++ b/packages/google-cloud-bigquery-analyticshub/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-bigquery-analyticshub/testing/constraints-3.14.txt b/packages/google-cloud-bigquery-analyticshub/testing/constraints-3.14.txt new file mode 100644 index 000000000000..2010e549cceb --- /dev/null +++ b/packages/google-cloud-bigquery-analyticshub/testing/constraints-3.14.txt @@ -0,0 +1,12 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 +grpc-google-iam-v1>=0 diff --git a/packages/google-cloud-bigquery-biglake/.OwlBot.yaml b/packages/google-cloud-bigquery-biglake/.OwlBot.yaml deleted file mode 100644 index 19c14ee2a37a..000000000000 --- a/packages/google-cloud-bigquery-biglake/.OwlBot.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# 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/bigquery/biglake/(.*)/.*-py - dest: /owl-bot-staging/google-cloud-bigquery-biglake/$1 -api-name: google-cloud-bigquery-biglake diff --git a/packages/google-cloud-bigquery-biglake/google/cloud/bigquery_biglake/gapic_version.py b/packages/google-cloud-bigquery-biglake/google/cloud/bigquery_biglake/gapic_version.py index 20a9cd975b02..7aea328343c5 100644 --- a/packages/google-cloud-bigquery-biglake/google/cloud/bigquery_biglake/gapic_version.py +++ b/packages/google-cloud-bigquery-biglake/google/cloud/bigquery_biglake/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.4.15" # {x-release-please-version} diff --git a/packages/google-cloud-bigquery-biglake/google/cloud/bigquery_biglake_v1/gapic_version.py b/packages/google-cloud-bigquery-biglake/google/cloud/bigquery_biglake_v1/gapic_version.py index 20a9cd975b02..7aea328343c5 100644 --- a/packages/google-cloud-bigquery-biglake/google/cloud/bigquery_biglake_v1/gapic_version.py +++ b/packages/google-cloud-bigquery-biglake/google/cloud/bigquery_biglake_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.4.15" # {x-release-please-version} diff --git a/packages/google-cloud-bigquery-biglake/google/cloud/bigquery_biglake_v1alpha1/gapic_version.py b/packages/google-cloud-bigquery-biglake/google/cloud/bigquery_biglake_v1alpha1/gapic_version.py index 20a9cd975b02..7aea328343c5 100644 --- a/packages/google-cloud-bigquery-biglake/google/cloud/bigquery_biglake_v1alpha1/gapic_version.py +++ b/packages/google-cloud-bigquery-biglake/google/cloud/bigquery_biglake_v1alpha1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.4.15" # {x-release-please-version} diff --git a/packages/google-cloud-bigquery-biglake/noxfile.py b/packages/google-cloud-bigquery-biglake/noxfile.py index be71b4466352..980ed2e7f030 100644 --- a/packages/google-cloud-bigquery-biglake/noxfile.py +++ b/packages/google-cloud-bigquery-biglake/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-bigquery-biglake/samples/generated_samples/snippet_metadata_google.cloud.bigquery.biglake.v1.json b/packages/google-cloud-bigquery-biglake/samples/generated_samples/snippet_metadata_google.cloud.bigquery.biglake.v1.json index 73ac8861a130..5f46e9afc45d 100644 --- a/packages/google-cloud-bigquery-biglake/samples/generated_samples/snippet_metadata_google.cloud.bigquery.biglake.v1.json +++ b/packages/google-cloud-bigquery-biglake/samples/generated_samples/snippet_metadata_google.cloud.bigquery.biglake.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-bigquery-biglake", - "version": "0.1.0" + "version": "0.4.15" }, "snippets": [ { diff --git a/packages/google-cloud-bigquery-biglake/samples/generated_samples/snippet_metadata_google.cloud.bigquery.biglake.v1alpha1.json b/packages/google-cloud-bigquery-biglake/samples/generated_samples/snippet_metadata_google.cloud.bigquery.biglake.v1alpha1.json index 69294cf144a2..0c502f197c36 100644 --- a/packages/google-cloud-bigquery-biglake/samples/generated_samples/snippet_metadata_google.cloud.bigquery.biglake.v1alpha1.json +++ b/packages/google-cloud-bigquery-biglake/samples/generated_samples/snippet_metadata_google.cloud.bigquery.biglake.v1alpha1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-bigquery-biglake", - "version": "0.1.0" + "version": "0.4.15" }, "snippets": [ { diff --git a/packages/google-cloud-bigquery-biglake/testing/constraints-3.14.txt b/packages/google-cloud-bigquery-biglake/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-cloud-bigquery-biglake/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-cloud-bigquery-connection/.OwlBot.yaml b/packages/google-cloud-bigquery-connection/.OwlBot.yaml deleted file mode 100644 index ce7797c8f66a..000000000000 --- a/packages/google-cloud-bigquery-connection/.OwlBot.yaml +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright 2021 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -deep-remove-regex: - - /owl-bot-staging - -deep-preserve-regex: - - /owl-bot-staging/google-cloud-bigquery-connection/v1beta1 - -deep-copy-regex: - - source: /google/cloud/bigquery/connection/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-bigquery-connection/$1 - -begin-after-commit-hash: 130ce904e5d546c312943d10f48799590f9c0f66 - -api-name: google-cloud-bigquery-connection diff --git a/packages/google-cloud-bigquery-connection/.repo-metadata.json b/packages/google-cloud-bigquery-connection/.repo-metadata.json index 56522f81fb5e..6a195cbcc50a 100644 --- a/packages/google-cloud-bigquery-connection/.repo-metadata.json +++ b/packages/google-cloud-bigquery-connection/.repo-metadata.json @@ -14,4 +14,4 @@ "requires_billing": true, "default_version": "v1", "api_shortname": "bigqueryconnection" -} +} \ No newline at end of file diff --git a/packages/google-cloud-bigquery-connection/google/cloud/bigquery_connection/gapic_version.py b/packages/google-cloud-bigquery-connection/google/cloud/bigquery_connection/gapic_version.py index 20a9cd975b02..e5433eca3938 100644 --- a/packages/google-cloud-bigquery-connection/google/cloud/bigquery_connection/gapic_version.py +++ b/packages/google-cloud-bigquery-connection/google/cloud/bigquery_connection/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.18.3" # {x-release-please-version} diff --git a/packages/google-cloud-bigquery-connection/google/cloud/bigquery_connection_v1/gapic_version.py b/packages/google-cloud-bigquery-connection/google/cloud/bigquery_connection_v1/gapic_version.py index 20a9cd975b02..e5433eca3938 100644 --- a/packages/google-cloud-bigquery-connection/google/cloud/bigquery_connection_v1/gapic_version.py +++ b/packages/google-cloud-bigquery-connection/google/cloud/bigquery_connection_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.18.3" # {x-release-please-version} diff --git a/packages/google-cloud-bigquery-connection/noxfile.py b/packages/google-cloud-bigquery-connection/noxfile.py index 17c6c52815a0..a16ef9542c38 100644 --- a/packages/google-cloud-bigquery-connection/noxfile.py +++ b/packages/google-cloud-bigquery-connection/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-bigquery-connection/samples/generated_samples/snippet_metadata_google.cloud.bigquery.connection.v1.json b/packages/google-cloud-bigquery-connection/samples/generated_samples/snippet_metadata_google.cloud.bigquery.connection.v1.json index a25b5a29d478..3be020f88c48 100644 --- a/packages/google-cloud-bigquery-connection/samples/generated_samples/snippet_metadata_google.cloud.bigquery.connection.v1.json +++ b/packages/google-cloud-bigquery-connection/samples/generated_samples/snippet_metadata_google.cloud.bigquery.connection.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-bigquery-connection", - "version": "0.1.0" + "version": "1.18.3" }, "snippets": [ { diff --git a/packages/google-cloud-bigquery-connection/testing/constraints-3.14.txt b/packages/google-cloud-bigquery-connection/testing/constraints-3.14.txt new file mode 100644 index 000000000000..2010e549cceb --- /dev/null +++ b/packages/google-cloud-bigquery-connection/testing/constraints-3.14.txt @@ -0,0 +1,12 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 +grpc-google-iam-v1>=0 diff --git a/packages/google-cloud-bigquery-data-exchange/.OwlBot.yaml b/packages/google-cloud-bigquery-data-exchange/.OwlBot.yaml deleted file mode 100644 index d827883ae4fe..000000000000 --- a/packages/google-cloud-bigquery-data-exchange/.OwlBot.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# 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-remove-regex: - - /owl-bot-staging - -deep-copy-regex: - - source: /google/cloud/bigquery/dataexchange/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-bigquery-data-exchange/$1 - -begin-after-commit-hash: 70f7f0525414fe4dfeb2fc2e81546b073f83a621 -api-name: google-cloud-bigquery-data-exchange diff --git a/packages/google-cloud-bigquery-data-exchange/google/cloud/bigquery_data_exchange/gapic_version.py b/packages/google-cloud-bigquery-data-exchange/google/cloud/bigquery_data_exchange/gapic_version.py index 20a9cd975b02..a8696682eba1 100644 --- a/packages/google-cloud-bigquery-data-exchange/google/cloud/bigquery_data_exchange/gapic_version.py +++ b/packages/google-cloud-bigquery-data-exchange/google/cloud/bigquery_data_exchange/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.5.20" # {x-release-please-version} diff --git a/packages/google-cloud-bigquery-data-exchange/google/cloud/bigquery_data_exchange_v1beta1/gapic_version.py b/packages/google-cloud-bigquery-data-exchange/google/cloud/bigquery_data_exchange_v1beta1/gapic_version.py index 20a9cd975b02..a8696682eba1 100644 --- a/packages/google-cloud-bigquery-data-exchange/google/cloud/bigquery_data_exchange_v1beta1/gapic_version.py +++ b/packages/google-cloud-bigquery-data-exchange/google/cloud/bigquery_data_exchange_v1beta1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.5.20" # {x-release-please-version} diff --git a/packages/google-cloud-bigquery-data-exchange/noxfile.py b/packages/google-cloud-bigquery-data-exchange/noxfile.py index 95586f51a334..ac2ee09fe213 100644 --- a/packages/google-cloud-bigquery-data-exchange/noxfile.py +++ b/packages/google-cloud-bigquery-data-exchange/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-bigquery-data-exchange/samples/generated_samples/snippet_metadata_google.cloud.bigquery.dataexchange.v1beta1.json b/packages/google-cloud-bigquery-data-exchange/samples/generated_samples/snippet_metadata_google.cloud.bigquery.dataexchange.v1beta1.json index 0103e35cd88a..14127fd0e000 100644 --- a/packages/google-cloud-bigquery-data-exchange/samples/generated_samples/snippet_metadata_google.cloud.bigquery.dataexchange.v1beta1.json +++ b/packages/google-cloud-bigquery-data-exchange/samples/generated_samples/snippet_metadata_google.cloud.bigquery.dataexchange.v1beta1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-bigquery-data-exchange", - "version": "0.1.0" + "version": "0.5.20" }, "snippets": [ { diff --git a/packages/google-cloud-bigquery-data-exchange/testing/constraints-3.14.txt b/packages/google-cloud-bigquery-data-exchange/testing/constraints-3.14.txt new file mode 100644 index 000000000000..2010e549cceb --- /dev/null +++ b/packages/google-cloud-bigquery-data-exchange/testing/constraints-3.14.txt @@ -0,0 +1,12 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 +grpc-google-iam-v1>=0 diff --git a/packages/google-cloud-bigquery-datapolicies/.OwlBot.yaml b/packages/google-cloud-bigquery-datapolicies/.OwlBot.yaml deleted file mode 100644 index d4ca1dd9fbfe..000000000000 --- a/packages/google-cloud-bigquery-datapolicies/.OwlBot.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# 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-remove-regex: - - /owl-bot-staging - -deep-copy-regex: - - source: /google/cloud/bigquery/datapolicies/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-bigquery-datapolicies/$1 - -begin-after-commit-hash: 70f7f0525414fe4dfeb2fc2e81546b073f83a621 -api-name: google-cloud-bigquery-datapolicies diff --git a/packages/google-cloud-bigquery-datapolicies/.repo-metadata.json b/packages/google-cloud-bigquery-datapolicies/.repo-metadata.json index f65d3fd57d35..0a6facc24361 100644 --- a/packages/google-cloud-bigquery-datapolicies/.repo-metadata.json +++ b/packages/google-cloud-bigquery-datapolicies/.repo-metadata.json @@ -13,4 +13,4 @@ "default_version": "v1", "api_shortname": "bigquerydatapolicy", "api_description": "Allows users to manage BigQuery data policies." -} +} \ No newline at end of file diff --git a/packages/google-cloud-bigquery-datapolicies/google/cloud/bigquery_datapolicies/gapic_version.py b/packages/google-cloud-bigquery-datapolicies/google/cloud/bigquery_datapolicies/gapic_version.py index 20a9cd975b02..cfc775d8b396 100644 --- a/packages/google-cloud-bigquery-datapolicies/google/cloud/bigquery_datapolicies/gapic_version.py +++ b/packages/google-cloud-bigquery-datapolicies/google/cloud/bigquery_datapolicies/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.6.16" # {x-release-please-version} diff --git a/packages/google-cloud-bigquery-datapolicies/google/cloud/bigquery_datapolicies_v1/gapic_version.py b/packages/google-cloud-bigquery-datapolicies/google/cloud/bigquery_datapolicies_v1/gapic_version.py index 20a9cd975b02..cfc775d8b396 100644 --- a/packages/google-cloud-bigquery-datapolicies/google/cloud/bigquery_datapolicies_v1/gapic_version.py +++ b/packages/google-cloud-bigquery-datapolicies/google/cloud/bigquery_datapolicies_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.6.16" # {x-release-please-version} diff --git a/packages/google-cloud-bigquery-datapolicies/google/cloud/bigquery_datapolicies_v1beta1/gapic_version.py b/packages/google-cloud-bigquery-datapolicies/google/cloud/bigquery_datapolicies_v1beta1/gapic_version.py index 20a9cd975b02..cfc775d8b396 100644 --- a/packages/google-cloud-bigquery-datapolicies/google/cloud/bigquery_datapolicies_v1beta1/gapic_version.py +++ b/packages/google-cloud-bigquery-datapolicies/google/cloud/bigquery_datapolicies_v1beta1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.6.16" # {x-release-please-version} diff --git a/packages/google-cloud-bigquery-datapolicies/google/cloud/bigquery_datapolicies_v2/gapic_version.py b/packages/google-cloud-bigquery-datapolicies/google/cloud/bigquery_datapolicies_v2/gapic_version.py index 20a9cd975b02..cfc775d8b396 100644 --- a/packages/google-cloud-bigquery-datapolicies/google/cloud/bigquery_datapolicies_v2/gapic_version.py +++ b/packages/google-cloud-bigquery-datapolicies/google/cloud/bigquery_datapolicies_v2/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.6.16" # {x-release-please-version} diff --git a/packages/google-cloud-bigquery-datapolicies/google/cloud/bigquery_datapolicies_v2beta1/gapic_version.py b/packages/google-cloud-bigquery-datapolicies/google/cloud/bigquery_datapolicies_v2beta1/gapic_version.py index 20a9cd975b02..cfc775d8b396 100644 --- a/packages/google-cloud-bigquery-datapolicies/google/cloud/bigquery_datapolicies_v2beta1/gapic_version.py +++ b/packages/google-cloud-bigquery-datapolicies/google/cloud/bigquery_datapolicies_v2beta1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.6.16" # {x-release-please-version} diff --git a/packages/google-cloud-bigquery-datapolicies/noxfile.py b/packages/google-cloud-bigquery-datapolicies/noxfile.py index d6e2ba832e7d..dea4eec3a352 100644 --- a/packages/google-cloud-bigquery-datapolicies/noxfile.py +++ b/packages/google-cloud-bigquery-datapolicies/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-bigquery-datapolicies/samples/generated_samples/snippet_metadata_google.cloud.bigquery.datapolicies.v1.json b/packages/google-cloud-bigquery-datapolicies/samples/generated_samples/snippet_metadata_google.cloud.bigquery.datapolicies.v1.json index 8f3adb520dfb..3d21ca904c8f 100644 --- a/packages/google-cloud-bigquery-datapolicies/samples/generated_samples/snippet_metadata_google.cloud.bigquery.datapolicies.v1.json +++ b/packages/google-cloud-bigquery-datapolicies/samples/generated_samples/snippet_metadata_google.cloud.bigquery.datapolicies.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-bigquery-datapolicies", - "version": "0.1.0" + "version": "0.6.16" }, "snippets": [ { diff --git a/packages/google-cloud-bigquery-datapolicies/samples/generated_samples/snippet_metadata_google.cloud.bigquery.datapolicies.v1beta1.json b/packages/google-cloud-bigquery-datapolicies/samples/generated_samples/snippet_metadata_google.cloud.bigquery.datapolicies.v1beta1.json index f5896d1aac3d..bfa7bc977762 100644 --- a/packages/google-cloud-bigquery-datapolicies/samples/generated_samples/snippet_metadata_google.cloud.bigquery.datapolicies.v1beta1.json +++ b/packages/google-cloud-bigquery-datapolicies/samples/generated_samples/snippet_metadata_google.cloud.bigquery.datapolicies.v1beta1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-bigquery-datapolicies", - "version": "0.1.0" + "version": "0.6.16" }, "snippets": [ { diff --git a/packages/google-cloud-bigquery-datapolicies/samples/generated_samples/snippet_metadata_google.cloud.bigquery.datapolicies.v2.json b/packages/google-cloud-bigquery-datapolicies/samples/generated_samples/snippet_metadata_google.cloud.bigquery.datapolicies.v2.json index 0574ba92f65f..9e4c47f90870 100644 --- a/packages/google-cloud-bigquery-datapolicies/samples/generated_samples/snippet_metadata_google.cloud.bigquery.datapolicies.v2.json +++ b/packages/google-cloud-bigquery-datapolicies/samples/generated_samples/snippet_metadata_google.cloud.bigquery.datapolicies.v2.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-bigquery-datapolicies", - "version": "0.1.0" + "version": "0.6.16" }, "snippets": [ { diff --git a/packages/google-cloud-bigquery-datapolicies/samples/generated_samples/snippet_metadata_google.cloud.bigquery.datapolicies.v2beta1.json b/packages/google-cloud-bigquery-datapolicies/samples/generated_samples/snippet_metadata_google.cloud.bigquery.datapolicies.v2beta1.json index 0ebbcc16227d..1c3166bb8999 100644 --- a/packages/google-cloud-bigquery-datapolicies/samples/generated_samples/snippet_metadata_google.cloud.bigquery.datapolicies.v2beta1.json +++ b/packages/google-cloud-bigquery-datapolicies/samples/generated_samples/snippet_metadata_google.cloud.bigquery.datapolicies.v2beta1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-bigquery-datapolicies", - "version": "0.1.0" + "version": "0.6.16" }, "snippets": [ { diff --git a/packages/google-cloud-bigquery-datapolicies/testing/constraints-3.14.txt b/packages/google-cloud-bigquery-datapolicies/testing/constraints-3.14.txt new file mode 100644 index 000000000000..2010e549cceb --- /dev/null +++ b/packages/google-cloud-bigquery-datapolicies/testing/constraints-3.14.txt @@ -0,0 +1,12 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 +grpc-google-iam-v1>=0 diff --git a/packages/google-cloud-bigquery-datatransfer/.OwlBot.yaml b/packages/google-cloud-bigquery-datatransfer/.OwlBot.yaml deleted file mode 100644 index 3c14b801f41c..000000000000 --- a/packages/google-cloud-bigquery-datatransfer/.OwlBot.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 2021 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -deep-remove-regex: - - /owl-bot-staging - -deep-copy-regex: - - source: /google/cloud/bigquery/datatransfer/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-bigquery-datatransfer/$1 - -begin-after-commit-hash: ad5147b2c3694044935301527f68b951c2e1f419 - -api-name: google-cloud-bigquery-datatransfer diff --git a/packages/google-cloud-bigquery-datatransfer/google/cloud/bigquery_datatransfer/gapic_version.py b/packages/google-cloud-bigquery-datatransfer/google/cloud/bigquery_datatransfer/gapic_version.py index 20a9cd975b02..d1f319282ec2 100644 --- a/packages/google-cloud-bigquery-datatransfer/google/cloud/bigquery_datatransfer/gapic_version.py +++ b/packages/google-cloud-bigquery-datatransfer/google/cloud/bigquery_datatransfer/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "3.19.2" # {x-release-please-version} diff --git a/packages/google-cloud-bigquery-datatransfer/google/cloud/bigquery_datatransfer_v1/gapic_version.py b/packages/google-cloud-bigquery-datatransfer/google/cloud/bigquery_datatransfer_v1/gapic_version.py index 20a9cd975b02..d1f319282ec2 100644 --- a/packages/google-cloud-bigquery-datatransfer/google/cloud/bigquery_datatransfer_v1/gapic_version.py +++ b/packages/google-cloud-bigquery-datatransfer/google/cloud/bigquery_datatransfer_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "3.19.2" # {x-release-please-version} diff --git a/packages/google-cloud-bigquery-datatransfer/noxfile.py b/packages/google-cloud-bigquery-datatransfer/noxfile.py index d3954c974a1d..60a455a95815 100644 --- a/packages/google-cloud-bigquery-datatransfer/noxfile.py +++ b/packages/google-cloud-bigquery-datatransfer/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-bigquery-datatransfer/samples/generated_samples/snippet_metadata_google.cloud.bigquery.datatransfer.v1.json b/packages/google-cloud-bigquery-datatransfer/samples/generated_samples/snippet_metadata_google.cloud.bigquery.datatransfer.v1.json index b0668de9f1d8..0df068f37db4 100644 --- a/packages/google-cloud-bigquery-datatransfer/samples/generated_samples/snippet_metadata_google.cloud.bigquery.datatransfer.v1.json +++ b/packages/google-cloud-bigquery-datatransfer/samples/generated_samples/snippet_metadata_google.cloud.bigquery.datatransfer.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-bigquery-datatransfer", - "version": "0.1.0" + "version": "3.19.2" }, "snippets": [ { diff --git a/packages/google-cloud-bigquery-datatransfer/testing/constraints-3.14.txt b/packages/google-cloud-bigquery-datatransfer/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-cloud-bigquery-datatransfer/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-cloud-bigquery-logging/.OwlBot.yaml b/packages/google-cloud-bigquery-logging/.OwlBot.yaml deleted file mode 100644 index 722ff7eadf78..000000000000 --- a/packages/google-cloud-bigquery-logging/.OwlBot.yaml +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright 2021 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -deep-remove-regex: - - /owl-bot-staging - -deep-copy-regex: - - source: /google/cloud/bigquery/logging/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-bigquery-logging/$1 - -begin-after-commit-hash: b06c9034cfcbce180ba732d03be6526e5c8ea1bc -api-name: google-cloud-bigquery-logging diff --git a/packages/google-cloud-bigquery-logging/.repo-metadata.json b/packages/google-cloud-bigquery-logging/.repo-metadata.json index bd1344c68419..c697ce8e30b5 100644 --- a/packages/google-cloud-bigquery-logging/.repo-metadata.json +++ b/packages/google-cloud-bigquery-logging/.repo-metadata.json @@ -12,4 +12,4 @@ "api_id": "", "default_version": "v1", "api_shortname": "bigquerylogging" -} +} \ No newline at end of file diff --git a/packages/google-cloud-bigquery-logging/google/cloud/bigquery_logging/gapic_version.py b/packages/google-cloud-bigquery-logging/google/cloud/bigquery_logging/gapic_version.py index 20a9cd975b02..c154b1a26fa7 100644 --- a/packages/google-cloud-bigquery-logging/google/cloud/bigquery_logging/gapic_version.py +++ b/packages/google-cloud-bigquery-logging/google/cloud/bigquery_logging/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.6.3" # {x-release-please-version} diff --git a/packages/google-cloud-bigquery-logging/google/cloud/bigquery_logging_v1/gapic_version.py b/packages/google-cloud-bigquery-logging/google/cloud/bigquery_logging_v1/gapic_version.py index 20a9cd975b02..c154b1a26fa7 100644 --- a/packages/google-cloud-bigquery-logging/google/cloud/bigquery_logging_v1/gapic_version.py +++ b/packages/google-cloud-bigquery-logging/google/cloud/bigquery_logging_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.6.3" # {x-release-please-version} diff --git a/packages/google-cloud-bigquery-logging/noxfile.py b/packages/google-cloud-bigquery-logging/noxfile.py index 67f192e540d9..dad7044816b6 100644 --- a/packages/google-cloud-bigquery-logging/noxfile.py +++ b/packages/google-cloud-bigquery-logging/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-bigquery-logging/testing/constraints-3.14.txt b/packages/google-cloud-bigquery-logging/testing/constraints-3.14.txt new file mode 100644 index 000000000000..2010e549cceb --- /dev/null +++ b/packages/google-cloud-bigquery-logging/testing/constraints-3.14.txt @@ -0,0 +1,12 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 +grpc-google-iam-v1>=0 diff --git a/packages/google-cloud-bigquery-migration/.OwlBot.yaml b/packages/google-cloud-bigquery-migration/.OwlBot.yaml deleted file mode 100644 index f5f4a83a23a8..000000000000 --- a/packages/google-cloud-bigquery-migration/.OwlBot.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright 2021 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -deep-remove-regex: - - /owl-bot-staging - -deep-copy-regex: - - source: /google/cloud/bigquery/migration/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-bigquery-migration/$1 - -begin-after-commit-hash: 70f7f0525414fe4dfeb2fc2e81546b073f83a621 -api-name: google-cloud-bigquery-migration diff --git a/packages/google-cloud-bigquery-migration/.repo-metadata.json b/packages/google-cloud-bigquery-migration/.repo-metadata.json index 97abf7b6d93e..e56d9e8b1dc9 100644 --- a/packages/google-cloud-bigquery-migration/.repo-metadata.json +++ b/packages/google-cloud-bigquery-migration/.repo-metadata.json @@ -13,4 +13,4 @@ "requires_billing": true, "default_version": "v2", "api_shortname": "bigquerymigration" -} +} \ No newline at end of file diff --git a/packages/google-cloud-bigquery-migration/google/cloud/bigquery_migration/gapic_version.py b/packages/google-cloud-bigquery-migration/google/cloud/bigquery_migration/gapic_version.py index 20a9cd975b02..43342257cb05 100644 --- a/packages/google-cloud-bigquery-migration/google/cloud/bigquery_migration/gapic_version.py +++ b/packages/google-cloud-bigquery-migration/google/cloud/bigquery_migration/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.11.15" # {x-release-please-version} diff --git a/packages/google-cloud-bigquery-migration/google/cloud/bigquery_migration_v2/gapic_version.py b/packages/google-cloud-bigquery-migration/google/cloud/bigquery_migration_v2/gapic_version.py index 20a9cd975b02..43342257cb05 100644 --- a/packages/google-cloud-bigquery-migration/google/cloud/bigquery_migration_v2/gapic_version.py +++ b/packages/google-cloud-bigquery-migration/google/cloud/bigquery_migration_v2/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.11.15" # {x-release-please-version} diff --git a/packages/google-cloud-bigquery-migration/google/cloud/bigquery_migration_v2alpha/gapic_version.py b/packages/google-cloud-bigquery-migration/google/cloud/bigquery_migration_v2alpha/gapic_version.py index 20a9cd975b02..43342257cb05 100644 --- a/packages/google-cloud-bigquery-migration/google/cloud/bigquery_migration_v2alpha/gapic_version.py +++ b/packages/google-cloud-bigquery-migration/google/cloud/bigquery_migration_v2alpha/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.11.15" # {x-release-please-version} diff --git a/packages/google-cloud-bigquery-migration/noxfile.py b/packages/google-cloud-bigquery-migration/noxfile.py index af1307bd61ce..408163947234 100644 --- a/packages/google-cloud-bigquery-migration/noxfile.py +++ b/packages/google-cloud-bigquery-migration/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-bigquery-migration/samples/generated_samples/snippet_metadata_google.cloud.bigquery.migration.v2.json b/packages/google-cloud-bigquery-migration/samples/generated_samples/snippet_metadata_google.cloud.bigquery.migration.v2.json index 07e44d919e85..42fd974bf40b 100644 --- a/packages/google-cloud-bigquery-migration/samples/generated_samples/snippet_metadata_google.cloud.bigquery.migration.v2.json +++ b/packages/google-cloud-bigquery-migration/samples/generated_samples/snippet_metadata_google.cloud.bigquery.migration.v2.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-bigquery-migration", - "version": "0.1.0" + "version": "0.11.15" }, "snippets": [ { diff --git a/packages/google-cloud-bigquery-migration/samples/generated_samples/snippet_metadata_google.cloud.bigquery.migration.v2alpha.json b/packages/google-cloud-bigquery-migration/samples/generated_samples/snippet_metadata_google.cloud.bigquery.migration.v2alpha.json index d849f516e6d6..82e68c2c3fbc 100644 --- a/packages/google-cloud-bigquery-migration/samples/generated_samples/snippet_metadata_google.cloud.bigquery.migration.v2alpha.json +++ b/packages/google-cloud-bigquery-migration/samples/generated_samples/snippet_metadata_google.cloud.bigquery.migration.v2alpha.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-bigquery-migration", - "version": "0.1.0" + "version": "0.11.15" }, "snippets": [ { diff --git a/packages/google-cloud-bigquery-migration/testing/constraints-3.14.txt b/packages/google-cloud-bigquery-migration/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-cloud-bigquery-migration/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-cloud-bigquery-reservation/.OwlBot.yaml b/packages/google-cloud-bigquery-reservation/.OwlBot.yaml deleted file mode 100644 index 0996786bef1c..000000000000 --- a/packages/google-cloud-bigquery-reservation/.OwlBot.yaml +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright 2021 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -deep-remove-regex: - - /owl-bot-staging - -deep-preserve-regex: - - /owl-bot-staging/google-cloud-bigquery-reservation/v1beta1 - -deep-copy-regex: - - source: /google/cloud/bigquery/reservation/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-bigquery-reservation/$1 - -begin-after-commit-hash: 6a5da3f1274b088752f074da5bc9e30bd1beb27e - -api-name: google-cloud-bigquery-reservation diff --git a/packages/google-cloud-bigquery-reservation/noxfile.py b/packages/google-cloud-bigquery-reservation/noxfile.py index 3d3d1d9cab9f..a8e3355ce8b8 100644 --- a/packages/google-cloud-bigquery-reservation/noxfile.py +++ b/packages/google-cloud-bigquery-reservation/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-bigquery-reservation/testing/constraints-3.14.txt b/packages/google-cloud-bigquery-reservation/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-cloud-bigquery-reservation/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-cloud-billing-budgets/.OwlBot.yaml b/packages/google-cloud-billing-budgets/.OwlBot.yaml deleted file mode 100644 index 0b252a421944..000000000000 --- a/packages/google-cloud-billing-budgets/.OwlBot.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 2021 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -deep-remove-regex: - - /owl-bot-staging - -deep-copy-regex: - - source: /google/cloud/billing/budgets/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-billing-budgets/$1 - -begin-after-commit-hash: 0a3c7d272d697796db75857bac73905c68e498c3 - -api-name: google-cloud-billing-budgets diff --git a/packages/google-cloud-billing-budgets/google/cloud/billing/budgets/gapic_version.py b/packages/google-cloud-billing-budgets/google/cloud/billing/budgets/gapic_version.py index 20a9cd975b02..e27c97e29514 100644 --- a/packages/google-cloud-billing-budgets/google/cloud/billing/budgets/gapic_version.py +++ b/packages/google-cloud-billing-budgets/google/cloud/billing/budgets/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.17.2" # {x-release-please-version} diff --git a/packages/google-cloud-billing-budgets/google/cloud/billing/budgets_v1/gapic_version.py b/packages/google-cloud-billing-budgets/google/cloud/billing/budgets_v1/gapic_version.py index 20a9cd975b02..e27c97e29514 100644 --- a/packages/google-cloud-billing-budgets/google/cloud/billing/budgets_v1/gapic_version.py +++ b/packages/google-cloud-billing-budgets/google/cloud/billing/budgets_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.17.2" # {x-release-please-version} diff --git a/packages/google-cloud-billing-budgets/google/cloud/billing/budgets_v1beta1/gapic_version.py b/packages/google-cloud-billing-budgets/google/cloud/billing/budgets_v1beta1/gapic_version.py index 20a9cd975b02..e27c97e29514 100644 --- a/packages/google-cloud-billing-budgets/google/cloud/billing/budgets_v1beta1/gapic_version.py +++ b/packages/google-cloud-billing-budgets/google/cloud/billing/budgets_v1beta1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.17.2" # {x-release-please-version} diff --git a/packages/google-cloud-billing-budgets/noxfile.py b/packages/google-cloud-billing-budgets/noxfile.py index 4c9f547f8804..6327bf489705 100644 --- a/packages/google-cloud-billing-budgets/noxfile.py +++ b/packages/google-cloud-billing-budgets/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-billing-budgets/samples/generated_samples/snippet_metadata_google.cloud.billing.budgets.v1.json b/packages/google-cloud-billing-budgets/samples/generated_samples/snippet_metadata_google.cloud.billing.budgets.v1.json index c24b57dc687a..94ccd884a07c 100644 --- a/packages/google-cloud-billing-budgets/samples/generated_samples/snippet_metadata_google.cloud.billing.budgets.v1.json +++ b/packages/google-cloud-billing-budgets/samples/generated_samples/snippet_metadata_google.cloud.billing.budgets.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-billing-budgets", - "version": "0.1.0" + "version": "1.17.2" }, "snippets": [ { diff --git a/packages/google-cloud-billing-budgets/samples/generated_samples/snippet_metadata_google.cloud.billing.budgets.v1beta1.json b/packages/google-cloud-billing-budgets/samples/generated_samples/snippet_metadata_google.cloud.billing.budgets.v1beta1.json index 2c44cd8f7269..20085142b6e6 100644 --- a/packages/google-cloud-billing-budgets/samples/generated_samples/snippet_metadata_google.cloud.billing.budgets.v1beta1.json +++ b/packages/google-cloud-billing-budgets/samples/generated_samples/snippet_metadata_google.cloud.billing.budgets.v1beta1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-billing-budgets", - "version": "0.1.0" + "version": "1.17.2" }, "snippets": [ { diff --git a/packages/google-cloud-billing-budgets/testing/constraints-3.14.txt b/packages/google-cloud-billing-budgets/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-cloud-billing-budgets/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-cloud-billing/.OwlBot.yaml b/packages/google-cloud-billing/.OwlBot.yaml deleted file mode 100644 index 3fce9d1f539e..000000000000 --- a/packages/google-cloud-billing/.OwlBot.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 2021 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -deep-remove-regex: - - /owl-bot-staging - -deep-copy-regex: - - source: /google/cloud/billing/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-billing/$1 - -begin-after-commit-hash: 6a5da3f1274b088752f074da5bc9e30bd1beb27e - -api-name: google-cloud-billing diff --git a/packages/google-cloud-billing/google/cloud/billing/gapic_version.py b/packages/google-cloud-billing/google/cloud/billing/gapic_version.py index 20a9cd975b02..391dc7576683 100644 --- a/packages/google-cloud-billing/google/cloud/billing/gapic_version.py +++ b/packages/google-cloud-billing/google/cloud/billing/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.16.3" # {x-release-please-version} diff --git a/packages/google-cloud-billing/google/cloud/billing_v1/gapic_version.py b/packages/google-cloud-billing/google/cloud/billing_v1/gapic_version.py index 20a9cd975b02..391dc7576683 100644 --- a/packages/google-cloud-billing/google/cloud/billing_v1/gapic_version.py +++ b/packages/google-cloud-billing/google/cloud/billing_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.16.3" # {x-release-please-version} diff --git a/packages/google-cloud-billing/noxfile.py b/packages/google-cloud-billing/noxfile.py index 81bbf151a995..420944ee838e 100644 --- a/packages/google-cloud-billing/noxfile.py +++ b/packages/google-cloud-billing/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-billing/samples/generated_samples/snippet_metadata_google.cloud.billing.v1.json b/packages/google-cloud-billing/samples/generated_samples/snippet_metadata_google.cloud.billing.v1.json index 027b84af0571..efc236985304 100644 --- a/packages/google-cloud-billing/samples/generated_samples/snippet_metadata_google.cloud.billing.v1.json +++ b/packages/google-cloud-billing/samples/generated_samples/snippet_metadata_google.cloud.billing.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-billing", - "version": "0.1.0" + "version": "1.16.3" }, "snippets": [ { diff --git a/packages/google-cloud-billing/testing/constraints-3.14.txt b/packages/google-cloud-billing/testing/constraints-3.14.txt new file mode 100644 index 000000000000..2010e549cceb --- /dev/null +++ b/packages/google-cloud-billing/testing/constraints-3.14.txt @@ -0,0 +1,12 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 +grpc-google-iam-v1>=0 diff --git a/packages/google-cloud-binary-authorization/.OwlBot.yaml b/packages/google-cloud-binary-authorization/.OwlBot.yaml deleted file mode 100644 index 835961ae1853..000000000000 --- a/packages/google-cloud-binary-authorization/.OwlBot.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 2021 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -deep-remove-regex: - - /owl-bot-staging - -deep-copy-regex: - - source: /google/cloud/binaryauthorization/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-binary-authorization/$1 - -begin-after-commit-hash: 6a5da3f1274b088752f074da5bc9e30bd1beb27e - -api-name: google-cloud-binary-authorization diff --git a/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization/gapic_version.py b/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization/gapic_version.py index 20a9cd975b02..11ddf36c5505 100644 --- a/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization/gapic_version.py +++ b/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.13.2" # {x-release-please-version} diff --git a/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1/gapic_version.py b/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1/gapic_version.py index 20a9cd975b02..11ddf36c5505 100644 --- a/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1/gapic_version.py +++ b/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.13.2" # {x-release-please-version} diff --git a/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1beta1/gapic_version.py b/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1beta1/gapic_version.py index 20a9cd975b02..11ddf36c5505 100644 --- a/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1beta1/gapic_version.py +++ b/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1beta1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.13.2" # {x-release-please-version} diff --git a/packages/google-cloud-binary-authorization/noxfile.py b/packages/google-cloud-binary-authorization/noxfile.py index bdc915da5f19..152a81fa7a95 100644 --- a/packages/google-cloud-binary-authorization/noxfile.py +++ b/packages/google-cloud-binary-authorization/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-binary-authorization/samples/generated_samples/snippet_metadata_google.cloud.binaryauthorization.v1.json b/packages/google-cloud-binary-authorization/samples/generated_samples/snippet_metadata_google.cloud.binaryauthorization.v1.json index d3f819ebeddc..f77f59220c36 100644 --- a/packages/google-cloud-binary-authorization/samples/generated_samples/snippet_metadata_google.cloud.binaryauthorization.v1.json +++ b/packages/google-cloud-binary-authorization/samples/generated_samples/snippet_metadata_google.cloud.binaryauthorization.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-binary-authorization", - "version": "0.1.0" + "version": "1.13.2" }, "snippets": [ { diff --git a/packages/google-cloud-binary-authorization/samples/generated_samples/snippet_metadata_google.cloud.binaryauthorization.v1beta1.json b/packages/google-cloud-binary-authorization/samples/generated_samples/snippet_metadata_google.cloud.binaryauthorization.v1beta1.json index 1e9460cea8ee..29b464847a99 100644 --- a/packages/google-cloud-binary-authorization/samples/generated_samples/snippet_metadata_google.cloud.binaryauthorization.v1beta1.json +++ b/packages/google-cloud-binary-authorization/samples/generated_samples/snippet_metadata_google.cloud.binaryauthorization.v1beta1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-binary-authorization", - "version": "0.1.0" + "version": "1.13.2" }, "snippets": [ { diff --git a/packages/google-cloud-binary-authorization/testing/constraints-3.14.txt b/packages/google-cloud-binary-authorization/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-cloud-binary-authorization/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-cloud-build/.OwlBot.yaml b/packages/google-cloud-build/.OwlBot.yaml deleted file mode 100644 index b51b5d12375f..000000000000 --- a/packages/google-cloud-build/.OwlBot.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 2021 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -deep-remove-regex: - - /owl-bot-staging - -deep-copy-regex: - - source: /google/devtools/cloudbuild/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-build/$1 - -begin-after-commit-hash: 0a3c7d272d697796db75857bac73905c68e498c3 - -api-name: google-cloud-build diff --git a/packages/google-cloud-build/google/cloud/devtools/cloudbuild/gapic_version.py b/packages/google-cloud-build/google/cloud/devtools/cloudbuild/gapic_version.py index 20a9cd975b02..9b6e607cc2bd 100644 --- a/packages/google-cloud-build/google/cloud/devtools/cloudbuild/gapic_version.py +++ b/packages/google-cloud-build/google/cloud/devtools/cloudbuild/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "3.32.0" # {x-release-please-version} diff --git a/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v1/gapic_version.py b/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v1/gapic_version.py index 20a9cd975b02..9b6e607cc2bd 100644 --- a/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v1/gapic_version.py +++ b/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "3.32.0" # {x-release-please-version} diff --git a/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v2/gapic_version.py b/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v2/gapic_version.py index 20a9cd975b02..9b6e607cc2bd 100644 --- a/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v2/gapic_version.py +++ b/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v2/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "3.32.0" # {x-release-please-version} diff --git a/packages/google-cloud-build/noxfile.py b/packages/google-cloud-build/noxfile.py index f4bebf963011..c3d2c0813507 100644 --- a/packages/google-cloud-build/noxfile.py +++ b/packages/google-cloud-build/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-build/samples/generated_samples/snippet_metadata_google.devtools.cloudbuild.v1.json b/packages/google-cloud-build/samples/generated_samples/snippet_metadata_google.devtools.cloudbuild.v1.json index 48df7a914e6e..a65a0fadaa98 100644 --- a/packages/google-cloud-build/samples/generated_samples/snippet_metadata_google.devtools.cloudbuild.v1.json +++ b/packages/google-cloud-build/samples/generated_samples/snippet_metadata_google.devtools.cloudbuild.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-build", - "version": "0.1.0" + "version": "3.32.0" }, "snippets": [ { diff --git a/packages/google-cloud-build/samples/generated_samples/snippet_metadata_google.devtools.cloudbuild.v2.json b/packages/google-cloud-build/samples/generated_samples/snippet_metadata_google.devtools.cloudbuild.v2.json index b384db6d11b0..b7ee79dcce97 100644 --- a/packages/google-cloud-build/samples/generated_samples/snippet_metadata_google.devtools.cloudbuild.v2.json +++ b/packages/google-cloud-build/samples/generated_samples/snippet_metadata_google.devtools.cloudbuild.v2.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-build", - "version": "0.1.0" + "version": "3.32.0" }, "snippets": [ { diff --git a/packages/google-cloud-build/testing/constraints-3.14.txt b/packages/google-cloud-build/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-cloud-build/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-cloud-capacityplanner/.OwlBot.yaml b/packages/google-cloud-capacityplanner/.OwlBot.yaml deleted file mode 100644 index 457f1d7de159..000000000000 --- a/packages/google-cloud-capacityplanner/.OwlBot.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# 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/capacityplanner/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-capacityplanner/$1 -api-name: google-cloud-capacityplanner diff --git a/packages/google-cloud-capacityplanner/.repo-metadata.json b/packages/google-cloud-capacityplanner/.repo-metadata.json index 2653b3717eb1..e8531fa77f4a 100644 --- a/packages/google-cloud-capacityplanner/.repo-metadata.json +++ b/packages/google-cloud-capacityplanner/.repo-metadata.json @@ -1,16 +1,16 @@ { - "name": "google-cloud-capacityplanner", - "name_pretty": "Capacity Planner API", - "api_description": "Provides programmatic access to Capacity Planner features.", - "product_documentation": "https://cloud.google.com/capacity-planner/docs", - "client_documentation": "https://cloud.google.com/python/docs/reference/google-cloud-capacityplanner/latest", - "issue_tracker": "https://issuetracker.google.com/issues/new?component=1194830", - "release_level": "preview", - "language": "python", - "library_type": "GAPIC_AUTO", - "repo": "googleapis/google-cloud-python", - "distribution_name": "google-cloud-capacityplanner", - "api_id": "capacityplanner.googleapis.com", - "default_version": "v1beta", - "api_shortname": "capacityplanner" -} \ No newline at end of file + "name": "google-cloud-capacityplanner", + "name_pretty": "Capacity Planner API", + "api_description": "Provides programmatic access to Capacity Planner features.", + "product_documentation": "https://cloud.google.com/capacity-planner/docs", + "client_documentation": "https://cloud.google.com/python/docs/reference/google-cloud-capacityplanner/latest", + "issue_tracker": "https://issuetracker.google.com/issues/new?component=1194830", + "release_level": "preview", + "language": "python", + "library_type": "GAPIC_AUTO", + "repo": "googleapis/google-cloud-python", + "distribution_name": "google-cloud-capacityplanner", + "api_id": "capacityplanner.googleapis.com", + "default_version": "v1beta", + "api_shortname": "capacityplanner" +} diff --git a/packages/google-cloud-capacityplanner/google/cloud/capacityplanner_v1beta/types/usage_service.py b/packages/google-cloud-capacityplanner/google/cloud/capacityplanner_v1beta/types/usage_service.py index af2e7ddcff85..1165ab01451f 100644 --- a/packages/google-cloud-capacityplanner/google/cloud/capacityplanner_v1beta/types/usage_service.py +++ b/packages/google-cloud-capacityplanner/google/cloud/capacityplanner_v1beta/types/usage_service.py @@ -59,7 +59,11 @@ class QueryUsageHistoriesRequest(proto.Message): parent (str): Required. The compute engine resource and location for the time series values to return. - The format is: projects/{project}/locations/{location} or organizations/{organization}/locations/{location} or folders/{folder}/locations/{location} + The format is: + + projects/{project}/locations/{location} or + organizations/{organization}/locations/{location} + or folders/{folder}/locations/{location} location_level (google.cloud.capacityplanner_v1beta.types.TimeSeries.LocationType): Optional. The location level of the reservations usage timeseries. @@ -190,7 +194,11 @@ class QueryForecastsRequest(proto.Message): parent (str): Required. The compute engine resource and location for the time series values to return. - The format is: projects/{project}/locations/{location} or organizations/{organization}/locations/{location} or folders/{folder}/locations/{location} + The format is: + + projects/{project}/locations/{location} or + organizations/{organization}/locations/{location} + or folders/{folder}/locations/{location} machine_family (str): The machine family to use to select the ``Forecast`` values to return. Possible values include "n1", and "n2d". Empty @@ -307,7 +315,11 @@ class QueryReservationsRequest(proto.Message): parent (str): Required. The compute engine resource and location for the time series values to return. - The format is: projects/{project}/locations/{location} or organizations/{organization}/locations/{location} or folders/{folder}/locations/{location} + The format is: + + projects/{project}/locations/{location} or + organizations/{organization}/locations/{location} + or folders/{folder}/locations/{location} location_level (google.cloud.capacityplanner_v1beta.types.TimeSeries.LocationType): Optional. The location level of the reservations usage timeseries. @@ -987,7 +999,11 @@ class ExportUsageHistoriesRequest(proto.Message): parent (str): Required. The compute engine resource and location for the time series values to return. - The format is: projects/{project}/locations/{location} or organizations/{organization}/locations/{location} or folders/{folder}/locations/{location} + The format is: + + projects/{project}/locations/{location} or + organizations/{organization}/locations/{location} + or folders/{folder}/locations/{location} is_spot (bool): Optional. Set true to export usage for spot resources. @@ -1095,7 +1111,11 @@ class ExportForecastsRequest(proto.Message): parent (str): Required. The compute engine resource and location for the time series values to return. - The format is: projects/{project}/locations/{location} or organizations/{organization}/locations/{location} or folders/{folder}/locations/{location} + The format is: + + projects/{project}/locations/{location} or + organizations/{organization}/locations/{location} + or folders/{folder}/locations/{location} machine_family (str): Optional. The machine family to use to select the ``Forecast`` values to return. Possible values include "n1", @@ -1223,8 +1243,11 @@ class ExportReservationsUsageRequest(proto.Message): This field is a member of `oneof`_ ``resource``. parent (str): Required. The compute engine resource and - location of the reservationsusage. The format - is: projects/{project}/locations/{location} or organizations/{organization}/locations/{location} or folders/{folder}/locations/{location} + location of the reservationsusage. The format is: + + projects/{project}/locations/{location} or + organizations/{organization}/locations/{location} + or folders/{folder}/locations/{location} location_level (google.cloud.capacityplanner_v1beta.types.TimeSeries.LocationType): Optional. The location level of the reservations usage timeseries. diff --git a/packages/google-cloud-capacityplanner/noxfile.py b/packages/google-cloud-capacityplanner/noxfile.py index 666563528d0f..3a2bc55690b5 100644 --- a/packages/google-cloud-capacityplanner/noxfile.py +++ b/packages/google-cloud-capacityplanner/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-capacityplanner/testing/constraints-3.14.txt b/packages/google-cloud-capacityplanner/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-cloud-capacityplanner/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-cloud-certificate-manager/.OwlBot.yaml b/packages/google-cloud-certificate-manager/.OwlBot.yaml deleted file mode 100644 index d2eb16ef122e..000000000000 --- a/packages/google-cloud-certificate-manager/.OwlBot.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# 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-remove-regex: - - /owl-bot-staging - -deep-copy-regex: - - source: /google/cloud/certificatemanager/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-certificate-manager/$1 - -begin-after-commit-hash: 70f7f0525414fe4dfeb2fc2e81546b073f83a621 -api-name: google-cloud-certificate-manager diff --git a/packages/google-cloud-certificate-manager/google/cloud/certificate_manager/gapic_version.py b/packages/google-cloud-certificate-manager/google/cloud/certificate_manager/gapic_version.py index 20a9cd975b02..ba36c6640871 100644 --- a/packages/google-cloud-certificate-manager/google/cloud/certificate_manager/gapic_version.py +++ b/packages/google-cloud-certificate-manager/google/cloud/certificate_manager/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.10.2" # {x-release-please-version} diff --git a/packages/google-cloud-certificate-manager/google/cloud/certificate_manager_v1/gapic_version.py b/packages/google-cloud-certificate-manager/google/cloud/certificate_manager_v1/gapic_version.py index 20a9cd975b02..ba36c6640871 100644 --- a/packages/google-cloud-certificate-manager/google/cloud/certificate_manager_v1/gapic_version.py +++ b/packages/google-cloud-certificate-manager/google/cloud/certificate_manager_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.10.2" # {x-release-please-version} diff --git a/packages/google-cloud-certificate-manager/noxfile.py b/packages/google-cloud-certificate-manager/noxfile.py index bff29037c846..08c0cbccaf0a 100644 --- a/packages/google-cloud-certificate-manager/noxfile.py +++ b/packages/google-cloud-certificate-manager/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-certificate-manager/samples/generated_samples/snippet_metadata_google.cloud.certificatemanager.v1.json b/packages/google-cloud-certificate-manager/samples/generated_samples/snippet_metadata_google.cloud.certificatemanager.v1.json index 294c1f4aa1e6..ca155b4b56a4 100644 --- a/packages/google-cloud-certificate-manager/samples/generated_samples/snippet_metadata_google.cloud.certificatemanager.v1.json +++ b/packages/google-cloud-certificate-manager/samples/generated_samples/snippet_metadata_google.cloud.certificatemanager.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-certificate-manager", - "version": "0.1.0" + "version": "1.10.2" }, "snippets": [ { diff --git a/packages/google-cloud-certificate-manager/testing/constraints-3.14.txt b/packages/google-cloud-certificate-manager/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-cloud-certificate-manager/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-cloud-channel/.OwlBot.yaml b/packages/google-cloud-channel/.OwlBot.yaml deleted file mode 100644 index 2570128b7cd0..000000000000 --- a/packages/google-cloud-channel/.OwlBot.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 2021 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -deep-remove-regex: - - /owl-bot-staging - -deep-copy-regex: - - source: /google/cloud/channel/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-channel/$1 - -begin-after-commit-hash: 6a5da3f1274b088752f074da5bc9e30bd1beb27e - -api-name: google-cloud-channel diff --git a/packages/google-cloud-channel/google/cloud/channel/gapic_version.py b/packages/google-cloud-channel/google/cloud/channel/gapic_version.py index 20a9cd975b02..04d1fe5f84e8 100644 --- a/packages/google-cloud-channel/google/cloud/channel/gapic_version.py +++ b/packages/google-cloud-channel/google/cloud/channel/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.23.0" # {x-release-please-version} diff --git a/packages/google-cloud-channel/google/cloud/channel_v1/gapic_version.py b/packages/google-cloud-channel/google/cloud/channel_v1/gapic_version.py index 20a9cd975b02..04d1fe5f84e8 100644 --- a/packages/google-cloud-channel/google/cloud/channel_v1/gapic_version.py +++ b/packages/google-cloud-channel/google/cloud/channel_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.23.0" # {x-release-please-version} diff --git a/packages/google-cloud-channel/noxfile.py b/packages/google-cloud-channel/noxfile.py index b155e432a9b3..96ad0be09785 100644 --- a/packages/google-cloud-channel/noxfile.py +++ b/packages/google-cloud-channel/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-channel/samples/generated_samples/snippet_metadata_google.cloud.channel.v1.json b/packages/google-cloud-channel/samples/generated_samples/snippet_metadata_google.cloud.channel.v1.json index 2158f62acc0a..968af2dc94d1 100644 --- a/packages/google-cloud-channel/samples/generated_samples/snippet_metadata_google.cloud.channel.v1.json +++ b/packages/google-cloud-channel/samples/generated_samples/snippet_metadata_google.cloud.channel.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-channel", - "version": "0.1.0" + "version": "1.23.0" }, "snippets": [ { diff --git a/packages/google-cloud-channel/testing/constraints-3.14.txt b/packages/google-cloud-channel/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-cloud-channel/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-cloud-chronicle/.OwlBot.yaml b/packages/google-cloud-chronicle/.OwlBot.yaml deleted file mode 100644 index 08c878d9aff0..000000000000 --- a/packages/google-cloud-chronicle/.OwlBot.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# 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/chronicle/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-chronicle/$1 -api-name: google-cloud-chronicle diff --git a/packages/google-cloud-chronicle/google/cloud/chronicle/gapic_version.py b/packages/google-cloud-chronicle/google/cloud/chronicle/gapic_version.py index 20a9cd975b02..ce52f107f367 100644 --- a/packages/google-cloud-chronicle/google/cloud/chronicle/gapic_version.py +++ b/packages/google-cloud-chronicle/google/cloud/chronicle/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.1.0" # {x-release-please-version} diff --git a/packages/google-cloud-chronicle/google/cloud/chronicle_v1/gapic_version.py b/packages/google-cloud-chronicle/google/cloud/chronicle_v1/gapic_version.py index 20a9cd975b02..ce52f107f367 100644 --- a/packages/google-cloud-chronicle/google/cloud/chronicle_v1/gapic_version.py +++ b/packages/google-cloud-chronicle/google/cloud/chronicle_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.1.0" # {x-release-please-version} diff --git a/packages/google-cloud-chronicle/noxfile.py b/packages/google-cloud-chronicle/noxfile.py index 05d17c4cb653..1c0f56bb4cc4 100644 --- a/packages/google-cloud-chronicle/noxfile.py +++ b/packages/google-cloud-chronicle/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-chronicle/testing/constraints-3.14.txt b/packages/google-cloud-chronicle/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-cloud-chronicle/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-cloud-cloudcontrolspartner/.OwlBot.yaml b/packages/google-cloud-cloudcontrolspartner/.OwlBot.yaml deleted file mode 100644 index ab372e8f04ea..000000000000 --- a/packages/google-cloud-cloudcontrolspartner/.OwlBot.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# 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/cloudcontrolspartner/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-cloudcontrolspartner/$1 -api-name: google-cloud-cloudcontrolspartner diff --git a/packages/google-cloud-cloudcontrolspartner/google/cloud/cloudcontrolspartner/gapic_version.py b/packages/google-cloud-cloudcontrolspartner/google/cloud/cloudcontrolspartner/gapic_version.py index 20a9cd975b02..5e9f73f4e3f5 100644 --- a/packages/google-cloud-cloudcontrolspartner/google/cloud/cloudcontrolspartner/gapic_version.py +++ b/packages/google-cloud-cloudcontrolspartner/google/cloud/cloudcontrolspartner/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.2.7" # {x-release-please-version} diff --git a/packages/google-cloud-cloudcontrolspartner/google/cloud/cloudcontrolspartner_v1/gapic_version.py b/packages/google-cloud-cloudcontrolspartner/google/cloud/cloudcontrolspartner_v1/gapic_version.py index 20a9cd975b02..5e9f73f4e3f5 100644 --- a/packages/google-cloud-cloudcontrolspartner/google/cloud/cloudcontrolspartner_v1/gapic_version.py +++ b/packages/google-cloud-cloudcontrolspartner/google/cloud/cloudcontrolspartner_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.2.7" # {x-release-please-version} diff --git a/packages/google-cloud-cloudcontrolspartner/google/cloud/cloudcontrolspartner_v1beta/gapic_version.py b/packages/google-cloud-cloudcontrolspartner/google/cloud/cloudcontrolspartner_v1beta/gapic_version.py index 20a9cd975b02..5e9f73f4e3f5 100644 --- a/packages/google-cloud-cloudcontrolspartner/google/cloud/cloudcontrolspartner_v1beta/gapic_version.py +++ b/packages/google-cloud-cloudcontrolspartner/google/cloud/cloudcontrolspartner_v1beta/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.2.7" # {x-release-please-version} diff --git a/packages/google-cloud-cloudcontrolspartner/noxfile.py b/packages/google-cloud-cloudcontrolspartner/noxfile.py index f7174c3aefa9..072dfee94227 100644 --- a/packages/google-cloud-cloudcontrolspartner/noxfile.py +++ b/packages/google-cloud-cloudcontrolspartner/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-cloudcontrolspartner/samples/generated_samples/snippet_metadata_google.cloud.cloudcontrolspartner.v1.json b/packages/google-cloud-cloudcontrolspartner/samples/generated_samples/snippet_metadata_google.cloud.cloudcontrolspartner.v1.json index b660e201579f..4081ca41c3af 100644 --- a/packages/google-cloud-cloudcontrolspartner/samples/generated_samples/snippet_metadata_google.cloud.cloudcontrolspartner.v1.json +++ b/packages/google-cloud-cloudcontrolspartner/samples/generated_samples/snippet_metadata_google.cloud.cloudcontrolspartner.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-cloudcontrolspartner", - "version": "0.1.0" + "version": "0.2.7" }, "snippets": [ { diff --git a/packages/google-cloud-cloudcontrolspartner/samples/generated_samples/snippet_metadata_google.cloud.cloudcontrolspartner.v1beta.json b/packages/google-cloud-cloudcontrolspartner/samples/generated_samples/snippet_metadata_google.cloud.cloudcontrolspartner.v1beta.json index 586e22745082..092936b792c1 100644 --- a/packages/google-cloud-cloudcontrolspartner/samples/generated_samples/snippet_metadata_google.cloud.cloudcontrolspartner.v1beta.json +++ b/packages/google-cloud-cloudcontrolspartner/samples/generated_samples/snippet_metadata_google.cloud.cloudcontrolspartner.v1beta.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-cloudcontrolspartner", - "version": "0.1.0" + "version": "0.2.7" }, "snippets": [ { diff --git a/packages/google-cloud-cloudcontrolspartner/testing/constraints-3.14.txt b/packages/google-cloud-cloudcontrolspartner/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-cloud-cloudcontrolspartner/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-cloud-cloudsecuritycompliance/.OwlBot.yaml b/packages/google-cloud-cloudsecuritycompliance/.OwlBot.yaml deleted file mode 100644 index 75b67d6c3dc3..000000000000 --- a/packages/google-cloud-cloudsecuritycompliance/.OwlBot.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# 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/cloudsecuritycompliance/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-cloudsecuritycompliance/$1 -api-name: google-cloud-cloudsecuritycompliance diff --git a/packages/google-cloud-cloudsecuritycompliance/.repo-metadata.json b/packages/google-cloud-cloudsecuritycompliance/.repo-metadata.json index 7e737f84f158..c38f20636d37 100644 --- a/packages/google-cloud-cloudsecuritycompliance/.repo-metadata.json +++ b/packages/google-cloud-cloudsecuritycompliance/.repo-metadata.json @@ -1,16 +1,16 @@ { - "name": "google-cloud-cloudsecuritycompliance", - "name_pretty": "Cloud Security Compliance API", - "api_description": "null ", - "product_documentation": "https://cloud.google.com/security-command-center/docs/compliance-manager-overview", - "client_documentation": "https://cloud.google.com/python/docs/reference/google-cloud-cloudsecuritycompliance/latest", - "issue_tracker": "https://issuetracker.google.com/issues/new?component=1761967&template=0", - "release_level": "preview", - "language": "python", - "library_type": "GAPIC_AUTO", - "repo": "googleapis/google-cloud-python", - "distribution_name": "google-cloud-cloudsecuritycompliance", - "api_id": "cloudsecuritycompliance.googleapis.com", - "default_version": "v1", - "api_shortname": "cloudsecuritycompliance" -} + "name": "google-cloud-cloudsecuritycompliance", + "name_pretty": "Cloud Security Compliance API", + "api_description": "null ", + "product_documentation": "https://cloud.google.com/security-command-center/docs/compliance-manager-overview", + "client_documentation": "https://cloud.google.com/python/docs/reference/google-cloud-cloudsecuritycompliance/latest", + "issue_tracker": "https://issuetracker.google.com/issues/new?component=1761967&template=0", + "release_level": "preview", + "language": "python", + "library_type": "GAPIC_AUTO", + "repo": "googleapis/google-cloud-python", + "distribution_name": "google-cloud-cloudsecuritycompliance", + "api_id": "cloudsecuritycompliance.googleapis.com", + "default_version": "v1", + "api_shortname": "cloudsecuritycompliance" +} \ No newline at end of file diff --git a/packages/google-cloud-cloudsecuritycompliance/noxfile.py b/packages/google-cloud-cloudsecuritycompliance/noxfile.py index 9bc187821486..9a38eba0ebc2 100644 --- a/packages/google-cloud-cloudsecuritycompliance/noxfile.py +++ b/packages/google-cloud-cloudsecuritycompliance/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-cloudsecuritycompliance/testing/constraints-3.14.txt b/packages/google-cloud-cloudsecuritycompliance/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-cloud-cloudsecuritycompliance/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-cloud-commerce-consumer-procurement/.OwlBot.yaml b/packages/google-cloud-commerce-consumer-procurement/.OwlBot.yaml deleted file mode 100644 index 9eab6098342e..000000000000 --- a/packages/google-cloud-commerce-consumer-procurement/.OwlBot.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# 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/commerce/consumer/procurement/(.*)/.*-py - dest: /owl-bot-staging/google-cloud-commerce-consumer-procurement/$1 -api-name: google-cloud-commerce-consumer-procurement diff --git a/packages/google-cloud-commerce-consumer-procurement/google/cloud/commerce_consumer_procurement/gapic_version.py b/packages/google-cloud-commerce-consumer-procurement/google/cloud/commerce_consumer_procurement/gapic_version.py index 20a9cd975b02..b35a7c7cc0b3 100644 --- a/packages/google-cloud-commerce-consumer-procurement/google/cloud/commerce_consumer_procurement/gapic_version.py +++ b/packages/google-cloud-commerce-consumer-procurement/google/cloud/commerce_consumer_procurement/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.2.0" # {x-release-please-version} diff --git a/packages/google-cloud-commerce-consumer-procurement/google/cloud/commerce_consumer_procurement_v1/gapic_version.py b/packages/google-cloud-commerce-consumer-procurement/google/cloud/commerce_consumer_procurement_v1/gapic_version.py index 20a9cd975b02..b35a7c7cc0b3 100644 --- a/packages/google-cloud-commerce-consumer-procurement/google/cloud/commerce_consumer_procurement_v1/gapic_version.py +++ b/packages/google-cloud-commerce-consumer-procurement/google/cloud/commerce_consumer_procurement_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.2.0" # {x-release-please-version} diff --git a/packages/google-cloud-commerce-consumer-procurement/google/cloud/commerce_consumer_procurement_v1alpha1/gapic_version.py b/packages/google-cloud-commerce-consumer-procurement/google/cloud/commerce_consumer_procurement_v1alpha1/gapic_version.py index 20a9cd975b02..b35a7c7cc0b3 100644 --- a/packages/google-cloud-commerce-consumer-procurement/google/cloud/commerce_consumer_procurement_v1alpha1/gapic_version.py +++ b/packages/google-cloud-commerce-consumer-procurement/google/cloud/commerce_consumer_procurement_v1alpha1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.2.0" # {x-release-please-version} diff --git a/packages/google-cloud-commerce-consumer-procurement/noxfile.py b/packages/google-cloud-commerce-consumer-procurement/noxfile.py index b7bd81125caa..eeb05434d9b8 100644 --- a/packages/google-cloud-commerce-consumer-procurement/noxfile.py +++ b/packages/google-cloud-commerce-consumer-procurement/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-commerce-consumer-procurement/samples/generated_samples/snippet_metadata_google.cloud.commerce.consumer.procurement.v1.json b/packages/google-cloud-commerce-consumer-procurement/samples/generated_samples/snippet_metadata_google.cloud.commerce.consumer.procurement.v1.json index 969c021010bd..a289505662e1 100644 --- a/packages/google-cloud-commerce-consumer-procurement/samples/generated_samples/snippet_metadata_google.cloud.commerce.consumer.procurement.v1.json +++ b/packages/google-cloud-commerce-consumer-procurement/samples/generated_samples/snippet_metadata_google.cloud.commerce.consumer.procurement.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-commerce-consumer-procurement", - "version": "0.1.0" + "version": "0.2.0" }, "snippets": [ { diff --git a/packages/google-cloud-commerce-consumer-procurement/samples/generated_samples/snippet_metadata_google.cloud.commerce.consumer.procurement.v1alpha1.json b/packages/google-cloud-commerce-consumer-procurement/samples/generated_samples/snippet_metadata_google.cloud.commerce.consumer.procurement.v1alpha1.json index 5d6b7cc97a9a..c722a3ad31b7 100644 --- a/packages/google-cloud-commerce-consumer-procurement/samples/generated_samples/snippet_metadata_google.cloud.commerce.consumer.procurement.v1alpha1.json +++ b/packages/google-cloud-commerce-consumer-procurement/samples/generated_samples/snippet_metadata_google.cloud.commerce.consumer.procurement.v1alpha1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-commerce-consumer-procurement", - "version": "0.1.0" + "version": "0.2.0" }, "snippets": [ { diff --git a/packages/google-cloud-commerce-consumer-procurement/testing/constraints-3.14.txt b/packages/google-cloud-commerce-consumer-procurement/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-cloud-commerce-consumer-procurement/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-cloud-common/.OwlBot.yaml b/packages/google-cloud-common/.OwlBot.yaml deleted file mode 100644 index fe469acf88b9..000000000000 --- a/packages/google-cloud-common/.OwlBot.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright 2021 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -deep-remove-regex: - - /owl-bot-staging - -deep-copy-regex: - - source: /google/cloud/common/(.*-py) - dest: /owl-bot-staging/google-cloud-common/$1 - -begin-after-commit-hash: 70f7f0525414fe4dfeb2fc2e81546b073f83a621 -api-name: google-cloud-common diff --git a/packages/google-cloud-common/.repo-metadata.json b/packages/google-cloud-common/.repo-metadata.json index 27117343ce58..05b866da8ffe 100644 --- a/packages/google-cloud-common/.repo-metadata.json +++ b/packages/google-cloud-common/.repo-metadata.json @@ -11,4 +11,4 @@ "distribution_name": "google-cloud-common", "default_version": "apiVersion", "api_description": "This package contains generated Python types for google.cloud.common" -} +} \ No newline at end of file diff --git a/packages/google-cloud-common/google/cloud/common/gapic_version.py b/packages/google-cloud-common/google/cloud/common/gapic_version.py index 20a9cd975b02..26b4ad5480ef 100644 --- a/packages/google-cloud-common/google/cloud/common/gapic_version.py +++ b/packages/google-cloud-common/google/cloud/common/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.5.2" # {x-release-please-version} diff --git a/packages/google-cloud-common/noxfile.py b/packages/google-cloud-common/noxfile.py index 2f17bb015ce4..46f68af18258 100644 --- a/packages/google-cloud-common/noxfile.py +++ b/packages/google-cloud-common/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-common/testing/constraints-3.14.txt b/packages/google-cloud-common/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-cloud-common/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-cloud-compute-v1beta/.OwlBot.yaml b/packages/google-cloud-compute-v1beta/.OwlBot.yaml deleted file mode 100644 index f57571139e49..000000000000 --- a/packages/google-cloud-compute-v1beta/.OwlBot.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -deep-remove-regex: - - /owl-bot-staging - -deep-copy-regex: - - source: /google/cloud/compute/(v1beta)/compute-v.*-py - dest: /owl-bot-staging/google-cloud-compute-v1beta/$1 - -begin-after-commit-hash: 70f7f0525414fe4dfeb2fc2e81546b073f83a621 -api-name: google-cloud-compute-v1beta diff --git a/packages/google-cloud-compute-v1beta/.repo-metadata.json b/packages/google-cloud-compute-v1beta/.repo-metadata.json index 3a427d12bde3..9e249a8eb834 100644 --- a/packages/google-cloud-compute-v1beta/.repo-metadata.json +++ b/packages/google-cloud-compute-v1beta/.repo-metadata.json @@ -13,4 +13,4 @@ "default_version": "v1beta", "api_shortname": "compute", "api_description": "delivers virtual machines running in Google's innovative data centers and worldwide fiber network. Compute Engine's tooling and workflow support enable scaling from single instances to global, load-balanced cloud computing. Compute Engine's VMs boot quickly, come with persistent disk storage, deliver consistent performance and are available in many configurations." -} +} \ No newline at end of file diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/accelerator_types/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/accelerator_types/client.py index bd9a90ee81d3..5567a74d564a 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/accelerator_types/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/accelerator_types/client.py @@ -534,9 +534,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the AcceleratorTypesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/accelerator_types/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/accelerator_types/transports/rest.py index 65075b0b9358..c5d2ef49b9b8 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/accelerator_types/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/accelerator_types/transports/rest.py @@ -286,39 +286,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/accelerator_types/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/accelerator_types/transports/rest_base.py index 3222587a0452..e8497730d9f8 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/accelerator_types/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/accelerator_types/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/addresses/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/addresses/client.py index 0f3b4b02df86..127d3d62b47e 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/addresses/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/addresses/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the AddressesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/addresses/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/addresses/transports/rest.py index 9dd5d408c287..6cb4c77355c2 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/addresses/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/addresses/transports/rest.py @@ -544,39 +544,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/addresses/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/addresses/transports/rest_base.py index 4a0b24b94c9d..2ca5887b4410 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/addresses/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/addresses/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -261,7 +264,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseMove: @@ -363,7 +368,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -372,7 +377,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -381,6 +386,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetLabels: @@ -419,7 +425,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -428,7 +434,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -437,6 +443,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -475,7 +482,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -484,7 +491,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -493,6 +500,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/advice/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/advice/client.py index 1cf611e26f9e..5f80067de1f4 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/advice/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/advice/client.py @@ -526,9 +526,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the AdviceTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/advice/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/advice/transports/rest.py index 1fb691daabf5..498c974f5311 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/advice/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/advice/transports/rest.py @@ -173,39 +173,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/advice/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/advice/transports/rest_base.py index d1f175d12cb3..f85b2c5e08c5 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/advice/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/advice/transports/rest_base.py @@ -123,7 +123,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -132,7 +132,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -141,6 +141,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/autoscalers/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/autoscalers/client.py index 0eaa751e038a..ee1f758f2f98 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/autoscalers/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/autoscalers/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the AutoscalersTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/autoscalers/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/autoscalers/transports/rest.py index ee44e31c0981..98cd359fcc73 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/autoscalers/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/autoscalers/transports/rest.py @@ -551,39 +551,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/autoscalers/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/autoscalers/transports/rest_base.py index a894531143c5..2ddc939876c5 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/autoscalers/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/autoscalers/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -261,7 +264,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -363,7 +368,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -372,7 +377,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -381,6 +386,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -419,7 +425,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -428,7 +434,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -437,6 +443,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdate: @@ -475,7 +482,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -484,7 +491,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -493,6 +500,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_buckets/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_buckets/client.py index 65dbea653811..5c82b8579f3f 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_buckets/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_buckets/client.py @@ -532,9 +532,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the BackendBucketsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_buckets/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_buckets/transports/rest.py index f816c0fa2100..5b273133aa08 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_buckets/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_buckets/transports/rest.py @@ -837,39 +837,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_buckets/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_buckets/transports/rest_base.py index c9b38f4f04ee..a08012644ef5 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_buckets/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_buckets/transports/rest_base.py @@ -123,7 +123,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -132,7 +132,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -141,6 +141,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -178,7 +179,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -187,6 +188,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDeleteSignedUrlKey: @@ -226,7 +228,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -235,6 +237,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -272,7 +275,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -281,6 +284,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetIamPolicy: @@ -318,7 +322,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -327,6 +331,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -365,7 +370,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -374,7 +379,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -383,6 +388,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -420,7 +426,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -429,6 +435,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseListUsable: @@ -466,7 +473,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -475,6 +482,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -513,7 +521,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -522,7 +530,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -531,6 +539,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetEdgeSecurityPolicy: @@ -569,7 +578,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -578,7 +587,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -587,6 +596,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetIamPolicy: @@ -625,7 +635,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -634,7 +644,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -643,6 +653,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -681,7 +692,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -690,7 +701,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -699,6 +710,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdate: @@ -737,7 +749,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -746,7 +758,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -755,6 +767,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_services/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_services/client.py index 18ee6462350a..ad8b1c22c6f6 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_services/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_services/client.py @@ -534,9 +534,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the BackendServicesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_services/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_services/transports/rest.py index fc4e002703ae..731aba2d0293 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_services/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_services/transports/rest.py @@ -1072,39 +1072,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_services/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_services/transports/rest_base.py index ca6ab475138d..5e18967b8b61 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_services/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/backend_services/transports/rest_base.py @@ -123,7 +123,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -132,7 +132,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -141,6 +141,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseAggregatedList: @@ -178,7 +179,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -187,6 +188,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDeleteSignedUrlKey: @@ -272,7 +275,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -281,6 +284,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -318,7 +322,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -327,6 +331,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetEffectiveSecurityPolicies: @@ -366,7 +371,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -375,6 +380,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetHealth: @@ -413,7 +419,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -422,7 +428,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -431,6 +437,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetIamPolicy: @@ -468,7 +475,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -477,6 +484,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -515,7 +523,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -524,7 +532,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -533,6 +541,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -570,7 +579,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -579,6 +588,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseListUsable: @@ -616,7 +626,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -625,6 +635,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -663,7 +674,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -672,7 +683,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -681,6 +692,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetEdgeSecurityPolicy: @@ -719,7 +731,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -728,7 +740,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -737,6 +749,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetIamPolicy: @@ -775,7 +788,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -784,7 +797,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -793,6 +806,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetSecurityPolicy: @@ -831,7 +845,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -840,7 +854,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -849,6 +863,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -887,7 +902,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -896,7 +911,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -905,6 +920,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdate: @@ -943,7 +959,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -952,7 +968,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -961,6 +977,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/cross_site_networks/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/cross_site_networks/client.py index f5c578cea7eb..957fdf7d445c 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/cross_site_networks/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/cross_site_networks/client.py @@ -536,9 +536,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the CrossSiteNetworksTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/cross_site_networks/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/cross_site_networks/transports/rest.py index abc883649438..f11b6f1a9861 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/cross_site_networks/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/cross_site_networks/transports/rest.py @@ -387,39 +387,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/cross_site_networks/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/cross_site_networks/transports/rest_base.py index f33a3ceb42c7..9db1753d206a 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/cross_site_networks/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/cross_site_networks/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -215,7 +217,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -317,7 +321,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -326,7 +330,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -335,6 +339,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disk_settings_service/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disk_settings_service/client.py index 5906d097c2f8..daa528545141 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disk_settings_service/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disk_settings_service/client.py @@ -535,9 +535,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the DiskSettingsServiceTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disk_settings_service/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disk_settings_service/transports/rest.py index 6a9801d0292b..de918d3b8441 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disk_settings_service/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disk_settings_service/transports/rest.py @@ -221,39 +221,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disk_settings_service/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disk_settings_service/transports/rest_base.py index 757e68432874..98909e7024b0 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disk_settings_service/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disk_settings_service/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -169,7 +170,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -178,7 +179,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -187,6 +188,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disk_types/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disk_types/client.py index c16eba7bfe4c..e8d901b90c32 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disk_types/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disk_types/client.py @@ -527,9 +527,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the DiskTypesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disk_types/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disk_types/transports/rest.py index e6ab1fb5987d..187f26038cf7 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disk_types/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disk_types/transports/rest.py @@ -275,39 +275,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disk_types/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disk_types/transports/rest_base.py index 044f3090eaa1..fe068150f2d9 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disk_types/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disk_types/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disks/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disks/client.py index 4d4f39e133ad..974b165dbf43 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disks/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disks/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the DisksTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disks/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disks/transports/rest.py index 97ed5918b59a..540c4c86b931 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disks/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disks/transports/rest.py @@ -1142,39 +1142,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disks/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disks/transports/rest_base.py index f0b1a99f1adf..265f16297280 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disks/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/disks/transports/rest_base.py @@ -123,7 +123,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -132,7 +132,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -141,6 +141,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseAggregatedList: @@ -178,7 +179,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -187,6 +188,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseBulkInsert: @@ -225,7 +227,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -234,7 +236,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -243,6 +245,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseBulkSetLabels: @@ -281,7 +284,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -290,7 +293,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -299,6 +302,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseCreateSnapshot: @@ -337,7 +341,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -346,7 +350,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -355,6 +359,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -392,7 +397,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -401,6 +406,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -438,7 +444,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -447,6 +453,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetIamPolicy: @@ -484,7 +491,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -493,6 +500,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -531,7 +539,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -540,7 +548,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -549,6 +557,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -586,7 +595,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -595,6 +604,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseRemoveResourcePolicies: @@ -633,7 +643,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -642,7 +652,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -651,6 +661,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseResize: @@ -689,7 +700,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -698,7 +709,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -707,6 +718,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetIamPolicy: @@ -745,7 +757,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -754,7 +766,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -763,6 +775,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetLabels: @@ -801,7 +814,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -810,7 +823,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -819,6 +832,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseStartAsyncReplication: @@ -857,7 +871,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -866,7 +880,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -875,6 +889,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseStopAsyncReplication: @@ -912,7 +927,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -921,6 +936,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseStopGroupAsyncReplication: @@ -959,7 +975,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -968,7 +984,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -977,6 +993,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -1015,7 +1032,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1024,7 +1041,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1033,6 +1050,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdate: @@ -1071,7 +1089,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1080,7 +1098,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1089,6 +1107,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/external_vpn_gateways/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/external_vpn_gateways/client.py index 29ca3786fc74..8411e6c2f1dc 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/external_vpn_gateways/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/external_vpn_gateways/client.py @@ -536,9 +536,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the ExternalVpnGatewaysTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/external_vpn_gateways/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/external_vpn_gateways/transports/rest.py index f3398c036aa6..8f8252cb09db 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/external_vpn_gateways/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/external_vpn_gateways/transports/rest.py @@ -449,39 +449,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/external_vpn_gateways/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/external_vpn_gateways/transports/rest_base.py index 337688e9e80a..73ca876391f9 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/external_vpn_gateways/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/external_vpn_gateways/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -215,7 +217,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetLabels: @@ -317,7 +321,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -326,7 +330,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -335,6 +339,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -373,7 +378,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -382,7 +387,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -391,6 +396,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/firewall_policies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/firewall_policies/client.py index 64d8ce6cab09..043c1b4b25ee 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/firewall_policies/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/firewall_policies/client.py @@ -534,9 +534,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the FirewallPoliciesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/firewall_policies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/firewall_policies/transports/rest.py index 6433e8e498c7..ab4214178538 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/firewall_policies/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/firewall_policies/transports/rest.py @@ -1339,39 +1339,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/firewall_policies/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/firewall_policies/transports/rest_base.py index cc00ab43e356..31b423e7cba8 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/firewall_policies/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/firewall_policies/transports/rest_base.py @@ -123,7 +123,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -132,7 +132,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -141,6 +141,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseAddPacketMirroringRule: @@ -179,7 +180,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -188,7 +189,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -197,6 +198,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseAddRule: @@ -235,7 +237,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -244,7 +246,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -253,6 +255,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseCloneRules: @@ -290,7 +293,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -299,6 +302,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -336,7 +340,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -345,6 +349,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -382,7 +387,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -391,6 +396,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetAssociation: @@ -428,7 +434,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -437,6 +443,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetIamPolicy: @@ -474,7 +481,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -483,6 +490,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetPacketMirroringRule: @@ -520,7 +528,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -529,6 +537,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetRule: @@ -566,7 +575,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -575,6 +584,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -615,7 +625,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -624,7 +634,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -633,6 +643,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -660,10 +671,11 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseListAssociations: @@ -691,10 +703,11 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseMove: @@ -734,7 +747,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -743,6 +756,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -781,7 +795,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -790,7 +804,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -799,6 +813,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatchPacketMirroringRule: @@ -839,7 +854,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -848,7 +863,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -857,6 +872,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatchRule: @@ -895,7 +911,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -904,7 +920,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -913,6 +929,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseRemoveAssociation: @@ -950,7 +967,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -959,6 +976,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseRemovePacketMirroringRule: @@ -998,7 +1016,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1007,6 +1025,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseRemoveRule: @@ -1044,7 +1063,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1053,6 +1072,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetIamPolicy: @@ -1091,7 +1111,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1100,7 +1120,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1109,6 +1129,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -1147,7 +1168,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1156,7 +1177,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1165,6 +1186,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/firewalls/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/firewalls/client.py index f45e5f1b29e8..7eb247f6c1fc 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/firewalls/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/firewalls/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the FirewallsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/firewalls/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/firewalls/transports/rest.py index ad0cf252c5da..fe3f699d2bc8 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/firewalls/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/firewalls/transports/rest.py @@ -486,39 +486,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/firewalls/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/firewalls/transports/rest_base.py index aab72cca15c6..bb5927ebc90a 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/firewalls/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/firewalls/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -215,7 +217,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -317,7 +321,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -326,7 +330,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -335,6 +339,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -373,7 +378,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -382,7 +387,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -391,6 +396,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdate: @@ -429,7 +435,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -438,7 +444,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -447,6 +453,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/forwarding_rules/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/forwarding_rules/client.py index 479a4205972a..8c557af8d66e 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/forwarding_rules/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/forwarding_rules/client.py @@ -534,9 +534,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the ForwardingRulesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/forwarding_rules/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/forwarding_rules/transports/rest.py index cc2b539afa9f..39566ba8f1c0 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/forwarding_rules/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/forwarding_rules/transports/rest.py @@ -613,39 +613,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/forwarding_rules/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/forwarding_rules/transports/rest_base.py index 5511e791c3a7..1fad9022d7bd 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/forwarding_rules/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/forwarding_rules/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -261,7 +264,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -363,7 +368,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -372,7 +377,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -381,6 +386,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetLabels: @@ -419,7 +425,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -428,7 +434,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -437,6 +443,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetTarget: @@ -475,7 +482,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -484,7 +491,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -493,6 +500,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -531,7 +539,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -540,7 +548,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -549,6 +557,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/future_reservations/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/future_reservations/client.py index dc410de92330..18c232ae880d 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/future_reservations/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/future_reservations/client.py @@ -536,9 +536,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the FutureReservationsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/future_reservations/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/future_reservations/transports/rest.py index cbb11f707232..a26f1ef301de 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/future_reservations/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/future_reservations/transports/rest.py @@ -505,39 +505,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/future_reservations/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/future_reservations/transports/rest_base.py index 5579180b43fb..455325403c52 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/future_reservations/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/future_reservations/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseCancel: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -260,7 +263,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -269,6 +272,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -307,7 +311,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -362,7 +367,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -371,6 +376,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdate: @@ -409,7 +415,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -418,7 +424,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -427,6 +433,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_addresses/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_addresses/client.py index 5afbf74d9202..4a2e5a6e6f01 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_addresses/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_addresses/client.py @@ -534,9 +534,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the GlobalAddressesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_addresses/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_addresses/transports/rest.py index eef336bc5028..a1dce911440c 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_addresses/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_addresses/transports/rest.py @@ -498,39 +498,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_addresses/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_addresses/transports/rest_base.py index 1a3a3d616992..5f0b1f2d0825 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_addresses/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_addresses/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -215,7 +217,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseMove: @@ -317,7 +321,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -326,7 +330,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -335,6 +339,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetLabels: @@ -373,7 +378,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -382,7 +387,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -391,6 +396,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -429,7 +435,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -438,7 +444,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -447,6 +453,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_forwarding_rules/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_forwarding_rules/client.py index 39f0f5801f7a..0c5b7883078f 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_forwarding_rules/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_forwarding_rules/client.py @@ -538,9 +538,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the GlobalForwardingRulesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_forwarding_rules/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_forwarding_rules/transports/rest.py index fbe6fda2cfac..14cb8c9f62ee 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_forwarding_rules/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_forwarding_rules/transports/rest.py @@ -560,39 +560,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_forwarding_rules/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_forwarding_rules/transports/rest_base.py index 9c61c364dfa8..bb2f2cd79b63 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_forwarding_rules/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_forwarding_rules/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -215,7 +217,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -317,7 +321,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -326,7 +330,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -335,6 +339,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetLabels: @@ -373,7 +378,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -382,7 +387,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -391,6 +396,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetTarget: @@ -429,7 +435,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -438,7 +444,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -447,6 +453,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -487,7 +494,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -496,7 +503,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -505,6 +512,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_network_endpoint_groups/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_network_endpoint_groups/client.py index e9e66ddada43..902ef665c644 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_network_endpoint_groups/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_network_endpoint_groups/client.py @@ -540,9 +540,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the GlobalNetworkEndpointGroupsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_network_endpoint_groups/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_network_endpoint_groups/transports/rest.py index 74db104f1522..86219f44bc75 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_network_endpoint_groups/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_network_endpoint_groups/transports/rest.py @@ -517,39 +517,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_network_endpoint_groups/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_network_endpoint_groups/transports/rest_base.py index cfe2e57d7d4a..d0dd59db49c1 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_network_endpoint_groups/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_network_endpoint_groups/transports/rest_base.py @@ -129,7 +129,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -138,7 +138,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -147,6 +147,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -184,7 +185,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -193,6 +194,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDetachNetworkEndpoints: @@ -235,7 +237,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -244,7 +246,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -253,6 +255,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -290,7 +293,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -299,6 +302,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -337,7 +341,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -346,7 +350,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -355,6 +359,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -392,7 +397,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -401,6 +406,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseListNetworkEndpoints: @@ -442,7 +448,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -451,6 +457,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_operations/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_operations/client.py index aa33f45379d0..6218181a8d0d 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_operations/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_operations/client.py @@ -531,9 +531,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the GlobalOperationsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_operations/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_operations/transports/rest.py index b5f44b81c909..f7c8ad272040 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_operations/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_operations/transports/rest.py @@ -394,39 +394,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_operations/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_operations/transports/rest_base.py index 38d273b7a087..6556456de8a5 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_operations/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_operations/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -260,7 +263,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -269,6 +272,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseWait: @@ -306,7 +310,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -315,6 +319,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_organization_operations/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_organization_operations/client.py index daf0ac4a54a7..046e0820341d 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_organization_operations/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_organization_operations/client.py @@ -537,9 +537,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the GlobalOrganizationOperationsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_organization_operations/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_organization_operations/transports/rest.py index 990af2bf108d..b5510616fa7e 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_organization_operations/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_organization_operations/transports/rest.py @@ -287,39 +287,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_organization_operations/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_organization_operations/transports/rest_base.py index 63e112069f45..79d3b6f03786 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_organization_operations/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_organization_operations/transports/rest_base.py @@ -124,7 +124,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -133,6 +133,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -170,7 +171,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -179,6 +180,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -206,10 +208,11 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_public_delegated_prefixes/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_public_delegated_prefixes/client.py index 8b560a497b7e..08c796773b04 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_public_delegated_prefixes/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_public_delegated_prefixes/client.py @@ -540,9 +540,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the GlobalPublicDelegatedPrefixesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_public_delegated_prefixes/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_public_delegated_prefixes/transports/rest.py index 70e4bd4e7d26..6c0dda3421c8 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_public_delegated_prefixes/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_public_delegated_prefixes/transports/rest.py @@ -398,39 +398,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_public_delegated_prefixes/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_public_delegated_prefixes/transports/rest_base.py index 0fa01ae3cd99..3d3ae23f8199 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_public_delegated_prefixes/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/global_public_delegated_prefixes/transports/rest_base.py @@ -124,7 +124,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -133,6 +133,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -170,7 +171,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -179,6 +180,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -217,7 +219,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -226,7 +228,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -235,6 +237,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -272,7 +275,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -281,6 +284,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -319,7 +323,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -328,7 +332,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -337,6 +341,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/health_checks/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/health_checks/client.py index d236715dab11..4c3fdccaef93 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/health_checks/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/health_checks/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the HealthChecksTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/health_checks/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/health_checks/transports/rest.py index b8e16fb66698..ca4065249295 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/health_checks/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/health_checks/transports/rest.py @@ -555,39 +555,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/health_checks/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/health_checks/transports/rest_base.py index ff2cb0ea2ca8..56b51adf0364 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/health_checks/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/health_checks/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -261,7 +264,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -363,7 +368,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -372,7 +377,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -381,6 +386,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -419,7 +425,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -428,7 +434,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -437,6 +443,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdate: @@ -475,7 +482,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -484,7 +491,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -493,6 +500,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/image_family_views/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/image_family_views/client.py index b00220244089..1f1ba1011a54 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/image_family_views/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/image_family_views/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the ImageFamilyViewsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/image_family_views/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/image_family_views/transports/rest.py index 6010b6a2311a..1201991408be 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/image_family_views/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/image_family_views/transports/rest.py @@ -169,39 +169,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/image_family_views/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/image_family_views/transports/rest_base.py index a61f2b6b002b..841482c3c39f 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/image_family_views/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/image_family_views/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/images/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/images/client.py index d3b38d841ef8..281ddd21e794 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/images/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/images/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the ImagesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/images/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/images/transports/rest.py index f0ade063ecfe..7027749acd28 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/images/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/images/transports/rest.py @@ -695,39 +695,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/images/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/images/transports/rest_base.py index 11da78890c25..53e8c320855d 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/images/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/images/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDeprecate: @@ -169,7 +170,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -178,7 +179,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -187,6 +188,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetFromFamily: @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetIamPolicy: @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -363,7 +368,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -372,7 +377,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -381,6 +386,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -418,7 +424,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -427,6 +433,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -465,7 +472,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -474,7 +481,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -483,6 +490,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetIamPolicy: @@ -521,7 +529,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -530,7 +538,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -539,6 +547,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetLabels: @@ -577,7 +586,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -586,7 +595,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -595,6 +604,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -633,7 +643,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -642,7 +652,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -651,6 +661,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_manager_resize_requests/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_manager_resize_requests/client.py index c4c59c0d934f..55ffc55386bf 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_manager_resize_requests/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_manager_resize_requests/client.py @@ -547,9 +547,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the InstanceGroupManagerResizeRequestsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_manager_resize_requests/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_manager_resize_requests/transports/rest.py index 56d21e2bcde6..05de5857ea32 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_manager_resize_requests/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_manager_resize_requests/transports/rest.py @@ -402,39 +402,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_manager_resize_requests/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_manager_resize_requests/transports/rest_base.py index ebca6e45d716..f12d0d8fa1f8 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_manager_resize_requests/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_manager_resize_requests/transports/rest_base.py @@ -126,7 +126,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -135,6 +135,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -174,7 +175,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -183,6 +184,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -220,7 +222,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -229,6 +231,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -269,7 +272,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -278,7 +281,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -287,6 +290,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -326,7 +330,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -335,6 +339,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_managers/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_managers/client.py index 7e1ddde54752..9c473d8ad247 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_managers/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_managers/client.py @@ -538,9 +538,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the InstanceGroupManagersTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_managers/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_managers/transports/rest.py index 0165e6628eab..804fa8d1bfd4 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_managers/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_managers/transports/rest.py @@ -1696,39 +1696,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_managers/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_managers/transports/rest_base.py index d4ced53d4543..32931a850dba 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_managers/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_group_managers/transports/rest_base.py @@ -123,7 +123,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -132,7 +132,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -141,6 +141,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseAggregatedList: @@ -178,7 +179,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -187,6 +188,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseApplyUpdatesToInstances: @@ -227,7 +229,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -236,7 +238,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -245,6 +247,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseCreateInstances: @@ -283,7 +286,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -292,7 +295,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -301,6 +304,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -338,7 +342,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -347,6 +351,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDeleteInstances: @@ -385,7 +390,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -394,7 +399,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -403,6 +408,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDeletePerInstanceConfigs: @@ -443,7 +449,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -452,7 +458,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -461,6 +467,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -498,7 +505,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -507,6 +514,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -545,7 +553,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -554,7 +562,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -563,6 +571,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -600,7 +609,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -609,6 +618,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseListErrors: @@ -646,7 +656,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -655,6 +665,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseListManagedInstances: @@ -694,7 +705,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -703,6 +714,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseListPerInstanceConfigs: @@ -742,7 +754,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -751,6 +763,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -789,7 +802,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -798,7 +811,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -807,6 +820,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatchPerInstanceConfigs: @@ -847,7 +861,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -856,7 +870,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -865,6 +879,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseRecreateInstances: @@ -905,7 +920,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -914,7 +929,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -923,6 +938,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseResize: @@ -962,7 +978,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -971,6 +987,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseResizeAdvanced: @@ -1009,7 +1026,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1018,7 +1035,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1027,6 +1044,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseResumeInstances: @@ -1065,7 +1083,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1074,7 +1092,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1083,6 +1101,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetAutoHealingPolicies: @@ -1123,7 +1142,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1132,7 +1151,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1141,6 +1160,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetInstanceTemplate: @@ -1181,7 +1201,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1190,7 +1210,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1199,6 +1219,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetTargetPools: @@ -1237,7 +1258,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1246,7 +1267,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1255,6 +1276,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseStartInstances: @@ -1293,7 +1315,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1302,7 +1324,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1311,6 +1333,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseStopInstances: @@ -1349,7 +1372,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1358,7 +1381,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1367,6 +1390,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSuspendInstances: @@ -1405,7 +1429,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1414,7 +1438,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1423,6 +1447,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -1463,7 +1488,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1472,7 +1497,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1481,6 +1506,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdate: @@ -1519,7 +1545,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1528,7 +1554,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1537,6 +1563,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdatePerInstanceConfigs: @@ -1577,7 +1604,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1586,7 +1613,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1595,6 +1622,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_groups/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_groups/client.py index 23530bd688f2..7a308b515185 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_groups/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_groups/client.py @@ -532,9 +532,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the InstanceGroupsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_groups/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_groups/transports/rest.py index 36cd724ff1e2..62a65bf92399 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_groups/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_groups/transports/rest.py @@ -675,39 +675,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_groups/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_groups/transports/rest_base.py index b8b91a665f19..ede93c8a3335 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_groups/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_groups/transports/rest_base.py @@ -123,7 +123,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -132,7 +132,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -141,6 +141,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseAggregatedList: @@ -178,7 +179,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -187,6 +188,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -317,7 +321,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -326,7 +330,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -335,6 +339,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -372,7 +377,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -381,6 +386,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseListInstances: @@ -419,7 +425,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -428,7 +434,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -437,6 +443,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseRemoveInstances: @@ -475,7 +482,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -484,7 +491,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -493,6 +500,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetNamedPorts: @@ -531,7 +539,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -540,7 +548,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -549,6 +557,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -587,7 +596,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -596,7 +605,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -605,6 +614,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_settings_service/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_settings_service/client.py index 99eaa2bf2f59..f9f4fddc9aa2 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_settings_service/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_settings_service/client.py @@ -537,9 +537,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the InstanceSettingsServiceTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_settings_service/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_settings_service/transports/rest.py index 687029995adf..8931c715960a 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_settings_service/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_settings_service/transports/rest.py @@ -223,39 +223,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_settings_service/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_settings_service/transports/rest_base.py index ba76d206f936..378a1beb4f6c 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_settings_service/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_settings_service/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -169,7 +170,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -178,7 +179,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -187,6 +188,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_templates/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_templates/client.py index 03816e1011a5..94e2ff134264 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_templates/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_templates/client.py @@ -536,9 +536,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the InstanceTemplatesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_templates/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_templates/transports/rest.py index fcca0fffc6f9..216e10d6737e 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_templates/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_templates/transports/rest.py @@ -561,39 +561,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_templates/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_templates/transports/rest_base.py index 4e88c31e4336..c3573870639c 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_templates/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instance_templates/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetIamPolicy: @@ -260,7 +263,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -269,6 +272,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -307,7 +311,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -362,7 +367,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -371,6 +376,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetIamPolicy: @@ -409,7 +415,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -418,7 +424,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -427,6 +433,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -465,7 +472,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -474,7 +481,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -483,6 +490,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instances/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instances/client.py index d2de2fdf5125..e359cef5f70a 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instances/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instances/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the InstancesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instances/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instances/transports/rest.py index ebb128513904..02a96df6ddba 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instances/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instances/transports/rest.py @@ -3222,39 +3222,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instances/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instances/transports/rest_base.py index d7b913eaa810..c8d4c4dfe716 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instances/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instances/transports/rest_base.py @@ -125,7 +125,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -134,7 +134,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -143,6 +143,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseAddNetworkInterface: @@ -181,7 +182,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -190,7 +191,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -199,6 +200,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseAddResourcePolicies: @@ -237,7 +239,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -246,7 +248,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -255,6 +257,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseAggregatedList: @@ -292,7 +295,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -301,6 +304,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseAttachDisk: @@ -339,7 +343,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -348,7 +352,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -357,6 +361,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseBulkInsert: @@ -395,7 +400,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -404,7 +409,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -413,6 +418,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -450,7 +456,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -459,6 +465,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDeleteAccessConfig: @@ -499,7 +506,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -508,6 +515,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDeleteNetworkInterface: @@ -547,7 +555,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -556,6 +564,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDetachDisk: @@ -595,7 +604,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -604,6 +613,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -641,7 +651,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -650,6 +660,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetEffectiveFirewalls: @@ -689,7 +700,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -698,6 +709,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetGuestAttributes: @@ -735,7 +747,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -744,6 +756,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetIamPolicy: @@ -781,7 +794,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -790,6 +803,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetPartnerMetadata: @@ -827,7 +841,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -836,6 +850,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetScreenshot: @@ -873,7 +888,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -882,6 +897,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetSerialPortOutput: @@ -919,7 +935,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -928,6 +944,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetShieldedInstanceIdentity: @@ -965,7 +982,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -974,6 +991,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetShieldedVmIdentity: @@ -1011,7 +1029,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1020,6 +1038,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -1058,7 +1077,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1067,7 +1086,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1076,6 +1095,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -1113,7 +1133,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1122,6 +1142,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseListReferrers: @@ -1159,7 +1180,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1168,6 +1189,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatchPartnerMetadata: @@ -1206,7 +1228,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1215,7 +1237,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1224,6 +1246,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePerformMaintenance: @@ -1261,7 +1284,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1270,6 +1293,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseRemoveResourcePolicies: @@ -1308,7 +1332,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1317,7 +1341,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1326,6 +1350,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseReportHostAsFaulty: @@ -1364,7 +1389,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1373,7 +1398,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1382,6 +1407,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseReset: @@ -1419,7 +1445,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1428,6 +1454,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseResume: @@ -1466,7 +1493,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1475,7 +1502,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1484,6 +1511,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSendDiagnosticInterrupt: @@ -1521,7 +1549,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1530,6 +1558,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetDeletionProtection: @@ -1567,7 +1596,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1576,6 +1605,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetDiskAutoDelete: @@ -1616,7 +1646,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1625,6 +1655,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetIamPolicy: @@ -1663,7 +1694,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1672,7 +1703,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1681,6 +1712,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetLabels: @@ -1719,7 +1751,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1728,7 +1760,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1737,6 +1769,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetMachineResources: @@ -1775,7 +1808,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1784,7 +1817,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1793,6 +1826,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetMachineType: @@ -1831,7 +1865,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1840,7 +1874,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1849,6 +1883,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetMetadata: @@ -1887,7 +1922,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1896,7 +1931,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1905,6 +1940,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetMinCpuPlatform: @@ -1943,7 +1979,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1952,7 +1988,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1961,6 +1997,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetName: @@ -1999,7 +2036,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -2008,7 +2045,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -2017,6 +2054,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetScheduling: @@ -2055,7 +2093,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -2064,7 +2102,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -2073,6 +2111,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetSecurityPolicy: @@ -2111,7 +2150,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -2120,7 +2159,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -2129,6 +2168,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetServiceAccount: @@ -2167,7 +2207,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -2176,7 +2216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -2185,6 +2225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetShieldedInstanceIntegrityPolicy: @@ -2225,7 +2266,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -2234,7 +2275,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -2243,6 +2284,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetShieldedVmIntegrityPolicy: @@ -2281,7 +2323,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -2290,7 +2332,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -2299,6 +2341,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetTags: @@ -2337,7 +2380,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -2346,7 +2389,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -2355,6 +2398,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSimulateMaintenanceEvent: @@ -2392,7 +2436,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -2401,6 +2445,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseStart: @@ -2438,7 +2483,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -2447,6 +2492,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseStartWithEncryptionKey: @@ -2485,7 +2531,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -2494,7 +2540,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -2503,6 +2549,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseStop: @@ -2540,7 +2587,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -2549,6 +2596,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSuspend: @@ -2586,7 +2634,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -2595,6 +2643,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -2633,7 +2682,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -2642,7 +2691,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -2651,6 +2700,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdate: @@ -2689,7 +2739,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -2698,7 +2748,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -2707,6 +2757,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdateAccessConfig: @@ -2747,7 +2798,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -2756,7 +2807,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -2765,6 +2816,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdateDisplayDevice: @@ -2803,7 +2855,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -2812,7 +2864,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -2821,6 +2873,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdateNetworkInterface: @@ -2861,7 +2914,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -2870,7 +2923,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -2879,6 +2932,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdateShieldedInstanceConfig: @@ -2917,7 +2971,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -2926,7 +2980,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -2935,6 +2989,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdateShieldedVmConfig: @@ -2973,7 +3028,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -2982,7 +3037,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -2991,6 +3046,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instant_snapshots/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instant_snapshots/client.py index 2606ef23379b..22b3fe2b5297 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instant_snapshots/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instant_snapshots/client.py @@ -534,9 +534,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the InstantSnapshotsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instant_snapshots/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instant_snapshots/transports/rest.py index 00d19dd36be7..b4f47d3b629e 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instant_snapshots/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instant_snapshots/transports/rest.py @@ -615,39 +615,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instant_snapshots/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instant_snapshots/transports/rest_base.py index cb6e3e027b3e..0976ba73b528 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instant_snapshots/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/instant_snapshots/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetIamPolicy: @@ -260,7 +263,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -269,6 +272,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -307,7 +311,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -362,7 +367,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -371,6 +376,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetIamPolicy: @@ -409,7 +415,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -418,7 +424,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -427,6 +433,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetLabels: @@ -465,7 +472,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -474,7 +481,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -483,6 +490,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -521,7 +529,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -530,7 +538,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -539,6 +547,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_attachment_groups/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_attachment_groups/client.py index 441f332cb099..f9f1d71ac5a3 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_attachment_groups/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_attachment_groups/client.py @@ -540,9 +540,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the InterconnectAttachmentGroupsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_attachment_groups/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_attachment_groups/transports/rest.py index ad25fb98fae1..435b550fa05a 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_attachment_groups/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_attachment_groups/transports/rest.py @@ -630,39 +630,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_attachment_groups/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_attachment_groups/transports/rest_base.py index 039cc3f7df3c..e398761b6c4e 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_attachment_groups/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_attachment_groups/transports/rest_base.py @@ -124,7 +124,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -133,6 +133,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -170,7 +171,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -179,6 +180,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetIamPolicy: @@ -218,7 +220,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -227,6 +229,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetOperationalStatus: @@ -268,7 +271,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -277,6 +280,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -315,7 +319,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -324,7 +328,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -333,6 +337,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -370,7 +375,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -379,6 +384,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -417,7 +423,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -426,7 +432,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -435,6 +441,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetIamPolicy: @@ -475,7 +482,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -484,7 +491,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -493,6 +500,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -533,7 +541,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -542,7 +550,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -551,6 +559,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_attachments/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_attachments/client.py index 81378cad6d74..564a7839998c 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_attachments/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_attachments/client.py @@ -538,9 +538,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the InterconnectAttachmentsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_attachments/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_attachments/transports/rest.py index 8d160f0cdd7d..38eb47cb57bf 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_attachments/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_attachments/transports/rest.py @@ -570,39 +570,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_attachments/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_attachments/transports/rest_base.py index 062fc3efeb9e..7db36fa27f9e 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_attachments/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_attachments/transports/rest_base.py @@ -124,7 +124,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -133,6 +133,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -170,7 +171,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -179,6 +180,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -216,7 +218,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -225,6 +227,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -263,7 +266,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -272,7 +275,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -281,6 +284,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -318,7 +322,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -327,6 +331,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -365,7 +370,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -374,7 +379,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -383,6 +388,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetLabels: @@ -421,7 +427,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -430,7 +436,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -439,6 +445,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -479,7 +486,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -488,7 +495,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -497,6 +504,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_groups/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_groups/client.py index dab2e7baa524..59525818feee 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_groups/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_groups/client.py @@ -536,9 +536,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the InterconnectGroupsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_groups/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_groups/transports/rest.py index 5ade556c7945..3288ff4ad697 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_groups/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_groups/transports/rest.py @@ -675,39 +675,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_groups/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_groups/transports/rest_base.py index 9dfaf69e6407..f47b7b29aea9 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_groups/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_groups/transports/rest_base.py @@ -123,7 +123,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -132,7 +132,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -141,6 +141,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -178,7 +179,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -187,6 +188,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetIamPolicy: @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetOperationalStatus: @@ -318,7 +322,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -327,6 +331,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -365,7 +370,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -374,7 +379,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -383,6 +388,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -420,7 +426,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -429,6 +435,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -467,7 +474,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -476,7 +483,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -485,6 +492,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetIamPolicy: @@ -523,7 +531,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -532,7 +540,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -541,6 +549,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -579,7 +588,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -588,7 +597,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -597,6 +606,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_locations/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_locations/client.py index a8090ad3fb20..dfce3f08edc4 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_locations/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_locations/client.py @@ -535,9 +535,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the InterconnectLocationsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_locations/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_locations/transports/rest.py index f645c5075acc..be8b326580bd 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_locations/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_locations/transports/rest.py @@ -230,39 +230,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_locations/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_locations/transports/rest_base.py index 7917ea5cbc3e..f6861569508b 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_locations/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_locations/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_remote_locations/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_remote_locations/client.py index a98bea0070ed..ac45a47b5ff2 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_remote_locations/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_remote_locations/client.py @@ -537,9 +537,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the InterconnectRemoteLocationsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_remote_locations/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_remote_locations/transports/rest.py index 397a4f118d32..b826b986ceb8 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_remote_locations/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_remote_locations/transports/rest.py @@ -235,39 +235,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_remote_locations/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_remote_locations/transports/rest_base.py index 882d2e37b54e..e7dbbefe1a44 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_remote_locations/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnect_remote_locations/transports/rest_base.py @@ -124,7 +124,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -133,6 +133,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -170,7 +171,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -179,6 +180,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnects/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnects/client.py index 4aaf9220579c..193b56266b3f 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnects/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnects/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the InterconnectsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnects/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnects/transports/rest.py index aa8d0bf12dbc..213694c396be 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnects/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnects/transports/rest.py @@ -616,39 +616,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnects/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnects/transports/rest_base.py index 992ba36f98b4..ac743a0bd604 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnects/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/interconnects/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetDiagnostics: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetMacsecConfig: @@ -260,7 +263,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -269,6 +272,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -307,7 +311,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -362,7 +367,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -371,6 +376,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -409,7 +415,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -418,7 +424,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -427,6 +433,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetLabels: @@ -465,7 +472,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -474,7 +481,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -483,6 +490,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -521,7 +529,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -530,7 +538,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -539,6 +547,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/license_codes/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/license_codes/client.py index 2c1cd07dd982..83bea878c060 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/license_codes/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/license_codes/client.py @@ -526,9 +526,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the LicenseCodesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/license_codes/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/license_codes/transports/rest.py index c2e8b51ade5a..6fbf25404c23 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/license_codes/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/license_codes/transports/rest.py @@ -226,39 +226,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/license_codes/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/license_codes/transports/rest_base.py index d05226efc402..980fc4c26da1 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/license_codes/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/license_codes/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -169,7 +170,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -178,7 +179,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -187,6 +188,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/licenses/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/licenses/client.py index ce2b9b44690a..55d4310b36e5 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/licenses/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/licenses/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the LicensesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/licenses/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/licenses/transports/rest.py index fa17f37d770b..9c716b9370c3 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/licenses/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/licenses/transports/rest.py @@ -544,39 +544,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/licenses/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/licenses/transports/rest_base.py index cd1f073da7c2..9a37a3b67b07 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/licenses/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/licenses/transports/rest_base.py @@ -124,7 +124,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -133,6 +133,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -172,7 +173,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -181,6 +182,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetIamPolicy: @@ -218,7 +220,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -227,6 +229,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -265,7 +268,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -274,7 +277,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -283,6 +286,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -320,7 +324,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -329,6 +333,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetIamPolicy: @@ -367,7 +372,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -376,7 +381,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -385,6 +390,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -423,7 +429,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -432,7 +438,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -441,6 +447,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdate: @@ -481,7 +488,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -490,7 +497,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -499,6 +506,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/machine_images/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/machine_images/client.py index 07cefd71e775..438b59d4e7c5 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/machine_images/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/machine_images/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the MachineImagesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/machine_images/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/machine_images/transports/rest.py index a3714d81f828..f3837609f44f 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/machine_images/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/machine_images/transports/rest.py @@ -550,39 +550,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/machine_images/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/machine_images/transports/rest_base.py index 49a19f400c0b..841ca0950d41 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/machine_images/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/machine_images/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetIamPolicy: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -261,7 +264,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetIamPolicy: @@ -363,7 +368,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -372,7 +377,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -381,6 +386,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetLabels: @@ -419,7 +425,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -428,7 +434,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -437,6 +443,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -475,7 +482,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -484,7 +491,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -493,6 +500,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/machine_types/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/machine_types/client.py index 9a74b3ecf8e3..feb7a3227fc5 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/machine_types/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/machine_types/client.py @@ -527,9 +527,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the MachineTypesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/machine_types/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/machine_types/transports/rest.py index 680c61c8bb82..0241871ee7e6 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/machine_types/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/machine_types/transports/rest.py @@ -280,39 +280,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/machine_types/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/machine_types/transports/rest_base.py index b11555273ee8..aa9965c70627 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/machine_types/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/machine_types/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_attachments/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_attachments/client.py index 63bef28652b9..91b6eedb7038 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_attachments/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_attachments/client.py @@ -536,9 +536,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the NetworkAttachmentsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_attachments/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_attachments/transports/rest.py index ff21f7610fc4..eee38dbf73d6 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_attachments/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_attachments/transports/rest.py @@ -617,39 +617,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_attachments/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_attachments/transports/rest_base.py index 2975344ebb7e..2f7aa83aef37 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_attachments/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_attachments/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetIamPolicy: @@ -260,7 +263,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -269,6 +272,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -307,7 +311,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -362,7 +367,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -371,6 +376,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -409,7 +415,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -418,7 +424,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -427,6 +433,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetIamPolicy: @@ -465,7 +472,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -474,7 +481,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -483,6 +490,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -521,7 +529,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -530,7 +538,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -539,6 +547,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_edge_security_services/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_edge_security_services/client.py index c307b264df59..5a2e9c98b933 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_edge_security_services/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_edge_security_services/client.py @@ -540,9 +540,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the NetworkEdgeSecurityServicesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_edge_security_services/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_edge_security_services/transports/rest.py index 201beb1823a5..21ceca957b11 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_edge_security_services/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_edge_security_services/transports/rest.py @@ -401,39 +401,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_edge_security_services/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_edge_security_services/transports/rest_base.py index 840e1075b6c0..0416ab70c82f 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_edge_security_services/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_edge_security_services/transports/rest_base.py @@ -126,7 +126,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -135,6 +135,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -172,7 +173,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -181,6 +182,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -218,7 +220,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -227,6 +229,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -265,7 +268,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -274,7 +277,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -283,6 +286,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -321,7 +325,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -330,7 +334,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -339,6 +343,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_endpoint_groups/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_endpoint_groups/client.py index 1e7f9fc1f251..9057e1dc5093 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_endpoint_groups/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_endpoint_groups/client.py @@ -538,9 +538,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the NetworkEndpointGroupsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_endpoint_groups/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_endpoint_groups/transports/rest.py index ec329f70cd7d..6f2ca19e01f9 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_endpoint_groups/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_endpoint_groups/transports/rest.py @@ -633,39 +633,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_endpoint_groups/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_endpoint_groups/transports/rest_base.py index 06416dc2f97a..4a2771e84dea 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_endpoint_groups/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_endpoint_groups/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseAttachNetworkEndpoints: @@ -171,7 +172,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -180,7 +181,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -189,6 +190,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -226,7 +228,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -235,6 +237,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDetachNetworkEndpoints: @@ -275,7 +278,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -284,7 +287,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -293,6 +296,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -330,7 +334,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -339,6 +343,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -377,7 +382,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -386,7 +391,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -395,6 +400,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -432,7 +438,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -441,6 +447,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseListNetworkEndpoints: @@ -481,7 +488,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -490,7 +497,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -499,6 +506,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -539,7 +547,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -548,7 +556,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -557,6 +565,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_firewall_policies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_firewall_policies/client.py index 950aed5d0eef..9c21a9642cca 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_firewall_policies/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_firewall_policies/client.py @@ -538,9 +538,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the NetworkFirewallPoliciesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_firewall_policies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_firewall_policies/transports/rest.py index 145f68e04893..db558c3020ed 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_firewall_policies/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_firewall_policies/transports/rest.py @@ -1294,39 +1294,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_firewall_policies/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_firewall_policies/transports/rest_base.py index 822c912283a9..d0b09e6db597 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_firewall_policies/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_firewall_policies/transports/rest_base.py @@ -123,7 +123,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -132,7 +132,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -141,6 +141,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseAddPacketMirroringRule: @@ -181,7 +182,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -190,7 +191,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -199,6 +200,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseAddRule: @@ -237,7 +239,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -246,7 +248,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -255,6 +257,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseAggregatedList: @@ -294,7 +297,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -303,6 +306,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseCloneRules: @@ -340,7 +344,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -349,6 +353,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -386,7 +391,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -395,6 +400,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -432,7 +438,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -441,6 +447,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetAssociation: @@ -478,7 +485,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -487,6 +494,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetIamPolicy: @@ -524,7 +532,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -533,6 +541,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetPacketMirroringRule: @@ -572,7 +581,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -581,6 +590,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetRule: @@ -618,7 +628,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -627,6 +637,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -665,7 +676,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -674,7 +685,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -683,6 +694,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -720,7 +732,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -729,6 +741,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -767,7 +780,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -776,7 +789,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -785,6 +798,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatchPacketMirroringRule: @@ -825,7 +839,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -834,7 +848,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -843,6 +857,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatchRule: @@ -881,7 +896,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -890,7 +905,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -899,6 +914,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseRemoveAssociation: @@ -938,7 +954,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -947,6 +963,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseRemovePacketMirroringRule: @@ -988,7 +1005,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -997,6 +1014,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseRemoveRule: @@ -1034,7 +1052,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1043,6 +1061,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetIamPolicy: @@ -1081,7 +1100,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1090,7 +1109,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1099,6 +1118,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -1139,7 +1159,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1148,7 +1168,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1157,6 +1177,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_profiles/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_profiles/client.py index 02a3250d10ae..85aabecb2d3c 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_profiles/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_profiles/client.py @@ -531,9 +531,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the NetworkProfilesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_profiles/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_profiles/transports/rest.py index 9e10809c6a1d..8fdd0cd9588a 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_profiles/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_profiles/transports/rest.py @@ -227,39 +227,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_profiles/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_profiles/transports/rest_base.py index 1d683780c525..97b91ba46931 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_profiles/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/network_profiles/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/networks/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/networks/client.py index 9a52a3181361..ca8e5951f5b7 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/networks/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/networks/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the NetworksTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/networks/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/networks/transports/rest.py index 85295564c08d..e7225d6440a8 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/networks/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/networks/transports/rest.py @@ -829,39 +829,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/networks/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/networks/transports/rest_base.py index 147dd5ef3212..6468f6e02953 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/networks/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/networks/transports/rest_base.py @@ -123,7 +123,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -132,7 +132,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -141,6 +141,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -178,7 +179,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -187,6 +188,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetEffectiveFirewalls: @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -317,7 +321,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -326,7 +330,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -335,6 +339,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -372,7 +377,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -381,6 +386,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseListPeeringRoutes: @@ -418,7 +424,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -427,6 +433,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -465,7 +472,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -474,7 +481,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -483,6 +490,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseRemovePeering: @@ -521,7 +529,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -530,7 +538,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -539,6 +547,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseRequestRemovePeering: @@ -577,7 +586,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -586,7 +595,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -595,6 +604,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSwitchToCustomMode: @@ -632,7 +642,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -641,6 +651,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -679,7 +690,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -688,7 +699,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -697,6 +708,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdatePeering: @@ -735,7 +747,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -744,7 +756,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -753,6 +765,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_groups/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_groups/client.py index 902379e44857..8dee636a90f2 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_groups/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_groups/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the NodeGroupsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_groups/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_groups/transports/rest.py index f03bb7326f11..eefaceb93c3c 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_groups/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_groups/transports/rest.py @@ -932,39 +932,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_groups/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_groups/transports/rest_base.py index f0eaa883bc15..11465d5b8475 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_groups/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_groups/transports/rest_base.py @@ -123,7 +123,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -132,7 +132,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -141,6 +141,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseAggregatedList: @@ -178,7 +179,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -187,6 +188,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDeleteNodes: @@ -271,7 +274,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -280,7 +283,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -289,6 +292,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -326,7 +330,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -335,6 +339,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetIamPolicy: @@ -372,7 +377,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -381,6 +386,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -421,7 +427,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -430,7 +436,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -439,6 +445,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -476,7 +483,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -485,6 +492,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseListNodes: @@ -522,7 +530,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -531,6 +539,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -569,7 +578,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -578,7 +587,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -587,6 +596,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePerformMaintenance: @@ -625,7 +635,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -634,7 +644,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -643,6 +653,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetIamPolicy: @@ -681,7 +692,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -690,7 +701,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -699,6 +710,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetNodeTemplate: @@ -737,7 +749,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -746,7 +758,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -755,6 +767,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSimulateMaintenanceEvent: @@ -793,7 +806,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -802,7 +815,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -811,6 +824,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -849,7 +863,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -858,7 +872,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -867,6 +881,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_templates/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_templates/client.py index 797f867a2aa3..75a6abc6ae24 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_templates/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_templates/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the NodeTemplatesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_templates/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_templates/transports/rest.py index 84281a55a5db..d0b2ff4b6a6b 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_templates/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_templates/transports/rest.py @@ -555,39 +555,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_templates/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_templates/transports/rest_base.py index b34762055ce3..100b71141dd5 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_templates/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_templates/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetIamPolicy: @@ -260,7 +263,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -269,6 +272,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -307,7 +311,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -362,7 +367,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -371,6 +376,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetIamPolicy: @@ -409,7 +415,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -418,7 +424,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -427,6 +433,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -465,7 +472,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -474,7 +481,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -483,6 +490,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_types/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_types/client.py index 485bb4d5213a..fb0b6bebf4c5 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_types/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_types/client.py @@ -527,9 +527,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the NodeTypesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_types/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_types/transports/rest.py index 6a6180e19e31..fdb65ad326f3 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_types/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_types/transports/rest.py @@ -275,39 +275,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_types/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_types/transports/rest_base.py index 85a9ad60e042..d389ec30b3fd 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_types/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/node_types/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/organization_security_policies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/organization_security_policies/client.py index 618c3f7f87a0..6cfbcba44724 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/organization_security_policies/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/organization_security_policies/client.py @@ -540,9 +540,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the OrganizationSecurityPoliciesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/organization_security_policies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/organization_security_policies/transports/rest.py index 26f983a9f58a..5d71d69a0196 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/organization_security_policies/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/organization_security_policies/transports/rest.py @@ -1015,39 +1015,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/organization_security_policies/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/organization_security_policies/transports/rest_base.py index d058d7a78eee..c8065d64dfee 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/organization_security_policies/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/organization_security_policies/transports/rest_base.py @@ -127,7 +127,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -136,7 +136,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -145,6 +145,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseAddRule: @@ -183,7 +184,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -192,7 +193,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -201,6 +202,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseCopyRules: @@ -238,7 +240,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -247,6 +249,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -284,7 +287,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -293,6 +296,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -330,7 +334,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -339,6 +343,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetAssociation: @@ -378,7 +383,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -387,6 +392,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetRule: @@ -424,7 +430,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -433,6 +439,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -471,7 +478,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -480,7 +487,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -489,6 +496,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -516,10 +524,11 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseListAssociations: @@ -549,10 +558,11 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseListPreconfiguredExpressionSets: @@ -582,10 +592,11 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseMove: @@ -623,7 +634,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -632,6 +643,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -670,7 +682,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -679,7 +691,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -688,6 +700,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatchRule: @@ -726,7 +739,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -735,7 +748,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -744,6 +757,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseRemoveAssociation: @@ -783,7 +797,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -792,6 +806,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseRemoveRule: @@ -829,7 +844,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -838,6 +853,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/packet_mirrorings/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/packet_mirrorings/client.py index cb012a3fb8be..1f67c3930b5b 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/packet_mirrorings/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/packet_mirrorings/client.py @@ -534,9 +534,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the PacketMirroringsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/packet_mirrorings/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/packet_mirrorings/transports/rest.py index d046282ea9e7..0e210cb550ab 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/packet_mirrorings/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/packet_mirrorings/transports/rest.py @@ -505,39 +505,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/packet_mirrorings/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/packet_mirrorings/transports/rest_base.py index 5118af0146a0..a495b20c111f 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/packet_mirrorings/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/packet_mirrorings/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -261,7 +264,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -363,7 +368,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -372,7 +377,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -381,6 +386,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -419,7 +425,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -428,7 +434,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -437,6 +443,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/preview_features/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/preview_features/client.py index 33e357acecea..82c6a86233e3 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/preview_features/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/preview_features/client.py @@ -534,9 +534,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the PreviewFeaturesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/preview_features/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/preview_features/transports/rest.py index 55070d3813e9..5ee1b1aa21aa 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/preview_features/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/preview_features/transports/rest.py @@ -279,39 +279,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/preview_features/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/preview_features/transports/rest_base.py index 52250f04bb94..f91e22db6f83 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/preview_features/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/preview_features/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdate: @@ -215,7 +217,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/projects/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/projects/client.py index 43ed73e2669f..13836a3a75ec 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/projects/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/projects/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the ProjectsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. @@ -2183,7 +2180,15 @@ def move_disk_unary( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: - r"""Moves a persistent disk from one zone to another. + r"""Starting September 29, 2025, you can't use the moveDisk API on + new projects. To move a disk to a different region or zone, + follow the steps in `Change the location of a + disk `__. + Projects that already use the moveDisk API can continue usage + until September 29, 2026. Starting November 1, 2025, API + responses will include a warning message in the response body + about the upcoming deprecation. You can skip the message to + continue using the service without interruption. .. code-block:: python @@ -2298,7 +2303,15 @@ def move_disk( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: - r"""Moves a persistent disk from one zone to another. + r"""Starting September 29, 2025, you can't use the moveDisk API on + new projects. To move a disk to a different region or zone, + follow the steps in `Change the location of a + disk `__. + Projects that already use the moveDisk API can continue usage + until September 29, 2026. Starting November 1, 2025, API + responses will include a warning message in the response body + about the upcoming deprecation. You can skip the message to + continue using the service without interruption. .. code-block:: python diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/projects/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/projects/transports/rest.py index 692d029ca508..a9b374aae679 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/projects/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/projects/transports/rest.py @@ -944,39 +944,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/projects/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/projects/transports/rest_base.py index bf467f102d5c..47e2168ab19a 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/projects/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/projects/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDisableXpnResource: @@ -169,7 +170,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -178,7 +179,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -187,6 +188,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseEnableXpnHost: @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseEnableXpnResource: @@ -271,7 +274,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -280,7 +283,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -289,6 +292,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -326,7 +330,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -335,6 +339,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetXpnHost: @@ -372,7 +377,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -381,6 +386,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetXpnResources: @@ -418,7 +424,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -427,6 +433,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseListXpnHosts: @@ -465,7 +472,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -474,7 +481,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -483,6 +490,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseMoveDisk: @@ -521,7 +529,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -530,7 +538,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -539,6 +547,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseMoveInstance: @@ -577,7 +586,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -586,7 +595,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -595,6 +604,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetCloudArmorTier: @@ -633,7 +643,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -642,7 +652,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -651,6 +661,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetCommonInstanceMetadata: @@ -689,7 +700,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -698,7 +709,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -707,6 +718,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetDefaultNetworkTier: @@ -745,7 +757,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -754,7 +766,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -763,6 +775,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetManagedProtectionTier: @@ -801,7 +814,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -810,7 +823,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -819,6 +832,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetUsageExportBucket: @@ -857,7 +871,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -866,7 +880,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -875,6 +889,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/public_advertised_prefixes/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/public_advertised_prefixes/client.py index c2ac82afb7d4..68fce299e1a6 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/public_advertised_prefixes/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/public_advertised_prefixes/client.py @@ -538,9 +538,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the PublicAdvertisedPrefixesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/public_advertised_prefixes/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/public_advertised_prefixes/transports/rest.py index dd43106fa329..316ff5acb8a4 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/public_advertised_prefixes/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/public_advertised_prefixes/transports/rest.py @@ -506,39 +506,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/public_advertised_prefixes/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/public_advertised_prefixes/transports/rest_base.py index d1b328b08ef3..d079909b2be7 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/public_advertised_prefixes/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/public_advertised_prefixes/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -261,7 +264,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -363,7 +368,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -372,7 +377,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -381,6 +386,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseWithdraw: @@ -418,7 +424,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -427,6 +433,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/public_delegated_prefixes/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/public_delegated_prefixes/client.py index 678812bb1d47..3024385920d6 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/public_delegated_prefixes/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/public_delegated_prefixes/client.py @@ -538,9 +538,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the PublicDelegatedPrefixesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/public_delegated_prefixes/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/public_delegated_prefixes/transports/rest.py index 49ca3f46908d..d4c65be1260b 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/public_delegated_prefixes/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/public_delegated_prefixes/transports/rest.py @@ -566,39 +566,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/public_delegated_prefixes/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/public_delegated_prefixes/transports/rest_base.py index 9989efcc3373..d216694b46e1 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/public_delegated_prefixes/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/public_delegated_prefixes/transports/rest_base.py @@ -124,7 +124,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -133,6 +133,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseAnnounce: @@ -170,7 +171,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -179,6 +180,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -216,7 +218,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -225,6 +227,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -262,7 +265,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -271,6 +274,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -309,7 +313,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -318,7 +322,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -327,6 +331,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -364,7 +369,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -373,6 +378,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -411,7 +417,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -420,7 +426,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -429,6 +435,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseWithdraw: @@ -466,7 +473,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -475,6 +482,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_autoscalers/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_autoscalers/client.py index 1a493e99f1a5..537c5d0f0c63 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_autoscalers/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_autoscalers/client.py @@ -536,9 +536,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RegionAutoscalersTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_autoscalers/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_autoscalers/transports/rest.py index be76d3049cd9..4f59e308ffaa 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_autoscalers/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_autoscalers/transports/rest.py @@ -500,39 +500,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_autoscalers/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_autoscalers/transports/rest_base.py index ff0474657c8f..efc539d6cc0d 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_autoscalers/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_autoscalers/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -215,7 +217,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -317,7 +321,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -326,7 +330,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -335,6 +339,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -373,7 +378,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -382,7 +387,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -391,6 +396,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdate: @@ -429,7 +435,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -438,7 +444,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -447,6 +453,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_services/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_services/client.py index 4e8bb1698f4d..e06fe1013764 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_services/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_services/client.py @@ -538,9 +538,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RegionBackendServicesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_services/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_services/transports/rest.py index 2825cfcd6779..856619cd4832 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_services/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_services/transports/rest.py @@ -790,39 +790,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_services/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_services/transports/rest_base.py index 53e12f587b05..0a5446e7444c 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_services/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_backend_services/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetHealth: @@ -215,7 +217,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetIamPolicy: @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -317,7 +321,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -326,7 +330,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -335,6 +339,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -372,7 +377,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -381,6 +386,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseListUsable: @@ -418,7 +424,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -427,6 +433,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -465,7 +472,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -474,7 +481,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -483,6 +490,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetIamPolicy: @@ -521,7 +529,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -530,7 +538,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -539,6 +547,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetSecurityPolicy: @@ -579,7 +588,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -588,7 +597,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -597,6 +606,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -637,7 +647,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -646,7 +656,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -655,6 +665,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdate: @@ -693,7 +704,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -702,7 +713,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -711,6 +722,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_commitments/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_commitments/client.py index 9fc4c0bf24af..2a73c1a53eaa 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_commitments/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_commitments/client.py @@ -536,9 +536,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RegionCommitmentsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_commitments/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_commitments/transports/rest.py index 39b278203aa1..13780610dfba 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_commitments/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_commitments/transports/rest.py @@ -506,39 +506,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_commitments/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_commitments/transports/rest_base.py index 55e7797735c7..8b9d76b5741b 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_commitments/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_commitments/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -215,7 +217,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -317,7 +321,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -326,7 +330,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -335,6 +339,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdate: @@ -373,7 +378,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -382,7 +387,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -391,6 +396,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdateReservations: @@ -429,7 +435,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -438,7 +444,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -447,6 +453,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disk_settings/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disk_settings/client.py index 6fa68c49e323..5231d0d16eef 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disk_settings/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disk_settings/client.py @@ -535,9 +535,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RegionDiskSettingsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disk_settings/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disk_settings/transports/rest.py index 0d1590772ea4..9d2de952b79b 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disk_settings/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disk_settings/transports/rest.py @@ -223,39 +223,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disk_settings/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disk_settings/transports/rest_base.py index fb354a0ccba9..7dd3afaba65e 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disk_settings/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disk_settings/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -169,7 +170,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -178,7 +179,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -187,6 +188,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disk_types/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disk_types/client.py index 4284280c7754..f626b93b6e39 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disk_types/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disk_types/client.py @@ -531,9 +531,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RegionDiskTypesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disk_types/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disk_types/transports/rest.py index d83eb368d1d3..c6c135dc6e0e 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disk_types/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disk_types/transports/rest.py @@ -225,39 +225,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disk_types/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disk_types/transports/rest_base.py index 7d1551e08670..5c93a3252870 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disk_types/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disk_types/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disks/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disks/client.py index b2aef8fd1b78..cf63a7a5ee78 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disks/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disks/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RegionDisksTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disks/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disks/transports/rest.py index 5c6d3eced7f1..2490a9e84690 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disks/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disks/transports/rest.py @@ -1047,39 +1047,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disks/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disks/transports/rest_base.py index 082eb05377fc..d8ab8809804b 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disks/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_disks/transports/rest_base.py @@ -123,7 +123,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -132,7 +132,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -141,6 +141,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseBulkInsert: @@ -179,7 +180,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -188,7 +189,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -197,6 +198,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseCreateSnapshot: @@ -235,7 +237,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -244,7 +246,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -253,6 +255,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -290,7 +293,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -299,6 +302,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -336,7 +340,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -345,6 +349,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetIamPolicy: @@ -382,7 +387,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -391,6 +396,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -429,7 +435,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -438,7 +444,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -447,6 +453,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -484,7 +491,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -493,6 +500,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseRemoveResourcePolicies: @@ -531,7 +539,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -540,7 +548,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -549,6 +557,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseResize: @@ -587,7 +596,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -596,7 +605,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -605,6 +614,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetIamPolicy: @@ -643,7 +653,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -652,7 +662,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -661,6 +671,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetLabels: @@ -699,7 +710,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -708,7 +719,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -717,6 +728,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseStartAsyncReplication: @@ -755,7 +767,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -764,7 +776,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -773,6 +785,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseStopAsyncReplication: @@ -810,7 +823,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -819,6 +832,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseStopGroupAsyncReplication: @@ -857,7 +871,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -866,7 +880,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -875,6 +889,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -913,7 +928,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -922,7 +937,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -931,6 +946,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdate: @@ -969,7 +985,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -978,7 +994,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -987,6 +1003,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_check_services/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_check_services/client.py index fb2faa0cacd9..490005537a8e 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_check_services/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_check_services/client.py @@ -538,9 +538,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RegionHealthCheckServicesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_check_services/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_check_services/transports/rest.py index 94319b7b3a18..95761301e0f5 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_check_services/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_check_services/transports/rest.py @@ -457,39 +457,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_check_services/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_check_services/transports/rest_base.py index bbe475097f38..058e36d1034f 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_check_services/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_check_services/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -215,7 +217,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -317,7 +321,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -326,7 +330,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -335,6 +339,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -375,7 +380,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -384,7 +389,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -393,6 +398,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_checks/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_checks/client.py index de12cbe55cfe..3d616ccdca31 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_checks/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_checks/client.py @@ -536,9 +536,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RegionHealthChecksTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_checks/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_checks/transports/rest.py index fb789100224d..8952e4763500 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_checks/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_checks/transports/rest.py @@ -498,39 +498,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_checks/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_checks/transports/rest_base.py index af47c7d2da4d..e29efe29cae0 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_checks/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_health_checks/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -215,7 +217,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -317,7 +321,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -326,7 +330,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -335,6 +339,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -373,7 +378,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -382,7 +387,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -391,6 +396,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdate: @@ -429,7 +435,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -438,7 +444,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -447,6 +453,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_manager_resize_requests/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_manager_resize_requests/client.py index 1efb2fbdddf2..4860fa29336a 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_manager_resize_requests/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_manager_resize_requests/client.py @@ -549,9 +549,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RegionInstanceGroupManagerResizeRequestsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_manager_resize_requests/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_manager_resize_requests/transports/rest.py index 4d5c998bc0c5..2047256a874f 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_manager_resize_requests/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_manager_resize_requests/transports/rest.py @@ -404,39 +404,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_manager_resize_requests/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_manager_resize_requests/transports/rest_base.py index e96342e6ae5f..85c872a96367 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_manager_resize_requests/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_manager_resize_requests/transports/rest_base.py @@ -126,7 +126,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -135,6 +135,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -174,7 +175,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -183,6 +184,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -222,7 +224,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -231,6 +233,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -271,7 +274,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -280,7 +283,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -289,6 +292,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -328,7 +332,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -337,6 +341,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_managers/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_managers/client.py index 56bb64cc605e..1afb81c98d91 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_managers/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_managers/client.py @@ -540,9 +540,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RegionInstanceGroupManagersTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_managers/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_managers/transports/rest.py index e2bee2dd0f74..9bcd840e5c43 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_managers/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_managers/transports/rest.py @@ -1639,39 +1639,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_managers/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_managers/transports/rest_base.py index 02bdb7f2f9f8..103b40a80d3f 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_managers/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_group_managers/transports/rest_base.py @@ -127,7 +127,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -136,7 +136,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -145,6 +145,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseApplyUpdatesToInstances: @@ -187,7 +188,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -196,7 +197,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -205,6 +206,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseCreateInstances: @@ -245,7 +247,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -254,7 +256,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -263,6 +265,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -300,7 +303,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -309,6 +312,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDeleteInstances: @@ -349,7 +353,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -358,7 +362,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -367,6 +371,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDeletePerInstanceConfigs: @@ -409,7 +414,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -418,7 +423,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -427,6 +432,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -464,7 +470,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -473,6 +479,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -511,7 +518,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -520,7 +527,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -529,6 +536,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -566,7 +574,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -575,6 +583,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseListErrors: @@ -614,7 +623,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -623,6 +632,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseListManagedInstances: @@ -664,7 +674,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -673,6 +683,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseListPerInstanceConfigs: @@ -714,7 +725,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -723,6 +734,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -761,7 +773,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -770,7 +782,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -779,6 +791,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatchPerInstanceConfigs: @@ -821,7 +834,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -830,7 +843,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -839,6 +852,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseRecreateInstances: @@ -879,7 +893,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -888,7 +902,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -897,6 +911,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseResize: @@ -936,7 +951,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -945,6 +960,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseResizeAdvanced: @@ -985,7 +1001,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -994,7 +1010,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1003,6 +1019,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseResumeInstances: @@ -1043,7 +1060,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1052,7 +1069,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1061,6 +1078,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetAutoHealingPolicies: @@ -1103,7 +1121,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1112,7 +1130,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1121,6 +1139,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetInstanceTemplate: @@ -1161,7 +1180,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1170,7 +1189,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1179,6 +1198,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetTargetPools: @@ -1219,7 +1239,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1228,7 +1248,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1237,6 +1257,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseStartInstances: @@ -1277,7 +1298,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1286,7 +1307,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1295,6 +1316,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseStopInstances: @@ -1335,7 +1357,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1344,7 +1366,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1353,6 +1375,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSuspendInstances: @@ -1393,7 +1416,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1402,7 +1425,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1411,6 +1434,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -1451,7 +1475,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1460,7 +1484,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1469,6 +1493,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdate: @@ -1507,7 +1532,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1516,7 +1541,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1525,6 +1550,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdatePerInstanceConfigs: @@ -1567,7 +1593,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1576,7 +1602,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1585,6 +1611,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_groups/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_groups/client.py index 3d6d5bef46bd..b9eb510b8522 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_groups/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_groups/client.py @@ -536,9 +536,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RegionInstanceGroupsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_groups/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_groups/transports/rest.py index b0b6ce3fa5f6..35352a56184b 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_groups/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_groups/transports/rest.py @@ -401,39 +401,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_groups/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_groups/transports/rest_base.py index 2efc3ebe0d83..b5a6f4980f55 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_groups/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_groups/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseListInstances: @@ -215,7 +217,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetNamedPorts: @@ -271,7 +274,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -280,7 +283,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -289,6 +292,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -329,7 +333,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -338,7 +342,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -347,6 +351,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_templates/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_templates/client.py index 6479817e04e4..c1476d845b8d 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_templates/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_templates/client.py @@ -538,9 +538,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RegionInstanceTemplatesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_templates/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_templates/transports/rest.py index b5c71d281cae..3a86a660c777 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_templates/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_templates/transports/rest.py @@ -337,39 +337,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_templates/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_templates/transports/rest_base.py index 96c9ae195c80..d8bf588876db 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_templates/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instance_templates/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -215,7 +217,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instances/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instances/client.py index 82cbea711454..d36cd7aac8f4 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instances/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instances/client.py @@ -533,9 +533,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RegionInstancesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instances/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instances/transports/rest.py index 4fc6183901f2..d4195cffc16e 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instances/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instances/transports/rest.py @@ -169,39 +169,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instances/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instances/transports/rest_base.py index 222ce33c7176..eef80f8d3002 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instances/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instances/transports/rest_base.py @@ -123,7 +123,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -132,7 +132,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -141,6 +141,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instant_snapshots/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instant_snapshots/client.py index e73180d45f84..9268ee05cd51 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instant_snapshots/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instant_snapshots/client.py @@ -538,9 +538,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RegionInstantSnapshotsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instant_snapshots/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instant_snapshots/transports/rest.py index 8c3af2d5d3fe..6e1874d5706f 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instant_snapshots/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instant_snapshots/transports/rest.py @@ -560,39 +560,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instant_snapshots/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instant_snapshots/transports/rest_base.py index 49cedb265d02..bc056a13a888 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instant_snapshots/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_instant_snapshots/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetIamPolicy: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -261,7 +264,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetIamPolicy: @@ -363,7 +368,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -372,7 +377,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -381,6 +386,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetLabels: @@ -419,7 +425,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -428,7 +434,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -437,6 +443,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -477,7 +484,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -486,7 +493,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -495,6 +502,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_multi_migs/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_multi_migs/client.py index 63ff82e4bbd5..c0c4733916db 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_multi_migs/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_multi_migs/client.py @@ -534,9 +534,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RegionMultiMigsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_multi_migs/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_multi_migs/transports/rest.py index 0e1ef4922c1b..8ae6bc1c60cd 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_multi_migs/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_multi_migs/transports/rest.py @@ -331,39 +331,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_multi_migs/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_multi_migs/transports/rest_base.py index a918f5e58ed9..d1ffc5b80525 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_multi_migs/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_multi_migs/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -215,7 +217,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_endpoint_groups/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_endpoint_groups/client.py index 3daa391a37b1..4e6f5072fa01 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_endpoint_groups/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_endpoint_groups/client.py @@ -540,9 +540,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RegionNetworkEndpointGroupsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_endpoint_groups/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_endpoint_groups/transports/rest.py index 615d73f70530..53af894f283d 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_endpoint_groups/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_endpoint_groups/transports/rest.py @@ -517,39 +517,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_endpoint_groups/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_endpoint_groups/transports/rest_base.py index 0c9d6e3ef018..385de04bfeaa 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_endpoint_groups/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_endpoint_groups/transports/rest_base.py @@ -129,7 +129,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -138,7 +138,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -147,6 +147,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -184,7 +185,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -193,6 +194,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDetachNetworkEndpoints: @@ -235,7 +237,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -244,7 +246,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -253,6 +255,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -290,7 +293,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -299,6 +302,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -337,7 +341,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -346,7 +350,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -355,6 +359,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -392,7 +397,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -401,6 +406,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseListNetworkEndpoints: @@ -442,7 +448,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -451,6 +457,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_firewall_policies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_firewall_policies/client.py index 90d99ff120d5..598bff84e44a 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_firewall_policies/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_firewall_policies/client.py @@ -540,9 +540,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RegionNetworkFirewallPoliciesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_firewall_policies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_firewall_policies/transports/rest.py index 8552eb796d61..8c97a1abd47e 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_firewall_policies/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_firewall_policies/transports/rest.py @@ -1125,39 +1125,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_firewall_policies/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_firewall_policies/transports/rest_base.py index cc48027f062c..7d732b4ec82b 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_firewall_policies/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_network_firewall_policies/transports/rest_base.py @@ -127,7 +127,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -136,7 +136,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -145,6 +145,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseAddRule: @@ -183,7 +184,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -192,7 +193,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -201,6 +202,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseCloneRules: @@ -240,7 +242,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -249,6 +251,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -286,7 +289,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -295,6 +298,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -332,7 +336,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -341,6 +345,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetAssociation: @@ -380,7 +385,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -389,6 +394,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetEffectiveFirewalls: @@ -432,7 +438,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -441,6 +447,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetIamPolicy: @@ -480,7 +487,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -489,6 +496,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetRule: @@ -526,7 +534,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -535,6 +543,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -573,7 +582,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -582,7 +591,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -591,6 +600,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -628,7 +638,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -637,6 +647,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -675,7 +686,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -684,7 +695,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -693,6 +704,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatchAssociation: @@ -733,7 +745,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -742,7 +754,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -751,6 +763,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatchRule: @@ -789,7 +802,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -798,7 +811,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -807,6 +820,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseRemoveAssociation: @@ -846,7 +860,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -855,6 +869,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseRemoveRule: @@ -894,7 +909,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -903,6 +918,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetIamPolicy: @@ -943,7 +959,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -952,7 +968,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -961,6 +977,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -1001,7 +1018,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1010,7 +1027,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1019,6 +1036,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_notification_endpoints/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_notification_endpoints/client.py index cef548d9cc0b..513425d1e075 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_notification_endpoints/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_notification_endpoints/client.py @@ -540,9 +540,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RegionNotificationEndpointsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_notification_endpoints/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_notification_endpoints/transports/rest.py index 36a341d8a9c4..dc372cfafa13 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_notification_endpoints/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_notification_endpoints/transports/rest.py @@ -402,39 +402,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_notification_endpoints/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_notification_endpoints/transports/rest_base.py index c638ccee4146..feff2e9092ac 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_notification_endpoints/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_notification_endpoints/transports/rest_base.py @@ -124,7 +124,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -133,6 +133,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -170,7 +171,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -179,6 +180,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -217,7 +219,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -226,7 +228,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -235,6 +237,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -272,7 +275,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -281,6 +284,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -321,7 +325,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -330,7 +334,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -339,6 +343,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_operations/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_operations/client.py index 9ed385b29dc0..204d2767fba4 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_operations/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_operations/client.py @@ -531,9 +531,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RegionOperationsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_operations/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_operations/transports/rest.py index 0c0e633c5c52..9a5e36931af9 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_operations/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_operations/transports/rest.py @@ -335,39 +335,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_operations/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_operations/transports/rest_base.py index be71802b63dd..dc8efe013017 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_operations/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_operations/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseWait: @@ -260,7 +263,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -269,6 +272,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_security_policies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_security_policies/client.py index be8e66882ef2..5eea6f66ffca 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_security_policies/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_security_policies/client.py @@ -538,9 +538,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RegionSecurityPoliciesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_security_policies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_security_policies/transports/rest.py index 97013ba2ee0c..52f044ae0654 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_security_policies/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_security_policies/transports/rest.py @@ -668,39 +668,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_security_policies/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_security_policies/transports/rest_base.py index 4c0c7475a536..de8c3f411431 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_security_policies/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_security_policies/transports/rest_base.py @@ -123,7 +123,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -132,7 +132,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -141,6 +141,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -178,7 +179,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -187,6 +188,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetRule: @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -317,7 +321,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -326,7 +330,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -335,6 +339,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -372,7 +377,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -381,6 +386,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -419,7 +425,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -428,7 +434,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -437,6 +443,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatchRule: @@ -475,7 +482,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -484,7 +491,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -493,6 +500,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseRemoveRule: @@ -530,7 +538,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -539,6 +547,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetLabels: @@ -577,7 +586,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -586,7 +595,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -595,6 +604,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_snapshot_settings/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_snapshot_settings/client.py index f31413d558e0..71e190363e28 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_snapshot_settings/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_snapshot_settings/client.py @@ -537,9 +537,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RegionSnapshotSettingsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_snapshot_settings/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_snapshot_settings/transports/rest.py index 04798317535a..105a04c658ec 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_snapshot_settings/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_snapshot_settings/transports/rest.py @@ -224,39 +224,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_snapshot_settings/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_snapshot_settings/transports/rest_base.py index 607f20e17b1d..4e91d144bc48 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_snapshot_settings/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_snapshot_settings/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -169,7 +170,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -178,7 +179,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -187,6 +188,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_snapshots/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_snapshots/client.py index c63c7d9e2d1e..d850227d4184 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_snapshots/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_snapshots/client.py @@ -534,9 +534,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RegionSnapshotsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_snapshots/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_snapshots/transports/rest.py index 1399fe3c71b4..2e15c6fabc60 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_snapshots/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_snapshots/transports/rest.py @@ -554,39 +554,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_snapshots/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_snapshots/transports/rest_base.py index 02a07bc9b15d..44edcb460cd1 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_snapshots/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_snapshots/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetIamPolicy: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -261,7 +264,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetIamPolicy: @@ -363,7 +368,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -372,7 +377,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -381,6 +386,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetLabels: @@ -419,7 +425,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -428,7 +434,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -437,6 +443,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -475,7 +482,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -484,7 +491,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -493,6 +500,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_ssl_certificates/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_ssl_certificates/client.py index becde158bc82..37ef5d41ed31 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_ssl_certificates/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_ssl_certificates/client.py @@ -538,9 +538,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RegionSslCertificatesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_ssl_certificates/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_ssl_certificates/transports/rest.py index 3c658eb91129..cdf49af90a67 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_ssl_certificates/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_ssl_certificates/transports/rest.py @@ -395,39 +395,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_ssl_certificates/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_ssl_certificates/transports/rest_base.py index 21a3396d5453..2964fd07e734 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_ssl_certificates/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_ssl_certificates/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -215,7 +217,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -319,7 +323,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -328,7 +332,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -337,6 +341,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_ssl_policies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_ssl_policies/client.py index 5ba09c85535f..09a68bbcbb07 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_ssl_policies/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_ssl_policies/client.py @@ -536,9 +536,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RegionSslPoliciesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_ssl_policies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_ssl_policies/transports/rest.py index 58fec844184c..90569895d0e2 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_ssl_policies/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_ssl_policies/transports/rest.py @@ -504,39 +504,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_ssl_policies/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_ssl_policies/transports/rest_base.py index 5fa0a6a24088..23461c02a2d7 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_ssl_policies/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_ssl_policies/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -215,7 +217,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseListAvailableFeatures: @@ -318,7 +322,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -327,6 +331,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -365,7 +370,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -374,7 +379,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -383,6 +388,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -421,7 +427,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -430,7 +436,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -439,6 +445,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_http_proxies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_http_proxies/client.py index 5bd056463808..c61945b12467 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_http_proxies/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_http_proxies/client.py @@ -538,9 +538,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RegionTargetHttpProxiesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_http_proxies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_http_proxies/transports/rest.py index b413961d332a..a75560d9ba74 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_http_proxies/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_http_proxies/transports/rest.py @@ -450,39 +450,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_http_proxies/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_http_proxies/transports/rest_base.py index 76527565e5bf..bc8fc6ce1d4a 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_http_proxies/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_http_proxies/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -215,7 +217,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetUrlMap: @@ -317,7 +321,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -326,7 +330,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -335,6 +339,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -375,7 +380,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -384,7 +389,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -393,6 +398,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_https_proxies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_https_proxies/client.py index d5366d3a7e7d..4cb4921e22d4 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_https_proxies/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_https_proxies/client.py @@ -538,9 +538,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RegionTargetHttpsProxiesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_https_proxies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_https_proxies/transports/rest.py index 49fc11b70c69..b370d68b5e36 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_https_proxies/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_https_proxies/transports/rest.py @@ -563,39 +563,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_https_proxies/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_https_proxies/transports/rest_base.py index ad869d515611..5870b8a49565 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_https_proxies/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_https_proxies/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -215,7 +217,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -317,7 +321,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -326,7 +330,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -335,6 +339,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetSslCertificates: @@ -375,7 +380,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -384,7 +389,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -393,6 +398,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetUrlMap: @@ -431,7 +437,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -440,7 +446,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -449,6 +455,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -489,7 +496,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -498,7 +505,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -507,6 +514,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_tcp_proxies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_tcp_proxies/client.py index 5e8b1399f4f6..599cd6f697e1 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_tcp_proxies/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_tcp_proxies/client.py @@ -538,9 +538,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RegionTargetTcpProxiesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_tcp_proxies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_tcp_proxies/transports/rest.py index 40ede8ed593b..18e67b6e4142 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_tcp_proxies/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_tcp_proxies/transports/rest.py @@ -395,39 +395,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_tcp_proxies/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_tcp_proxies/transports/rest_base.py index 4ebe6a7ab343..109538528f3a 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_tcp_proxies/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_target_tcp_proxies/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -215,7 +217,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -319,7 +323,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -328,7 +332,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -337,6 +341,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_url_maps/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_url_maps/client.py index 36a01207799b..03f8e0b2d2db 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_url_maps/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_url_maps/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RegionUrlMapsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_url_maps/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_url_maps/transports/rest.py index fb10adcdac4a..2f8fbfc185ff 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_url_maps/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_url_maps/transports/rest.py @@ -609,39 +609,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_url_maps/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_url_maps/transports/rest_base.py index 815f5af8ccb9..ae8e3c67f4e6 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_url_maps/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_url_maps/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -215,7 +217,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInvalidateCache: @@ -271,7 +274,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -280,7 +283,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -289,6 +292,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -326,7 +330,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -335,6 +339,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -373,7 +378,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -382,7 +387,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -391,6 +396,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -429,7 +435,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -438,7 +444,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -447,6 +453,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdate: @@ -485,7 +492,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -494,7 +501,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -503,6 +510,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseValidate: @@ -541,7 +549,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -550,7 +558,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -559,6 +567,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_zones/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_zones/client.py index b1e89b66eafa..d7ba00cc6852 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_zones/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_zones/client.py @@ -527,9 +527,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RegionZonesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_zones/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_zones/transports/rest.py index 848bfa9963f2..e0682756a605 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_zones/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_zones/transports/rest.py @@ -167,39 +167,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_zones/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_zones/transports/rest_base.py index 4649bf92c594..a3ab7f37946b 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_zones/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/region_zones/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/regions/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/regions/client.py index 760f63d1cffa..3b71583b5dd3 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/regions/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/regions/client.py @@ -527,9 +527,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RegionsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/regions/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/regions/transports/rest.py index 43343414e5a1..fd4d9708a4c1 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/regions/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/regions/transports/rest.py @@ -219,39 +219,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/regions/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/regions/transports/rest_base.py index 68d2daa84fa6..54d09aa48cf8 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/regions/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/regions/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_blocks/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_blocks/client.py index 8b8846201892..2267247fd2f3 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_blocks/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_blocks/client.py @@ -536,9 +536,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the ReservationBlocksTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_blocks/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_blocks/transports/rest.py index 9b3435b2be29..711d9c844ddb 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_blocks/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_blocks/transports/rest.py @@ -288,39 +288,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_blocks/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_blocks/transports/rest_base.py index 85ee107d8cd2..8a7a8298fac8 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_blocks/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_blocks/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePerformMaintenance: @@ -215,7 +217,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_sub_blocks/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_sub_blocks/client.py index 9486f23cf6f3..732000c8603d 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_sub_blocks/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_sub_blocks/client.py @@ -536,9 +536,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the ReservationSubBlocksTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_sub_blocks/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_sub_blocks/transports/rest.py index 054e5fa6d94a..90e4b5a88801 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_sub_blocks/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_sub_blocks/transports/rest.py @@ -289,39 +289,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_sub_blocks/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_sub_blocks/transports/rest_base.py index 310a6804f80a..25408ebdd0cd 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_sub_blocks/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservation_sub_blocks/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePerformMaintenance: @@ -216,7 +218,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -225,6 +227,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservations/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservations/client.py index e97d7c2e04cb..f50000b05a9c 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservations/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservations/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the ReservationsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservations/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservations/transports/rest.py index 1a5879ffded2..c1ba311908ab 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservations/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservations/transports/rest.py @@ -720,39 +720,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservations/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservations/transports/rest_base.py index fa4607f0d310..11f56b8a7595 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservations/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/reservations/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetIamPolicy: @@ -260,7 +263,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -269,6 +272,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -307,7 +311,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -362,7 +367,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -371,6 +376,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePerformMaintenance: @@ -409,7 +415,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -418,7 +424,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -427,6 +433,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseResize: @@ -465,7 +472,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -474,7 +481,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -483,6 +490,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetIamPolicy: @@ -521,7 +529,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -530,7 +538,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -539,6 +547,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -577,7 +586,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -586,7 +595,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -595,6 +604,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdate: @@ -633,7 +643,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -642,7 +652,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -651,6 +661,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/resource_policies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/resource_policies/client.py index be2c59dd5a77..00877fd87800 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/resource_policies/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/resource_policies/client.py @@ -534,9 +534,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the ResourcePoliciesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/resource_policies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/resource_policies/transports/rest.py index 035cdf4e9c5e..029164307f08 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/resource_policies/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/resource_policies/transports/rest.py @@ -615,39 +615,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/resource_policies/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/resource_policies/transports/rest_base.py index 98288d07045b..0853cfac2fc2 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/resource_policies/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/resource_policies/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetIamPolicy: @@ -260,7 +263,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -269,6 +272,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -307,7 +311,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -362,7 +367,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -371,6 +376,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -409,7 +415,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -418,7 +424,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -427,6 +433,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetIamPolicy: @@ -465,7 +472,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -474,7 +481,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -483,6 +490,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -521,7 +529,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -530,7 +538,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -539,6 +547,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/routers/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/routers/client.py index 3c149f6d27ad..b1d98493a6d0 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/routers/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/routers/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RoutersTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/routers/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/routers/transports/rest.py index d7a852e15405..085bfaabf6b4 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/routers/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/routers/transports/rest.py @@ -1103,39 +1103,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/routers/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/routers/transports/rest_base.py index 00827de3eec1..3530a79c0264 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/routers/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/routers/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDeleteRoutePolicy: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -260,7 +263,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -269,6 +272,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetNatIpInfo: @@ -306,7 +310,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -315,6 +319,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetNatMappingInfo: @@ -352,7 +357,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -361,6 +366,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetRoutePolicy: @@ -398,7 +404,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -407,6 +413,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetRouterStatus: @@ -444,7 +451,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -453,6 +460,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -491,7 +499,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -500,7 +508,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -509,6 +517,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -546,7 +555,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -555,6 +564,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseListBgpRoutes: @@ -592,7 +602,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -601,6 +611,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseListRoutePolicies: @@ -638,7 +649,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -647,6 +658,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -685,7 +697,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -694,7 +706,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -703,6 +715,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatchRoutePolicy: @@ -741,7 +754,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -750,7 +763,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -759,6 +772,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePreview: @@ -797,7 +811,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -806,7 +820,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -815,6 +829,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -853,7 +868,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -862,7 +877,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -871,6 +886,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdate: @@ -909,7 +925,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -918,7 +934,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -927,6 +943,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdateRoutePolicy: @@ -965,7 +982,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -974,7 +991,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -983,6 +1000,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/routes/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/routes/client.py index 600d9f6d8207..c0958d024821 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/routes/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/routes/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RoutesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/routes/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/routes/transports/rest.py index 7fe6556d84fc..5e58a2e0eff9 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/routes/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/routes/transports/rest.py @@ -379,39 +379,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/routes/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/routes/transports/rest_base.py index 24e4fc16143d..7d248599db0a 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/routes/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/routes/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -215,7 +217,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -317,7 +321,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -326,7 +330,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -335,6 +339,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/security_policies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/security_policies/client.py index b4d404671696..4e1a5c9ec30b 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/security_policies/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/security_policies/client.py @@ -534,9 +534,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the SecurityPoliciesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/security_policies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/security_policies/transports/rest.py index fe8645184e0d..b607cdf7af3c 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/security_policies/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/security_policies/transports/rest.py @@ -837,39 +837,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/security_policies/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/security_policies/transports/rest_base.py index 0de7fe9a267d..66d281437abb 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/security_policies/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/security_policies/transports/rest_base.py @@ -123,7 +123,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -132,7 +132,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -141,6 +141,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseAggregatedList: @@ -178,7 +179,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -187,6 +188,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetRule: @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -363,7 +368,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -372,7 +377,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -381,6 +386,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -418,7 +424,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -427,6 +433,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseListPreconfiguredExpressionSets: @@ -468,7 +475,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -477,6 +484,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -515,7 +523,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -524,7 +532,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -533,6 +541,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatchRule: @@ -571,7 +580,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -580,7 +589,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -589,6 +598,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseRemoveRule: @@ -626,7 +636,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -635,6 +645,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetLabels: @@ -673,7 +684,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -682,7 +693,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -691,6 +702,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -729,7 +741,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -738,7 +750,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -747,6 +759,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/service_attachments/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/service_attachments/client.py index 3798d2342968..c8a617994988 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/service_attachments/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/service_attachments/client.py @@ -536,9 +536,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the ServiceAttachmentsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/service_attachments/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/service_attachments/transports/rest.py index e96421882c04..51fd46fe2de6 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/service_attachments/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/service_attachments/transports/rest.py @@ -617,39 +617,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/service_attachments/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/service_attachments/transports/rest_base.py index 06f547176c79..ca54f6d91239 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/service_attachments/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/service_attachments/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetIamPolicy: @@ -260,7 +263,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -269,6 +272,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -307,7 +311,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -362,7 +367,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -371,6 +376,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -409,7 +415,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -418,7 +424,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -427,6 +433,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetIamPolicy: @@ -465,7 +472,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -474,7 +481,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -483,6 +490,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -521,7 +529,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -530,7 +538,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -539,6 +547,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/snapshot_settings_service/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/snapshot_settings_service/client.py index b0dd23437849..4c28a7a82314 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/snapshot_settings_service/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/snapshot_settings_service/client.py @@ -537,9 +537,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the SnapshotSettingsServiceTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/snapshot_settings_service/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/snapshot_settings_service/transports/rest.py index 4bf9b62cbf0c..382acd37f493 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/snapshot_settings_service/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/snapshot_settings_service/transports/rest.py @@ -223,39 +223,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/snapshot_settings_service/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/snapshot_settings_service/transports/rest_base.py index c63197e5811c..3714769cd80b 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/snapshot_settings_service/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/snapshot_settings_service/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -169,7 +170,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -178,7 +179,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -187,6 +188,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/snapshots/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/snapshots/client.py index 5fad6a406a86..a24f42b7ad2a 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/snapshots/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/snapshots/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the SnapshotsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/snapshots/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/snapshots/transports/rest.py index a2c6b2f7c8cb..c1245e1a8e29 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/snapshots/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/snapshots/transports/rest.py @@ -600,39 +600,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/snapshots/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/snapshots/transports/rest_base.py index ba62996b8353..93374ea88c47 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/snapshots/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/snapshots/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetIamPolicy: @@ -260,7 +263,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -269,6 +272,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -307,7 +311,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -362,7 +367,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -371,6 +376,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetIamPolicy: @@ -409,7 +415,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -418,7 +424,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -427,6 +433,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetLabels: @@ -465,7 +472,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -474,7 +481,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -483,6 +490,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -521,7 +529,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -530,7 +538,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -539,6 +547,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/ssl_certificates/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/ssl_certificates/client.py index 26a1f62ba953..60b04d2a9d86 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/ssl_certificates/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/ssl_certificates/client.py @@ -534,9 +534,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the SslCertificatesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/ssl_certificates/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/ssl_certificates/transports/rest.py index a063992b9adc..0a64d796e2bb 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/ssl_certificates/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/ssl_certificates/transports/rest.py @@ -451,39 +451,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/ssl_certificates/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/ssl_certificates/transports/rest_base.py index 03de2b0dcb72..ae460d4f8ebf 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/ssl_certificates/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/ssl_certificates/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -261,7 +264,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -363,7 +368,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -372,7 +377,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -381,6 +386,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/ssl_policies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/ssl_policies/client.py index 6020125d29a3..79c72d6f8c53 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/ssl_policies/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/ssl_policies/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the SslPoliciesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/ssl_policies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/ssl_policies/transports/rest.py index dd1f4fc7150e..c4f7eedcc128 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/ssl_policies/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/ssl_policies/transports/rest.py @@ -553,39 +553,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/ssl_policies/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/ssl_policies/transports/rest_base.py index 526afb127114..5afa74650ca1 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/ssl_policies/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/ssl_policies/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -261,7 +264,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseListAvailableFeatures: @@ -362,7 +367,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -371,6 +376,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -409,7 +415,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -418,7 +424,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -427,6 +433,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -465,7 +472,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -474,7 +481,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -483,6 +490,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/storage_pool_types/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/storage_pool_types/client.py index 182b995b81b4..c97a007d4ef3 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/storage_pool_types/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/storage_pool_types/client.py @@ -531,9 +531,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the StoragePoolTypesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/storage_pool_types/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/storage_pool_types/transports/rest.py index 04d8864008dc..1eb73a543075 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/storage_pool_types/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/storage_pool_types/transports/rest.py @@ -284,39 +284,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/storage_pool_types/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/storage_pool_types/transports/rest_base.py index ab83711d7065..c4cd4f84c225 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/storage_pool_types/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/storage_pool_types/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/storage_pools/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/storage_pools/client.py index 0b9361a631dc..ce4884a00498 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/storage_pools/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/storage_pools/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the StoragePoolsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/storage_pools/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/storage_pools/transports/rest.py index 6ee279a6c750..2f9ddc93ac40 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/storage_pools/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/storage_pools/transports/rest.py @@ -665,39 +665,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/storage_pools/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/storage_pools/transports/rest_base.py index 9fbf97e36f6a..b2382cadf4dc 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/storage_pools/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/storage_pools/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetIamPolicy: @@ -260,7 +263,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -269,6 +272,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -307,7 +311,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -362,7 +367,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -371,6 +376,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseListDisks: @@ -408,7 +414,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -417,6 +423,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetIamPolicy: @@ -455,7 +462,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -464,7 +471,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -473,6 +480,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -511,7 +519,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -520,7 +528,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -529,6 +537,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdate: @@ -567,7 +576,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -576,7 +585,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -585,6 +594,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/subnetworks/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/subnetworks/client.py index a1eec3368a99..d3e833d00867 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/subnetworks/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/subnetworks/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the SubnetworksTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/subnetworks/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/subnetworks/transports/rest.py index 45ea7ea765ac..8d24c6924f83 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/subnetworks/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/subnetworks/transports/rest.py @@ -777,39 +777,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/subnetworks/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/subnetworks/transports/rest_base.py index 094df164ab74..9f33941cea12 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/subnetworks/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/subnetworks/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseExpandIpCidrRange: @@ -215,7 +217,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetIamPolicy: @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -363,7 +368,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -372,7 +377,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -381,6 +386,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -418,7 +424,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -427,6 +433,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseListUsable: @@ -464,7 +471,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -473,6 +480,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -511,7 +519,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -520,7 +528,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -529,6 +537,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetIamPolicy: @@ -567,7 +576,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -576,7 +585,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -585,6 +594,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetPrivateIpGoogleAccess: @@ -623,7 +633,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -632,7 +642,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -641,6 +651,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -679,7 +690,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -688,7 +699,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -697,6 +708,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_grpc_proxies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_grpc_proxies/client.py index dedac66d4cb6..71e992745402 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_grpc_proxies/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_grpc_proxies/client.py @@ -536,9 +536,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the TargetGrpcProxiesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_grpc_proxies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_grpc_proxies/transports/rest.py index fa0790bf2d81..b3c654eb2d20 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_grpc_proxies/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_grpc_proxies/transports/rest.py @@ -446,39 +446,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_grpc_proxies/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_grpc_proxies/transports/rest_base.py index c79a89a07c90..9eac915de5b0 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_grpc_proxies/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_grpc_proxies/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -215,7 +217,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -317,7 +321,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -326,7 +330,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -335,6 +339,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -373,7 +378,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -382,7 +387,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -391,6 +396,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_http_proxies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_http_proxies/client.py index a0170f9dc42f..834df5abe9c2 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_http_proxies/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_http_proxies/client.py @@ -536,9 +536,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the TargetHttpProxiesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_http_proxies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_http_proxies/transports/rest.py index f9f49a01bb09..583a30c1a283 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_http_proxies/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_http_proxies/transports/rest.py @@ -559,39 +559,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_http_proxies/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_http_proxies/transports/rest_base.py index d6d35d62d71a..6da73d1b6ec2 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_http_proxies/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_http_proxies/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -261,7 +264,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -363,7 +368,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -372,7 +377,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -381,6 +386,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetUrlMap: @@ -419,7 +425,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -428,7 +434,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -437,6 +443,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -475,7 +482,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -484,7 +491,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -493,6 +500,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_https_proxies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_https_proxies/client.py index 8a36bcdb9ace..f2afe64ad176 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_https_proxies/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_https_proxies/client.py @@ -536,9 +536,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the TargetHttpsProxiesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_https_proxies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_https_proxies/transports/rest.py index 263d2088d274..7b9f15f939b5 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_https_proxies/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_https_proxies/transports/rest.py @@ -784,39 +784,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_https_proxies/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_https_proxies/transports/rest_base.py index 707ba124c969..d0eea3986d53 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_https_proxies/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_https_proxies/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -261,7 +264,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -363,7 +368,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -372,7 +377,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -381,6 +386,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetCertificateMap: @@ -419,7 +425,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -428,7 +434,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -437,6 +443,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetQuicOverride: @@ -475,7 +482,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -484,7 +491,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -493,6 +500,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetSslCertificates: @@ -531,7 +539,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -540,7 +548,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -549,6 +557,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetSslPolicy: @@ -587,7 +596,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -596,7 +605,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -605,6 +614,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetUrlMap: @@ -643,7 +653,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -652,7 +662,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -661,6 +671,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -699,7 +710,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -708,7 +719,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -717,6 +728,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_instances/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_instances/client.py index f86bd26678e9..441a1c90eee1 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_instances/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_instances/client.py @@ -534,9 +534,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the TargetInstancesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_instances/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_instances/transports/rest.py index 0b297e053e0e..89d0d12a4e28 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_instances/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_instances/transports/rest.py @@ -508,39 +508,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_instances/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_instances/transports/rest_base.py index fec829cf1eba..5e2fc302ea86 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_instances/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_instances/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -261,7 +264,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetSecurityPolicy: @@ -363,7 +368,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -372,7 +377,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -381,6 +386,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -419,7 +425,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -428,7 +434,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -437,6 +443,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_pools/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_pools/client.py index f93ca7173bac..773c73d0869d 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_pools/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_pools/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the TargetPoolsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_pools/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_pools/transports/rest.py index 5a6cf1b98916..0e4a71a62a4c 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_pools/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_pools/transports/rest.py @@ -833,39 +833,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_pools/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_pools/transports/rest_base.py index c722fd2bc7ce..aba5dda20f5b 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_pools/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_pools/transports/rest_base.py @@ -123,7 +123,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -132,7 +132,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -141,6 +141,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseAddInstance: @@ -179,7 +180,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -188,7 +189,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -197,6 +198,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseAggregatedList: @@ -234,7 +236,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -243,6 +245,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -280,7 +283,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -289,6 +292,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -326,7 +330,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -335,6 +339,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetHealth: @@ -373,7 +378,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -382,7 +387,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -391,6 +396,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -429,7 +435,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -438,7 +444,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -447,6 +453,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -484,7 +491,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -493,6 +500,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseRemoveHealthCheck: @@ -531,7 +539,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -540,7 +548,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -549,6 +557,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseRemoveInstance: @@ -587,7 +596,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -596,7 +605,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -605,6 +614,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetBackup: @@ -643,7 +653,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -652,7 +662,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -661,6 +671,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetSecurityPolicy: @@ -699,7 +710,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -708,7 +719,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -717,6 +728,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -755,7 +767,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -764,7 +776,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -773,6 +785,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_ssl_proxies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_ssl_proxies/client.py index 6726e11bef97..578b534d289e 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_ssl_proxies/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_ssl_proxies/client.py @@ -534,9 +534,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the TargetSslProxiesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_ssl_proxies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_ssl_proxies/transports/rest.py index 7290352882c8..15fef0011f2a 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_ssl_proxies/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_ssl_proxies/transports/rest.py @@ -673,39 +673,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_ssl_proxies/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_ssl_proxies/transports/rest_base.py index 7e99dc9e0d3a..8f2069968fb8 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_ssl_proxies/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_ssl_proxies/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -215,7 +217,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetBackendService: @@ -317,7 +321,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -326,7 +330,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -335,6 +339,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetCertificateMap: @@ -373,7 +378,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -382,7 +387,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -391,6 +396,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetProxyHeader: @@ -429,7 +435,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -438,7 +444,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -447,6 +453,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetSslCertificates: @@ -485,7 +492,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -494,7 +501,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -503,6 +510,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetSslPolicy: @@ -541,7 +549,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -550,7 +558,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -559,6 +567,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -597,7 +606,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -606,7 +615,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -615,6 +624,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_tcp_proxies/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_tcp_proxies/client.py index 1c1c58337153..f2493ab265cd 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_tcp_proxies/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_tcp_proxies/client.py @@ -534,9 +534,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the TargetTcpProxiesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_tcp_proxies/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_tcp_proxies/transports/rest.py index 83f26328eb84..31c38780ef87 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_tcp_proxies/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_tcp_proxies/transports/rest.py @@ -563,39 +563,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_tcp_proxies/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_tcp_proxies/transports/rest_base.py index 039e09a11b9a..3e2e38b95868 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_tcp_proxies/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_tcp_proxies/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -261,7 +264,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetBackendService: @@ -363,7 +368,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -372,7 +377,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -381,6 +386,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetProxyHeader: @@ -419,7 +425,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -428,7 +434,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -437,6 +443,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -475,7 +482,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -484,7 +491,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -493,6 +500,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_vpn_gateways/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_vpn_gateways/client.py index 69966be97039..7eafdeeb86ef 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_vpn_gateways/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_vpn_gateways/client.py @@ -536,9 +536,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the TargetVpnGatewaysTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_vpn_gateways/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_vpn_gateways/transports/rest.py index dcb205c7c431..359be45787e0 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_vpn_gateways/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_vpn_gateways/transports/rest.py @@ -506,39 +506,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_vpn_gateways/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_vpn_gateways/transports/rest_base.py index 35ddd4bbcc01..327437d30f45 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_vpn_gateways/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/target_vpn_gateways/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -261,7 +264,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetLabels: @@ -363,7 +368,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -372,7 +377,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -381,6 +386,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -419,7 +425,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -428,7 +434,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -437,6 +443,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/url_maps/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/url_maps/client.py index 5e5eada3fe6a..3907f433382f 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/url_maps/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/url_maps/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the UrlMapsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/url_maps/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/url_maps/transports/rest.py index 8a3220390cb5..4ec173173315 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/url_maps/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/url_maps/transports/rest.py @@ -651,39 +651,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/url_maps/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/url_maps/transports/rest_base.py index 74bba5ca8b10..5df28aaedb41 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/url_maps/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/url_maps/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -261,7 +264,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInvalidateCache: @@ -317,7 +321,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -326,7 +330,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -335,6 +339,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -372,7 +377,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -381,6 +386,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -419,7 +425,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -428,7 +434,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -437,6 +443,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -475,7 +482,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -484,7 +491,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -493,6 +500,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdate: @@ -531,7 +539,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -540,7 +548,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -549,6 +557,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseValidate: @@ -587,7 +596,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -596,7 +605,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -605,6 +614,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/vpn_gateways/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/vpn_gateways/client.py index 1851d625901d..9012e4404bf0 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/vpn_gateways/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/vpn_gateways/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the VpnGatewaysTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/vpn_gateways/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/vpn_gateways/transports/rest.py index 3b28d90319d9..028d0c0ba66f 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/vpn_gateways/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/vpn_gateways/transports/rest.py @@ -557,39 +557,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/vpn_gateways/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/vpn_gateways/transports/rest_base.py index fa3d5adc251c..634226d74b7f 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/vpn_gateways/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/vpn_gateways/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetStatus: @@ -260,7 +263,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -269,6 +272,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -307,7 +311,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -362,7 +367,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -371,6 +376,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetLabels: @@ -409,7 +415,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -418,7 +424,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -427,6 +433,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -465,7 +472,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -474,7 +481,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -483,6 +490,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/vpn_tunnels/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/vpn_tunnels/client.py index 56a03dab1395..8aa2bbb834cd 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/vpn_tunnels/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/vpn_tunnels/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the VpnTunnelsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/vpn_tunnels/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/vpn_tunnels/transports/rest.py index 91a0f2f48137..189da7527633 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/vpn_tunnels/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/vpn_tunnels/transports/rest.py @@ -494,39 +494,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/vpn_tunnels/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/vpn_tunnels/transports/rest_base.py index d40af42b48d6..0f2692cbf530 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/vpn_tunnels/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/vpn_tunnels/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -261,7 +264,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetLabels: @@ -363,7 +368,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -372,7 +377,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -381,6 +386,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -419,7 +425,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -428,7 +434,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -437,6 +443,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/wire_groups/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/wire_groups/client.py index 7426519b9c5d..feff480ebf0b 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/wire_groups/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/wire_groups/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the WireGroupsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/wire_groups/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/wire_groups/transports/rest.py index 404580a58c4e..f9fad7c7cd34 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/wire_groups/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/wire_groups/transports/rest.py @@ -375,39 +375,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/wire_groups/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/wire_groups/transports/rest_base.py index 1819b1281cfe..0e5667065749 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/wire_groups/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/wire_groups/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -215,7 +217,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -317,7 +321,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -326,7 +330,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -335,6 +339,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_operations/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_operations/client.py index 9500dba5e26f..c01df1814577 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_operations/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_operations/client.py @@ -529,9 +529,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the ZoneOperationsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_operations/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_operations/transports/rest.py index ec80d27fe35c..dce0aaae2975 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_operations/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_operations/transports/rest.py @@ -335,39 +335,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_operations/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_operations/transports/rest_base.py index fd24597a019d..8f285a4e0cd6 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_operations/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zone_operations/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseWait: @@ -260,7 +263,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -269,6 +272,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zones/client.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zones/client.py index f5103c838bc1..efc02607556e 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zones/client.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zones/client.py @@ -527,9 +527,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the ZonesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zones/transports/rest.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zones/transports/rest.py index ca3d3cbaecf8..066ffe92a602 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zones/transports/rest.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zones/transports/rest.py @@ -217,39 +217,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zones/transports/rest_base.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zones/transports/rest_base.py index 1939943974e3..4b8de6ec66db 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zones/transports/rest_base.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/services/zones/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/types/compute.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/types/compute.py index 94e587330a88..06abc481cc2d 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/types/compute.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/types/compute.py @@ -61821,6 +61821,11 @@ class InterconnectLocation(proto.Message): [Output Only] Server-defined URL for the resource. This field is a member of `oneof`_ ``_self_link``. + single_region_production_critical_peer_locations (MutableSequence[str]): + [Output Only] URLs of the other locations that can pair up + with this location to support Single-Region 99.99% SLA. E.g. + iad-zone1-1 and iad-zone2-5467 are Single-Region 99.99% peer + locations of each other. status (str): [Output Only] The status of this InterconnectLocation, which can take one of the following values: - CLOSED: The @@ -62023,6 +62028,12 @@ class Status(proto.Enum): number=456214797, optional=True, ) + single_region_production_critical_peer_locations: MutableSequence[ + str + ] = proto.RepeatedField( + proto.STRING, + number=439537103, + ) status: str = proto.Field( proto.STRING, number=181260274, @@ -93386,6 +93397,11 @@ class PatchOrganizationSecurityPolicyRequest(proto.Message): Name of the security policy to update. security_policy_resource (google.cloud.compute_v1beta.types.SecurityPolicy): The body resource for this request + update_mask (str): + Indicates fields to be cleared as part of + this request. + + This field is a member of `oneof`_ ``_update_mask``. """ request_id: str = proto.Field( @@ -93402,6 +93418,11 @@ class PatchOrganizationSecurityPolicyRequest(proto.Message): number=216159612, message="SecurityPolicy", ) + update_mask: str = proto.Field( + proto.STRING, + number=500079778, + optional=True, + ) class PatchPacketMirroringRequest(proto.Message): @@ -94968,6 +94989,11 @@ class PatchRuleOrganizationSecurityPolicyRequest(proto.Message): Name of the security policy to update. security_policy_rule_resource (google.cloud.compute_v1beta.types.SecurityPolicyRule): The body resource for this request + update_mask (str): + Indicates fields to be cleared as part of + this request. + + This field is a member of `oneof`_ ``_update_mask``. """ priority: int = proto.Field( @@ -94989,6 +95015,11 @@ class PatchRuleOrganizationSecurityPolicyRequest(proto.Message): number=402693443, message="SecurityPolicyRule", ) + update_mask: str = proto.Field( + proto.STRING, + number=500079778, + optional=True, + ) class PatchRuleRegionNetworkFirewallPolicyRequest(proto.Message): diff --git a/packages/google-cloud-compute-v1beta/noxfile.py b/packages/google-cloud-compute-v1beta/noxfile.py index 499fcede6f9c..7e6847288a9d 100644 --- a/packages/google-cloud-compute-v1beta/noxfile.py +++ b/packages/google-cloud-compute-v1beta/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-compute-v1beta/testing/constraints-3.14.txt b/packages/google-cloud-compute-v1beta/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-cloud-compute-v1beta/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_accelerator_types.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_accelerator_types.py index 52db228767d9..b392176ced62 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_accelerator_types.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_accelerator_types.py @@ -1083,7 +1083,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1355,7 +1355,7 @@ def test_get_rest_required_fields(request_type=compute.GetAcceleratorTypeRequest response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1562,7 +1562,7 @@ def test_list_rest_required_fields(request_type=compute.ListAcceleratorTypesRequ response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_addresses.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_addresses.py index 4c6ee0047993..f14cd287f02e 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_addresses.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_addresses.py @@ -1041,7 +1041,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1314,7 +1314,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteAddressRequest): response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1521,7 +1521,7 @@ def test_delete_unary_rest_required_fields(request_type=compute.DeleteAddressReq response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1722,7 +1722,7 @@ def test_get_rest_required_fields(request_type=compute.GetAddressRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1926,7 +1926,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertAddressRequest): response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2126,7 +2126,7 @@ def test_insert_unary_rest_required_fields(request_type=compute.InsertAddressReq response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2329,7 +2329,7 @@ def test_list_rest_required_fields(request_type=compute.ListAddressesRequest): response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2599,7 +2599,7 @@ def test_move_rest_required_fields(request_type=compute.MoveAddressRequest): response = client.move(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2814,7 +2814,7 @@ def test_move_unary_rest_required_fields(request_type=compute.MoveAddressRequest response = client.move_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3029,7 +3029,7 @@ def test_set_labels_rest_required_fields(request_type=compute.SetLabelsAddressRe response = client.set_labels(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3246,7 +3246,7 @@ def test_set_labels_unary_rest_required_fields( response = client.set_labels_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3461,7 +3461,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_advice.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_advice.py index 4afa7d543116..659e7a67b94b 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_advice.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_advice.py @@ -1010,7 +1010,7 @@ def test_calendar_mode_rest_required_fields( response = client.calendar_mode(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_autoscalers.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_autoscalers.py index 805876b2f3a7..a7c6ac55b309 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_autoscalers.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_autoscalers.py @@ -1049,7 +1049,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1325,7 +1325,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteAutoscalerReques response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1534,7 +1534,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1735,7 +1735,7 @@ def test_get_rest_required_fields(request_type=compute.GetAutoscalerRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1939,7 +1939,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertAutoscalerReques response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2145,7 +2145,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2352,7 +2352,7 @@ def test_list_rest_required_fields(request_type=compute.ListAutoscalersRequest): response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2623,7 +2623,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchAutoscalerRequest) response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2837,7 +2837,7 @@ def test_patch_unary_rest_required_fields(request_type=compute.PatchAutoscalerRe response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3050,7 +3050,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3266,7 +3266,7 @@ def test_update_rest_required_fields(request_type=compute.UpdateAutoscalerReques response = client.update(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3482,7 +3482,7 @@ def test_update_unary_rest_required_fields( response = client.update_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_backend_buckets.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_backend_buckets.py index 129029d91616..43c31744e7c6 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_backend_buckets.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_backend_buckets.py @@ -1073,7 +1073,7 @@ def test_add_signed_url_key_rest_required_fields( response = client.add_signed_url_key(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1279,7 +1279,7 @@ def test_add_signed_url_key_unary_rest_required_fields( response = client.add_signed_url_key_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1478,7 +1478,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteBackendBucketReq response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1676,7 +1676,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1896,6 +1896,7 @@ def test_delete_signed_url_key_rest_required_fields( "keyName", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2124,6 +2125,7 @@ def test_delete_signed_url_key_unary_rest_required_fields( "keyName", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2322,7 +2324,7 @@ def test_get_rest_required_fields(request_type=compute.GetBackendBucketRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2516,7 +2518,7 @@ def test_get_iam_policy_rest_required_fields( response = client.get_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2709,7 +2711,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertBackendBucketReq response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2908,7 +2910,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3108,7 +3110,7 @@ def test_list_rest_required_fields(request_type=compute.ListBackendBucketsReques response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3368,7 +3370,7 @@ def test_list_usable_rest_required_fields( response = client.list_usable(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3627,7 +3629,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchBackendBucketReque response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3833,7 +3835,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4044,7 +4046,7 @@ def test_set_edge_security_policy_rest_required_fields( response = client.set_edge_security_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4255,7 +4257,7 @@ def test_set_edge_security_policy_unary_rest_required_fields( response = client.set_edge_security_policy_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4455,7 +4457,7 @@ def test_set_iam_policy_rest_required_fields( response = client.set_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4659,7 +4661,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4863,7 +4865,7 @@ def test_update_rest_required_fields(request_type=compute.UpdateBackendBucketReq response = client.update(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5069,7 +5071,7 @@ def test_update_unary_rest_required_fields( response = client.update_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_backend_services.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_backend_services.py index 2d5abb7698c5..5ad2745c86be 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_backend_services.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_backend_services.py @@ -1087,7 +1087,7 @@ def test_add_signed_url_key_rest_required_fields( response = client.add_signed_url_key(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1293,7 +1293,7 @@ def test_add_signed_url_key_unary_rest_required_fields( response = client.add_signed_url_key_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1496,7 +1496,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1770,7 +1770,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteBackendServiceRe response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1968,7 +1968,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2188,6 +2188,7 @@ def test_delete_signed_url_key_rest_required_fields( "keyName", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2416,6 +2417,7 @@ def test_delete_signed_url_key_unary_rest_required_fields( "keyName", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2614,7 +2616,7 @@ def test_get_rest_required_fields(request_type=compute.GetBackendServiceRequest) response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2815,7 +2817,7 @@ def test_get_effective_security_policies_rest_required_fields( response = client.get_effective_security_policies(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3012,7 +3014,7 @@ def test_get_health_rest_required_fields( response = client.get_health(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3213,7 +3215,7 @@ def test_get_iam_policy_rest_required_fields( response = client.get_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3406,7 +3408,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertBackendServiceRe response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3605,7 +3607,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3805,7 +3807,7 @@ def test_list_rest_required_fields(request_type=compute.ListBackendServicesReque response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4065,7 +4067,7 @@ def test_list_usable_rest_required_fields( response = client.list_usable(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4324,7 +4326,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchBackendServiceRequ response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4530,7 +4532,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4741,7 +4743,7 @@ def test_set_edge_security_policy_rest_required_fields( response = client.set_edge_security_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4952,7 +4954,7 @@ def test_set_edge_security_policy_unary_rest_required_fields( response = client.set_edge_security_policy_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5152,7 +5154,7 @@ def test_set_iam_policy_rest_required_fields( response = client.set_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5362,7 +5364,7 @@ def test_set_security_policy_rest_required_fields( response = client.set_security_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5572,7 +5574,7 @@ def test_set_security_policy_unary_rest_required_fields( response = client.set_security_policy_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5776,7 +5778,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5980,7 +5982,7 @@ def test_update_rest_required_fields(request_type=compute.UpdateBackendServiceRe response = client.update(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6186,7 +6188,7 @@ def test_update_unary_rest_required_fields( response = client.update_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_cross_site_networks.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_cross_site_networks.py index ecfa6eed5a0d..f89958bdfff4 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_cross_site_networks.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_cross_site_networks.py @@ -1096,7 +1096,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1294,7 +1294,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1484,7 +1484,7 @@ def test_get_rest_required_fields(request_type=compute.GetCrossSiteNetworkReques response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1684,7 +1684,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1893,7 +1893,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2098,7 +2098,7 @@ def test_list_rest_required_fields(request_type=compute.ListCrossSiteNetworksReq response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2363,7 +2363,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchCrossSiteNetworkRe response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2581,7 +2581,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_disk_settings_service.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_disk_settings_service.py index e8299c455920..8a1a4dca3054 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_disk_settings_service.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_disk_settings_service.py @@ -1101,7 +1101,7 @@ def test_get_rest_required_fields(request_type=compute.GetDiskSettingRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1303,7 +1303,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchDiskSettingRequest response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1529,7 +1529,7 @@ def test_patch_unary_rest_required_fields(request_type=compute.PatchDiskSettingR response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_disk_types.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_disk_types.py index 5228ce3f91fe..bdee4ff2bfc0 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_disk_types.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_disk_types.py @@ -1036,7 +1036,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1303,7 +1303,7 @@ def test_get_rest_required_fields(request_type=compute.GetDiskTypeRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1510,7 +1510,7 @@ def test_list_rest_required_fields(request_type=compute.ListDiskTypesRequest): response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_disks.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_disks.py index 7e8d89567c8e..59d633cb2367 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_disks.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_disks.py @@ -1028,7 +1028,7 @@ def test_add_resource_policies_rest_required_fields( response = client.add_resource_policies(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1246,7 +1246,7 @@ def test_add_resource_policies_unary_rest_required_fields( response = client.add_resource_policies_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1456,7 +1456,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1726,7 +1726,7 @@ def test_bulk_insert_rest_required_fields(request_type=compute.BulkInsertDiskReq response = client.bulk_insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1932,7 +1932,7 @@ def test_bulk_insert_unary_rest_required_fields( response = client.bulk_insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2143,7 +2143,7 @@ def test_bulk_set_labels_rest_required_fields( response = client.bulk_set_labels(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2367,7 +2367,7 @@ def test_bulk_set_labels_unary_rest_required_fields( response = client.bulk_set_labels_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2595,7 +2595,7 @@ def test_create_snapshot_rest_required_fields( response = client.create_snapshot(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2814,7 +2814,7 @@ def test_create_snapshot_unary_rest_required_fields( response = client.create_snapshot_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3025,7 +3025,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteDiskRequest): response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3228,7 +3228,7 @@ def test_delete_unary_rest_required_fields(request_type=compute.DeleteDiskReques response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3425,7 +3425,7 @@ def test_get_rest_required_fields(request_type=compute.GetDiskRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3626,7 +3626,7 @@ def test_get_iam_policy_rest_required_fields( response = client.get_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3835,7 +3835,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertDiskRequest): response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4045,7 +4045,7 @@ def test_insert_unary_rest_required_fields(request_type=compute.InsertDiskReques response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4253,7 +4253,7 @@ def test_list_rest_required_fields(request_type=compute.ListDisksRequest): response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4530,7 +4530,7 @@ def test_remove_resource_policies_rest_required_fields( response = client.remove_resource_policies(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4748,7 +4748,7 @@ def test_remove_resource_policies_unary_rest_required_fields( response = client.remove_resource_policies_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4959,7 +4959,7 @@ def test_resize_rest_required_fields(request_type=compute.ResizeDiskRequest): response = client.resize(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5166,7 +5166,7 @@ def test_resize_unary_rest_required_fields(request_type=compute.ResizeDiskReques response = client.resize_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5369,7 +5369,7 @@ def test_set_iam_policy_rest_required_fields( response = client.set_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5584,7 +5584,7 @@ def test_set_labels_rest_required_fields(request_type=compute.SetLabelsDiskReque response = client.set_labels(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5801,7 +5801,7 @@ def test_set_labels_unary_rest_required_fields( response = client.set_labels_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6023,7 +6023,7 @@ def test_start_async_replication_rest_required_fields( response = client.start_async_replication(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6241,7 +6241,7 @@ def test_start_async_replication_unary_rest_required_fields( response = client.start_async_replication_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6458,7 +6458,7 @@ def test_stop_async_replication_rest_required_fields( response = client.stop_async_replication(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6668,7 +6668,7 @@ def test_stop_async_replication_unary_rest_required_fields( response = client.stop_async_replication_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6875,7 +6875,7 @@ def test_stop_group_async_replication_rest_required_fields( response = client.stop_group_async_replication(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -7086,7 +7086,7 @@ def test_stop_group_async_replication_unary_rest_required_fields( response = client.stop_group_async_replication_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -7296,7 +7296,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -7517,7 +7517,7 @@ def test_update_rest_required_fields(request_type=compute.UpdateDiskRequest): response = client.update(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -7736,7 +7736,7 @@ def test_update_unary_rest_required_fields(request_type=compute.UpdateDiskReques response = client.update_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_external_vpn_gateways.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_external_vpn_gateways.py index 89c213ef5bbc..35fe7ac4ddd1 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_external_vpn_gateways.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_external_vpn_gateways.py @@ -1110,7 +1110,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1308,7 +1308,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1498,7 +1498,7 @@ def test_get_rest_required_fields(request_type=compute.GetExternalVpnGatewayRequ response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1693,7 +1693,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1892,7 +1892,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2092,7 +2092,7 @@ def test_list_rest_required_fields(request_type=compute.ListExternalVpnGatewaysR response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2351,7 +2351,7 @@ def test_set_labels_rest_required_fields( response = client.set_labels(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2555,7 +2555,7 @@ def test_set_labels_unary_rest_required_fields( response = client.set_labels_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2759,7 +2759,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_firewall_policies.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_firewall_policies.py index b67dbdfbbfb6..be12d1e8dce4 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_firewall_policies.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_firewall_policies.py @@ -1090,7 +1090,7 @@ def test_add_association_rest_required_fields( response = client.add_association(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1299,7 +1299,7 @@ def test_add_association_unary_rest_required_fields( response = client.add_association_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1508,7 +1508,7 @@ def test_add_packet_mirroring_rule_rest_required_fields( response = client.add_packet_mirroring_rule(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1712,7 +1712,7 @@ def test_add_packet_mirroring_rule_unary_rest_required_fields( response = client.add_packet_mirroring_rule_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1911,7 +1911,7 @@ def test_add_rule_rest_required_fields( response = client.add_rule(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2110,7 +2110,7 @@ def test_add_rule_unary_rest_required_fields( response = client.add_rule_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2313,7 +2313,7 @@ def test_clone_rules_rest_required_fields( response = client.clone_rules(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2510,7 +2510,7 @@ def test_clone_rules_unary_rest_required_fields( response = client.clone_rules_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2700,7 +2700,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteFirewallPolicyRe response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2884,7 +2884,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3060,7 +3060,7 @@ def test_get_rest_required_fields(request_type=compute.GetFirewallPolicyRequest) response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3240,7 +3240,7 @@ def test_get_association_rest_required_fields( response = client.get_association(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3420,7 +3420,7 @@ def test_get_iam_policy_rest_required_fields( response = client.get_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3607,7 +3607,7 @@ def test_get_packet_mirroring_rule_rest_required_fields( response = client.get_packet_mirroring_rule(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3787,7 +3787,7 @@ def test_get_rule_rest_required_fields( response = client.get_rule(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3983,6 +3983,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertFirewallPolicyRe "parentId", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4208,6 +4209,7 @@ def test_insert_unary_rest_required_fields( "parentId", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4569,6 +4571,7 @@ def test_move_rest_required_fields(request_type=compute.MoveFirewallPolicyReques "parentId", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4785,6 +4788,7 @@ def test_move_unary_rest_required_fields( "parentId", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4983,7 +4987,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchFirewallPolicyRequ response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5190,7 +5194,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5407,7 +5411,7 @@ def test_patch_packet_mirroring_rule_rest_required_fields( response = client.patch_packet_mirroring_rule(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5621,7 +5625,7 @@ def test_patch_packet_mirroring_rule_unary_rest_required_fields( response = client.patch_packet_mirroring_rule_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5832,7 +5836,7 @@ def test_patch_rule_rest_required_fields( response = client.patch_rule(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6041,7 +6045,7 @@ def test_patch_rule_unary_rest_required_fields( response = client.patch_rule_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6253,7 +6257,7 @@ def test_remove_association_rest_required_fields( response = client.remove_association(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6454,7 +6458,7 @@ def test_remove_association_unary_rest_required_fields( response = client.remove_association_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6656,7 +6660,7 @@ def test_remove_packet_mirroring_rule_rest_required_fields( response = client.remove_packet_mirroring_rule(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6858,7 +6862,7 @@ def test_remove_packet_mirroring_rule_unary_rest_required_fields( response = client.remove_packet_mirroring_rule_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -7057,7 +7061,7 @@ def test_remove_rule_rest_required_fields( response = client.remove_rule(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -7254,7 +7258,7 @@ def test_remove_rule_unary_rest_required_fields( response = client.remove_rule_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -7441,7 +7445,7 @@ def test_set_iam_policy_rest_required_fields( response = client.set_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -7638,7 +7642,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_firewalls.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_firewalls.py index 5ee2f1c6fa32..e1382988f31f 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_firewalls.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_firewalls.py @@ -1037,7 +1037,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteFirewallRequest) response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1233,7 +1233,7 @@ def test_delete_unary_rest_required_fields(request_type=compute.DeleteFirewallRe response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1423,7 +1423,7 @@ def test_get_rest_required_fields(request_type=compute.GetFirewallRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1616,7 +1616,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertFirewallRequest) response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1813,7 +1813,7 @@ def test_insert_unary_rest_required_fields(request_type=compute.InsertFirewallRe response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2013,7 +2013,7 @@ def test_list_rest_required_fields(request_type=compute.ListFirewallsRequest): response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2272,7 +2272,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchFirewallRequest): response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2476,7 +2476,7 @@ def test_patch_unary_rest_required_fields(request_type=compute.PatchFirewallRequ response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2680,7 +2680,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2884,7 +2884,7 @@ def test_update_rest_required_fields(request_type=compute.UpdateFirewallRequest) response = client.update(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3088,7 +3088,7 @@ def test_update_unary_rest_required_fields(request_type=compute.UpdateFirewallRe response = client.update_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_forwarding_rules.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_forwarding_rules.py index 1a1b90730bca..9589894c1a3c 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_forwarding_rules.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_forwarding_rules.py @@ -1084,7 +1084,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1362,7 +1362,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteForwardingRuleRe response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1571,7 +1571,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1772,7 +1772,7 @@ def test_get_rest_required_fields(request_type=compute.GetForwardingRuleRequest) response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1976,7 +1976,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertForwardingRuleRe response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2182,7 +2182,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2389,7 +2389,7 @@ def test_list_rest_required_fields(request_type=compute.ListForwardingRulesReque response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2659,7 +2659,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchForwardingRuleRequ response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2876,7 +2876,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3093,7 +3093,7 @@ def test_set_labels_rest_required_fields( response = client.set_labels(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3310,7 +3310,7 @@ def test_set_labels_unary_rest_required_fields( response = client.set_labels_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3527,7 +3527,7 @@ def test_set_target_rest_required_fields( response = client.set_target(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3740,7 +3740,7 @@ def test_set_target_unary_rest_required_fields( response = client.set_target_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3951,7 +3951,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_future_reservations.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_future_reservations.py index 1928248f532a..373382b6d5f9 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_future_reservations.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_future_reservations.py @@ -1104,7 +1104,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1385,7 +1385,7 @@ def test_cancel_rest_required_fields( response = client.cancel(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1594,7 +1594,7 @@ def test_cancel_unary_rest_required_fields( response = client.cancel_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1803,7 +1803,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2012,7 +2012,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2213,7 +2213,7 @@ def test_get_rest_required_fields(request_type=compute.GetFutureReservationReque response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2419,7 +2419,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2629,7 +2629,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2840,7 +2840,7 @@ def test_list_rest_required_fields(request_type=compute.ListFutureReservationsRe response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3119,7 +3119,7 @@ def test_update_rest_required_fields( response = client.update(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3350,7 +3350,7 @@ def test_update_unary_rest_required_fields( response = client.update_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_global_addresses.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_global_addresses.py index 5ec6d1b3a55e..625ac2174a0a 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_global_addresses.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_global_addresses.py @@ -1080,7 +1080,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteGlobalAddressReq response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1278,7 +1278,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1468,7 +1468,7 @@ def test_get_rest_required_fields(request_type=compute.GetGlobalAddressRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1661,7 +1661,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertGlobalAddressReq response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1856,7 +1856,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2052,7 +2052,7 @@ def test_list_rest_required_fields(request_type=compute.ListGlobalAddressesReque response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2311,7 +2311,7 @@ def test_move_rest_required_fields(request_type=compute.MoveGlobalAddressRequest response = client.move(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2515,7 +2515,7 @@ def test_move_unary_rest_required_fields(request_type=compute.MoveGlobalAddressR response = client.move_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2719,7 +2719,7 @@ def test_set_labels_rest_required_fields( response = client.set_labels(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2923,7 +2923,7 @@ def test_set_labels_unary_rest_required_fields( response = client.set_labels_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3127,7 +3127,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_global_forwarding_rules.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_global_forwarding_rules.py index 630a79c475af..e3ec2d2752ec 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_global_forwarding_rules.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_global_forwarding_rules.py @@ -1112,7 +1112,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1310,7 +1310,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1500,7 +1500,7 @@ def test_get_rest_required_fields(request_type=compute.GetGlobalForwardingRuleRe response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1695,7 +1695,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1894,7 +1894,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2096,7 +2096,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2357,7 +2357,7 @@ def test_patch_rest_required_fields( response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2563,7 +2563,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2767,7 +2767,7 @@ def test_set_labels_rest_required_fields( response = client.set_labels(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2971,7 +2971,7 @@ def test_set_labels_unary_rest_required_fields( response = client.set_labels_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3177,7 +3177,7 @@ def test_set_target_rest_required_fields( response = client.set_target(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3379,7 +3379,7 @@ def test_set_target_unary_rest_required_fields( response = client.set_target_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3579,7 +3579,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_global_network_endpoint_groups.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_global_network_endpoint_groups.py index 889b2cbd6726..c840b6da53cd 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_global_network_endpoint_groups.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_global_network_endpoint_groups.py @@ -1134,7 +1134,7 @@ def test_attach_network_endpoints_rest_required_fields( response = client.attach_network_endpoints(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1349,7 +1349,7 @@ def test_attach_network_endpoints_unary_rest_required_fields( response = client.attach_network_endpoints_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1558,7 +1558,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1756,7 +1756,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1960,7 +1960,7 @@ def test_detach_network_endpoints_rest_required_fields( response = client.detach_network_endpoints(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2175,7 +2175,7 @@ def test_detach_network_endpoints_unary_rest_required_fields( response = client.detach_network_endpoints_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2378,7 +2378,7 @@ def test_get_rest_required_fields( response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2573,7 +2573,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2772,7 +2772,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2974,7 +2974,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3245,7 +3245,7 @@ def test_list_network_endpoints_rest_required_fields( response = client.list_network_endpoints(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_global_operations.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_global_operations.py index 8bf785c1eb2b..328d70300c95 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_global_operations.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_global_operations.py @@ -1083,7 +1083,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1346,7 +1346,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteGlobalOperationR response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1536,7 +1536,7 @@ def test_get_rest_required_fields(request_type=compute.GetGlobalOperationRequest response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1732,7 +1732,7 @@ def test_list_rest_required_fields(request_type=compute.ListGlobalOperationsRequ response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1984,7 +1984,7 @@ def test_wait_rest_required_fields(request_type=compute.WaitGlobalOperationReque response = client.wait(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_global_organization_operations.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_global_organization_operations.py index 014d08966b3b..961118851b93 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_global_organization_operations.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_global_organization_operations.py @@ -1119,7 +1119,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1301,7 +1301,7 @@ def test_get_rest_required_fields( response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_global_public_delegated_prefixes.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_global_public_delegated_prefixes.py index b6ad3285ac57..e20cdf89b594 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_global_public_delegated_prefixes.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_global_public_delegated_prefixes.py @@ -1134,7 +1134,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1332,7 +1332,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1524,7 +1524,7 @@ def test_get_rest_required_fields( response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1719,7 +1719,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1918,7 +1918,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2120,7 +2120,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2381,7 +2381,7 @@ def test_patch_rest_required_fields( response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2587,7 +2587,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_health_checks.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_health_checks.py index 52cd9169b942..77302b9e198f 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_health_checks.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_health_checks.py @@ -1053,7 +1053,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1327,7 +1327,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteHealthCheckReque response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1525,7 +1525,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1715,7 +1715,7 @@ def test_get_rest_required_fields(request_type=compute.GetHealthCheckRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1908,7 +1908,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertHealthCheckReque response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2103,7 +2103,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2299,7 +2299,7 @@ def test_list_rest_required_fields(request_type=compute.ListHealthChecksRequest) response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2558,7 +2558,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchHealthCheckRequest response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2758,7 +2758,7 @@ def test_patch_unary_rest_required_fields(request_type=compute.PatchHealthCheckR response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2958,7 +2958,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3162,7 +3162,7 @@ def test_update_rest_required_fields(request_type=compute.UpdateHealthCheckReque response = client.update(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3364,7 +3364,7 @@ def test_update_unary_rest_required_fields( response = client.update_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_image_family_views.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_image_family_views.py index aa01841ed4a8..a04ba61d276c 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_image_family_views.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_image_family_views.py @@ -1076,7 +1076,7 @@ def test_get_rest_required_fields(request_type=compute.GetImageFamilyViewRequest response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_images.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_images.py index 80d4a42a0bc5..8502d6f84a06 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_images.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_images.py @@ -1020,7 +1020,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteImageRequest): response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1216,7 +1216,7 @@ def test_delete_unary_rest_required_fields(request_type=compute.DeleteImageReque response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1413,7 +1413,7 @@ def test_deprecate_rest_required_fields(request_type=compute.DeprecateImageReque response = client.deprecate(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1619,7 +1619,7 @@ def test_deprecate_unary_rest_required_fields( response = client.deprecate_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1816,7 +1816,7 @@ def test_get_rest_required_fields(request_type=compute.GetImageRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2008,7 +2008,7 @@ def test_get_from_family_rest_required_fields( response = client.get_from_family(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2202,7 +2202,7 @@ def test_get_iam_policy_rest_required_fields( response = client.get_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2400,7 +2400,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertImageRequest): response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2602,7 +2602,7 @@ def test_insert_unary_rest_required_fields(request_type=compute.InsertImageReque response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2803,7 +2803,7 @@ def test_list_rest_required_fields(request_type=compute.ListImagesRequest): response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3062,7 +3062,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchImageRequest): response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3262,7 +3262,7 @@ def test_patch_unary_rest_required_fields(request_type=compute.PatchImageRequest response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3458,7 +3458,7 @@ def test_set_iam_policy_rest_required_fields( response = client.set_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3660,7 +3660,7 @@ def test_set_labels_rest_required_fields(request_type=compute.SetLabelsImageRequ response = client.set_labels(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3864,7 +3864,7 @@ def test_set_labels_unary_rest_required_fields( response = client.set_labels_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4068,7 +4068,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_instance_group_manager_resize_requests.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_instance_group_manager_resize_requests.py index 709eb1171874..1af4a199842a 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_instance_group_manager_resize_requests.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_instance_group_manager_resize_requests.py @@ -1150,7 +1150,7 @@ def test_cancel_rest_required_fields( response = client.cancel(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1367,7 +1367,7 @@ def test_cancel_unary_rest_required_fields( response = client.cancel_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1584,7 +1584,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1801,7 +1801,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2012,7 +2012,7 @@ def test_get_rest_required_fields( response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2226,7 +2226,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2443,7 +2443,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2665,7 +2665,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_instance_group_managers.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_instance_group_managers.py index 3d6586481928..2346ec8b483e 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_instance_group_managers.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_instance_group_managers.py @@ -1119,7 +1119,7 @@ def test_abandon_instances_rest_required_fields( response = client.abandon_instances(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1338,7 +1338,7 @@ def test_abandon_instances_unary_rest_required_fields( response = client.abandon_instances_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1552,7 +1552,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1836,7 +1836,7 @@ def test_apply_updates_to_instances_rest_required_fields( response = client.apply_updates_to_instances(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2056,7 +2056,7 @@ def test_apply_updates_to_instances_unary_rest_required_fields( response = client.apply_updates_to_instances_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2275,7 +2275,7 @@ def test_create_instances_rest_required_fields( response = client.create_instances(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2494,7 +2494,7 @@ def test_create_instances_unary_rest_required_fields( response = client.create_instances_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2710,7 +2710,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2919,7 +2919,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3131,7 +3131,7 @@ def test_delete_instances_rest_required_fields( response = client.delete_instances(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3350,7 +3350,7 @@ def test_delete_instances_unary_rest_required_fields( response = client.delete_instances_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3570,7 +3570,7 @@ def test_delete_per_instance_configs_rest_required_fields( response = client.delete_per_instance_configs(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3790,7 +3790,7 @@ def test_delete_per_instance_configs_unary_rest_required_fields( response = client.delete_per_instance_configs_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4000,7 +4000,7 @@ def test_get_rest_required_fields(request_type=compute.GetInstanceGroupManagerRe response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4206,7 +4206,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4420,7 +4420,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4637,7 +4637,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4914,7 +4914,7 @@ def test_list_errors_rest_required_fields( response = client.list_errors(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5209,7 +5209,7 @@ def test_list_managed_instances_rest_required_fields( response = client.list_managed_instances(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5507,7 +5507,7 @@ def test_list_per_instance_configs_rest_required_fields( response = client.list_per_instance_configs(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5795,7 +5795,7 @@ def test_patch_rest_required_fields( response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6020,7 +6020,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6250,7 +6250,7 @@ def test_patch_per_instance_configs_rest_required_fields( response = client.patch_per_instance_configs(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6476,7 +6476,7 @@ def test_patch_per_instance_configs_unary_rest_required_fields( response = client.patch_per_instance_configs_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6701,7 +6701,7 @@ def test_recreate_instances_rest_required_fields( response = client.recreate_instances(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6922,7 +6922,7 @@ def test_recreate_instances_unary_rest_required_fields( response = client.recreate_instances_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -7155,6 +7155,7 @@ def test_resize_rest_required_fields( "size", str(0), ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -7389,6 +7390,7 @@ def test_resize_unary_rest_required_fields( "size", str(0), ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -7607,7 +7609,7 @@ def test_resize_advanced_rest_required_fields( response = client.resize_advanced(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -7824,7 +7826,7 @@ def test_resize_advanced_unary_rest_required_fields( response = client.resize_advanced_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -8043,7 +8045,7 @@ def test_resume_instances_rest_required_fields( response = client.resume_instances(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -8262,7 +8264,7 @@ def test_resume_instances_unary_rest_required_fields( response = client.resume_instances_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -8484,7 +8486,7 @@ def test_set_auto_healing_policies_rest_required_fields( response = client.set_auto_healing_policies(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -8714,7 +8716,7 @@ def test_set_auto_healing_policies_unary_rest_required_fields( response = client.set_auto_healing_policies_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -8944,7 +8946,7 @@ def test_set_instance_template_rest_required_fields( response = client.set_instance_template(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -9166,7 +9168,7 @@ def test_set_instance_template_unary_rest_required_fields( response = client.set_instance_template_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -9385,7 +9387,7 @@ def test_set_target_pools_rest_required_fields( response = client.set_target_pools(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -9604,7 +9606,7 @@ def test_set_target_pools_unary_rest_required_fields( response = client.set_target_pools_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -9821,7 +9823,7 @@ def test_start_instances_rest_required_fields( response = client.start_instances(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -10038,7 +10040,7 @@ def test_start_instances_unary_rest_required_fields( response = client.start_instances_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -10255,7 +10257,7 @@ def test_stop_instances_rest_required_fields( response = client.stop_instances(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -10472,7 +10474,7 @@ def test_stop_instances_unary_rest_required_fields( response = client.stop_instances_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -10691,7 +10693,7 @@ def test_suspend_instances_rest_required_fields( response = client.suspend_instances(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -10910,7 +10912,7 @@ def test_suspend_instances_unary_rest_required_fields( response = client.suspend_instances_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -11125,7 +11127,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -11342,7 +11344,7 @@ def test_update_rest_required_fields( response = client.update(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -11567,7 +11569,7 @@ def test_update_unary_rest_required_fields( response = client.update_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -11797,7 +11799,7 @@ def test_update_per_instance_configs_rest_required_fields( response = client.update_per_instance_configs(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -12023,7 +12025,7 @@ def test_update_per_instance_configs_unary_rest_required_fields( response = client.update_per_instance_configs_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_instance_groups.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_instance_groups.py index b4c2a527f614..ce264ec9f326 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_instance_groups.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_instance_groups.py @@ -1073,7 +1073,7 @@ def test_add_instances_rest_required_fields( response = client.add_instances(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1290,7 +1290,7 @@ def test_add_instances_unary_rest_required_fields( response = client.add_instances_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1504,7 +1504,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1782,7 +1782,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteInstanceGroupReq response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1991,7 +1991,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2192,7 +2192,7 @@ def test_get_rest_required_fields(request_type=compute.GetInstanceGroupRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2396,7 +2396,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertInstanceGroupReq response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2602,7 +2602,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2809,7 +2809,7 @@ def test_list_rest_required_fields(request_type=compute.ListInstanceGroupsReques response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3085,7 +3085,7 @@ def test_list_instances_rest_required_fields( response = client.list_instances(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3384,7 +3384,7 @@ def test_remove_instances_rest_required_fields( response = client.remove_instances(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3603,7 +3603,7 @@ def test_remove_instances_unary_rest_required_fields( response = client.remove_instances_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3820,7 +3820,7 @@ def test_set_named_ports_rest_required_fields( response = client.set_named_ports(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4037,7 +4037,7 @@ def test_set_named_ports_unary_rest_required_fields( response = client.set_named_ports_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4252,7 +4252,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_instance_settings_service.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_instance_settings_service.py index 6573fd967e4c..3ca72e2141d2 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_instance_settings_service.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_instance_settings_service.py @@ -1105,7 +1105,7 @@ def test_get_rest_required_fields(request_type=compute.GetInstanceSettingRequest response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1307,7 +1307,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchInstanceSettingReq response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1523,7 +1523,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_instance_templates.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_instance_templates.py index 18c41c9b6735..b02c2c5bd1db 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_instance_templates.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_instance_templates.py @@ -1099,7 +1099,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1375,7 +1375,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1573,7 +1573,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1765,7 +1765,7 @@ def test_get_rest_required_fields(request_type=compute.GetInstanceTemplateReques response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1959,7 +1959,7 @@ def test_get_iam_policy_rest_required_fields( response = client.get_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2154,7 +2154,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2353,7 +2353,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2554,7 +2554,7 @@ def test_list_rest_required_fields(request_type=compute.ListInstanceTemplatesReq response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2810,7 +2810,7 @@ def test_set_iam_policy_rest_required_fields( response = client.set_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3014,7 +3014,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_instances.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_instances.py index a20f3d03c147..3699493f3b35 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_instances.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_instances.py @@ -1064,6 +1064,7 @@ def test_add_access_config_rest_required_fields( "networkInterface", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1308,6 +1309,7 @@ def test_add_access_config_unary_rest_required_fields( "networkInterface", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1538,7 +1540,7 @@ def test_add_network_interface_rest_required_fields( response = client.add_network_interface(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1764,7 +1766,7 @@ def test_add_network_interface_unary_rest_required_fields( response = client.add_network_interface_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1990,7 +1992,7 @@ def test_add_resource_policies_rest_required_fields( response = client.add_resource_policies(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2212,7 +2214,7 @@ def test_add_resource_policies_unary_rest_required_fields( response = client.add_resource_policies_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2426,7 +2428,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2707,7 +2709,7 @@ def test_attach_disk_rest_required_fields( response = client.attach_disk(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2934,7 +2936,7 @@ def test_attach_disk_unary_rest_required_fields( response = client.attach_disk_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3152,7 +3154,7 @@ def test_bulk_insert_rest_required_fields( response = client.bulk_insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3358,7 +3360,7 @@ def test_bulk_insert_unary_rest_required_fields( response = client.bulk_insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3570,7 +3572,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteInstanceRequest) response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3787,7 +3789,7 @@ def test_delete_unary_rest_required_fields(request_type=compute.DeleteInstanceRe response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4034,6 +4036,7 @@ def test_delete_access_config_rest_required_fields( "networkInterface", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4288,6 +4291,7 @@ def test_delete_access_config_unary_rest_required_fields( "networkInterface", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4534,6 +4538,7 @@ def test_delete_network_interface_rest_required_fields( "networkInterfaceName", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4776,6 +4781,7 @@ def test_delete_network_interface_unary_rest_required_fields( "networkInterfaceName", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5010,6 +5016,7 @@ def test_detach_disk_rest_required_fields( "deviceName", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5244,6 +5251,7 @@ def test_detach_disk_unary_rest_required_fields( "deviceName", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5455,7 +5463,7 @@ def test_get_rest_required_fields(request_type=compute.GetInstanceRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5679,6 +5687,7 @@ def test_get_effective_firewalls_rest_required_fields( "networkInterface", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5896,7 +5905,7 @@ def test_get_guest_attributes_rest_required_fields( response = client.get_guest_attributes(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6106,7 +6115,7 @@ def test_get_iam_policy_rest_required_fields( response = client.get_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6315,7 +6324,7 @@ def test_get_partner_metadata_rest_required_fields( response = client.get_partner_metadata(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6518,7 +6527,7 @@ def test_get_screenshot_rest_required_fields( response = client.get_screenshot(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6733,7 +6742,7 @@ def test_get_serial_port_output_rest_required_fields( response = client.get_serial_port_output(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6946,7 +6955,7 @@ def test_get_shielded_instance_identity_rest_required_fields( response = client.get_shielded_instance_identity(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -7156,7 +7165,7 @@ def test_get_shielded_vm_identity_rest_required_fields( response = client.get_shielded_vm_identity(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -7366,7 +7375,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertInstanceRequest) response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -7586,7 +7595,7 @@ def test_insert_unary_rest_required_fields(request_type=compute.InsertInstanceRe response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -7804,7 +7813,7 @@ def test_list_rest_required_fields(request_type=compute.ListInstancesRequest): response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -8080,7 +8089,7 @@ def test_list_referrers_rest_required_fields( response = client.list_referrers(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -8368,7 +8377,7 @@ def test_patch_partner_metadata_rest_required_fields( response = client.patch_partner_metadata(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -8590,7 +8599,7 @@ def test_patch_partner_metadata_unary_rest_required_fields( response = client.patch_partner_metadata_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -8810,7 +8819,7 @@ def test_perform_maintenance_rest_required_fields( response = client.perform_maintenance(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -9023,7 +9032,7 @@ def test_perform_maintenance_unary_rest_required_fields( response = client.perform_maintenance_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -9238,7 +9247,7 @@ def test_remove_resource_policies_rest_required_fields( response = client.remove_resource_policies(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -9460,7 +9469,7 @@ def test_remove_resource_policies_unary_rest_required_fields( response = client.remove_resource_policies_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -9682,7 +9691,7 @@ def test_report_host_as_faulty_rest_required_fields( response = client.report_host_as_faulty(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -9904,7 +9913,7 @@ def test_report_host_as_faulty_unary_rest_required_fields( response = client.report_host_as_faulty_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -10118,7 +10127,7 @@ def test_reset_rest_required_fields(request_type=compute.ResetInstanceRequest): response = client.reset(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -10325,7 +10334,7 @@ def test_reset_unary_rest_required_fields(request_type=compute.ResetInstanceRequ response = client.reset_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -10533,7 +10542,7 @@ def test_resume_rest_required_fields(request_type=compute.ResumeInstanceRequest) response = client.resume(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -10742,7 +10751,7 @@ def test_resume_unary_rest_required_fields(request_type=compute.ResumeInstanceRe response = client.resume_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -10953,7 +10962,7 @@ def test_send_diagnostic_interrupt_rest_required_fields( response = client.send_diagnostic_interrupt(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -11172,7 +11181,7 @@ def test_set_deletion_protection_rest_required_fields( response = client.set_deletion_protection(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -11396,7 +11405,7 @@ def test_set_deletion_protection_unary_rest_required_fields( response = client.set_deletion_protection_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -11643,6 +11652,7 @@ def test_set_disk_auto_delete_rest_required_fields( "deviceName", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -11897,6 +11907,7 @@ def test_set_disk_auto_delete_unary_rest_required_fields( "deviceName", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -12113,7 +12124,7 @@ def test_set_iam_policy_rest_required_fields( response = client.set_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -12328,7 +12339,7 @@ def test_set_labels_rest_required_fields(request_type=compute.SetLabelsInstanceR response = client.set_labels(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -12545,7 +12556,7 @@ def test_set_labels_unary_rest_required_fields( response = client.set_labels_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -12767,7 +12778,7 @@ def test_set_machine_resources_rest_required_fields( response = client.set_machine_resources(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -12989,7 +13000,7 @@ def test_set_machine_resources_unary_rest_required_fields( response = client.set_machine_resources_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -13208,7 +13219,7 @@ def test_set_machine_type_rest_required_fields( response = client.set_machine_type(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -13427,7 +13438,7 @@ def test_set_machine_type_unary_rest_required_fields( response = client.set_machine_type_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -13644,7 +13655,7 @@ def test_set_metadata_rest_required_fields( response = client.set_metadata(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -13857,7 +13868,7 @@ def test_set_metadata_unary_rest_required_fields( response = client.set_metadata_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -14074,7 +14085,7 @@ def test_set_min_cpu_platform_rest_required_fields( response = client.set_min_cpu_platform(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -14295,7 +14306,7 @@ def test_set_min_cpu_platform_unary_rest_required_fields( response = client.set_min_cpu_platform_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -14510,7 +14521,7 @@ def test_set_name_rest_required_fields(request_type=compute.SetNameInstanceReque response = client.set_name(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -14727,7 +14738,7 @@ def test_set_name_unary_rest_required_fields( response = client.set_name_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -14944,7 +14955,7 @@ def test_set_scheduling_rest_required_fields( response = client.set_scheduling(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -15157,7 +15168,7 @@ def test_set_scheduling_unary_rest_required_fields( response = client.set_scheduling_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -15374,7 +15385,7 @@ def test_set_security_policy_rest_required_fields( response = client.set_security_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -15595,7 +15606,7 @@ def test_set_security_policy_unary_rest_required_fields( response = client.set_security_policy_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -15816,7 +15827,7 @@ def test_set_service_account_rest_required_fields( response = client.set_service_account(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -16037,7 +16048,7 @@ def test_set_service_account_unary_rest_required_fields( response = client.set_service_account_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -16263,7 +16274,7 @@ def test_set_shielded_instance_integrity_policy_rest_required_fields( response = client.set_shielded_instance_integrity_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -16493,7 +16504,7 @@ def test_set_shielded_instance_integrity_policy_unary_rest_required_fields( response = client.set_shielded_instance_integrity_policy_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -16719,7 +16730,7 @@ def test_set_shielded_vm_integrity_policy_rest_required_fields( response = client.set_shielded_vm_integrity_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -16943,7 +16954,7 @@ def test_set_shielded_vm_integrity_policy_unary_rest_required_fields( response = client.set_shielded_vm_integrity_policy_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -17162,7 +17173,7 @@ def test_set_tags_rest_required_fields(request_type=compute.SetTagsInstanceReque response = client.set_tags(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -17375,7 +17386,7 @@ def test_set_tags_unary_rest_required_fields( response = client.set_tags_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -17597,7 +17608,7 @@ def test_simulate_maintenance_event_rest_required_fields( response = client.simulate_maintenance_event(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -17821,7 +17832,7 @@ def test_simulate_maintenance_event_unary_rest_required_fields( response = client.simulate_maintenance_event_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -18033,7 +18044,7 @@ def test_start_rest_required_fields(request_type=compute.StartInstanceRequest): response = client.start(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -18240,7 +18251,7 @@ def test_start_unary_rest_required_fields(request_type=compute.StartInstanceRequ response = client.start_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -18455,7 +18466,7 @@ def test_start_with_encryption_key_rest_required_fields( response = client.start_with_encryption_key(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -18689,7 +18700,7 @@ def test_start_with_encryption_key_unary_rest_required_fields( response = client.start_with_encryption_key_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -18921,7 +18932,7 @@ def test_stop_rest_required_fields(request_type=compute.StopInstanceRequest): response = client.stop(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -19140,7 +19151,7 @@ def test_stop_unary_rest_required_fields(request_type=compute.StopInstanceReques response = client.stop_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -19358,7 +19369,7 @@ def test_suspend_rest_required_fields(request_type=compute.SuspendInstanceReques response = client.suspend(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -19577,7 +19588,7 @@ def test_suspend_unary_rest_required_fields( response = client.suspend_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -19790,7 +19801,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -20011,7 +20022,7 @@ def test_update_rest_required_fields(request_type=compute.UpdateInstanceRequest) response = client.update(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -20242,7 +20253,7 @@ def test_update_unary_rest_required_fields(request_type=compute.UpdateInstanceRe response = client.update_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -20490,6 +20501,7 @@ def test_update_access_config_rest_required_fields( "networkInterface", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -20736,6 +20748,7 @@ def test_update_access_config_unary_rest_required_fields( "networkInterface", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -20966,7 +20979,7 @@ def test_update_display_device_rest_required_fields( response = client.update_display_device(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -21184,7 +21197,7 @@ def test_update_display_device_unary_rest_required_fields( response = client.update_display_device_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -21419,6 +21432,7 @@ def test_update_network_interface_rest_required_fields( "networkInterface", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -21670,6 +21684,7 @@ def test_update_network_interface_unary_rest_required_fields( "networkInterface", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -21904,7 +21919,7 @@ def test_update_shielded_instance_config_rest_required_fields( response = client.update_shielded_instance_config(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -22128,7 +22143,7 @@ def test_update_shielded_instance_config_unary_rest_required_fields( response = client.update_shielded_instance_config_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -22354,7 +22369,7 @@ def test_update_shielded_vm_config_rest_required_fields( response = client.update_shielded_vm_config(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -22576,7 +22591,7 @@ def test_update_shielded_vm_config_unary_rest_required_fields( response = client.update_shielded_vm_config_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_instant_snapshots.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_instant_snapshots.py index be9fc7311fe1..54db4f5e0dc2 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_instant_snapshots.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_instant_snapshots.py @@ -1090,7 +1090,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1368,7 +1368,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteInstantSnapshotR response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1577,7 +1577,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1778,7 +1778,7 @@ def test_get_rest_required_fields(request_type=compute.GetInstantSnapshotRequest response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1983,7 +1983,7 @@ def test_get_iam_policy_rest_required_fields( response = client.get_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2187,7 +2187,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertInstantSnapshotR response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2393,7 +2393,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2600,7 +2600,7 @@ def test_list_rest_required_fields(request_type=compute.ListInstantSnapshotsRequ response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2866,7 +2866,7 @@ def test_set_iam_policy_rest_required_fields( response = client.set_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3083,7 +3083,7 @@ def test_set_labels_rest_required_fields( response = client.set_labels(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3300,7 +3300,7 @@ def test_set_labels_unary_rest_required_fields( response = client.set_labels_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3515,7 +3515,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_interconnect_attachment_groups.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_interconnect_attachment_groups.py index f8cf55c8704b..50f02c07a48f 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_interconnect_attachment_groups.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_interconnect_attachment_groups.py @@ -1137,7 +1137,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1343,7 +1343,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1543,7 +1543,7 @@ def test_get_rest_required_fields( response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1740,7 +1740,7 @@ def test_get_iam_policy_rest_required_fields( response = client.get_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1946,7 +1946,7 @@ def test_get_operational_status_rest_required_fields( response = client.get_operational_status(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2150,7 +2150,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2357,7 +2357,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2569,7 +2569,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2843,7 +2843,7 @@ def test_patch_rest_required_fields( response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3075,7 +3075,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3291,7 +3291,7 @@ def test_set_iam_policy_rest_required_fields( response = client.set_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3495,7 +3495,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_interconnect_attachments.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_interconnect_attachments.py index 16f77883bf3f..cd6ea3d0f984 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_interconnect_attachments.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_interconnect_attachments.py @@ -1116,7 +1116,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1398,7 +1398,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1609,7 +1609,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1814,7 +1814,7 @@ def test_get_rest_required_fields( response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2025,7 +2025,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2241,7 +2241,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2455,7 +2455,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2731,7 +2731,7 @@ def test_patch_rest_required_fields( response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2950,7 +2950,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3167,7 +3167,7 @@ def test_set_labels_rest_required_fields( response = client.set_labels(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3384,7 +3384,7 @@ def test_set_labels_unary_rest_required_fields( response = client.set_labels_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3599,7 +3599,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_interconnect_groups.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_interconnect_groups.py index 84ee1d52bdea..bb3a4cbe911e 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_interconnect_groups.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_interconnect_groups.py @@ -1099,7 +1099,7 @@ def test_create_members_rest_required_fields( response = client.create_members(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1307,7 +1307,7 @@ def test_create_members_unary_rest_required_fields( response = client.create_members_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1516,7 +1516,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1714,7 +1714,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1904,7 +1904,7 @@ def test_get_rest_required_fields(request_type=compute.GetInterconnectGroupReque response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2098,7 +2098,7 @@ def test_get_iam_policy_rest_required_fields( response = client.get_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2297,7 +2297,7 @@ def test_get_operational_status_rest_required_fields( response = client.get_operational_status(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2494,7 +2494,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2709,7 +2709,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2925,7 +2925,7 @@ def test_list_rest_required_fields(request_type=compute.ListInterconnectGroupsRe response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3191,7 +3191,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchInterconnectGroupR response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3423,7 +3423,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3644,7 +3644,7 @@ def test_set_iam_policy_rest_required_fields( response = client.set_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3848,7 +3848,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_interconnect_locations.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_interconnect_locations.py index 31321b11a4d1..b0a9448c2f65 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_interconnect_locations.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_interconnect_locations.py @@ -1097,7 +1097,7 @@ def test_get_rest_required_fields(request_type=compute.GetInterconnectLocationRe response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1295,7 +1295,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1579,6 +1579,9 @@ def test_get_rest_call_success(request_type): name="name_value", peeringdb_facility_id="peeringdb_facility_id_value", self_link="self_link_value", + single_region_production_critical_peer_locations=[ + "single_region_production_critical_peer_locations_value" + ], status="status_value", supports_pzs=True, ) @@ -1614,6 +1617,9 @@ def test_get_rest_call_success(request_type): assert response.name == "name_value" assert response.peeringdb_facility_id == "peeringdb_facility_id_value" assert response.self_link == "self_link_value" + assert response.single_region_production_critical_peer_locations == [ + "single_region_production_critical_peer_locations_value" + ] assert response.status == "status_value" assert response.supports_pzs is True diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_interconnect_remote_locations.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_interconnect_remote_locations.py index f84f128763d2..9de926c8cf0c 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_interconnect_remote_locations.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_interconnect_remote_locations.py @@ -1120,7 +1120,7 @@ def test_get_rest_required_fields( response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1321,7 +1321,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_interconnects.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_interconnects.py index e71ef67d1553..9d8a0a99598b 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_interconnects.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_interconnects.py @@ -1062,7 +1062,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteInterconnectRequ response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1260,7 +1260,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1450,7 +1450,7 @@ def test_get_rest_required_fields(request_type=compute.GetInterconnectRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1642,7 +1642,7 @@ def test_get_diagnostics_rest_required_fields( response = client.get_diagnostics(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1836,7 +1836,7 @@ def test_get_macsec_config_rest_required_fields( response = client.get_macsec_config(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2029,7 +2029,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertInterconnectRequ response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2224,7 +2224,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2420,7 +2420,7 @@ def test_list_rest_required_fields(request_type=compute.ListInterconnectsRequest response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2679,7 +2679,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchInterconnectReques response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2881,7 +2881,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3081,7 +3081,7 @@ def test_set_labels_rest_required_fields( response = client.set_labels(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3285,7 +3285,7 @@ def test_set_labels_unary_rest_required_fields( response = client.set_labels_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3489,7 +3489,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_license_codes.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_license_codes.py index 24704ee3c595..0918cabe8d2b 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_license_codes.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_license_codes.py @@ -1035,7 +1035,7 @@ def test_get_rest_required_fields(request_type=compute.GetLicenseCodeRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1232,7 +1232,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_licenses.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_licenses.py index 8ed180c179ba..4b9e71ec7aba 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_licenses.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_licenses.py @@ -1047,6 +1047,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteLicenseRequest): "license", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1261,6 +1262,7 @@ def test_delete_unary_rest_required_fields(request_type=compute.DeleteLicenseReq "license", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1466,6 +1468,7 @@ def test_get_rest_required_fields(request_type=compute.GetLicenseRequest): "license", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1660,7 +1663,7 @@ def test_get_iam_policy_rest_required_fields( response = client.get_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1853,7 +1856,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertLicenseRequest): response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2050,7 +2053,7 @@ def test_insert_unary_rest_required_fields(request_type=compute.InsertLicenseReq response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2250,7 +2253,7 @@ def test_list_rest_required_fields(request_type=compute.ListLicensesRequest): response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2505,7 +2508,7 @@ def test_set_iam_policy_rest_required_fields( response = client.set_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2709,7 +2712,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2927,6 +2930,7 @@ def test_update_rest_required_fields(request_type=compute.UpdateLicenseRequest): "license", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3151,6 +3155,7 @@ def test_update_unary_rest_required_fields(request_type=compute.UpdateLicenseReq "license", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_machine_images.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_machine_images.py index a91c176a06b6..d68a991d28d8 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_machine_images.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_machine_images.py @@ -1063,7 +1063,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteMachineImageRequ response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1261,7 +1261,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1451,7 +1451,7 @@ def test_get_rest_required_fields(request_type=compute.GetMachineImageRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1645,7 +1645,7 @@ def test_get_iam_policy_rest_required_fields( response = client.get_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1843,7 +1843,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertMachineImageRequ response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2052,7 +2052,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2257,7 +2257,7 @@ def test_list_rest_required_fields(request_type=compute.ListMachineImagesRequest response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2512,7 +2512,7 @@ def test_set_iam_policy_rest_required_fields( response = client.set_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2716,7 +2716,7 @@ def test_set_labels_rest_required_fields( response = client.set_labels(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2920,7 +2920,7 @@ def test_set_labels_unary_rest_required_fields( response = client.set_labels_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3124,7 +3124,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_machine_types.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_machine_types.py index 7f38bff92cc0..71f5c8650630 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_machine_types.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_machine_types.py @@ -1046,7 +1046,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1316,7 +1316,7 @@ def test_get_rest_required_fields(request_type=compute.GetMachineTypeRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1523,7 +1523,7 @@ def test_list_rest_required_fields(request_type=compute.ListMachineTypesRequest) response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_network_attachments.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_network_attachments.py index 17e794976019..4aab5e664dc4 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_network_attachments.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_network_attachments.py @@ -1102,7 +1102,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1382,7 +1382,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1591,7 +1591,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1792,7 +1792,7 @@ def test_get_rest_required_fields(request_type=compute.GetNetworkAttachmentReque response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1997,7 +1997,7 @@ def test_get_iam_policy_rest_required_fields( response = client.get_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2203,7 +2203,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2417,7 +2417,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2632,7 +2632,7 @@ def test_list_rest_required_fields(request_type=compute.ListNetworkAttachmentsRe response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2902,7 +2902,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchNetworkAttachmentR response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3127,7 +3127,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3346,7 +3346,7 @@ def test_set_iam_policy_rest_required_fields( response = client.set_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3561,7 +3561,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_network_edge_security_services.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_network_edge_security_services.py index 16c36e31cc4c..56d79f6d9795 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_network_edge_security_services.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_network_edge_security_services.py @@ -1132,7 +1132,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1418,7 +1418,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1632,7 +1632,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1840,7 +1840,7 @@ def test_get_rest_required_fields( response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2051,7 +2051,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2267,7 +2267,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2493,7 +2493,7 @@ def test_patch_rest_required_fields( response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2727,7 +2727,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_network_endpoint_groups.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_network_endpoint_groups.py index 55ceb648c571..3d1c9067ba8f 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_network_endpoint_groups.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_network_endpoint_groups.py @@ -1114,7 +1114,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1400,7 +1400,7 @@ def test_attach_network_endpoints_rest_required_fields( response = client.attach_network_endpoints(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1626,7 +1626,7 @@ def test_attach_network_endpoints_unary_rest_required_fields( response = client.attach_network_endpoints_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1846,7 +1846,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2055,7 +2055,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2270,7 +2270,7 @@ def test_detach_network_endpoints_rest_required_fields( response = client.detach_network_endpoints(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2496,7 +2496,7 @@ def test_detach_network_endpoints_unary_rest_required_fields( response = client.detach_network_endpoints_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2708,7 +2708,7 @@ def test_get_rest_required_fields(request_type=compute.GetNetworkEndpointGroupRe response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2914,7 +2914,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3120,7 +3120,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3329,7 +3329,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3612,7 +3612,7 @@ def test_list_network_endpoints_rest_required_fields( response = client.list_network_endpoints(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3930,7 +3930,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_network_firewall_policies.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_network_firewall_policies.py index 2fbfbadf5134..1b6fea61c94b 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_network_firewall_policies.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_network_firewall_policies.py @@ -1120,7 +1120,7 @@ def test_add_association_rest_required_fields( response = client.add_association(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1336,7 +1336,7 @@ def test_add_association_unary_rest_required_fields( response = client.add_association_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1558,7 +1558,7 @@ def test_add_packet_mirroring_rule_rest_required_fields( response = client.add_packet_mirroring_rule(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1781,7 +1781,7 @@ def test_add_packet_mirroring_rule_unary_rest_required_fields( response = client.add_packet_mirroring_rule_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1999,7 +1999,7 @@ def test_add_rule_rest_required_fields( response = client.add_rule(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2217,7 +2217,7 @@ def test_add_rule_unary_rest_required_fields( response = client.add_rule_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2430,7 +2430,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2711,7 +2711,7 @@ def test_clone_rules_rest_required_fields( response = client.clone_rules(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2919,7 +2919,7 @@ def test_clone_rules_unary_rest_required_fields( response = client.clone_rules_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3122,7 +3122,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3320,7 +3320,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3510,7 +3510,7 @@ def test_get_rest_required_fields(request_type=compute.GetNetworkFirewallPolicyR response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3704,7 +3704,7 @@ def test_get_association_rest_required_fields( response = client.get_association(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3898,7 +3898,7 @@ def test_get_iam_policy_rest_required_fields( response = client.get_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4097,7 +4097,7 @@ def test_get_packet_mirroring_rule_rest_required_fields( response = client.get_packet_mirroring_rule(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4291,7 +4291,7 @@ def test_get_rule_rest_required_fields( response = client.get_rule(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4486,7 +4486,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4693,7 +4693,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4903,7 +4903,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5164,7 +5164,7 @@ def test_patch_rest_required_fields( response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5378,7 +5378,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5602,7 +5602,7 @@ def test_patch_packet_mirroring_rule_rest_required_fields( response = client.patch_packet_mirroring_rule(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5823,7 +5823,7 @@ def test_patch_packet_mirroring_rule_unary_rest_required_fields( response = client.patch_packet_mirroring_rule_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6041,7 +6041,7 @@ def test_patch_rule_rest_required_fields( response = client.patch_rule(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6257,7 +6257,7 @@ def test_patch_rule_unary_rest_required_fields( response = client.patch_rule_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6476,7 +6476,7 @@ def test_remove_association_rest_required_fields( response = client.remove_association(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6688,7 +6688,7 @@ def test_remove_association_unary_rest_required_fields( response = client.remove_association_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6901,7 +6901,7 @@ def test_remove_packet_mirroring_rule_rest_required_fields( response = client.remove_packet_mirroring_rule(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -7114,7 +7114,7 @@ def test_remove_packet_mirroring_rule_unary_rest_required_fields( response = client.remove_packet_mirroring_rule_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -7324,7 +7324,7 @@ def test_remove_rule_rest_required_fields( response = client.remove_rule(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -7532,7 +7532,7 @@ def test_remove_rule_unary_rest_required_fields( response = client.remove_rule_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -7730,7 +7730,7 @@ def test_set_iam_policy_rest_required_fields( response = client.set_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -7934,7 +7934,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_network_profiles.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_network_profiles.py index 7f92dc27ea07..da2f255b62d3 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_network_profiles.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_network_profiles.py @@ -1067,7 +1067,7 @@ def test_get_rest_required_fields(request_type=compute.GetNetworkProfileRequest) response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1263,7 +1263,7 @@ def test_list_rest_required_fields(request_type=compute.ListNetworkProfilesReque response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_networks.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_networks.py index 7c3a32acd852..f4178515cd25 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_networks.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_networks.py @@ -1037,7 +1037,7 @@ def test_add_peering_rest_required_fields( response = client.add_peering(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1243,7 +1243,7 @@ def test_add_peering_unary_rest_required_fields( response = client.add_peering_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1446,7 +1446,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteNetworkRequest): response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1642,7 +1642,7 @@ def test_delete_unary_rest_required_fields(request_type=compute.DeleteNetworkReq response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1832,7 +1832,7 @@ def test_get_rest_required_fields(request_type=compute.GetNetworkRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2031,7 +2031,7 @@ def test_get_effective_firewalls_rest_required_fields( response = client.get_effective_firewalls(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2224,7 +2224,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertNetworkRequest): response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2417,7 +2417,7 @@ def test_insert_unary_rest_required_fields(request_type=compute.InsertNetworkReq response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2613,7 +2613,7 @@ def test_list_rest_required_fields(request_type=compute.ListNetworksRequest): response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2884,7 +2884,7 @@ def test_list_peering_routes_rest_required_fields( response = client.list_peering_routes(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3155,7 +3155,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchNetworkRequest): response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3355,7 +3355,7 @@ def test_patch_unary_rest_required_fields(request_type=compute.PatchNetworkReque response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3557,7 +3557,7 @@ def test_remove_peering_rest_required_fields( response = client.remove_peering(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3763,7 +3763,7 @@ def test_remove_peering_unary_rest_required_fields( response = client.remove_peering_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3974,7 +3974,7 @@ def test_request_remove_peering_rest_required_fields( response = client.request_remove_peering(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4185,7 +4185,7 @@ def test_request_remove_peering_unary_rest_required_fields( response = client.request_remove_peering_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4395,7 +4395,7 @@ def test_switch_to_custom_mode_rest_required_fields( response = client.switch_to_custom_mode(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4598,7 +4598,7 @@ def test_switch_to_custom_mode_unary_rest_required_fields( response = client.switch_to_custom_mode_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4795,7 +4795,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5001,7 +5001,7 @@ def test_update_peering_rest_required_fields( response = client.update_peering(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5207,7 +5207,7 @@ def test_update_peering_unary_rest_required_fields( response = client.update_peering_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_node_groups.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_node_groups.py index f374b92ba138..6deff0201241 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_node_groups.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_node_groups.py @@ -1046,7 +1046,7 @@ def test_add_nodes_rest_required_fields(request_type=compute.AddNodesNodeGroupRe response = client.add_nodes(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1263,7 +1263,7 @@ def test_add_nodes_unary_rest_required_fields( response = client.add_nodes_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1477,7 +1477,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1750,7 +1750,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteNodeGroupRequest response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1957,7 +1957,7 @@ def test_delete_unary_rest_required_fields(request_type=compute.DeleteNodeGroupR response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2167,7 +2167,7 @@ def test_delete_nodes_rest_required_fields( response = client.delete_nodes(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2384,7 +2384,7 @@ def test_delete_nodes_unary_rest_required_fields( response = client.delete_nodes_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2592,7 +2592,7 @@ def test_get_rest_required_fields(request_type=compute.GetNodeGroupRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2797,7 +2797,7 @@ def test_get_iam_policy_rest_required_fields( response = client.get_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3018,6 +3018,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertNodeGroupRequest "initialNodeCount", str(0), ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3247,6 +3248,7 @@ def test_insert_unary_rest_required_fields(request_type=compute.InsertNodeGroupR "initialNodeCount", str(0), ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3462,7 +3464,7 @@ def test_list_rest_required_fields(request_type=compute.ListNodeGroupsRequest): response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3737,7 +3739,7 @@ def test_list_nodes_rest_required_fields( response = client.list_nodes(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4018,7 +4020,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchNodeGroupRequest): response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4233,7 +4235,7 @@ def test_patch_unary_rest_required_fields(request_type=compute.PatchNodeGroupReq response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4454,7 +4456,7 @@ def test_perform_maintenance_rest_required_fields( response = client.perform_maintenance(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4675,7 +4677,7 @@ def test_perform_maintenance_unary_rest_required_fields( response = client.perform_maintenance_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4886,7 +4888,7 @@ def test_set_iam_policy_rest_required_fields( response = client.set_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5105,7 +5107,7 @@ def test_set_node_template_rest_required_fields( response = client.set_node_template(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5324,7 +5326,7 @@ def test_set_node_template_unary_rest_required_fields( response = client.set_node_template_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5546,7 +5548,7 @@ def test_simulate_maintenance_event_rest_required_fields( response = client.simulate_maintenance_event(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5768,7 +5770,7 @@ def test_simulate_maintenance_event_unary_rest_required_fields( response = client.simulate_maintenance_event_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5983,7 +5985,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_node_templates.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_node_templates.py index 203f55382eb0..3c481ee26819 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_node_templates.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_node_templates.py @@ -1066,7 +1066,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1344,7 +1344,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteNodeTemplateRequ response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1553,7 +1553,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1754,7 +1754,7 @@ def test_get_rest_required_fields(request_type=compute.GetNodeTemplateRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1959,7 +1959,7 @@ def test_get_iam_policy_rest_required_fields( response = client.get_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2163,7 +2163,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertNodeTemplateRequ response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2369,7 +2369,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2576,7 +2576,7 @@ def test_list_rest_required_fields(request_type=compute.ListNodeTemplatesRequest response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2842,7 +2842,7 @@ def test_set_iam_policy_rest_required_fields( response = client.set_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3057,7 +3057,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_node_types.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_node_types.py index e04c5195c7d7..513f6bee97a7 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_node_types.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_node_types.py @@ -1036,7 +1036,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1303,7 +1303,7 @@ def test_get_rest_required_fields(request_type=compute.GetNodeTypeRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1510,7 +1510,7 @@ def test_list_rest_required_fields(request_type=compute.ListNodeTypesRequest): response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_organization_security_policies.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_organization_security_policies.py index 3a146c4ceb61..ca0f7eab64f8 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_organization_security_policies.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_organization_security_policies.py @@ -1134,7 +1134,7 @@ def test_add_association_rest_required_fields( response = client.add_association(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1343,7 +1343,7 @@ def test_add_association_unary_rest_required_fields( response = client.add_association_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1547,7 +1547,7 @@ def test_add_rule_rest_required_fields( response = client.add_rule(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1746,7 +1746,7 @@ def test_add_rule_unary_rest_required_fields( response = client.add_rule_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1949,7 +1949,7 @@ def test_copy_rules_rest_required_fields( response = client.copy_rules(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2146,7 +2146,7 @@ def test_copy_rules_unary_rest_required_fields( response = client.copy_rules_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2338,7 +2338,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2522,7 +2522,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2700,7 +2700,7 @@ def test_get_rest_required_fields( response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2880,7 +2880,7 @@ def test_get_association_rest_required_fields( response = client.get_association(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3060,7 +3060,7 @@ def test_get_rule_rest_required_fields( response = client.get_rule(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3245,7 +3245,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3450,7 +3450,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3835,7 +3835,7 @@ def test_move_rest_required_fields( response = client.move(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4032,7 +4032,7 @@ def test_move_unary_rest_required_fields( response = client.move_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4180,7 +4180,12 @@ def test_patch_rest_required_fields( credentials=ga_credentials.AnonymousCredentials() ).patch._get_unset_required_fields(jsonified_request) # Check that path parameters and body parameters are not mixing in. - assert not set(unset_fields) - set(("request_id",)) + assert not set(unset_fields) - set( + ( + "request_id", + "update_mask", + ) + ) jsonified_request.update(unset_fields) # verify required fields with non-default values are left alone @@ -4225,7 +4230,7 @@ def test_patch_rest_required_fields( response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4237,7 +4242,12 @@ def test_patch_rest_unset_required_fields(): unset_fields = transport.patch._get_unset_required_fields({}) assert set(unset_fields) == ( - set(("requestId",)) + set( + ( + "requestId", + "updateMask", + ) + ) & set( ( "securityPolicy", @@ -4387,7 +4397,12 @@ def test_patch_unary_rest_required_fields( credentials=ga_credentials.AnonymousCredentials() ).patch._get_unset_required_fields(jsonified_request) # Check that path parameters and body parameters are not mixing in. - assert not set(unset_fields) - set(("request_id",)) + assert not set(unset_fields) - set( + ( + "request_id", + "update_mask", + ) + ) jsonified_request.update(unset_fields) # verify required fields with non-default values are left alone @@ -4432,7 +4447,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4444,7 +4459,12 @@ def test_patch_unary_rest_unset_required_fields(): unset_fields = transport.patch._get_unset_required_fields({}) assert set(unset_fields) == ( - set(("requestId",)) + set( + ( + "requestId", + "updateMask", + ) + ) & set( ( "securityPolicy", @@ -4598,6 +4618,7 @@ def test_patch_rule_rest_required_fields( ( "priority", "request_id", + "update_mask", ) ) jsonified_request.update(unset_fields) @@ -4644,7 +4665,7 @@ def test_patch_rule_rest_required_fields( response = client.patch_rule(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4660,6 +4681,7 @@ def test_patch_rule_rest_unset_required_fields(): ( "priority", "requestId", + "updateMask", ) ) & set( @@ -4807,6 +4829,7 @@ def test_patch_rule_unary_rest_required_fields( ( "priority", "request_id", + "update_mask", ) ) jsonified_request.update(unset_fields) @@ -4853,7 +4876,7 @@ def test_patch_rule_unary_rest_required_fields( response = client.patch_rule_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4869,6 +4892,7 @@ def test_patch_rule_unary_rest_unset_required_fields(): ( "priority", "requestId", + "updateMask", ) ) & set( @@ -5065,7 +5089,7 @@ def test_remove_association_rest_required_fields( response = client.remove_association(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5266,7 +5290,7 @@ def test_remove_association_unary_rest_required_fields( response = client.remove_association_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5463,7 +5487,7 @@ def test_remove_rule_rest_required_fields( response = client.remove_rule(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5660,7 +5684,7 @@ def test_remove_rule_unary_rest_required_fields( response = client.remove_rule_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_packet_mirrorings.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_packet_mirrorings.py index 947888c84fcf..aceff700ee6c 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_packet_mirrorings.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_packet_mirrorings.py @@ -1090,7 +1090,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1368,7 +1368,7 @@ def test_delete_rest_required_fields(request_type=compute.DeletePacketMirroringR response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1577,7 +1577,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1778,7 +1778,7 @@ def test_get_rest_required_fields(request_type=compute.GetPacketMirroringRequest response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1982,7 +1982,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertPacketMirroringR response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2192,7 +2192,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2403,7 +2403,7 @@ def test_list_rest_required_fields(request_type=compute.ListPacketMirroringsRequ response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2673,7 +2673,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchPacketMirroringReq response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2894,7 +2894,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3113,7 +3113,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_preview_features.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_preview_features.py index 50d6a922eda1..0b595e221abf 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_preview_features.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_preview_features.py @@ -1074,7 +1074,7 @@ def test_get_rest_required_fields(request_type=compute.GetPreviewFeatureRequest) response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1270,7 +1270,7 @@ def test_list_rest_required_fields(request_type=compute.ListPreviewFeaturesReque response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1529,7 +1529,7 @@ def test_update_rest_required_fields(request_type=compute.UpdatePreviewFeatureRe response = client.update(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1735,7 +1735,7 @@ def test_update_unary_rest_required_fields( response = client.update_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_projects.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_projects.py index e7555c47fc8a..98b353bb356c 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_projects.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_projects.py @@ -1034,7 +1034,7 @@ def test_disable_xpn_host_rest_required_fields( response = client.disable_xpn_host(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1220,7 +1220,7 @@ def test_disable_xpn_host_unary_rest_required_fields( response = client.disable_xpn_host_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1409,7 +1409,7 @@ def test_disable_xpn_resource_rest_required_fields( response = client.disable_xpn_resource(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1612,7 +1612,7 @@ def test_disable_xpn_resource_unary_rest_required_fields( response = client.disable_xpn_resource_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1810,7 +1810,7 @@ def test_enable_xpn_host_rest_required_fields( response = client.enable_xpn_host(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1993,7 +1993,7 @@ def test_enable_xpn_host_unary_rest_required_fields( response = client.enable_xpn_host_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2181,7 +2181,7 @@ def test_enable_xpn_resource_rest_required_fields( response = client.enable_xpn_resource(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2384,7 +2384,7 @@ def test_enable_xpn_resource_unary_rest_required_fields( response = client.enable_xpn_resource_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2574,7 +2574,7 @@ def test_get_rest_required_fields(request_type=compute.GetProjectRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2750,7 +2750,7 @@ def test_get_xpn_host_rest_required_fields( response = client.get_xpn_host(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2939,7 +2939,7 @@ def test_get_xpn_resources_rest_required_fields( response = client.get_xpn_resources(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3200,7 +3200,7 @@ def test_list_xpn_hosts_rest_required_fields( response = client.list_xpn_hosts(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3468,7 +3468,7 @@ def test_move_disk_rest_required_fields(request_type=compute.MoveDiskProjectRequ response = client.move_disk(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3666,7 +3666,7 @@ def test_move_disk_unary_rest_required_fields( response = client.move_disk_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3864,7 +3864,7 @@ def test_move_instance_rest_required_fields( response = client.move_instance(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4062,7 +4062,7 @@ def test_move_instance_unary_rest_required_fields( response = client.move_instance_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4264,7 +4264,7 @@ def test_set_cloud_armor_tier_rest_required_fields( response = client.set_cloud_armor_tier(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4467,7 +4467,7 @@ def test_set_cloud_armor_tier_unary_rest_required_fields( response = client.set_cloud_armor_tier_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4671,7 +4671,7 @@ def test_set_common_instance_metadata_rest_required_fields( response = client.set_common_instance_metadata(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4871,7 +4871,7 @@ def test_set_common_instance_metadata_unary_rest_required_fields( response = client.set_common_instance_metadata_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5073,7 +5073,7 @@ def test_set_default_network_tier_rest_required_fields( response = client.set_default_network_tier(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5277,7 +5277,7 @@ def test_set_default_network_tier_unary_rest_required_fields( response = client.set_default_network_tier_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5481,7 +5481,7 @@ def test_set_managed_protection_tier_rest_required_fields( response = client.set_managed_protection_tier(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5685,7 +5685,7 @@ def test_set_managed_protection_tier_unary_rest_required_fields( response = client.set_managed_protection_tier_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5891,7 +5891,7 @@ def test_set_usage_export_bucket_rest_required_fields( response = client.set_usage_export_bucket(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6095,7 +6095,7 @@ def test_set_usage_export_bucket_unary_rest_required_fields( response = client.set_usage_export_bucket_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_public_advertised_prefixes.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_public_advertised_prefixes.py index 2913627d004c..0e2d17ddd5d3 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_public_advertised_prefixes.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_public_advertised_prefixes.py @@ -1120,7 +1120,7 @@ def test_announce_rest_required_fields( response = client.announce(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1320,7 +1320,7 @@ def test_announce_unary_rest_required_fields( response = client.announce_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1520,7 +1520,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1720,7 +1720,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1914,7 +1914,7 @@ def test_get_rest_required_fields( response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2109,7 +2109,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2308,7 +2308,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2510,7 +2510,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2775,7 +2775,7 @@ def test_patch_rest_required_fields( response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2983,7 +2983,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3190,7 +3190,7 @@ def test_withdraw_rest_required_fields( response = client.withdraw(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3390,7 +3390,7 @@ def test_withdraw_unary_rest_required_fields( response = client.withdraw_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_public_delegated_prefixes.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_public_delegated_prefixes.py index b9479efaac98..9a1d3928f5ee 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_public_delegated_prefixes.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_public_delegated_prefixes.py @@ -1116,7 +1116,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1396,7 +1396,7 @@ def test_announce_rest_required_fields( response = client.announce(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1605,7 +1605,7 @@ def test_announce_unary_rest_required_fields( response = client.announce_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1814,7 +1814,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2023,7 +2023,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2226,7 +2226,7 @@ def test_get_rest_required_fields( response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2432,7 +2432,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2638,7 +2638,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2847,7 +2847,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3119,7 +3119,7 @@ def test_patch_rest_required_fields( response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3336,7 +3336,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3552,7 +3552,7 @@ def test_withdraw_rest_required_fields( response = client.withdraw(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3761,7 +3761,7 @@ def test_withdraw_unary_rest_required_fields( response = client.withdraw_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_autoscalers.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_autoscalers.py index bf6199c9a198..cd281f2f3e1e 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_autoscalers.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_autoscalers.py @@ -1100,7 +1100,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1309,7 +1309,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1510,7 +1510,7 @@ def test_get_rest_required_fields(request_type=compute.GetRegionAutoscalerReques response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1716,7 +1716,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1922,7 +1922,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2129,7 +2129,7 @@ def test_list_rest_required_fields(request_type=compute.ListRegionAutoscalersReq response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2400,7 +2400,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchRegionAutoscalerRe response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2616,7 +2616,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2829,7 +2829,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3047,7 +3047,7 @@ def test_update_rest_required_fields( response = client.update(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3263,7 +3263,7 @@ def test_update_unary_rest_required_fields( response = client.update_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_backend_services.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_backend_services.py index 1176bc67d9d8..f39d6fbca79c 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_backend_services.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_backend_services.py @@ -1116,7 +1116,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1325,7 +1325,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1526,7 +1526,7 @@ def test_get_rest_required_fields(request_type=compute.GetRegionBackendServiceRe response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1730,7 +1730,7 @@ def test_get_health_rest_required_fields( response = client.get_health(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1942,7 +1942,7 @@ def test_get_iam_policy_rest_required_fields( response = client.get_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2148,7 +2148,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2354,7 +2354,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2563,7 +2563,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2834,7 +2834,7 @@ def test_list_usable_rest_required_fields( response = client.list_usable(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3106,7 +3106,7 @@ def test_patch_rest_required_fields( response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3323,7 +3323,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3534,7 +3534,7 @@ def test_set_iam_policy_rest_required_fields( response = client.set_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3755,7 +3755,7 @@ def test_set_security_policy_rest_required_fields( response = client.set_security_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3976,7 +3976,7 @@ def test_set_security_policy_unary_rest_required_fields( response = client.set_security_policy_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4191,7 +4191,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4408,7 +4408,7 @@ def test_update_rest_required_fields( response = client.update(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4625,7 +4625,7 @@ def test_update_unary_rest_required_fields( response = client.update_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_commitments.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_commitments.py index ccbd898a600c..b2e2381691de 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_commitments.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_commitments.py @@ -1098,7 +1098,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1368,7 +1368,7 @@ def test_get_rest_required_fields(request_type=compute.GetRegionCommitmentReques response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1574,7 +1574,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1776,7 +1776,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1979,7 +1979,7 @@ def test_list_rest_required_fields(request_type=compute.ListRegionCommitmentsReq response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2249,7 +2249,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2472,7 +2472,7 @@ def test_update_rest_required_fields( response = client.update(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2697,7 +2697,7 @@ def test_update_unary_rest_required_fields( response = client.update_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2920,7 +2920,7 @@ def test_update_reservations_rest_required_fields( response = client.update_reservations(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3153,7 +3153,7 @@ def test_update_reservations_unary_rest_required_fields( response = client.update_reservations_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_disk_settings.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_disk_settings.py index ba39bb0a3ce7..2ed5ce9d4ede 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_disk_settings.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_disk_settings.py @@ -1091,7 +1091,7 @@ def test_get_rest_required_fields(request_type=compute.GetRegionDiskSettingReque response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1293,7 +1293,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchRegionDiskSettingR response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1521,7 +1521,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_disk_types.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_disk_types.py index da6645554d7a..bb070d272fc1 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_disk_types.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_disk_types.py @@ -1071,7 +1071,7 @@ def test_get_rest_required_fields(request_type=compute.GetRegionDiskTypeRequest) response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1278,7 +1278,7 @@ def test_list_rest_required_fields(request_type=compute.ListRegionDiskTypesReque response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_disks.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_disks.py index 7543ac7a1d4c..7057e2234789 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_disks.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_disks.py @@ -1057,7 +1057,7 @@ def test_add_resource_policies_rest_required_fields( response = client.add_resource_policies(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1275,7 +1275,7 @@ def test_add_resource_policies_unary_rest_required_fields( response = client.add_resource_policies_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1484,7 +1484,7 @@ def test_bulk_insert_rest_required_fields( response = client.bulk_insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1690,7 +1690,7 @@ def test_bulk_insert_unary_rest_required_fields( response = client.bulk_insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1900,7 +1900,7 @@ def test_create_snapshot_rest_required_fields( response = client.create_snapshot(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2109,7 +2109,7 @@ def test_create_snapshot_unary_rest_required_fields( response = client.create_snapshot_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2315,7 +2315,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteRegionDiskReques response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2520,7 +2520,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2717,7 +2717,7 @@ def test_get_rest_required_fields(request_type=compute.GetRegionDiskRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2918,7 +2918,7 @@ def test_get_iam_policy_rest_required_fields( response = client.get_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3127,7 +3127,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertRegionDiskReques response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3339,7 +3339,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3547,7 +3547,7 @@ def test_list_rest_required_fields(request_type=compute.ListRegionDisksRequest): response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3824,7 +3824,7 @@ def test_remove_resource_policies_rest_required_fields( response = client.remove_resource_policies(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4042,7 +4042,7 @@ def test_remove_resource_policies_unary_rest_required_fields( response = client.remove_resource_policies_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4253,7 +4253,7 @@ def test_resize_rest_required_fields(request_type=compute.ResizeRegionDiskReques response = client.resize(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4466,7 +4466,7 @@ def test_resize_unary_rest_required_fields( response = client.resize_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4673,7 +4673,7 @@ def test_set_iam_policy_rest_required_fields( response = client.set_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4890,7 +4890,7 @@ def test_set_labels_rest_required_fields( response = client.set_labels(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5107,7 +5107,7 @@ def test_set_labels_unary_rest_required_fields( response = client.set_labels_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5329,7 +5329,7 @@ def test_start_async_replication_rest_required_fields( response = client.start_async_replication(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5547,7 +5547,7 @@ def test_start_async_replication_unary_rest_required_fields( response = client.start_async_replication_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5764,7 +5764,7 @@ def test_stop_async_replication_rest_required_fields( response = client.stop_async_replication(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5974,7 +5974,7 @@ def test_stop_async_replication_unary_rest_required_fields( response = client.stop_async_replication_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6181,7 +6181,7 @@ def test_stop_group_async_replication_rest_required_fields( response = client.stop_group_async_replication(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6392,7 +6392,7 @@ def test_stop_group_async_replication_unary_rest_required_fields( response = client.stop_group_async_replication_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6602,7 +6602,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6823,7 +6823,7 @@ def test_update_rest_required_fields(request_type=compute.UpdateRegionDiskReques response = client.update(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -7044,7 +7044,7 @@ def test_update_unary_rest_required_fields( response = client.update_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_health_check_services.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_health_check_services.py index e66804c62936..14e97527431e 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_health_check_services.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_health_check_services.py @@ -1128,7 +1128,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1337,7 +1337,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1540,7 +1540,7 @@ def test_get_rest_required_fields( response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1746,7 +1746,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1952,7 +1952,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2161,7 +2161,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2433,7 +2433,7 @@ def test_patch_rest_required_fields( response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2650,7 +2650,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2865,7 +2865,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_health_checks.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_health_checks.py index a69fc0ded7f9..63d19593b3e9 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_health_checks.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_health_checks.py @@ -1104,7 +1104,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1313,7 +1313,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1514,7 +1514,7 @@ def test_get_rest_required_fields(request_type=compute.GetRegionHealthCheckReque response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1720,7 +1720,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1922,7 +1922,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2125,7 +2125,7 @@ def test_list_rest_required_fields(request_type=compute.ListRegionHealthChecksRe response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2395,7 +2395,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchRegionHealthCheckR response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2608,7 +2608,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2819,7 +2819,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3036,7 +3036,7 @@ def test_update_rest_required_fields( response = client.update(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3249,7 +3249,7 @@ def test_update_unary_rest_required_fields( response = client.update_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_instance_group_manager_resize_requests.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_instance_group_manager_resize_requests.py index 9884a7c5288b..7a405735fafe 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_instance_group_manager_resize_requests.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_instance_group_manager_resize_requests.py @@ -1149,7 +1149,7 @@ def test_cancel_rest_required_fields( response = client.cancel(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1366,7 +1366,7 @@ def test_cancel_unary_rest_required_fields( response = client.cancel_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1583,7 +1583,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1800,7 +1800,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2011,7 +2011,7 @@ def test_get_rest_required_fields( response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2225,7 +2225,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2442,7 +2442,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2666,7 +2666,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_instance_group_managers.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_instance_group_managers.py index 9179d6d46fe9..80581e49ac9e 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_instance_group_managers.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_instance_group_managers.py @@ -1135,7 +1135,7 @@ def test_abandon_instances_rest_required_fields( response = client.abandon_instances(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1354,7 +1354,7 @@ def test_abandon_instances_unary_rest_required_fields( response = client.abandon_instances_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1574,7 +1574,7 @@ def test_apply_updates_to_instances_rest_required_fields( response = client.apply_updates_to_instances(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1794,7 +1794,7 @@ def test_apply_updates_to_instances_unary_rest_required_fields( response = client.apply_updates_to_instances_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2013,7 +2013,7 @@ def test_create_instances_rest_required_fields( response = client.create_instances(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2232,7 +2232,7 @@ def test_create_instances_unary_rest_required_fields( response = client.create_instances_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2448,7 +2448,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2657,7 +2657,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2869,7 +2869,7 @@ def test_delete_instances_rest_required_fields( response = client.delete_instances(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3088,7 +3088,7 @@ def test_delete_instances_unary_rest_required_fields( response = client.delete_instances_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3308,7 +3308,7 @@ def test_delete_per_instance_configs_rest_required_fields( response = client.delete_per_instance_configs(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3528,7 +3528,7 @@ def test_delete_per_instance_configs_unary_rest_required_fields( response = client.delete_per_instance_configs_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3740,7 +3740,7 @@ def test_get_rest_required_fields( response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3946,7 +3946,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4160,7 +4160,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4377,7 +4377,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4656,7 +4656,7 @@ def test_list_errors_rest_required_fields( response = client.list_errors(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4954,7 +4954,7 @@ def test_list_managed_instances_rest_required_fields( response = client.list_managed_instances(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5254,7 +5254,7 @@ def test_list_per_instance_configs_rest_required_fields( response = client.list_per_instance_configs(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5542,7 +5542,7 @@ def test_patch_rest_required_fields( response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5767,7 +5767,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5997,7 +5997,7 @@ def test_patch_per_instance_configs_rest_required_fields( response = client.patch_per_instance_configs(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6223,7 +6223,7 @@ def test_patch_per_instance_configs_unary_rest_required_fields( response = client.patch_per_instance_configs_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6448,7 +6448,7 @@ def test_recreate_instances_rest_required_fields( response = client.recreate_instances(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6669,7 +6669,7 @@ def test_recreate_instances_unary_rest_required_fields( response = client.recreate_instances_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6902,6 +6902,7 @@ def test_resize_rest_required_fields( "size", str(0), ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -7136,6 +7137,7 @@ def test_resize_unary_rest_required_fields( "size", str(0), ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -7354,7 +7356,7 @@ def test_resize_advanced_rest_required_fields( response = client.resize_advanced(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -7571,7 +7573,7 @@ def test_resize_advanced_unary_rest_required_fields( response = client.resize_advanced_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -7790,7 +7792,7 @@ def test_resume_instances_rest_required_fields( response = client.resume_instances(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -8009,7 +8011,7 @@ def test_resume_instances_unary_rest_required_fields( response = client.resume_instances_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -8231,7 +8233,7 @@ def test_set_auto_healing_policies_rest_required_fields( response = client.set_auto_healing_policies(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -8461,7 +8463,7 @@ def test_set_auto_healing_policies_unary_rest_required_fields( response = client.set_auto_healing_policies_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -8691,7 +8693,7 @@ def test_set_instance_template_rest_required_fields( response = client.set_instance_template(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -8913,7 +8915,7 @@ def test_set_instance_template_unary_rest_required_fields( response = client.set_instance_template_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -9132,7 +9134,7 @@ def test_set_target_pools_rest_required_fields( response = client.set_target_pools(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -9351,7 +9353,7 @@ def test_set_target_pools_unary_rest_required_fields( response = client.set_target_pools_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -9568,7 +9570,7 @@ def test_start_instances_rest_required_fields( response = client.start_instances(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -9785,7 +9787,7 @@ def test_start_instances_unary_rest_required_fields( response = client.start_instances_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -10002,7 +10004,7 @@ def test_stop_instances_rest_required_fields( response = client.stop_instances(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -10219,7 +10221,7 @@ def test_stop_instances_unary_rest_required_fields( response = client.stop_instances_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -10438,7 +10440,7 @@ def test_suspend_instances_rest_required_fields( response = client.suspend_instances(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -10657,7 +10659,7 @@ def test_suspend_instances_unary_rest_required_fields( response = client.suspend_instances_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -10872,7 +10874,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -11089,7 +11091,7 @@ def test_update_rest_required_fields( response = client.update(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -11314,7 +11316,7 @@ def test_update_unary_rest_required_fields( response = client.update_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -11544,7 +11546,7 @@ def test_update_per_instance_configs_rest_required_fields( response = client.update_per_instance_configs(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -11770,7 +11772,7 @@ def test_update_per_instance_configs_unary_rest_required_fields( response = client.update_per_instance_configs_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_instance_groups.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_instance_groups.py index 8f5d1e14aca8..d86114442bd1 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_instance_groups.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_instance_groups.py @@ -1106,7 +1106,7 @@ def test_get_rest_required_fields(request_type=compute.GetRegionInstanceGroupReq response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1315,7 +1315,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1591,7 +1591,7 @@ def test_list_instances_rest_required_fields( response = client.list_instances(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1888,7 +1888,7 @@ def test_set_named_ports_rest_required_fields( response = client.set_named_ports(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2105,7 +2105,7 @@ def test_set_named_ports_unary_rest_required_fields( response = client.set_named_ports_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2320,7 +2320,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_instance_templates.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_instance_templates.py index 2954318653fe..f98034385e5b 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_instance_templates.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_instance_templates.py @@ -1119,7 +1119,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1328,7 +1328,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1533,7 +1533,7 @@ def test_get_rest_required_fields( response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1739,7 +1739,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1945,7 +1945,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2155,7 +2155,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_instances.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_instances.py index 2d99311c7d8c..0b0b59a2cb03 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_instances.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_instances.py @@ -1083,7 +1083,7 @@ def test_bulk_insert_rest_required_fields( response = client.bulk_insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1289,7 +1289,7 @@ def test_bulk_insert_unary_rest_required_fields( response = client.bulk_insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_instant_snapshots.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_instant_snapshots.py index b04425c0453a..7fa9054f6efa 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_instant_snapshots.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_instant_snapshots.py @@ -1118,7 +1118,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1327,7 +1327,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1528,7 +1528,7 @@ def test_get_rest_required_fields(request_type=compute.GetRegionInstantSnapshotR response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1733,7 +1733,7 @@ def test_get_iam_policy_rest_required_fields( response = client.get_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1939,7 +1939,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2145,7 +2145,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2354,7 +2354,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2620,7 +2620,7 @@ def test_set_iam_policy_rest_required_fields( response = client.set_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2837,7 +2837,7 @@ def test_set_labels_rest_required_fields( response = client.set_labels(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3054,7 +3054,7 @@ def test_set_labels_unary_rest_required_fields( response = client.set_labels_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3269,7 +3269,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_multi_migs.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_multi_migs.py index 11c109cb6651..223908d65de0 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_multi_migs.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_multi_migs.py @@ -1084,7 +1084,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteRegionMultiMigRe response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1293,7 +1293,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1494,7 +1494,7 @@ def test_get_rest_required_fields(request_type=compute.GetRegionMultiMigRequest) response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1698,7 +1698,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertRegionMultiMigRe response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1904,7 +1904,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2111,7 +2111,7 @@ def test_list_rest_required_fields(request_type=compute.ListRegionMultiMigsReque response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_network_endpoint_groups.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_network_endpoint_groups.py index d2fa400a51df..efbed8be5cf1 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_network_endpoint_groups.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_network_endpoint_groups.py @@ -1138,7 +1138,7 @@ def test_attach_network_endpoints_rest_required_fields( response = client.attach_network_endpoints(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1364,7 +1364,7 @@ def test_attach_network_endpoints_unary_rest_required_fields( response = client.attach_network_endpoints_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1584,7 +1584,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1793,7 +1793,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2008,7 +2008,7 @@ def test_detach_network_endpoints_rest_required_fields( response = client.detach_network_endpoints(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2234,7 +2234,7 @@ def test_detach_network_endpoints_unary_rest_required_fields( response = client.detach_network_endpoints_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2448,7 +2448,7 @@ def test_get_rest_required_fields( response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2654,7 +2654,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2860,7 +2860,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3069,7 +3069,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3351,7 +3351,7 @@ def test_list_network_endpoints_rest_required_fields( response = client.list_network_endpoints(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_network_firewall_policies.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_network_firewall_policies.py index c93af895073b..8cb347351364 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_network_firewall_policies.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_network_firewall_policies.py @@ -1145,7 +1145,7 @@ def test_add_association_rest_required_fields( response = client.add_association(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1374,7 +1374,7 @@ def test_add_association_unary_rest_required_fields( response = client.add_association_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1603,7 +1603,7 @@ def test_add_rule_rest_required_fields( response = client.add_rule(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1832,7 +1832,7 @@ def test_add_rule_unary_rest_required_fields( response = client.add_rule_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2059,7 +2059,7 @@ def test_clone_rules_rest_required_fields( response = client.clone_rules(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2278,7 +2278,7 @@ def test_clone_rules_unary_rest_required_fields( response = client.clone_rules_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2492,7 +2492,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2701,7 +2701,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2904,7 +2904,7 @@ def test_get_rest_required_fields( response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3109,7 +3109,7 @@ def test_get_association_rest_required_fields( response = client.get_association(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3331,6 +3331,7 @@ def test_get_effective_firewalls_rest_required_fields( "network", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3538,7 +3539,7 @@ def test_get_iam_policy_rest_required_fields( response = client.get_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3743,7 +3744,7 @@ def test_get_rule_rest_required_fields( response = client.get_rule(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3949,7 +3950,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4163,7 +4164,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4380,7 +4381,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4652,7 +4653,7 @@ def test_patch_rest_required_fields( response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4877,7 +4878,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5104,7 +5105,7 @@ def test_patch_association_rest_required_fields( response = client.patch_association(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5323,7 +5324,7 @@ def test_patch_association_unary_rest_required_fields( response = client.patch_association_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5545,7 +5546,7 @@ def test_patch_rule_rest_required_fields( response = client.patch_rule(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5772,7 +5773,7 @@ def test_patch_rule_unary_rest_required_fields( response = client.patch_rule_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6002,7 +6003,7 @@ def test_remove_association_rest_required_fields( response = client.remove_association(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6225,7 +6226,7 @@ def test_remove_association_unary_rest_required_fields( response = client.remove_association_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6444,7 +6445,7 @@ def test_remove_rule_rest_required_fields( response = client.remove_rule(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6663,7 +6664,7 @@ def test_remove_rule_unary_rest_required_fields( response = client.remove_rule_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6872,7 +6873,7 @@ def test_set_iam_policy_rest_required_fields( response = client.set_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -7087,7 +7088,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_notification_endpoints.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_notification_endpoints.py index 778e6d94ee17..bac653ccecbb 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_notification_endpoints.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_notification_endpoints.py @@ -1132,7 +1132,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1341,7 +1341,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1544,7 +1544,7 @@ def test_get_rest_required_fields( response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1750,7 +1750,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1956,7 +1956,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2165,7 +2165,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2435,7 +2435,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_operations.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_operations.py index 9b128224372d..2af8fb8d93b1 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_operations.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_operations.py @@ -1077,7 +1077,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteRegionOperationR response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1278,7 +1278,7 @@ def test_get_rest_required_fields(request_type=compute.GetRegionOperationRequest response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1485,7 +1485,7 @@ def test_list_rest_required_fields(request_type=compute.ListRegionOperationsRequ response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1748,7 +1748,7 @@ def test_wait_rest_required_fields(request_type=compute.WaitRegionOperationReque response = client.wait(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_security_policies.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_security_policies.py index c04e9af1c82d..086bcf81fa39 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_security_policies.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_security_policies.py @@ -1119,7 +1119,7 @@ def test_add_rule_rest_required_fields( response = client.add_rule(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1336,7 +1336,7 @@ def test_add_rule_unary_rest_required_fields( response = client.add_rule_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1552,7 +1552,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1761,7 +1761,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1962,7 +1962,7 @@ def test_get_rest_required_fields(request_type=compute.GetRegionSecurityPolicyRe response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2167,7 +2167,7 @@ def test_get_rule_rest_required_fields( response = client.get_rule(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2378,7 +2378,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2602,7 +2602,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2824,7 +2824,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3101,7 +3101,7 @@ def test_patch_rest_required_fields( response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3336,7 +3336,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3572,7 +3572,7 @@ def test_patch_rule_rest_required_fields( response = client.patch_rule(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3801,7 +3801,7 @@ def test_patch_rule_unary_rest_required_fields( response = client.patch_rule_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4023,7 +4023,7 @@ def test_remove_rule_rest_required_fields( response = client.remove_rule(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4232,7 +4232,7 @@ def test_remove_rule_unary_rest_required_fields( response = client.remove_rule_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4442,7 +4442,7 @@ def test_set_labels_rest_required_fields( response = client.set_labels(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4659,7 +4659,7 @@ def test_set_labels_unary_rest_required_fields( response = client.set_labels_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_snapshot_settings.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_snapshot_settings.py index fac2937014c0..eacfaf66f39d 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_snapshot_settings.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_snapshot_settings.py @@ -1105,7 +1105,7 @@ def test_get_rest_required_fields(request_type=compute.GetRegionSnapshotSettingR response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1309,7 +1309,7 @@ def test_patch_rest_required_fields( response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1537,7 +1537,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_snapshots.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_snapshots.py index a39ebce73203..09b28019175e 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_snapshots.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_snapshots.py @@ -1084,7 +1084,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteRegionSnapshotRe response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1293,7 +1293,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1494,7 +1494,7 @@ def test_get_rest_required_fields(request_type=compute.GetRegionSnapshotRequest) response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1699,7 +1699,7 @@ def test_get_iam_policy_rest_required_fields( response = client.get_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1903,7 +1903,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertRegionSnapshotRe response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2105,7 +2105,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2308,7 +2308,7 @@ def test_list_rest_required_fields(request_type=compute.ListRegionSnapshotsReque response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2574,7 +2574,7 @@ def test_set_iam_policy_rest_required_fields( response = client.set_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2791,7 +2791,7 @@ def test_set_labels_rest_required_fields( response = client.set_labels(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3008,7 +3008,7 @@ def test_set_labels_unary_rest_required_fields( response = client.set_labels_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3223,7 +3223,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_ssl_certificates.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_ssl_certificates.py index 0a6a3df62232..b2735ef907d9 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_ssl_certificates.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_ssl_certificates.py @@ -1116,7 +1116,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1325,7 +1325,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1526,7 +1526,7 @@ def test_get_rest_required_fields(request_type=compute.GetRegionSslCertificateRe response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1732,7 +1732,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1938,7 +1938,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2147,7 +2147,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2417,7 +2417,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_ssl_policies.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_ssl_policies.py index 864768872fd5..80be7b160c9e 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_ssl_policies.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_ssl_policies.py @@ -1098,7 +1098,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteRegionSslPolicyR response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1307,7 +1307,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1508,7 +1508,7 @@ def test_get_rest_required_fields(request_type=compute.GetRegionSslPolicyRequest response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1712,7 +1712,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertRegionSslPolicyR response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1918,7 +1918,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2125,7 +2125,7 @@ def test_list_rest_required_fields(request_type=compute.ListRegionSslPoliciesReq response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2403,7 +2403,7 @@ def test_list_available_features_rest_required_fields( response = client.list_available_features(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2612,7 +2612,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchRegionSslPolicyReq response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2829,7 +2829,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3044,7 +3044,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_target_http_proxies.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_target_http_proxies.py index 47fed1be4068..8209ccc619aa 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_target_http_proxies.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_target_http_proxies.py @@ -1118,7 +1118,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1327,7 +1327,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1528,7 +1528,7 @@ def test_get_rest_required_fields(request_type=compute.GetRegionTargetHttpProxyR response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1734,7 +1734,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1940,7 +1940,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2149,7 +2149,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2421,7 +2421,7 @@ def test_set_url_map_rest_required_fields( response = client.set_url_map(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2634,7 +2634,7 @@ def test_set_url_map_unary_rest_required_fields( response = client.set_url_map_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2845,7 +2845,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_target_https_proxies.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_target_https_proxies.py index dbefdb5d36ac..647fbd7f8b54 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_target_https_proxies.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_target_https_proxies.py @@ -1122,7 +1122,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1331,7 +1331,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1534,7 +1534,7 @@ def test_get_rest_required_fields( response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1740,7 +1740,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1946,7 +1946,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2155,7 +2155,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2427,7 +2427,7 @@ def test_patch_rest_required_fields( response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2644,7 +2644,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2865,7 +2865,7 @@ def test_set_ssl_certificates_rest_required_fields( response = client.set_ssl_certificates(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3086,7 +3086,7 @@ def test_set_ssl_certificates_unary_rest_required_fields( response = client.set_ssl_certificates_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3303,7 +3303,7 @@ def test_set_url_map_rest_required_fields( response = client.set_url_map(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3516,7 +3516,7 @@ def test_set_url_map_unary_rest_required_fields( response = client.set_url_map_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3727,7 +3727,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_target_tcp_proxies.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_target_tcp_proxies.py index e66658b83248..d7027db59f15 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_target_tcp_proxies.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_target_tcp_proxies.py @@ -1118,7 +1118,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1327,7 +1327,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1528,7 +1528,7 @@ def test_get_rest_required_fields(request_type=compute.GetRegionTargetTcpProxyRe response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1734,7 +1734,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1940,7 +1940,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2149,7 +2149,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2419,7 +2419,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_url_maps.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_url_maps.py index 4a74ff7907bb..db6cc40b47fb 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_url_maps.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_url_maps.py @@ -1066,7 +1066,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteRegionUrlMapRequ response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1275,7 +1275,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1476,7 +1476,7 @@ def test_get_rest_required_fields(request_type=compute.GetRegionUrlMapRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1680,7 +1680,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertRegionUrlMapRequ response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1886,7 +1886,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2098,7 +2098,7 @@ def test_invalidate_cache_rest_required_fields( response = client.invalidate_cache(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2317,7 +2317,7 @@ def test_invalidate_cache_unary_rest_required_fields( response = client.invalidate_cache_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2531,7 +2531,7 @@ def test_list_rest_required_fields(request_type=compute.ListRegionUrlMapsRequest response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2801,7 +2801,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchRegionUrlMapReques response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3018,7 +3018,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3233,7 +3233,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3448,7 +3448,7 @@ def test_update_rest_required_fields(request_type=compute.UpdateRegionUrlMapRequ response = client.update(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3665,7 +3665,7 @@ def test_update_unary_rest_required_fields( response = client.update_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3876,7 +3876,7 @@ def test_validate_rest_required_fields( response = client.validate(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_zones.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_zones.py index 6041ae559ee0..03125faa6921 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_zones.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_region_zones.py @@ -1042,7 +1042,7 @@ def test_list_rest_required_fields(request_type=compute.ListRegionZonesRequest): response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_regions.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_regions.py index a94f9466da11..647665c14533 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_regions.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_regions.py @@ -1012,7 +1012,7 @@ def test_get_rest_required_fields(request_type=compute.GetRegionRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1208,7 +1208,7 @@ def test_list_rest_required_fields(request_type=compute.ListRegionsRequest): response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_reservation_blocks.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_reservation_blocks.py index feec31c43ea4..58181f88d094 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_reservation_blocks.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_reservation_blocks.py @@ -1098,7 +1098,7 @@ def test_get_rest_required_fields(request_type=compute.GetReservationBlockReques response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1313,7 +1313,7 @@ def test_list_rest_required_fields(request_type=compute.ListReservationBlocksReq response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1606,7 +1606,7 @@ def test_perform_maintenance_rest_required_fields( response = client.perform_maintenance(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1835,7 +1835,7 @@ def test_perform_maintenance_unary_rest_required_fields( response = client.perform_maintenance_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_reservation_sub_blocks.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_reservation_sub_blocks.py index 55bffa40e5e0..14b3c3b7e524 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_reservation_sub_blocks.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_reservation_sub_blocks.py @@ -1110,7 +1110,7 @@ def test_get_rest_required_fields(request_type=compute.GetReservationSubBlockReq response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1327,7 +1327,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1619,7 +1619,7 @@ def test_perform_maintenance_rest_required_fields( response = client.perform_maintenance(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1840,7 +1840,7 @@ def test_perform_maintenance_unary_rest_required_fields( response = client.perform_maintenance_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_reservations.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_reservations.py index 3f85c4313028..52c1cd05ac11 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_reservations.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_reservations.py @@ -1053,7 +1053,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1329,7 +1329,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteReservationReque response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1538,7 +1538,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1739,7 +1739,7 @@ def test_get_rest_required_fields(request_type=compute.GetReservationRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1944,7 +1944,7 @@ def test_get_iam_policy_rest_required_fields( response = client.get_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2148,7 +2148,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertReservationReque response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2358,7 +2358,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2569,7 +2569,7 @@ def test_list_rest_required_fields(request_type=compute.ListReservationsRequest) response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2845,7 +2845,7 @@ def test_perform_maintenance_rest_required_fields( response = client.perform_maintenance(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3066,7 +3066,7 @@ def test_perform_maintenance_unary_rest_required_fields( response = client.perform_maintenance_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3281,7 +3281,7 @@ def test_resize_rest_required_fields(request_type=compute.ResizeReservationReque response = client.resize(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3498,7 +3498,7 @@ def test_resize_unary_rest_required_fields( response = client.resize_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3709,7 +3709,7 @@ def test_set_iam_policy_rest_required_fields( response = client.set_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3924,7 +3924,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4145,7 +4145,7 @@ def test_update_rest_required_fields(request_type=compute.UpdateReservationReque response = client.update(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4378,7 +4378,7 @@ def test_update_unary_rest_required_fields( response = client.update_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_resource_policies.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_resource_policies.py index ce61ce4d00a1..e065f8ce77f2 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_resource_policies.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_resource_policies.py @@ -1090,7 +1090,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1368,7 +1368,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteResourcePolicyRe response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1577,7 +1577,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1778,7 +1778,7 @@ def test_get_rest_required_fields(request_type=compute.GetResourcePolicyRequest) response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1983,7 +1983,7 @@ def test_get_iam_policy_rest_required_fields( response = client.get_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2187,7 +2187,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertResourcePolicyRe response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2393,7 +2393,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2600,7 +2600,7 @@ def test_list_rest_required_fields(request_type=compute.ListResourcePoliciesRequ response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2875,7 +2875,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchResourcePolicyRequ response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3102,7 +3102,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3318,7 +3318,7 @@ def test_set_iam_policy_rest_required_fields( response = client.set_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3533,7 +3533,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_routers.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_routers.py index 9e47f08f34f9..be5202941cbc 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_routers.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_routers.py @@ -1029,7 +1029,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1302,7 +1302,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteRouterRequest): response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1509,7 +1509,7 @@ def test_delete_unary_rest_required_fields(request_type=compute.DeleteRouterRequ response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1727,7 +1727,7 @@ def test_delete_route_policy_rest_required_fields( response = client.delete_route_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1950,7 +1950,7 @@ def test_delete_route_policy_unary_rest_required_fields( response = client.delete_route_policy_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2156,7 +2156,7 @@ def test_get_rest_required_fields(request_type=compute.GetRouterRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2361,7 +2361,7 @@ def test_get_nat_ip_info_rest_required_fields( response = client.get_nat_ip_info(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2579,7 +2579,7 @@ def test_get_nat_mapping_info_rest_required_fields( response = client.get_nat_mapping_info(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2860,7 +2860,7 @@ def test_get_route_policy_rest_required_fields( response = client.get_route_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3065,7 +3065,7 @@ def test_get_router_status_rest_required_fields( response = client.get_router_status(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3269,7 +3269,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertRouterRequest): response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3473,7 +3473,7 @@ def test_insert_unary_rest_required_fields(request_type=compute.InsertRouterRequ response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3680,7 +3680,7 @@ def test_list_rest_required_fields(request_type=compute.ListRoutersRequest): response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3960,7 +3960,7 @@ def test_list_bgp_routes_rest_required_fields( response = client.list_bgp_routes(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4255,7 +4255,7 @@ def test_list_route_policies_rest_required_fields( response = client.list_route_policies(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4536,7 +4536,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchRouterRequest): response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4751,7 +4751,7 @@ def test_patch_unary_rest_required_fields(request_type=compute.PatchRouterReques response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4972,7 +4972,7 @@ def test_patch_route_policy_rest_required_fields( response = client.patch_route_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5189,7 +5189,7 @@ def test_patch_route_policy_unary_rest_required_fields( response = client.patch_route_policy_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5394,7 +5394,7 @@ def test_preview_rest_required_fields(request_type=compute.PreviewRouterRequest) response = client.preview(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5609,7 +5609,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5824,7 +5824,7 @@ def test_update_rest_required_fields(request_type=compute.UpdateRouterRequest): response = client.update(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6039,7 +6039,7 @@ def test_update_unary_rest_required_fields(request_type=compute.UpdateRouterRequ response = client.update_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6260,7 +6260,7 @@ def test_update_route_policy_rest_required_fields( response = client.update_route_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6477,7 +6477,7 @@ def test_update_route_policy_unary_rest_required_fields( response = client.update_route_policy_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_routes.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_routes.py index 22e7f7a4faef..a87341ea1d56 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_routes.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_routes.py @@ -1020,7 +1020,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteRouteRequest): response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1216,7 +1216,7 @@ def test_delete_unary_rest_required_fields(request_type=compute.DeleteRouteReque response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1406,7 +1406,7 @@ def test_get_rest_required_fields(request_type=compute.GetRouteRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1599,7 +1599,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertRouteRequest): response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1795,7 +1795,7 @@ def test_insert_unary_rest_required_fields(request_type=compute.InsertRouteReque response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1994,7 +1994,7 @@ def test_list_rest_required_fields(request_type=compute.ListRoutesRequest): response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2252,7 +2252,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_security_policies.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_security_policies.py index 268e04cecb0c..8489acccf165 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_security_policies.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_security_policies.py @@ -1089,7 +1089,7 @@ def test_add_rule_rest_required_fields( response = client.add_rule(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1295,7 +1295,7 @@ def test_add_rule_unary_rest_required_fields( response = client.add_rule_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1502,7 +1502,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1776,7 +1776,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteSecurityPolicyRe response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1974,7 +1974,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2164,7 +2164,7 @@ def test_get_rest_required_fields(request_type=compute.GetSecurityPolicyRequest) response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2358,7 +2358,7 @@ def test_get_rule_rest_required_fields( response = client.get_rule(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2556,7 +2556,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertSecurityPolicyRe response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2773,7 +2773,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2986,7 +2986,7 @@ def test_list_rest_required_fields(request_type=compute.ListSecurityPoliciesRequ response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3255,7 +3255,7 @@ def test_list_preconfigured_expression_sets_rest_required_fields( response = client.list_preconfigured_expression_sets(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3466,7 +3466,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchSecurityPolicyRequ response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3690,7 +3690,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3915,7 +3915,7 @@ def test_patch_rule_rest_required_fields( response = client.patch_rule(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4133,7 +4133,7 @@ def test_patch_rule_unary_rest_required_fields( response = client.patch_rule_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4344,7 +4344,7 @@ def test_remove_rule_rest_required_fields( response = client.remove_rule(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4542,7 +4542,7 @@ def test_remove_rule_unary_rest_required_fields( response = client.remove_rule_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4739,7 +4739,7 @@ def test_set_labels_rest_required_fields( response = client.set_labels(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4943,7 +4943,7 @@ def test_set_labels_unary_rest_required_fields( response = client.set_labels_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5147,7 +5147,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_service_attachments.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_service_attachments.py index 2f9506f932c7..04f3a9651dfd 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_service_attachments.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_service_attachments.py @@ -1102,7 +1102,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1382,7 +1382,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1591,7 +1591,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1794,7 +1794,7 @@ def test_get_rest_required_fields(request_type=compute.GetServiceAttachmentReque response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1999,7 +1999,7 @@ def test_get_iam_policy_rest_required_fields( response = client.get_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2205,7 +2205,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2419,7 +2419,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2634,7 +2634,7 @@ def test_list_rest_required_fields(request_type=compute.ListServiceAttachmentsRe response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2904,7 +2904,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchServiceAttachmentR response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3129,7 +3129,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3348,7 +3348,7 @@ def test_set_iam_policy_rest_required_fields( response = client.set_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3563,7 +3563,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_snapshot_settings_service.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_snapshot_settings_service.py index 5c40bcacb98a..cb79caa96129 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_snapshot_settings_service.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_snapshot_settings_service.py @@ -1101,7 +1101,7 @@ def test_get_rest_required_fields(request_type=compute.GetSnapshotSettingRequest response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1289,7 +1289,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchSnapshotSettingReq response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1510,7 +1510,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_snapshots.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_snapshots.py index 17f204f9d325..76bad54d8cab 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_snapshots.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_snapshots.py @@ -1041,7 +1041,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1310,7 +1310,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteSnapshotRequest) response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1506,7 +1506,7 @@ def test_delete_unary_rest_required_fields(request_type=compute.DeleteSnapshotRe response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1696,7 +1696,7 @@ def test_get_rest_required_fields(request_type=compute.GetSnapshotRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1890,7 +1890,7 @@ def test_get_iam_policy_rest_required_fields( response = client.get_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2083,7 +2083,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertSnapshotRequest) response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2276,7 +2276,7 @@ def test_insert_unary_rest_required_fields(request_type=compute.InsertSnapshotRe response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2472,7 +2472,7 @@ def test_list_rest_required_fields(request_type=compute.ListSnapshotsRequest): response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2727,7 +2727,7 @@ def test_set_iam_policy_rest_required_fields( response = client.set_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2929,7 +2929,7 @@ def test_set_labels_rest_required_fields(request_type=compute.SetLabelsSnapshotR response = client.set_labels(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3133,7 +3133,7 @@ def test_set_labels_unary_rest_required_fields( response = client.set_labels_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3337,7 +3337,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_ssl_certificates.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_ssl_certificates.py index c32b8f252eaa..4d2b15dbdae7 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_ssl_certificates.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_ssl_certificates.py @@ -1084,7 +1084,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1358,7 +1358,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteSslCertificateRe response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1556,7 +1556,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1746,7 +1746,7 @@ def test_get_rest_required_fields(request_type=compute.GetSslCertificateRequest) response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1939,7 +1939,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertSslCertificateRe response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2138,7 +2138,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2338,7 +2338,7 @@ def test_list_rest_required_fields(request_type=compute.ListSslCertificatesReque response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2597,7 +2597,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_ssl_policies.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_ssl_policies.py index 09d5d8a1ce8b..b1989bbb268c 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_ssl_policies.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_ssl_policies.py @@ -1049,7 +1049,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1321,7 +1321,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteSslPolicyRequest response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1517,7 +1517,7 @@ def test_delete_unary_rest_required_fields(request_type=compute.DeleteSslPolicyR response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1707,7 +1707,7 @@ def test_get_rest_required_fields(request_type=compute.GetSslPolicyRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1900,7 +1900,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertSslPolicyRequest response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2097,7 +2097,7 @@ def test_insert_unary_rest_required_fields(request_type=compute.InsertSslPolicyR response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2297,7 +2297,7 @@ def test_list_rest_required_fields(request_type=compute.ListSslPoliciesRequest): response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2564,7 +2564,7 @@ def test_list_available_features_rest_required_fields( response = client.list_available_features(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2762,7 +2762,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchSslPolicyRequest): response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2966,7 +2966,7 @@ def test_patch_unary_rest_required_fields(request_type=compute.PatchSslPolicyReq response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3170,7 +3170,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_storage_pool_types.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_storage_pool_types.py index b523c8fa7591..2d19177cdb2f 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_storage_pool_types.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_storage_pool_types.py @@ -1083,7 +1083,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1355,7 +1355,7 @@ def test_get_rest_required_fields(request_type=compute.GetStoragePoolTypeRequest response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1562,7 +1562,7 @@ def test_list_rest_required_fields(request_type=compute.ListStoragePoolTypesRequ response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_storage_pools.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_storage_pools.py index 09d6e1cbd2c5..376d7b1d105d 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_storage_pools.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_storage_pools.py @@ -1053,7 +1053,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1329,7 +1329,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteStoragePoolReque response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1538,7 +1538,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1739,7 +1739,7 @@ def test_get_rest_required_fields(request_type=compute.GetStoragePoolRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1944,7 +1944,7 @@ def test_get_iam_policy_rest_required_fields( response = client.get_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2148,7 +2148,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertStoragePoolReque response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2354,7 +2354,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2561,7 +2561,7 @@ def test_list_rest_required_fields(request_type=compute.ListStoragePoolsRequest) response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2836,7 +2836,7 @@ def test_list_disks_rest_required_fields( response = client.list_disks(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3113,7 +3113,7 @@ def test_set_iam_policy_rest_required_fields( response = client.set_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3328,7 +3328,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3548,7 +3548,7 @@ def test_update_rest_required_fields(request_type=compute.UpdateStoragePoolReque response = client.update(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3775,7 +3775,7 @@ def test_update_unary_rest_required_fields( response = client.update_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_subnetworks.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_subnetworks.py index 5d125119218e..6f147d088549 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_subnetworks.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_subnetworks.py @@ -1049,7 +1049,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1325,7 +1325,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteSubnetworkReques response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1534,7 +1534,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1748,7 +1748,7 @@ def test_expand_ip_cidr_range_rest_required_fields( response = client.expand_ip_cidr_range(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1969,7 +1969,7 @@ def test_expand_ip_cidr_range_unary_rest_required_fields( response = client.expand_ip_cidr_range_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2179,7 +2179,7 @@ def test_get_rest_required_fields(request_type=compute.GetSubnetworkRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2384,7 +2384,7 @@ def test_get_iam_policy_rest_required_fields( response = client.get_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2588,7 +2588,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertSubnetworkReques response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2794,7 +2794,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3002,7 +3002,7 @@ def test_list_rest_required_fields(request_type=compute.ListSubnetworksRequest): response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3271,7 +3271,7 @@ def test_list_usable_rest_required_fields( response = client.list_usable(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3542,7 +3542,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchSubnetworkRequest) response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3767,7 +3767,7 @@ def test_patch_unary_rest_required_fields(request_type=compute.PatchSubnetworkRe response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3983,7 +3983,7 @@ def test_set_iam_policy_rest_required_fields( response = client.set_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4205,7 +4205,7 @@ def test_set_private_ip_google_access_rest_required_fields( response = client.set_private_ip_google_access(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4427,7 +4427,7 @@ def test_set_private_ip_google_access_unary_rest_required_fields( response = client.set_private_ip_google_access_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4644,7 +4644,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_target_grpc_proxies.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_target_grpc_proxies.py index c9f846c1cf1b..b29ec134b7a8 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_target_grpc_proxies.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_target_grpc_proxies.py @@ -1094,7 +1094,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteTargetGrpcProxyR response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1292,7 +1292,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1482,7 +1482,7 @@ def test_get_rest_required_fields(request_type=compute.GetTargetGrpcProxyRequest response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1675,7 +1675,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertTargetGrpcProxyR response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1874,7 +1874,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2074,7 +2074,7 @@ def test_list_rest_required_fields(request_type=compute.ListTargetGrpcProxiesReq response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2333,7 +2333,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchTargetGrpcProxyReq response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2539,7 +2539,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2743,7 +2743,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_target_http_proxies.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_target_http_proxies.py index 2ee4bcbd2143..6f39acdeb771 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_target_http_proxies.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_target_http_proxies.py @@ -1098,7 +1098,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1372,7 +1372,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteTargetHttpProxyR response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1570,7 +1570,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1760,7 +1760,7 @@ def test_get_rest_required_fields(request_type=compute.GetTargetHttpProxyRequest response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1953,7 +1953,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertTargetHttpProxyR response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2152,7 +2152,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2352,7 +2352,7 @@ def test_list_rest_required_fields(request_type=compute.ListTargetHttpProxiesReq response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2611,7 +2611,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchTargetHttpProxyReq response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2817,7 +2817,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3023,7 +3023,7 @@ def test_set_url_map_rest_required_fields( response = client.set_url_map(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3225,7 +3225,7 @@ def test_set_url_map_unary_rest_required_fields( response = client.set_url_map_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3425,7 +3425,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_target_https_proxies.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_target_https_proxies.py index 510b7e68924a..5014c419d3ba 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_target_https_proxies.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_target_https_proxies.py @@ -1102,7 +1102,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1378,7 +1378,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1576,7 +1576,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1766,7 +1766,7 @@ def test_get_rest_required_fields(request_type=compute.GetTargetHttpsProxyReques response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1961,7 +1961,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2160,7 +2160,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2360,7 +2360,7 @@ def test_list_rest_required_fields(request_type=compute.ListTargetHttpsProxiesRe response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2619,7 +2619,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchTargetHttpsProxyRe response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2825,7 +2825,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3035,7 +3035,7 @@ def test_set_certificate_map_rest_required_fields( response = client.set_certificate_map(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3245,7 +3245,7 @@ def test_set_certificate_map_unary_rest_required_fields( response = client.set_certificate_map_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3453,7 +3453,7 @@ def test_set_quic_override_rest_required_fields( response = client.set_quic_override(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3661,7 +3661,7 @@ def test_set_quic_override_unary_rest_required_fields( response = client.set_quic_override_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3871,7 +3871,7 @@ def test_set_ssl_certificates_rest_required_fields( response = client.set_ssl_certificates(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4081,7 +4081,7 @@ def test_set_ssl_certificates_unary_rest_required_fields( response = client.set_ssl_certificates_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4287,7 +4287,7 @@ def test_set_ssl_policy_rest_required_fields( response = client.set_ssl_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4493,7 +4493,7 @@ def test_set_ssl_policy_unary_rest_required_fields( response = client.set_ssl_policy_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4699,7 +4699,7 @@ def test_set_url_map_rest_required_fields( response = client.set_url_map(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4901,7 +4901,7 @@ def test_set_url_map_unary_rest_required_fields( response = client.set_url_map_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5101,7 +5101,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_target_instances.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_target_instances.py index 1e0fc2c3aa29..efdf5db5b5be 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_target_instances.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_target_instances.py @@ -1084,7 +1084,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1362,7 +1362,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteTargetInstanceRe response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1571,7 +1571,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1772,7 +1772,7 @@ def test_get_rest_required_fields(request_type=compute.GetTargetInstanceRequest) response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1976,7 +1976,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertTargetInstanceRe response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2182,7 +2182,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2389,7 +2389,7 @@ def test_list_rest_required_fields(request_type=compute.ListTargetInstancesReque response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2665,7 +2665,7 @@ def test_set_security_policy_rest_required_fields( response = client.set_security_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2886,7 +2886,7 @@ def test_set_security_policy_unary_rest_required_fields( response = client.set_security_policy_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3101,7 +3101,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_target_pools.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_target_pools.py index b07eb612010d..80234fe9b30a 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_target_pools.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_target_pools.py @@ -1054,7 +1054,7 @@ def test_add_health_check_rest_required_fields( response = client.add_health_check(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1277,7 +1277,7 @@ def test_add_health_check_unary_rest_required_fields( response = client.add_health_check_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1498,7 +1498,7 @@ def test_add_instance_rest_required_fields( response = client.add_instance(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1715,7 +1715,7 @@ def test_add_instance_unary_rest_required_fields( response = client.add_instance_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1929,7 +1929,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2205,7 +2205,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteTargetPoolReques response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2414,7 +2414,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2615,7 +2615,7 @@ def test_get_rest_required_fields(request_type=compute.GetTargetPoolRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2819,7 +2819,7 @@ def test_get_health_rest_required_fields( response = client.get_health(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3030,7 +3030,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertTargetPoolReques response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3232,7 +3232,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3435,7 +3435,7 @@ def test_list_rest_required_fields(request_type=compute.ListTargetPoolsRequest): response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3711,7 +3711,7 @@ def test_remove_health_check_rest_required_fields( response = client.remove_health_check(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3936,7 +3936,7 @@ def test_remove_health_check_unary_rest_required_fields( response = client.remove_health_check_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4157,7 +4157,7 @@ def test_remove_instance_rest_required_fields( response = client.remove_instance(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4374,7 +4374,7 @@ def test_remove_instance_unary_rest_required_fields( response = client.remove_instance_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4596,7 +4596,7 @@ def test_set_backup_rest_required_fields( response = client.set_backup(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4819,7 +4819,7 @@ def test_set_backup_unary_rest_required_fields( response = client.set_backup_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5041,7 +5041,7 @@ def test_set_security_policy_rest_required_fields( response = client.set_security_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5262,7 +5262,7 @@ def test_set_security_policy_unary_rest_required_fields( response = client.set_security_policy_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5477,7 +5477,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_target_ssl_proxies.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_target_ssl_proxies.py index d3b6c30ef45d..ef5d686a3d93 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_target_ssl_proxies.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_target_ssl_proxies.py @@ -1086,7 +1086,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteTargetSslProxyRe response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1284,7 +1284,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1474,7 +1474,7 @@ def test_get_rest_required_fields(request_type=compute.GetTargetSslProxyRequest) response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1667,7 +1667,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertTargetSslProxyRe response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1866,7 +1866,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2066,7 +2066,7 @@ def test_list_rest_required_fields(request_type=compute.ListTargetSslProxiesRequ response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2331,7 +2331,7 @@ def test_set_backend_service_rest_required_fields( response = client.set_backend_service(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2541,7 +2541,7 @@ def test_set_backend_service_unary_rest_required_fields( response = client.set_backend_service_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2751,7 +2751,7 @@ def test_set_certificate_map_rest_required_fields( response = client.set_certificate_map(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2961,7 +2961,7 @@ def test_set_certificate_map_unary_rest_required_fields( response = client.set_certificate_map_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3169,7 +3169,7 @@ def test_set_proxy_header_rest_required_fields( response = client.set_proxy_header(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3377,7 +3377,7 @@ def test_set_proxy_header_unary_rest_required_fields( response = client.set_proxy_header_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3587,7 +3587,7 @@ def test_set_ssl_certificates_rest_required_fields( response = client.set_ssl_certificates(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3797,7 +3797,7 @@ def test_set_ssl_certificates_unary_rest_required_fields( response = client.set_ssl_certificates_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4003,7 +4003,7 @@ def test_set_ssl_policy_rest_required_fields( response = client.set_ssl_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4209,7 +4209,7 @@ def test_set_ssl_policy_unary_rest_required_fields( response = client.set_ssl_policy_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4413,7 +4413,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_target_tcp_proxies.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_target_tcp_proxies.py index a0c1fd25cbfe..08ed575c644b 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_target_tcp_proxies.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_target_tcp_proxies.py @@ -1090,7 +1090,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1364,7 +1364,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteTargetTcpProxyRe response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1562,7 +1562,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1752,7 +1752,7 @@ def test_get_rest_required_fields(request_type=compute.GetTargetTcpProxyRequest) response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1945,7 +1945,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertTargetTcpProxyRe response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2144,7 +2144,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2344,7 +2344,7 @@ def test_list_rest_required_fields(request_type=compute.ListTargetTcpProxiesRequ response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2609,7 +2609,7 @@ def test_set_backend_service_rest_required_fields( response = client.set_backend_service(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2819,7 +2819,7 @@ def test_set_backend_service_unary_rest_required_fields( response = client.set_backend_service_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3027,7 +3027,7 @@ def test_set_proxy_header_rest_required_fields( response = client.set_proxy_header(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3235,7 +3235,7 @@ def test_set_proxy_header_unary_rest_required_fields( response = client.set_proxy_header_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3439,7 +3439,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_target_vpn_gateways.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_target_vpn_gateways.py index 99db54421bfd..869190375fa1 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_target_vpn_gateways.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_target_vpn_gateways.py @@ -1098,7 +1098,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1378,7 +1378,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1587,7 +1587,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1788,7 +1788,7 @@ def test_get_rest_required_fields(request_type=compute.GetTargetVpnGatewayReques response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1994,7 +1994,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2200,7 +2200,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2407,7 +2407,7 @@ def test_list_rest_required_fields(request_type=compute.ListTargetVpnGatewaysReq response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2679,7 +2679,7 @@ def test_set_labels_rest_required_fields( response = client.set_labels(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2896,7 +2896,7 @@ def test_set_labels_unary_rest_required_fields( response = client.set_labels_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3111,7 +3111,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_url_maps.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_url_maps.py index 0548f498f178..d4b75d423b2a 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_url_maps.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_url_maps.py @@ -1031,7 +1031,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1300,7 +1300,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteUrlMapRequest): response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1496,7 +1496,7 @@ def test_delete_unary_rest_required_fields(request_type=compute.DeleteUrlMapRequ response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1686,7 +1686,7 @@ def test_get_rest_required_fields(request_type=compute.GetUrlMapRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1879,7 +1879,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertUrlMapRequest): response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2076,7 +2076,7 @@ def test_insert_unary_rest_required_fields(request_type=compute.InsertUrlMapRequ response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2281,7 +2281,7 @@ def test_invalidate_cache_rest_required_fields( response = client.invalidate_cache(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2489,7 +2489,7 @@ def test_invalidate_cache_unary_rest_required_fields( response = client.invalidate_cache_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2692,7 +2692,7 @@ def test_list_rest_required_fields(request_type=compute.ListUrlMapsRequest): response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2951,7 +2951,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchUrlMapRequest): response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3155,7 +3155,7 @@ def test_patch_unary_rest_required_fields(request_type=compute.PatchUrlMapReques response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3359,7 +3359,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3563,7 +3563,7 @@ def test_update_rest_required_fields(request_type=compute.UpdateUrlMapRequest): response = client.update(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3767,7 +3767,7 @@ def test_update_unary_rest_required_fields(request_type=compute.UpdateUrlMapRequ response = client.update_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3965,7 +3965,7 @@ def test_validate_rest_required_fields(request_type=compute.ValidateUrlMapReques response = client.validate(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_vpn_gateways.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_vpn_gateways.py index ddc2bf3c6881..89d1a93191e5 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_vpn_gateways.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_vpn_gateways.py @@ -1049,7 +1049,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1325,7 +1325,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteVpnGatewayReques response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1534,7 +1534,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1735,7 +1735,7 @@ def test_get_rest_required_fields(request_type=compute.GetVpnGatewayRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1938,7 +1938,7 @@ def test_get_status_rest_required_fields( response = client.get_status(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2142,7 +2142,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertVpnGatewayReques response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2348,7 +2348,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2555,7 +2555,7 @@ def test_list_rest_required_fields(request_type=compute.ListVpnGatewaysRequest): response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2827,7 +2827,7 @@ def test_set_labels_rest_required_fields( response = client.set_labels(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3044,7 +3044,7 @@ def test_set_labels_unary_rest_required_fields( response = client.set_labels_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3259,7 +3259,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_vpn_tunnels.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_vpn_tunnels.py index 396ab1b68703..ee4de56a1509 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_vpn_tunnels.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_vpn_tunnels.py @@ -1045,7 +1045,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1318,7 +1318,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteVpnTunnelRequest response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1525,7 +1525,7 @@ def test_delete_unary_rest_required_fields(request_type=compute.DeleteVpnTunnelR response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1726,7 +1726,7 @@ def test_get_rest_required_fields(request_type=compute.GetVpnTunnelRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1930,7 +1930,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertVpnTunnelRequest response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2138,7 +2138,7 @@ def test_insert_unary_rest_required_fields(request_type=compute.InsertVpnTunnelR response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2349,7 +2349,7 @@ def test_list_rest_required_fields(request_type=compute.ListVpnTunnelsRequest): response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2621,7 +2621,7 @@ def test_set_labels_rest_required_fields( response = client.set_labels(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2838,7 +2838,7 @@ def test_set_labels_unary_rest_required_fields( response = client.set_labels_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3053,7 +3053,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_wire_groups.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_wire_groups.py index ab2858bfa61c..8bf13c7ff0f2 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_wire_groups.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_wire_groups.py @@ -1045,7 +1045,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteWireGroupRequest response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1252,7 +1252,7 @@ def test_delete_unary_rest_required_fields(request_type=compute.DeleteWireGroupR response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1453,7 +1453,7 @@ def test_get_rest_required_fields(request_type=compute.GetWireGroupRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1662,7 +1662,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertWireGroupRequest response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1872,7 +1872,7 @@ def test_insert_unary_rest_required_fields(request_type=compute.InsertWireGroupR response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2080,7 +2080,7 @@ def test_list_rest_required_fields(request_type=compute.ListWireGroupsRequest): response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2356,7 +2356,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchWireGroupRequest): response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2579,7 +2579,7 @@ def test_patch_unary_rest_required_fields(request_type=compute.PatchWireGroupReq response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_zone_operations.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_zone_operations.py index 47b34ef215cc..441043d5fe42 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_zone_operations.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_zone_operations.py @@ -1057,7 +1057,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteZoneOperationReq response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1258,7 +1258,7 @@ def test_get_rest_required_fields(request_type=compute.GetZoneOperationRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1465,7 +1465,7 @@ def test_list_rest_required_fields(request_type=compute.ListZoneOperationsReques response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1728,7 +1728,7 @@ def test_wait_rest_required_fields(request_type=compute.WaitZoneOperationRequest response = client.wait(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_zones.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_zones.py index ecaa3221b160..b92c312aa2b5 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_zones.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_zones.py @@ -1003,7 +1003,7 @@ def test_get_rest_required_fields(request_type=compute.GetZoneRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1198,7 +1198,7 @@ def test_list_rest_required_fields(request_type=compute.ListZonesRequest): response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/.OwlBot.yaml b/packages/google-cloud-compute/.OwlBot.yaml deleted file mode 100644 index 13a7bd8f17d0..000000000000 --- a/packages/google-cloud-compute/.OwlBot.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright 2021 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -deep-remove-regex: - - /owl-bot-staging - -deep-copy-regex: - - source: /google/cloud/compute/(v1)/compute-v.*-py - dest: /owl-bot-staging/google-cloud-compute/$1 - -begin-after-commit-hash: 70f7f0525414fe4dfeb2fc2e81546b073f83a621 -api-name: google-cloud-compute diff --git a/packages/google-cloud-compute/google/cloud/compute/__init__.py b/packages/google-cloud-compute/google/cloud/compute/__init__.py index 1667f83c457e..aef642c6c51c 100644 --- a/packages/google-cloud-compute/google/cloud/compute/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute/__init__.py @@ -1751,6 +1751,9 @@ SubnetworksScopedList, SubnetworksScopedWarning, SubnetworksSetPrivateIpGoogleAccessRequest, + SubnetworkUtilizationDetails, + SubnetworkUtilizationDetailsIPV4Utilization, + SubnetworkUtilizationDetailsIPV6Utilization, Subsetting, SuspendInstanceRequest, SuspendInstancesInstanceGroupManagerRequest, @@ -3526,6 +3529,9 @@ "SubnetworksScopedList", "SubnetworksScopedWarning", "SubnetworksSetPrivateIpGoogleAccessRequest", + "SubnetworkUtilizationDetails", + "SubnetworkUtilizationDetailsIPV4Utilization", + "SubnetworkUtilizationDetailsIPV6Utilization", "Subsetting", "SuspendInstanceRequest", "SuspendInstancesInstanceGroupManagerRequest", diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/__init__.py index 356c8e33d716..f65cf8b7b202 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/__init__.py @@ -1625,6 +1625,9 @@ SubnetworksScopedList, SubnetworksScopedWarning, SubnetworksSetPrivateIpGoogleAccessRequest, + SubnetworkUtilizationDetails, + SubnetworkUtilizationDetailsIPV4Utilization, + SubnetworkUtilizationDetailsIPV6Utilization, Subsetting, SuspendInstanceRequest, SuspendInstancesInstanceGroupManagerRequest, @@ -3382,6 +3385,9 @@ "SubnetworkLogConfig", "SubnetworkParams", "SubnetworkSecondaryRange", + "SubnetworkUtilizationDetails", + "SubnetworkUtilizationDetailsIPV4Utilization", + "SubnetworkUtilizationDetailsIPV6Utilization", "SubnetworksClient", "SubnetworksExpandIpCidrRangeRequest", "SubnetworksScopedList", diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/accelerator_types/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/accelerator_types/client.py index 14714dfa965a..e6bad1418f5b 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/accelerator_types/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/accelerator_types/client.py @@ -534,9 +534,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the AcceleratorTypesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/accelerator_types/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/accelerator_types/transports/rest.py index 681a731d4430..c56f4c67a176 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/accelerator_types/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/accelerator_types/transports/rest.py @@ -286,39 +286,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/accelerator_types/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/accelerator_types/transports/rest_base.py index d9056ab71689..f63778884970 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/accelerator_types/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/accelerator_types/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/addresses/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/addresses/client.py index 910356c727af..98e3b1136f90 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/addresses/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/addresses/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the AddressesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/addresses/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/addresses/transports/rest.py index 61bdc52e0eac..ba7a32108935 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/addresses/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/addresses/transports/rest.py @@ -544,39 +544,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/addresses/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/addresses/transports/rest_base.py index 075030ea9b2d..545d9413eff5 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/addresses/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/addresses/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -261,7 +264,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseMove: @@ -363,7 +368,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -372,7 +377,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -381,6 +386,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetLabels: @@ -419,7 +425,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -428,7 +434,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -437,6 +443,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -475,7 +482,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -484,7 +491,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -493,6 +500,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/autoscalers/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/autoscalers/client.py index bc9c21e9fb00..7c60e35d03a3 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/autoscalers/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/autoscalers/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the AutoscalersTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/autoscalers/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/autoscalers/transports/rest.py index baea891873fd..c5504527d57a 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/autoscalers/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/autoscalers/transports/rest.py @@ -492,39 +492,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/autoscalers/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/autoscalers/transports/rest_base.py index 8acf625d010c..09529e8ab96b 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/autoscalers/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/autoscalers/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -261,7 +264,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -363,7 +368,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -372,7 +377,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -381,6 +386,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdate: @@ -419,7 +425,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -428,7 +434,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -437,6 +443,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_buckets/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_buckets/client.py index 024f0804918c..571b49dd8bf1 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_buckets/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_buckets/client.py @@ -532,9 +532,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the BackendBucketsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_buckets/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_buckets/transports/rest.py index 7145eae86fce..fad59ac36091 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_buckets/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_buckets/transports/rest.py @@ -779,39 +779,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_buckets/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_buckets/transports/rest_base.py index 93ec3a9e5722..68bb7acac097 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_buckets/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_buckets/transports/rest_base.py @@ -123,7 +123,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -132,7 +132,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -141,6 +141,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -178,7 +179,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -187,6 +188,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDeleteSignedUrlKey: @@ -226,7 +228,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -235,6 +237,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -272,7 +275,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -281,6 +284,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetIamPolicy: @@ -318,7 +322,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -327,6 +331,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -365,7 +370,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -374,7 +379,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -383,6 +388,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -420,7 +426,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -429,6 +435,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -467,7 +474,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -476,7 +483,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -485,6 +492,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetEdgeSecurityPolicy: @@ -523,7 +531,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -532,7 +540,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -541,6 +549,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetIamPolicy: @@ -579,7 +588,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -588,7 +597,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -597,6 +606,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -635,7 +645,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -644,7 +654,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -653,6 +663,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdate: @@ -691,7 +702,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -700,7 +711,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -709,6 +720,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_services/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_services/client.py index e682b04f9c9a..8a12e19ecffc 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_services/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_services/client.py @@ -534,9 +534,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the BackendServicesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_services/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_services/transports/rest.py index cc6eb2bbf60b..8d92438465f8 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_services/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_services/transports/rest.py @@ -1012,39 +1012,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_services/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_services/transports/rest_base.py index 4203ed913227..8b7107f28777 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_services/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_services/transports/rest_base.py @@ -123,7 +123,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -132,7 +132,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -141,6 +141,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseAggregatedList: @@ -178,7 +179,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -187,6 +188,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDeleteSignedUrlKey: @@ -272,7 +275,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -281,6 +284,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -318,7 +322,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -327,6 +331,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetHealth: @@ -365,7 +370,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -374,7 +379,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -383,6 +388,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetIamPolicy: @@ -420,7 +426,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -429,6 +435,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -467,7 +474,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -476,7 +483,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -485,6 +492,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -522,7 +530,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -531,6 +539,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseListUsable: @@ -568,7 +577,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -577,6 +586,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -615,7 +625,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -624,7 +634,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -633,6 +643,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetEdgeSecurityPolicy: @@ -671,7 +682,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -680,7 +691,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -689,6 +700,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetIamPolicy: @@ -727,7 +739,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -736,7 +748,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -745,6 +757,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetSecurityPolicy: @@ -783,7 +796,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -792,7 +805,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -801,6 +814,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -839,7 +853,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -848,7 +862,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -857,6 +871,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdate: @@ -895,7 +910,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -904,7 +919,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -913,6 +928,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/disk_types/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/disk_types/client.py index e63b4250db95..052defee8c6a 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/disk_types/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/disk_types/client.py @@ -527,9 +527,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the DiskTypesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/disk_types/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/disk_types/transports/rest.py index fd95acc153e9..50ba0964e20e 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/disk_types/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/disk_types/transports/rest.py @@ -275,39 +275,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/disk_types/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/disk_types/transports/rest_base.py index f4e1b66aee89..41a745e7178a 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/disk_types/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/disk_types/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/disks/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/disks/client.py index 78197fb86c5f..e2ae081398ce 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/disks/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/disks/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the DisksTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/disks/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/disks/transports/rest.py index 911e6c2d3603..366bb3c73fdf 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/disks/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/disks/transports/rest.py @@ -1142,39 +1142,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/disks/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/disks/transports/rest_base.py index 3992de014cc3..46efcf176f4a 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/disks/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/disks/transports/rest_base.py @@ -123,7 +123,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -132,7 +132,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -141,6 +141,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseAggregatedList: @@ -178,7 +179,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -187,6 +188,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseBulkInsert: @@ -225,7 +227,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -234,7 +236,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -243,6 +245,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseBulkSetLabels: @@ -281,7 +284,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -290,7 +293,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -299,6 +302,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseCreateSnapshot: @@ -337,7 +341,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -346,7 +350,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -355,6 +359,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -392,7 +397,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -401,6 +406,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -438,7 +444,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -447,6 +453,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetIamPolicy: @@ -484,7 +491,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -493,6 +500,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -531,7 +539,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -540,7 +548,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -549,6 +557,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -586,7 +595,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -595,6 +604,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseRemoveResourcePolicies: @@ -633,7 +643,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -642,7 +652,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -651,6 +661,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseResize: @@ -689,7 +700,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -698,7 +709,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -707,6 +718,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetIamPolicy: @@ -745,7 +757,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -754,7 +766,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -763,6 +775,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetLabels: @@ -801,7 +814,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -810,7 +823,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -819,6 +832,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseStartAsyncReplication: @@ -857,7 +871,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -866,7 +880,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -875,6 +889,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseStopAsyncReplication: @@ -912,7 +927,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -921,6 +936,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseStopGroupAsyncReplication: @@ -959,7 +975,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -968,7 +984,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -977,6 +993,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -1015,7 +1032,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1024,7 +1041,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1033,6 +1050,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdate: @@ -1071,7 +1089,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1080,7 +1098,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1089,6 +1107,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/external_vpn_gateways/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/external_vpn_gateways/client.py index 7d63a367b196..93b6673656a2 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/external_vpn_gateways/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/external_vpn_gateways/client.py @@ -536,9 +536,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the ExternalVpnGatewaysTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/external_vpn_gateways/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/external_vpn_gateways/transports/rest.py index da428e298d19..5a1005becfbe 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/external_vpn_gateways/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/external_vpn_gateways/transports/rest.py @@ -449,39 +449,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/external_vpn_gateways/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/external_vpn_gateways/transports/rest_base.py index 721be94a2b4f..0b58317ca814 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/external_vpn_gateways/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/external_vpn_gateways/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -215,7 +217,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetLabels: @@ -317,7 +321,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -326,7 +330,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -335,6 +339,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -373,7 +378,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -382,7 +387,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -391,6 +396,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/firewall_policies/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/firewall_policies/client.py index 8381426d0454..6b517e6ed5d3 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/firewall_policies/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/firewall_policies/client.py @@ -534,9 +534,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the FirewallPoliciesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/firewall_policies/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/firewall_policies/transports/rest.py index 9ae2140524aa..482ea43fcd0e 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/firewall_policies/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/firewall_policies/transports/rest.py @@ -1111,39 +1111,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/firewall_policies/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/firewall_policies/transports/rest_base.py index 95472bd20f84..fe3a5f5592ab 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/firewall_policies/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/firewall_policies/transports/rest_base.py @@ -123,7 +123,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -132,7 +132,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -141,6 +141,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseAddRule: @@ -179,7 +180,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -188,7 +189,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -197,6 +198,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseCloneRules: @@ -234,7 +236,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -243,6 +245,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -280,7 +283,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -289,6 +292,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -326,7 +330,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -335,6 +339,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetAssociation: @@ -372,7 +377,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -381,6 +386,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetIamPolicy: @@ -418,7 +424,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -427,6 +433,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetRule: @@ -464,7 +471,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -473,6 +480,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -513,7 +521,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -522,7 +530,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -531,6 +539,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -558,10 +567,11 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseListAssociations: @@ -589,10 +599,11 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseMove: @@ -632,7 +643,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -641,6 +652,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -679,7 +691,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -688,7 +700,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -697,6 +709,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatchRule: @@ -735,7 +748,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -744,7 +757,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -753,6 +766,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseRemoveAssociation: @@ -790,7 +804,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -799,6 +813,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseRemoveRule: @@ -836,7 +851,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -845,6 +860,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetIamPolicy: @@ -883,7 +899,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -892,7 +908,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -901,6 +917,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -939,7 +956,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -948,7 +965,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -957,6 +974,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/firewalls/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/firewalls/client.py index 69583fc0c310..eeab1fa0792b 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/firewalls/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/firewalls/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the FirewallsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/firewalls/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/firewalls/transports/rest.py index 80dbaa77d021..c11390ed4b1e 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/firewalls/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/firewalls/transports/rest.py @@ -427,39 +427,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/firewalls/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/firewalls/transports/rest_base.py index dd7023c0b0a2..4f0e66abe27c 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/firewalls/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/firewalls/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -215,7 +217,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -317,7 +321,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -326,7 +330,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -335,6 +339,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdate: @@ -373,7 +378,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -382,7 +387,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -391,6 +396,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/forwarding_rules/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/forwarding_rules/client.py index f2d1f93cf1e6..a92dfc613ee5 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/forwarding_rules/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/forwarding_rules/client.py @@ -534,9 +534,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the ForwardingRulesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/forwarding_rules/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/forwarding_rules/transports/rest.py index eed51aeefd75..b519773d4874 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/forwarding_rules/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/forwarding_rules/transports/rest.py @@ -554,39 +554,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/forwarding_rules/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/forwarding_rules/transports/rest_base.py index f9f27e04886e..8c51afb7aa4e 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/forwarding_rules/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/forwarding_rules/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -261,7 +264,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -363,7 +368,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -372,7 +377,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -381,6 +386,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetLabels: @@ -419,7 +425,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -428,7 +434,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -437,6 +443,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetTarget: @@ -475,7 +482,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -484,7 +491,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -493,6 +500,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_addresses/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_addresses/client.py index c0a138310747..343531df79b7 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_addresses/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_addresses/client.py @@ -534,9 +534,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the GlobalAddressesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_addresses/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_addresses/transports/rest.py index 9c2ed5b87a71..ab87ccc35433 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_addresses/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_addresses/transports/rest.py @@ -498,39 +498,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_addresses/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_addresses/transports/rest_base.py index d1cdfa2b9521..0db1b2529009 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_addresses/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_addresses/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -215,7 +217,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseMove: @@ -317,7 +321,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -326,7 +330,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -335,6 +339,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetLabels: @@ -373,7 +378,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -382,7 +387,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -391,6 +396,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -429,7 +435,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -438,7 +444,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -447,6 +453,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_forwarding_rules/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_forwarding_rules/client.py index 6524bfafdc21..d48808f9d164 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_forwarding_rules/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_forwarding_rules/client.py @@ -538,9 +538,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the GlobalForwardingRulesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_forwarding_rules/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_forwarding_rules/transports/rest.py index 45f19f99c103..9cf5314602d7 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_forwarding_rules/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_forwarding_rules/transports/rest.py @@ -501,39 +501,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_forwarding_rules/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_forwarding_rules/transports/rest_base.py index f8e9ebfe35eb..6253a23d5b43 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_forwarding_rules/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_forwarding_rules/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -215,7 +217,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -317,7 +321,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -326,7 +330,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -335,6 +339,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetLabels: @@ -373,7 +378,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -382,7 +387,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -391,6 +396,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetTarget: @@ -429,7 +435,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -438,7 +444,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -447,6 +453,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_network_endpoint_groups/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_network_endpoint_groups/client.py index 112d28375336..cb17eb537315 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_network_endpoint_groups/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_network_endpoint_groups/client.py @@ -540,9 +540,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the GlobalNetworkEndpointGroupsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_network_endpoint_groups/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_network_endpoint_groups/transports/rest.py index e9f4ba2493fe..ec4d1ab9e3e7 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_network_endpoint_groups/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_network_endpoint_groups/transports/rest.py @@ -517,39 +517,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_network_endpoint_groups/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_network_endpoint_groups/transports/rest_base.py index b5b34503de77..bf2be053c29d 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_network_endpoint_groups/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_network_endpoint_groups/transports/rest_base.py @@ -129,7 +129,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -138,7 +138,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -147,6 +147,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -184,7 +185,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -193,6 +194,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDetachNetworkEndpoints: @@ -235,7 +237,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -244,7 +246,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -253,6 +255,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -290,7 +293,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -299,6 +302,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -337,7 +341,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -346,7 +350,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -355,6 +359,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -392,7 +397,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -401,6 +406,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseListNetworkEndpoints: @@ -442,7 +448,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -451,6 +457,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_operations/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_operations/client.py index ea4f430a95c6..ffed04a49726 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_operations/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_operations/client.py @@ -531,9 +531,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the GlobalOperationsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_operations/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_operations/transports/rest.py index 4957af755f99..0fb70fa4dce7 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_operations/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_operations/transports/rest.py @@ -394,39 +394,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_operations/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_operations/transports/rest_base.py index 46442d159276..c52f706b69b4 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_operations/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_operations/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -260,7 +263,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -269,6 +272,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseWait: @@ -306,7 +310,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -315,6 +319,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_organization_operations/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_organization_operations/client.py index 16db55611b3c..0ccd2e701469 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_organization_operations/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_organization_operations/client.py @@ -537,9 +537,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the GlobalOrganizationOperationsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_organization_operations/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_organization_operations/transports/rest.py index b8ca71f4804e..d5dac61876e4 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_organization_operations/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_organization_operations/transports/rest.py @@ -287,39 +287,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_organization_operations/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_organization_operations/transports/rest_base.py index 12294c453548..47bd287f4809 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_organization_operations/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_organization_operations/transports/rest_base.py @@ -124,7 +124,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -133,6 +133,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -170,7 +171,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -179,6 +180,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -206,10 +208,11 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_public_delegated_prefixes/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_public_delegated_prefixes/client.py index dd7969d3ae2d..42aaa93d642f 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_public_delegated_prefixes/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_public_delegated_prefixes/client.py @@ -540,9 +540,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the GlobalPublicDelegatedPrefixesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_public_delegated_prefixes/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_public_delegated_prefixes/transports/rest.py index 8cdb541a79cc..ddb2c692ffb3 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_public_delegated_prefixes/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_public_delegated_prefixes/transports/rest.py @@ -398,39 +398,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_public_delegated_prefixes/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_public_delegated_prefixes/transports/rest_base.py index 52ee1e6b028f..4e98d6a28cd6 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_public_delegated_prefixes/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_public_delegated_prefixes/transports/rest_base.py @@ -124,7 +124,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -133,6 +133,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -170,7 +171,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -179,6 +180,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -217,7 +219,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -226,7 +228,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -235,6 +237,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -272,7 +275,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -281,6 +284,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -319,7 +323,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -328,7 +332,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -337,6 +341,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/health_checks/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/health_checks/client.py index 1026d3d183ab..3325c92abcb5 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/health_checks/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/health_checks/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the HealthChecksTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/health_checks/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/health_checks/transports/rest.py index befa889b755e..7a11cb027078 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/health_checks/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/health_checks/transports/rest.py @@ -496,39 +496,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/health_checks/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/health_checks/transports/rest_base.py index ca936033e4ea..9c399aa933bb 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/health_checks/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/health_checks/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -261,7 +264,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -363,7 +368,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -372,7 +377,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -381,6 +386,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdate: @@ -419,7 +425,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -428,7 +434,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -437,6 +443,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/image_family_views/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/image_family_views/client.py index 291c8c0b0b50..df9a9e6ac6c8 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/image_family_views/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/image_family_views/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the ImageFamilyViewsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/image_family_views/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/image_family_views/transports/rest.py index 5b4b05f92188..534cd8af158a 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/image_family_views/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/image_family_views/transports/rest.py @@ -169,39 +169,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/image_family_views/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/image_family_views/transports/rest_base.py index e383cb414ebd..a7bb9dfde7cc 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/image_family_views/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/image_family_views/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/images/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/images/client.py index 4f0eceba6afd..2e067a785451 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/images/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/images/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the ImagesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/images/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/images/transports/rest.py index 958c3d98e73a..766d04a81e5a 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/images/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/images/transports/rest.py @@ -695,39 +695,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/images/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/images/transports/rest_base.py index 5343748e224d..a192256a6504 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/images/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/images/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDeprecate: @@ -169,7 +170,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -178,7 +179,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -187,6 +188,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetFromFamily: @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetIamPolicy: @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -363,7 +368,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -372,7 +377,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -381,6 +386,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -418,7 +424,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -427,6 +433,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -465,7 +472,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -474,7 +481,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -483,6 +490,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetIamPolicy: @@ -521,7 +529,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -530,7 +538,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -539,6 +547,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetLabels: @@ -577,7 +586,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -586,7 +595,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -595,6 +604,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -633,7 +643,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -642,7 +652,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -651,6 +661,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_group_manager_resize_requests/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_group_manager_resize_requests/client.py index c2a8ca83c39a..c5359a58620c 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_group_manager_resize_requests/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_group_manager_resize_requests/client.py @@ -547,9 +547,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the InstanceGroupManagerResizeRequestsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_group_manager_resize_requests/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_group_manager_resize_requests/transports/rest.py index fcbe2bfd1b77..d204500324f5 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_group_manager_resize_requests/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_group_manager_resize_requests/transports/rest.py @@ -402,39 +402,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_group_manager_resize_requests/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_group_manager_resize_requests/transports/rest_base.py index 93e3d7dfab73..6a0f42cbf538 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_group_manager_resize_requests/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_group_manager_resize_requests/transports/rest_base.py @@ -126,7 +126,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -135,6 +135,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -174,7 +175,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -183,6 +184,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -220,7 +222,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -229,6 +231,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -269,7 +272,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -278,7 +281,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -287,6 +290,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -326,7 +330,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -335,6 +339,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_group_managers/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_group_managers/client.py index 21673d563d7e..edbb11f05f2b 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_group_managers/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_group_managers/client.py @@ -538,9 +538,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the InstanceGroupManagersTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_group_managers/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_group_managers/transports/rest.py index 615aafed7ff8..65b8936e863d 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_group_managers/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_group_managers/transports/rest.py @@ -1470,39 +1470,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_group_managers/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_group_managers/transports/rest_base.py index fbad8d315682..8a030a244031 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_group_managers/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_group_managers/transports/rest_base.py @@ -123,7 +123,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -132,7 +132,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -141,6 +141,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseAggregatedList: @@ -178,7 +179,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -187,6 +188,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseApplyUpdatesToInstances: @@ -227,7 +229,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -236,7 +238,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -245,6 +247,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseCreateInstances: @@ -283,7 +286,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -292,7 +295,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -301,6 +304,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -338,7 +342,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -347,6 +351,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDeleteInstances: @@ -385,7 +390,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -394,7 +399,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -403,6 +408,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDeletePerInstanceConfigs: @@ -443,7 +449,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -452,7 +458,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -461,6 +467,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -498,7 +505,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -507,6 +514,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -545,7 +553,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -554,7 +562,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -563,6 +571,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -600,7 +609,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -609,6 +618,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseListErrors: @@ -646,7 +656,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -655,6 +665,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseListManagedInstances: @@ -694,7 +705,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -703,6 +714,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseListPerInstanceConfigs: @@ -742,7 +754,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -751,6 +763,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -789,7 +802,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -798,7 +811,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -807,6 +820,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatchPerInstanceConfigs: @@ -847,7 +861,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -856,7 +870,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -865,6 +879,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseRecreateInstances: @@ -905,7 +920,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -914,7 +929,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -923,6 +938,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseResize: @@ -962,7 +978,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -971,6 +987,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseResumeInstances: @@ -1009,7 +1026,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1018,7 +1035,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1027,6 +1044,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetInstanceTemplate: @@ -1067,7 +1085,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1076,7 +1094,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1085,6 +1103,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetTargetPools: @@ -1123,7 +1142,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1132,7 +1151,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1141,6 +1160,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseStartInstances: @@ -1179,7 +1199,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1188,7 +1208,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1197,6 +1217,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseStopInstances: @@ -1235,7 +1256,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1244,7 +1265,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1253,6 +1274,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSuspendInstances: @@ -1291,7 +1313,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1300,7 +1322,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1309,6 +1331,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdatePerInstanceConfigs: @@ -1349,7 +1372,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1358,7 +1381,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1367,6 +1390,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_groups/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_groups/client.py index cfce5a0a389a..2e98c9391577 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_groups/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_groups/client.py @@ -532,9 +532,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the InstanceGroupsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_groups/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_groups/transports/rest.py index 5d2f353369c2..2ec3f6c0ad43 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_groups/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_groups/transports/rest.py @@ -675,39 +675,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_groups/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_groups/transports/rest_base.py index 03b81a94c67c..6c0c7d59f5dd 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_groups/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_groups/transports/rest_base.py @@ -123,7 +123,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -132,7 +132,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -141,6 +141,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseAggregatedList: @@ -178,7 +179,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -187,6 +188,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -317,7 +321,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -326,7 +330,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -335,6 +339,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -372,7 +377,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -381,6 +386,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseListInstances: @@ -419,7 +425,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -428,7 +434,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -437,6 +443,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseRemoveInstances: @@ -475,7 +482,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -484,7 +491,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -493,6 +500,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetNamedPorts: @@ -531,7 +539,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -540,7 +548,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -549,6 +557,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -587,7 +596,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -596,7 +605,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -605,6 +614,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_settings_service/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_settings_service/client.py index 10144e49ae64..0728cc41af96 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_settings_service/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_settings_service/client.py @@ -537,9 +537,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the InstanceSettingsServiceTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_settings_service/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_settings_service/transports/rest.py index 16aefe11726a..d5824a861f79 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_settings_service/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_settings_service/transports/rest.py @@ -223,39 +223,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_settings_service/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_settings_service/transports/rest_base.py index a1214f097763..79fba0156f07 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_settings_service/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_settings_service/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -169,7 +170,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -178,7 +179,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -187,6 +188,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_templates/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_templates/client.py index 6bf6b879c799..1a16e78c02bc 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_templates/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_templates/client.py @@ -536,9 +536,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the InstanceTemplatesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_templates/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_templates/transports/rest.py index 4876141af02a..531118382327 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_templates/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_templates/transports/rest.py @@ -561,39 +561,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_templates/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_templates/transports/rest_base.py index fd7844621042..3d4655996605 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_templates/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_templates/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetIamPolicy: @@ -260,7 +263,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -269,6 +272,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -307,7 +311,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -362,7 +367,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -371,6 +376,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetIamPolicy: @@ -409,7 +415,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -418,7 +424,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -427,6 +433,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -465,7 +472,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -474,7 +481,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -483,6 +490,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/instances/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/instances/client.py index 35bc79361b1e..30d242fea886 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/instances/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/instances/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the InstancesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/instances/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/instances/transports/rest.py index 07ec36bd6438..75e283523496 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/instances/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/instances/transports/rest.py @@ -2937,39 +2937,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/instances/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/instances/transports/rest_base.py index a0b45da75ed8..3308634ec9d0 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/instances/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/instances/transports/rest_base.py @@ -125,7 +125,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -134,7 +134,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -143,6 +143,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseAddNetworkInterface: @@ -181,7 +182,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -190,7 +191,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -199,6 +200,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseAddResourcePolicies: @@ -237,7 +239,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -246,7 +248,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -255,6 +257,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseAggregatedList: @@ -292,7 +295,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -301,6 +304,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseAttachDisk: @@ -339,7 +343,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -348,7 +352,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -357,6 +361,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseBulkInsert: @@ -395,7 +400,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -404,7 +409,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -413,6 +418,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -450,7 +456,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -459,6 +465,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDeleteAccessConfig: @@ -499,7 +506,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -508,6 +515,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDeleteNetworkInterface: @@ -547,7 +555,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -556,6 +564,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDetachDisk: @@ -595,7 +604,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -604,6 +613,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -641,7 +651,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -650,6 +660,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetEffectiveFirewalls: @@ -689,7 +700,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -698,6 +709,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetGuestAttributes: @@ -735,7 +747,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -744,6 +756,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetIamPolicy: @@ -781,7 +794,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -790,6 +803,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetScreenshot: @@ -827,7 +841,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -836,6 +850,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetSerialPortOutput: @@ -873,7 +888,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -882,6 +897,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetShieldedInstanceIdentity: @@ -919,7 +935,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -928,6 +944,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -966,7 +983,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -975,7 +992,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -984,6 +1001,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -1021,7 +1039,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1030,6 +1048,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseListReferrers: @@ -1067,7 +1086,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1076,6 +1095,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePerformMaintenance: @@ -1113,7 +1133,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1122,6 +1142,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseRemoveResourcePolicies: @@ -1160,7 +1181,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1169,7 +1190,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1178,6 +1199,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseReportHostAsFaulty: @@ -1216,7 +1238,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1225,7 +1247,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1234,6 +1256,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseReset: @@ -1271,7 +1294,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1280,6 +1303,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseResume: @@ -1317,7 +1341,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1326,6 +1350,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSendDiagnosticInterrupt: @@ -1363,7 +1388,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1372,6 +1397,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetDeletionProtection: @@ -1409,7 +1435,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1418,6 +1444,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetDiskAutoDelete: @@ -1458,7 +1485,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1467,6 +1494,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetIamPolicy: @@ -1505,7 +1533,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1514,7 +1542,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1523,6 +1551,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetLabels: @@ -1561,7 +1590,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1570,7 +1599,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1579,6 +1608,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetMachineResources: @@ -1617,7 +1647,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1626,7 +1656,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1635,6 +1665,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetMachineType: @@ -1673,7 +1704,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1682,7 +1713,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1691,6 +1722,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetMetadata: @@ -1729,7 +1761,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1738,7 +1770,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1747,6 +1779,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetMinCpuPlatform: @@ -1785,7 +1818,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1794,7 +1827,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1803,6 +1836,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetName: @@ -1841,7 +1875,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1850,7 +1884,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1859,6 +1893,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetScheduling: @@ -1897,7 +1932,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1906,7 +1941,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1915,6 +1950,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetSecurityPolicy: @@ -1953,7 +1989,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1962,7 +1998,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1971,6 +2007,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetServiceAccount: @@ -2009,7 +2046,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -2018,7 +2055,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -2027,6 +2064,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetShieldedInstanceIntegrityPolicy: @@ -2067,7 +2105,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -2076,7 +2114,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -2085,6 +2123,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetTags: @@ -2123,7 +2162,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -2132,7 +2171,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -2141,6 +2180,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSimulateMaintenanceEvent: @@ -2178,7 +2218,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -2187,6 +2227,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseStart: @@ -2224,7 +2265,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -2233,6 +2274,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseStartWithEncryptionKey: @@ -2271,7 +2313,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -2280,7 +2322,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -2289,6 +2331,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseStop: @@ -2326,7 +2369,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -2335,6 +2378,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSuspend: @@ -2372,7 +2416,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -2381,6 +2425,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -2419,7 +2464,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -2428,7 +2473,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -2437,6 +2482,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdate: @@ -2475,7 +2521,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -2484,7 +2530,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -2493,6 +2539,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdateAccessConfig: @@ -2533,7 +2580,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -2542,7 +2589,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -2551,6 +2598,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdateDisplayDevice: @@ -2589,7 +2637,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -2598,7 +2646,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -2607,6 +2655,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdateNetworkInterface: @@ -2647,7 +2696,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -2656,7 +2705,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -2665,6 +2714,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdateShieldedInstanceConfig: @@ -2703,7 +2753,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -2712,7 +2762,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -2721,6 +2771,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/instant_snapshots/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/instant_snapshots/client.py index 948cfe49d7df..496d07ce4369 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/instant_snapshots/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/instant_snapshots/client.py @@ -534,9 +534,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the InstantSnapshotsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/instant_snapshots/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/instant_snapshots/transports/rest.py index bed48c92b635..e8b2a6e274fe 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/instant_snapshots/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/instant_snapshots/transports/rest.py @@ -615,39 +615,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/instant_snapshots/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/instant_snapshots/transports/rest_base.py index 1634d70c4e91..bfcd5f53951d 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/instant_snapshots/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/instant_snapshots/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetIamPolicy: @@ -260,7 +263,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -269,6 +272,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -307,7 +311,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -362,7 +367,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -371,6 +376,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetIamPolicy: @@ -409,7 +415,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -418,7 +424,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -427,6 +433,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetLabels: @@ -465,7 +472,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -474,7 +481,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -483,6 +490,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -521,7 +529,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -530,7 +538,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -539,6 +547,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_attachment_groups/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_attachment_groups/client.py index d7d96ffde475..91a14701bf8d 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_attachment_groups/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_attachment_groups/client.py @@ -540,9 +540,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the InterconnectAttachmentGroupsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_attachment_groups/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_attachment_groups/transports/rest.py index 5f2a9562d43e..f6519b166c31 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_attachment_groups/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_attachment_groups/transports/rest.py @@ -630,39 +630,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_attachment_groups/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_attachment_groups/transports/rest_base.py index 91a19bb4feb6..90d8df29b254 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_attachment_groups/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_attachment_groups/transports/rest_base.py @@ -124,7 +124,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -133,6 +133,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -170,7 +171,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -179,6 +180,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetIamPolicy: @@ -218,7 +220,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -227,6 +229,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetOperationalStatus: @@ -268,7 +271,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -277,6 +280,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -315,7 +319,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -324,7 +328,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -333,6 +337,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -370,7 +375,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -379,6 +384,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -417,7 +423,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -426,7 +432,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -435,6 +441,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetIamPolicy: @@ -475,7 +482,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -484,7 +491,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -493,6 +500,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -533,7 +541,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -542,7 +550,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -551,6 +559,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_attachments/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_attachments/client.py index 198e36eeb2d7..64ed027d3094 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_attachments/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_attachments/client.py @@ -538,9 +538,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the InterconnectAttachmentsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_attachments/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_attachments/transports/rest.py index 6a63b2ec207f..2f3269dc04a2 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_attachments/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_attachments/transports/rest.py @@ -511,39 +511,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_attachments/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_attachments/transports/rest_base.py index 3d527ec52781..949b303ca179 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_attachments/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_attachments/transports/rest_base.py @@ -124,7 +124,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -133,6 +133,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -170,7 +171,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -179,6 +180,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -216,7 +218,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -225,6 +227,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -263,7 +266,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -272,7 +275,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -281,6 +284,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -318,7 +322,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -327,6 +331,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -365,7 +370,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -374,7 +379,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -383,6 +388,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetLabels: @@ -421,7 +427,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -430,7 +436,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -439,6 +445,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_groups/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_groups/client.py index b0f0e4e02181..cbb725cbc516 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_groups/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_groups/client.py @@ -536,9 +536,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the InterconnectGroupsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_groups/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_groups/transports/rest.py index d544617605d5..bb3c368742e4 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_groups/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_groups/transports/rest.py @@ -675,39 +675,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_groups/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_groups/transports/rest_base.py index fbec1f5fe919..0ad5877d20fc 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_groups/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_groups/transports/rest_base.py @@ -123,7 +123,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -132,7 +132,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -141,6 +141,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -178,7 +179,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -187,6 +188,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetIamPolicy: @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetOperationalStatus: @@ -318,7 +322,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -327,6 +331,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -365,7 +370,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -374,7 +379,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -383,6 +388,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -420,7 +426,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -429,6 +435,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -467,7 +474,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -476,7 +483,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -485,6 +492,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetIamPolicy: @@ -523,7 +531,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -532,7 +540,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -541,6 +549,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -579,7 +588,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -588,7 +597,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -597,6 +606,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_locations/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_locations/client.py index da2cd7b74e82..39e1b01ed6da 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_locations/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_locations/client.py @@ -535,9 +535,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the InterconnectLocationsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_locations/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_locations/transports/rest.py index 69409c4857b9..290688bfef36 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_locations/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_locations/transports/rest.py @@ -230,39 +230,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_locations/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_locations/transports/rest_base.py index 781cc4023935..5007379cd6a9 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_locations/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_locations/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_remote_locations/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_remote_locations/client.py index 1d7516292535..953552f607e5 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_remote_locations/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_remote_locations/client.py @@ -537,9 +537,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the InterconnectRemoteLocationsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_remote_locations/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_remote_locations/transports/rest.py index 3d946d027f2b..c190ca22e37a 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_remote_locations/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_remote_locations/transports/rest.py @@ -235,39 +235,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_remote_locations/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_remote_locations/transports/rest_base.py index 8e74eb125598..94e8c58c2b2a 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_remote_locations/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_remote_locations/transports/rest_base.py @@ -124,7 +124,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -133,6 +133,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -170,7 +171,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -179,6 +180,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnects/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnects/client.py index 2286b93270f6..e18eab93c802 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnects/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnects/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the InterconnectsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnects/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnects/transports/rest.py index 6ab36da504fe..54f890e75981 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnects/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnects/transports/rest.py @@ -557,39 +557,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnects/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnects/transports/rest_base.py index fb91c58cf9d5..c4babf9f34c9 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnects/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnects/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetDiagnostics: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetMacsecConfig: @@ -260,7 +263,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -269,6 +272,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -307,7 +311,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -362,7 +367,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -371,6 +376,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -409,7 +415,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -418,7 +424,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -427,6 +433,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetLabels: @@ -465,7 +472,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -474,7 +481,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -483,6 +490,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/license_codes/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/license_codes/client.py index 948fc01f4e3b..4bd0f2f82aed 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/license_codes/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/license_codes/client.py @@ -526,9 +526,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the LicenseCodesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/license_codes/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/license_codes/transports/rest.py index 0b93e02f6702..172554f85a46 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/license_codes/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/license_codes/transports/rest.py @@ -226,39 +226,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/license_codes/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/license_codes/transports/rest_base.py index 061fc317eeac..b4dfe558a2ab 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/license_codes/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/license_codes/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -169,7 +170,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -178,7 +179,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -187,6 +188,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/licenses/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/licenses/client.py index d75bf69cb6d2..8855033aff4f 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/licenses/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/licenses/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the LicensesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/licenses/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/licenses/transports/rest.py index 5bbc30a2daa8..d5b8c9ade9b3 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/licenses/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/licenses/transports/rest.py @@ -544,39 +544,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/licenses/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/licenses/transports/rest_base.py index b4e878235f11..ba47acc239f4 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/licenses/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/licenses/transports/rest_base.py @@ -124,7 +124,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -133,6 +133,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -172,7 +173,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -181,6 +182,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetIamPolicy: @@ -218,7 +220,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -227,6 +229,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -265,7 +268,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -274,7 +277,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -283,6 +286,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -320,7 +324,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -329,6 +333,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetIamPolicy: @@ -367,7 +372,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -376,7 +381,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -385,6 +390,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -423,7 +429,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -432,7 +438,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -441,6 +447,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdate: @@ -481,7 +488,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -490,7 +497,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -499,6 +506,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_images/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_images/client.py index ab0477a4172d..66136c95551b 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_images/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_images/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the MachineImagesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_images/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_images/transports/rest.py index be39bac1e67b..7e351b021fb7 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_images/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_images/transports/rest.py @@ -550,39 +550,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_images/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_images/transports/rest_base.py index 5930361f5c13..dc43a50aa930 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_images/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_images/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetIamPolicy: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -261,7 +264,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetIamPolicy: @@ -363,7 +368,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -372,7 +377,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -381,6 +386,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetLabels: @@ -419,7 +425,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -428,7 +434,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -437,6 +443,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -475,7 +482,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -484,7 +491,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -493,6 +500,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_types/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_types/client.py index 7f184a1a8d72..fed4aaf087eb 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_types/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_types/client.py @@ -527,9 +527,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the MachineTypesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_types/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_types/transports/rest.py index 7021c062fa5b..b7becf0be557 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_types/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_types/transports/rest.py @@ -280,39 +280,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_types/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_types/transports/rest_base.py index 3503009dd52e..ca0d7f3cb7d6 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_types/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_types/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_attachments/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_attachments/client.py index 14e3d81f7c82..2a9e82ad5db0 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_attachments/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_attachments/client.py @@ -536,9 +536,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the NetworkAttachmentsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_attachments/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_attachments/transports/rest.py index 40504addc689..44266b0996fb 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_attachments/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_attachments/transports/rest.py @@ -617,39 +617,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_attachments/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_attachments/transports/rest_base.py index 313dc13f2c44..9a75a6f22933 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_attachments/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_attachments/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetIamPolicy: @@ -260,7 +263,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -269,6 +272,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -307,7 +311,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -362,7 +367,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -371,6 +376,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -409,7 +415,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -418,7 +424,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -427,6 +433,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetIamPolicy: @@ -465,7 +472,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -474,7 +481,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -483,6 +490,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -521,7 +529,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -530,7 +538,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -539,6 +547,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_edge_security_services/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_edge_security_services/client.py index 9d7bde04ab28..aed92d03943f 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_edge_security_services/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_edge_security_services/client.py @@ -540,9 +540,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the NetworkEdgeSecurityServicesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_edge_security_services/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_edge_security_services/transports/rest.py index a7111140ee55..fb4104ea6015 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_edge_security_services/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_edge_security_services/transports/rest.py @@ -401,39 +401,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_edge_security_services/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_edge_security_services/transports/rest_base.py index b479de7a55bb..070f3b61c25e 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_edge_security_services/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_edge_security_services/transports/rest_base.py @@ -126,7 +126,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -135,6 +135,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -172,7 +173,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -181,6 +182,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -218,7 +220,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -227,6 +229,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -265,7 +268,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -274,7 +277,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -283,6 +286,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -321,7 +325,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -330,7 +334,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -339,6 +343,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_endpoint_groups/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_endpoint_groups/client.py index 1cf3032c6e36..523a7fa555fb 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_endpoint_groups/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_endpoint_groups/client.py @@ -538,9 +538,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the NetworkEndpointGroupsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_endpoint_groups/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_endpoint_groups/transports/rest.py index aae5f95200e3..85908ed6e37f 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_endpoint_groups/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_endpoint_groups/transports/rest.py @@ -633,39 +633,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_endpoint_groups/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_endpoint_groups/transports/rest_base.py index f1c901995dfb..60c4a4d1cca2 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_endpoint_groups/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_endpoint_groups/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseAttachNetworkEndpoints: @@ -171,7 +172,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -180,7 +181,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -189,6 +190,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -226,7 +228,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -235,6 +237,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDetachNetworkEndpoints: @@ -275,7 +278,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -284,7 +287,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -293,6 +296,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -330,7 +334,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -339,6 +343,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -377,7 +382,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -386,7 +391,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -395,6 +400,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -432,7 +438,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -441,6 +447,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseListNetworkEndpoints: @@ -481,7 +488,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -490,7 +497,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -499,6 +506,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -539,7 +547,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -548,7 +556,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -557,6 +565,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_firewall_policies/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_firewall_policies/client.py index 005bc9bd6394..aedc2e4256b1 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_firewall_policies/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_firewall_policies/client.py @@ -538,9 +538,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the NetworkFirewallPoliciesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_firewall_policies/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_firewall_policies/transports/rest.py index b19f2bfd623c..ab581bb128da 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_firewall_policies/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_firewall_policies/transports/rest.py @@ -1294,39 +1294,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_firewall_policies/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_firewall_policies/transports/rest_base.py index f2b43d15af0c..7858c705ef37 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_firewall_policies/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_firewall_policies/transports/rest_base.py @@ -123,7 +123,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -132,7 +132,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -141,6 +141,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseAddPacketMirroringRule: @@ -181,7 +182,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -190,7 +191,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -199,6 +200,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseAddRule: @@ -237,7 +239,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -246,7 +248,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -255,6 +257,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseAggregatedList: @@ -294,7 +297,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -303,6 +306,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseCloneRules: @@ -340,7 +344,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -349,6 +353,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -386,7 +391,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -395,6 +400,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -432,7 +438,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -441,6 +447,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetAssociation: @@ -478,7 +485,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -487,6 +494,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetIamPolicy: @@ -524,7 +532,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -533,6 +541,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetPacketMirroringRule: @@ -572,7 +581,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -581,6 +590,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetRule: @@ -618,7 +628,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -627,6 +637,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -665,7 +676,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -674,7 +685,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -683,6 +694,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -720,7 +732,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -729,6 +741,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -767,7 +780,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -776,7 +789,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -785,6 +798,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatchPacketMirroringRule: @@ -825,7 +839,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -834,7 +848,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -843,6 +857,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatchRule: @@ -881,7 +896,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -890,7 +905,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -899,6 +914,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseRemoveAssociation: @@ -938,7 +954,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -947,6 +963,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseRemovePacketMirroringRule: @@ -988,7 +1005,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -997,6 +1014,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseRemoveRule: @@ -1034,7 +1052,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1043,6 +1061,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetIamPolicy: @@ -1081,7 +1100,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1090,7 +1109,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1099,6 +1118,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -1139,7 +1159,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1148,7 +1168,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1157,6 +1177,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_profiles/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_profiles/client.py index de5cfffbea34..39a79bd7ca9f 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_profiles/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_profiles/client.py @@ -531,9 +531,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the NetworkProfilesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_profiles/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_profiles/transports/rest.py index fd3c0218ac04..3bd086572f49 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_profiles/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_profiles/transports/rest.py @@ -227,39 +227,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_profiles/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_profiles/transports/rest_base.py index 57bf164f1514..0a6daf4903b6 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_profiles/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_profiles/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/networks/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/networks/client.py index 4f1ffea35933..a54cb5c9fcf6 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/networks/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/networks/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the NetworksTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/networks/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/networks/transports/rest.py index ce0b1569c9f0..4ae9b74e4634 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/networks/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/networks/transports/rest.py @@ -770,39 +770,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/networks/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/networks/transports/rest_base.py index e1a7afb57335..f78e0cad6610 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/networks/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/networks/transports/rest_base.py @@ -123,7 +123,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -132,7 +132,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -141,6 +141,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -178,7 +179,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -187,6 +188,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetEffectiveFirewalls: @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -317,7 +321,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -326,7 +330,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -335,6 +339,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -372,7 +377,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -381,6 +386,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseListPeeringRoutes: @@ -418,7 +424,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -427,6 +433,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -465,7 +472,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -474,7 +481,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -483,6 +490,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseRemovePeering: @@ -521,7 +529,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -530,7 +538,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -539,6 +547,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseRequestRemovePeering: @@ -577,7 +586,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -586,7 +595,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -595,6 +604,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSwitchToCustomMode: @@ -632,7 +642,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -641,6 +651,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdatePeering: @@ -679,7 +690,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -688,7 +699,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -697,6 +708,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/node_groups/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/node_groups/client.py index 01b65fee6ef1..3e88f974c974 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/node_groups/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/node_groups/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the NodeGroupsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/node_groups/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/node_groups/transports/rest.py index e6acbddc91cf..85cd36d2fab1 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/node_groups/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/node_groups/transports/rest.py @@ -932,39 +932,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/node_groups/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/node_groups/transports/rest_base.py index 9ed63235787f..d7aa0b9161ad 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/node_groups/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/node_groups/transports/rest_base.py @@ -123,7 +123,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -132,7 +132,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -141,6 +141,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseAggregatedList: @@ -178,7 +179,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -187,6 +188,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDeleteNodes: @@ -271,7 +274,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -280,7 +283,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -289,6 +292,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -326,7 +330,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -335,6 +339,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetIamPolicy: @@ -372,7 +377,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -381,6 +386,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -421,7 +427,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -430,7 +436,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -439,6 +445,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -476,7 +483,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -485,6 +492,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseListNodes: @@ -522,7 +530,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -531,6 +539,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -569,7 +578,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -578,7 +587,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -587,6 +596,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePerformMaintenance: @@ -625,7 +635,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -634,7 +644,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -643,6 +653,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetIamPolicy: @@ -681,7 +692,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -690,7 +701,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -699,6 +710,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetNodeTemplate: @@ -737,7 +749,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -746,7 +758,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -755,6 +767,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSimulateMaintenanceEvent: @@ -793,7 +806,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -802,7 +815,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -811,6 +824,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -849,7 +863,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -858,7 +872,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -867,6 +881,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/node_templates/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/node_templates/client.py index c0fff7f3729d..ec55b81149a3 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/node_templates/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/node_templates/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the NodeTemplatesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/node_templates/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/node_templates/transports/rest.py index a610a9b3d0d6..7393a46a3076 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/node_templates/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/node_templates/transports/rest.py @@ -555,39 +555,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/node_templates/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/node_templates/transports/rest_base.py index 35d786c58ced..efb838fcafd4 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/node_templates/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/node_templates/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetIamPolicy: @@ -260,7 +263,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -269,6 +272,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -307,7 +311,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -362,7 +367,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -371,6 +376,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetIamPolicy: @@ -409,7 +415,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -418,7 +424,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -427,6 +433,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -465,7 +472,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -474,7 +481,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -483,6 +490,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/node_types/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/node_types/client.py index ca7a82a6597c..794f0857b59c 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/node_types/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/node_types/client.py @@ -527,9 +527,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the NodeTypesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/node_types/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/node_types/transports/rest.py index 62a63e3e5d5d..1707adeac0c3 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/node_types/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/node_types/transports/rest.py @@ -275,39 +275,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/node_types/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/node_types/transports/rest_base.py index 3bb9bbc6df2d..57797cbaf961 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/node_types/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/node_types/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/packet_mirrorings/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/packet_mirrorings/client.py index f5004cb6b3ac..a4c7a5a6191a 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/packet_mirrorings/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/packet_mirrorings/client.py @@ -534,9 +534,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the PacketMirroringsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/packet_mirrorings/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/packet_mirrorings/transports/rest.py index bf2a9347e9c0..f7bbb2e1c462 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/packet_mirrorings/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/packet_mirrorings/transports/rest.py @@ -505,39 +505,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/packet_mirrorings/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/packet_mirrorings/transports/rest_base.py index 735459d3c602..bd1a94593260 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/packet_mirrorings/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/packet_mirrorings/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -261,7 +264,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -363,7 +368,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -372,7 +377,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -381,6 +386,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -419,7 +425,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -428,7 +434,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -437,6 +443,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/projects/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/projects/client.py index 47f333c721a9..980b5ac96739 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/projects/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/projects/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the ProjectsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. @@ -2183,7 +2180,15 @@ def move_disk_unary( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> compute.Operation: - r"""Moves a persistent disk from one zone to another. + r"""Starting September 29, 2025, you can't use the moveDisk API on + new projects. To move a disk to a different region or zone, + follow the steps in `Change the location of a + disk `__. + Projects that already use the moveDisk API can continue usage + until September 29, 2026. Starting November 1, 2025, API + responses will include a warning message in the response body + about the upcoming deprecation. You can skip the message to + continue using the service without interruption. .. code-block:: python @@ -2298,7 +2303,15 @@ def move_disk( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> extended_operation.ExtendedOperation: - r"""Moves a persistent disk from one zone to another. + r"""Starting September 29, 2025, you can't use the moveDisk API on + new projects. To move a disk to a different region or zone, + follow the steps in `Change the location of a + disk `__. + Projects that already use the moveDisk API can continue usage + until September 29, 2026. Starting November 1, 2025, API + responses will include a warning message in the response body + about the upcoming deprecation. You can skip the message to + continue using the service without interruption. .. code-block:: python diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/projects/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/projects/transports/rest.py index 32397873dbec..fbb9275def63 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/projects/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/projects/transports/rest.py @@ -887,39 +887,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/projects/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/projects/transports/rest_base.py index d510ecbe2590..157d1ebce86a 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/projects/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/projects/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDisableXpnResource: @@ -169,7 +170,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -178,7 +179,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -187,6 +188,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseEnableXpnHost: @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseEnableXpnResource: @@ -271,7 +274,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -280,7 +283,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -289,6 +292,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -326,7 +330,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -335,6 +339,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetXpnHost: @@ -372,7 +377,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -381,6 +386,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetXpnResources: @@ -418,7 +424,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -427,6 +433,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseListXpnHosts: @@ -465,7 +472,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -474,7 +481,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -483,6 +490,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseMoveDisk: @@ -521,7 +529,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -530,7 +538,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -539,6 +547,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseMoveInstance: @@ -577,7 +586,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -586,7 +595,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -595,6 +604,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetCloudArmorTier: @@ -633,7 +643,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -642,7 +652,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -651,6 +661,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetCommonInstanceMetadata: @@ -689,7 +700,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -698,7 +709,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -707,6 +718,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetDefaultNetworkTier: @@ -745,7 +757,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -754,7 +766,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -763,6 +775,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetUsageExportBucket: @@ -801,7 +814,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -810,7 +823,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -819,6 +832,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/public_advertised_prefixes/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/public_advertised_prefixes/client.py index 60ff014e1f0e..2fc191fe5f87 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/public_advertised_prefixes/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/public_advertised_prefixes/client.py @@ -538,9 +538,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the PublicAdvertisedPrefixesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/public_advertised_prefixes/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/public_advertised_prefixes/transports/rest.py index 1e266fa37a22..a00d0c94890b 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/public_advertised_prefixes/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/public_advertised_prefixes/transports/rest.py @@ -506,39 +506,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/public_advertised_prefixes/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/public_advertised_prefixes/transports/rest_base.py index ad79715ef44f..fc22614ed5eb 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/public_advertised_prefixes/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/public_advertised_prefixes/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -261,7 +264,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -363,7 +368,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -372,7 +377,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -381,6 +386,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseWithdraw: @@ -418,7 +424,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -427,6 +433,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/public_delegated_prefixes/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/public_delegated_prefixes/client.py index 103c8afd5a2d..8e9b1e2cf952 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/public_delegated_prefixes/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/public_delegated_prefixes/client.py @@ -538,9 +538,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the PublicDelegatedPrefixesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/public_delegated_prefixes/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/public_delegated_prefixes/transports/rest.py index 2862926c0842..d079b5e2ed2f 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/public_delegated_prefixes/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/public_delegated_prefixes/transports/rest.py @@ -566,39 +566,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/public_delegated_prefixes/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/public_delegated_prefixes/transports/rest_base.py index e1adbb899b73..ca278f6d7b26 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/public_delegated_prefixes/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/public_delegated_prefixes/transports/rest_base.py @@ -124,7 +124,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -133,6 +133,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseAnnounce: @@ -170,7 +171,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -179,6 +180,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -216,7 +218,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -225,6 +227,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -262,7 +265,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -271,6 +274,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -309,7 +313,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -318,7 +322,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -327,6 +331,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -364,7 +369,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -373,6 +378,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -411,7 +417,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -420,7 +426,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -429,6 +435,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseWithdraw: @@ -466,7 +473,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -475,6 +482,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_autoscalers/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_autoscalers/client.py index 016bfee724e7..614b729fa582 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_autoscalers/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_autoscalers/client.py @@ -536,9 +536,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RegionAutoscalersTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_autoscalers/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_autoscalers/transports/rest.py index 3fbff9b8f692..7bb2a86d659b 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_autoscalers/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_autoscalers/transports/rest.py @@ -441,39 +441,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_autoscalers/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_autoscalers/transports/rest_base.py index efc915db4e7e..44ec61360b23 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_autoscalers/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_autoscalers/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -215,7 +217,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -317,7 +321,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -326,7 +330,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -335,6 +339,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdate: @@ -373,7 +378,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -382,7 +387,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -391,6 +396,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_backend_services/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_backend_services/client.py index bad8a25cc6e8..8882b27bbe63 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_backend_services/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_backend_services/client.py @@ -538,9 +538,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RegionBackendServicesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_backend_services/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_backend_services/transports/rest.py index 2e5d9b9e836e..9216f5d1cc8b 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_backend_services/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_backend_services/transports/rest.py @@ -790,39 +790,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_backend_services/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_backend_services/transports/rest_base.py index b3e13be86020..d419b8d9cebd 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_backend_services/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_backend_services/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetHealth: @@ -215,7 +217,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetIamPolicy: @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -317,7 +321,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -326,7 +330,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -335,6 +339,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -372,7 +377,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -381,6 +386,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseListUsable: @@ -418,7 +424,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -427,6 +433,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -465,7 +472,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -474,7 +481,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -483,6 +490,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetIamPolicy: @@ -521,7 +529,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -530,7 +538,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -539,6 +547,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetSecurityPolicy: @@ -579,7 +588,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -588,7 +597,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -597,6 +606,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -637,7 +647,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -646,7 +656,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -655,6 +665,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdate: @@ -693,7 +704,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -702,7 +713,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -711,6 +722,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_commitments/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_commitments/client.py index baca3089cd8b..4422c95f5d2b 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_commitments/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_commitments/client.py @@ -536,9 +536,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RegionCommitmentsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_commitments/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_commitments/transports/rest.py index 9405a6a13a27..14787c1adb1a 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_commitments/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_commitments/transports/rest.py @@ -390,39 +390,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_commitments/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_commitments/transports/rest_base.py index 2079a9be8d39..1999ca890d82 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_commitments/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_commitments/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -215,7 +217,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdate: @@ -317,7 +321,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -326,7 +330,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -335,6 +339,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disk_types/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disk_types/client.py index 5f10dc1d9d97..ea9c989044dc 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disk_types/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disk_types/client.py @@ -531,9 +531,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RegionDiskTypesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disk_types/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disk_types/transports/rest.py index 682f487c40f0..299cdb168fcd 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disk_types/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disk_types/transports/rest.py @@ -225,39 +225,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disk_types/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disk_types/transports/rest_base.py index ef0544cba1ea..06bdf351aa7d 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disk_types/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disk_types/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disks/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disks/client.py index 0d3493ac9f8e..05c15ed0fe38 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disks/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disks/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RegionDisksTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disks/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disks/transports/rest.py index b77aeabcf5e9..17a856dffe4b 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disks/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disks/transports/rest.py @@ -1047,39 +1047,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disks/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disks/transports/rest_base.py index 7b19c46f7a21..d747f53bc7fe 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disks/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disks/transports/rest_base.py @@ -123,7 +123,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -132,7 +132,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -141,6 +141,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseBulkInsert: @@ -179,7 +180,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -188,7 +189,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -197,6 +198,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseCreateSnapshot: @@ -235,7 +237,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -244,7 +246,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -253,6 +255,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -290,7 +293,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -299,6 +302,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -336,7 +340,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -345,6 +349,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetIamPolicy: @@ -382,7 +387,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -391,6 +396,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -429,7 +435,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -438,7 +444,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -447,6 +453,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -484,7 +491,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -493,6 +500,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseRemoveResourcePolicies: @@ -531,7 +539,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -540,7 +548,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -549,6 +557,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseResize: @@ -587,7 +596,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -596,7 +605,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -605,6 +614,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetIamPolicy: @@ -643,7 +653,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -652,7 +662,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -661,6 +671,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetLabels: @@ -699,7 +710,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -708,7 +719,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -717,6 +728,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseStartAsyncReplication: @@ -755,7 +767,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -764,7 +776,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -773,6 +785,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseStopAsyncReplication: @@ -810,7 +823,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -819,6 +832,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseStopGroupAsyncReplication: @@ -857,7 +871,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -866,7 +880,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -875,6 +889,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -913,7 +928,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -922,7 +937,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -931,6 +946,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdate: @@ -969,7 +985,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -978,7 +994,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -987,6 +1003,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_check_services/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_check_services/client.py index 050c7646ee04..899f422154fe 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_check_services/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_check_services/client.py @@ -538,9 +538,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RegionHealthCheckServicesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_check_services/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_check_services/transports/rest.py index eaf8ccfb70f9..1c383aa10506 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_check_services/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_check_services/transports/rest.py @@ -398,39 +398,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_check_services/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_check_services/transports/rest_base.py index 095a3c6cd5d0..8bcdc67f08d7 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_check_services/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_check_services/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -215,7 +217,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -317,7 +321,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -326,7 +330,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -335,6 +339,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_checks/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_checks/client.py index 434a96e2b7a4..cbe9029103b2 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_checks/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_checks/client.py @@ -536,9 +536,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RegionHealthChecksTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_checks/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_checks/transports/rest.py index bdcfd29c49cf..5939232f1205 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_checks/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_checks/transports/rest.py @@ -439,39 +439,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_checks/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_checks/transports/rest_base.py index d1d53ca9669f..cb00c8c96e87 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_checks/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_checks/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -215,7 +217,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -317,7 +321,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -326,7 +330,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -335,6 +339,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdate: @@ -373,7 +378,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -382,7 +387,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -391,6 +396,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_group_managers/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_group_managers/client.py index ae784b044b34..73a7e2fe5ec1 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_group_managers/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_group_managers/client.py @@ -540,9 +540,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RegionInstanceGroupManagersTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_group_managers/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_group_managers/transports/rest.py index 11bd903ccc9f..cafe43355b2e 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_group_managers/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_group_managers/transports/rest.py @@ -1413,39 +1413,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_group_managers/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_group_managers/transports/rest_base.py index 296883cb7e2e..92bf388b2ee8 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_group_managers/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_group_managers/transports/rest_base.py @@ -127,7 +127,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -136,7 +136,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -145,6 +145,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseApplyUpdatesToInstances: @@ -187,7 +188,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -196,7 +197,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -205,6 +206,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseCreateInstances: @@ -245,7 +247,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -254,7 +256,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -263,6 +265,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -300,7 +303,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -309,6 +312,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDeleteInstances: @@ -349,7 +353,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -358,7 +362,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -367,6 +371,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDeletePerInstanceConfigs: @@ -409,7 +414,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -418,7 +423,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -427,6 +432,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -464,7 +470,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -473,6 +479,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -511,7 +518,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -520,7 +527,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -529,6 +536,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -566,7 +574,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -575,6 +583,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseListErrors: @@ -614,7 +623,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -623,6 +632,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseListManagedInstances: @@ -664,7 +674,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -673,6 +683,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseListPerInstanceConfigs: @@ -714,7 +725,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -723,6 +734,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -761,7 +773,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -770,7 +782,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -779,6 +791,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatchPerInstanceConfigs: @@ -821,7 +834,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -830,7 +843,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -839,6 +852,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseRecreateInstances: @@ -879,7 +893,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -888,7 +902,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -897,6 +911,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseResize: @@ -936,7 +951,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -945,6 +960,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseResumeInstances: @@ -985,7 +1001,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -994,7 +1010,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1003,6 +1019,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetInstanceTemplate: @@ -1043,7 +1060,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1052,7 +1069,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1061,6 +1078,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetTargetPools: @@ -1101,7 +1119,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1110,7 +1128,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1119,6 +1137,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseStartInstances: @@ -1159,7 +1178,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1168,7 +1187,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1177,6 +1196,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseStopInstances: @@ -1217,7 +1237,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1226,7 +1246,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1235,6 +1255,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSuspendInstances: @@ -1275,7 +1296,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1284,7 +1305,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1293,6 +1314,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdatePerInstanceConfigs: @@ -1335,7 +1357,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -1344,7 +1366,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -1353,6 +1375,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_groups/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_groups/client.py index f5fc9f5e59d1..30f9b8c1c2af 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_groups/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_groups/client.py @@ -536,9 +536,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RegionInstanceGroupsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_groups/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_groups/transports/rest.py index ec6f44d49a94..a405cc3e2bb6 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_groups/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_groups/transports/rest.py @@ -401,39 +401,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_groups/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_groups/transports/rest_base.py index b63228ec866b..fb662019dacd 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_groups/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_groups/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseListInstances: @@ -215,7 +217,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetNamedPorts: @@ -271,7 +274,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -280,7 +283,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -289,6 +292,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -329,7 +333,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -338,7 +342,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -347,6 +351,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_templates/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_templates/client.py index d29099721899..c296cba47973 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_templates/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_templates/client.py @@ -538,9 +538,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RegionInstanceTemplatesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_templates/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_templates/transports/rest.py index a2eaae72b94d..71bd3d37e093 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_templates/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_templates/transports/rest.py @@ -337,39 +337,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_templates/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_templates/transports/rest_base.py index 1968c539ba2f..cf8d9168c4c5 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_templates/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_templates/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -215,7 +217,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instances/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instances/client.py index b3dabdfdeb30..1a222e69cff7 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instances/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instances/client.py @@ -533,9 +533,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RegionInstancesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instances/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instances/transports/rest.py index 159c50603641..d6cf5a26ebe5 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instances/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instances/transports/rest.py @@ -169,39 +169,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instances/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instances/transports/rest_base.py index e7867a1e61a1..527e5dd2dbca 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instances/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instances/transports/rest_base.py @@ -123,7 +123,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -132,7 +132,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -141,6 +141,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instant_snapshots/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instant_snapshots/client.py index f7d3281d8a8f..9247441a1998 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instant_snapshots/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instant_snapshots/client.py @@ -538,9 +538,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RegionInstantSnapshotsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instant_snapshots/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instant_snapshots/transports/rest.py index 3c4dc3066fe8..3114b9901636 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instant_snapshots/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instant_snapshots/transports/rest.py @@ -560,39 +560,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instant_snapshots/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instant_snapshots/transports/rest_base.py index 5d1544ecb232..b617a29f40d5 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instant_snapshots/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instant_snapshots/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetIamPolicy: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -261,7 +264,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetIamPolicy: @@ -363,7 +368,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -372,7 +377,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -381,6 +386,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetLabels: @@ -419,7 +425,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -428,7 +434,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -437,6 +443,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -477,7 +484,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -486,7 +493,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -495,6 +502,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_endpoint_groups/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_endpoint_groups/client.py index 3307d25c834d..6e444b9396cf 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_endpoint_groups/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_endpoint_groups/client.py @@ -540,9 +540,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RegionNetworkEndpointGroupsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_endpoint_groups/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_endpoint_groups/transports/rest.py index b2b9adbbb4e9..de4b1b7886f0 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_endpoint_groups/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_endpoint_groups/transports/rest.py @@ -517,39 +517,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_endpoint_groups/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_endpoint_groups/transports/rest_base.py index cfe0fbab6d47..502c9806fc09 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_endpoint_groups/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_endpoint_groups/transports/rest_base.py @@ -129,7 +129,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -138,7 +138,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -147,6 +147,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -184,7 +185,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -193,6 +194,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDetachNetworkEndpoints: @@ -235,7 +237,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -244,7 +246,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -253,6 +255,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -290,7 +293,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -299,6 +302,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -337,7 +341,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -346,7 +350,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -355,6 +359,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -392,7 +397,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -401,6 +406,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseListNetworkEndpoints: @@ -442,7 +448,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -451,6 +457,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_firewall_policies/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_firewall_policies/client.py index 6dc9b672c3b7..e21fab175e1b 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_firewall_policies/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_firewall_policies/client.py @@ -540,9 +540,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RegionNetworkFirewallPoliciesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_firewall_policies/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_firewall_policies/transports/rest.py index cf8f07866763..6bc1001ba759 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_firewall_policies/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_firewall_policies/transports/rest.py @@ -1070,39 +1070,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_firewall_policies/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_firewall_policies/transports/rest_base.py index c7972ed87cce..ee58bb172af3 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_firewall_policies/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_firewall_policies/transports/rest_base.py @@ -127,7 +127,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -136,7 +136,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -145,6 +145,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseAddRule: @@ -183,7 +184,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -192,7 +193,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -201,6 +202,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseCloneRules: @@ -240,7 +242,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -249,6 +251,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -286,7 +289,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -295,6 +298,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -332,7 +336,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -341,6 +345,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetAssociation: @@ -380,7 +385,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -389,6 +394,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetEffectiveFirewalls: @@ -432,7 +438,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -441,6 +447,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetIamPolicy: @@ -480,7 +487,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -489,6 +496,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetRule: @@ -526,7 +534,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -535,6 +543,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -573,7 +582,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -582,7 +591,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -591,6 +600,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -628,7 +638,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -637,6 +647,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -675,7 +686,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -684,7 +695,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -693,6 +704,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatchRule: @@ -731,7 +743,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -740,7 +752,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -749,6 +761,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseRemoveAssociation: @@ -788,7 +801,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -797,6 +810,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseRemoveRule: @@ -836,7 +850,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -845,6 +859,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetIamPolicy: @@ -885,7 +900,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -894,7 +909,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -903,6 +918,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -943,7 +959,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -952,7 +968,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -961,6 +977,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_notification_endpoints/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_notification_endpoints/client.py index f38b8f69d7d3..c1f9b91e146d 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_notification_endpoints/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_notification_endpoints/client.py @@ -540,9 +540,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RegionNotificationEndpointsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_notification_endpoints/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_notification_endpoints/transports/rest.py index 35b3d08f54ce..e341efb689dc 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_notification_endpoints/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_notification_endpoints/transports/rest.py @@ -343,39 +343,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_notification_endpoints/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_notification_endpoints/transports/rest_base.py index ea74ac8d0e66..17af2410dd2f 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_notification_endpoints/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_notification_endpoints/transports/rest_base.py @@ -124,7 +124,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -133,6 +133,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -170,7 +171,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -179,6 +180,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -217,7 +219,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -226,7 +228,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -235,6 +237,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -272,7 +275,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -281,6 +284,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_operations/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_operations/client.py index 8a11a1a5d4c4..40b61387a093 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_operations/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_operations/client.py @@ -531,9 +531,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RegionOperationsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_operations/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_operations/transports/rest.py index 06d80fcb5176..b8ea7392eff7 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_operations/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_operations/transports/rest.py @@ -335,39 +335,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_operations/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_operations/transports/rest_base.py index a6e23b7bffdf..cfeb125b380b 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_operations/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_operations/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseWait: @@ -260,7 +263,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -269,6 +272,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_security_policies/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_security_policies/client.py index 096152af5efa..4c03fc75c96f 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_security_policies/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_security_policies/client.py @@ -538,9 +538,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RegionSecurityPoliciesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_security_policies/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_security_policies/transports/rest.py index e62b115fdae8..98175bde23fb 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_security_policies/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_security_policies/transports/rest.py @@ -668,39 +668,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_security_policies/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_security_policies/transports/rest_base.py index 4e8e191a7a71..ae837c9b76d3 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_security_policies/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_security_policies/transports/rest_base.py @@ -123,7 +123,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -132,7 +132,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -141,6 +141,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -178,7 +179,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -187,6 +188,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetRule: @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -317,7 +321,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -326,7 +330,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -335,6 +339,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -372,7 +377,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -381,6 +386,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -419,7 +425,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -428,7 +434,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -437,6 +443,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatchRule: @@ -475,7 +482,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -484,7 +491,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -493,6 +500,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseRemoveRule: @@ -530,7 +538,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -539,6 +547,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetLabels: @@ -577,7 +586,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -586,7 +595,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -595,6 +604,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_certificates/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_certificates/client.py index 08bf2eba4b7e..e86108b6e71b 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_certificates/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_certificates/client.py @@ -538,9 +538,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RegionSslCertificatesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_certificates/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_certificates/transports/rest.py index e9a28f9500ec..9d31acbc3087 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_certificates/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_certificates/transports/rest.py @@ -336,39 +336,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_certificates/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_certificates/transports/rest_base.py index 84432c8a3f82..0984c3052b5f 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_certificates/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_certificates/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -215,7 +217,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_policies/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_policies/client.py index 3aae45e9829b..2143fa7ed480 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_policies/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_policies/client.py @@ -536,9 +536,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RegionSslPoliciesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_policies/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_policies/transports/rest.py index 62e6b1a7e669..7c853839ed3a 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_policies/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_policies/transports/rest.py @@ -445,39 +445,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_policies/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_policies/transports/rest_base.py index a0dafb0c9458..4fc863b70bc4 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_policies/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_policies/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -215,7 +217,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseListAvailableFeatures: @@ -318,7 +322,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -327,6 +331,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -365,7 +370,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -374,7 +379,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -383,6 +388,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_http_proxies/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_http_proxies/client.py index dd1cf5263c42..80b00c6bcb49 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_http_proxies/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_http_proxies/client.py @@ -538,9 +538,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RegionTargetHttpProxiesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_http_proxies/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_http_proxies/transports/rest.py index 3deea3c667a9..4bfd465fb27c 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_http_proxies/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_http_proxies/transports/rest.py @@ -391,39 +391,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_http_proxies/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_http_proxies/transports/rest_base.py index b3302531c8b7..3b4dccdfe963 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_http_proxies/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_http_proxies/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -215,7 +217,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetUrlMap: @@ -317,7 +321,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -326,7 +330,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -335,6 +339,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_https_proxies/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_https_proxies/client.py index 11d740b2a72c..8b2237a61c0b 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_https_proxies/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_https_proxies/client.py @@ -538,9 +538,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RegionTargetHttpsProxiesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_https_proxies/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_https_proxies/transports/rest.py index db0fb3c077c1..c8f32ba14a67 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_https_proxies/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_https_proxies/transports/rest.py @@ -504,39 +504,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_https_proxies/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_https_proxies/transports/rest_base.py index ceef59dfac08..c250e79e37fe 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_https_proxies/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_https_proxies/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -215,7 +217,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -317,7 +321,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -326,7 +330,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -335,6 +339,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetSslCertificates: @@ -375,7 +380,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -384,7 +389,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -393,6 +398,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetUrlMap: @@ -431,7 +437,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -440,7 +446,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -449,6 +455,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_tcp_proxies/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_tcp_proxies/client.py index 34e798057fe0..76fc4f6fdfc5 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_tcp_proxies/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_tcp_proxies/client.py @@ -538,9 +538,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RegionTargetTcpProxiesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_tcp_proxies/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_tcp_proxies/transports/rest.py index 6e79bb6a88f9..17e9bc0f3c5c 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_tcp_proxies/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_tcp_proxies/transports/rest.py @@ -336,39 +336,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_tcp_proxies/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_tcp_proxies/transports/rest_base.py index 5708fea14a71..461d1d0bd64b 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_tcp_proxies/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_tcp_proxies/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -215,7 +217,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_url_maps/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_url_maps/client.py index 6b0f1dd5456d..a62554888be3 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_url_maps/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_url_maps/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RegionUrlMapsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_url_maps/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_url_maps/transports/rest.py index b3308ddf91f2..cd6b9186f619 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_url_maps/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_url_maps/transports/rest.py @@ -495,39 +495,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_url_maps/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_url_maps/transports/rest_base.py index 627a171b976f..069b324929b9 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_url_maps/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_url_maps/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -215,7 +217,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -317,7 +321,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -326,7 +330,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -335,6 +339,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdate: @@ -373,7 +378,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -382,7 +387,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -391,6 +396,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseValidate: @@ -429,7 +435,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -438,7 +444,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -447,6 +453,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_zones/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_zones/client.py index edbcb3c6c92c..311c9ed34b30 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_zones/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_zones/client.py @@ -527,9 +527,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RegionZonesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_zones/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_zones/transports/rest.py index 320613df8f13..2299cdd7bf27 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_zones/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_zones/transports/rest.py @@ -167,39 +167,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_zones/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_zones/transports/rest_base.py index 0547d504b8db..3195e9ffc18c 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_zones/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_zones/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/regions/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/regions/client.py index 4bf90719405c..a35f40ae0aee 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/regions/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/regions/client.py @@ -527,9 +527,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RegionsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/regions/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/regions/transports/rest.py index ff3bb211a36c..274638bd1590 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/regions/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/regions/transports/rest.py @@ -219,39 +219,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/regions/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/regions/transports/rest_base.py index 99dc91d6562b..a3316e6e4c9d 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/regions/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/regions/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/reservation_blocks/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/reservation_blocks/client.py index 07a7c1b1acb3..a3250d5a7926 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/reservation_blocks/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/reservation_blocks/client.py @@ -536,9 +536,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the ReservationBlocksTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/reservation_blocks/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/reservation_blocks/transports/rest.py index aa65461687da..5de7074e4f94 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/reservation_blocks/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/reservation_blocks/transports/rest.py @@ -288,39 +288,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/reservation_blocks/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/reservation_blocks/transports/rest_base.py index 55f15c26f066..e8bfeabdb03d 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/reservation_blocks/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/reservation_blocks/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePerformMaintenance: @@ -215,7 +217,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/reservation_sub_blocks/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/reservation_sub_blocks/client.py index 52af00f746fc..b8c102593fd5 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/reservation_sub_blocks/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/reservation_sub_blocks/client.py @@ -536,9 +536,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the ReservationSubBlocksTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/reservation_sub_blocks/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/reservation_sub_blocks/transports/rest.py index 0ed790137324..4aa7d740f411 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/reservation_sub_blocks/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/reservation_sub_blocks/transports/rest.py @@ -289,39 +289,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/reservation_sub_blocks/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/reservation_sub_blocks/transports/rest_base.py index 0ef3342b1397..4af16e1d2ad5 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/reservation_sub_blocks/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/reservation_sub_blocks/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePerformMaintenance: @@ -216,7 +218,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -225,6 +227,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/reservations/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/reservations/client.py index 2652cb03ab5d..9d5f227b6219 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/reservations/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/reservations/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the ReservationsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/reservations/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/reservations/transports/rest.py index 6fd9ac68a318..30e0a46d07de 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/reservations/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/reservations/transports/rest.py @@ -720,39 +720,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/reservations/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/reservations/transports/rest_base.py index 04c4a2179edb..08893c1c10fa 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/reservations/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/reservations/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetIamPolicy: @@ -260,7 +263,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -269,6 +272,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -307,7 +311,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -362,7 +367,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -371,6 +376,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePerformMaintenance: @@ -409,7 +415,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -418,7 +424,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -427,6 +433,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseResize: @@ -465,7 +472,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -474,7 +481,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -483,6 +490,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetIamPolicy: @@ -521,7 +529,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -530,7 +538,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -539,6 +547,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -577,7 +586,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -586,7 +595,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -595,6 +604,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdate: @@ -633,7 +643,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -642,7 +652,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -651,6 +661,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/resource_policies/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/resource_policies/client.py index 53068701dac6..6f186c058b38 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/resource_policies/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/resource_policies/client.py @@ -534,9 +534,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the ResourcePoliciesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/resource_policies/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/resource_policies/transports/rest.py index 9e71a66f70ca..27d7ada58da3 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/resource_policies/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/resource_policies/transports/rest.py @@ -615,39 +615,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/resource_policies/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/resource_policies/transports/rest_base.py index 6bb3321027b4..e1c1eafdb79e 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/resource_policies/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/resource_policies/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetIamPolicy: @@ -260,7 +263,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -269,6 +272,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -307,7 +311,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -362,7 +367,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -371,6 +376,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -409,7 +415,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -418,7 +424,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -427,6 +433,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetIamPolicy: @@ -465,7 +472,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -474,7 +481,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -483,6 +490,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -521,7 +529,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -530,7 +538,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -539,6 +547,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/routers/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/routers/client.py index 9c8a63a44307..af1fd5817d36 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/routers/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/routers/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RoutersTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/routers/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/routers/transports/rest.py index ef38b15fafb7..72341a2ce861 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/routers/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/routers/transports/rest.py @@ -1045,39 +1045,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/routers/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/routers/transports/rest_base.py index 9ee7efd64b04..a48428a1f5a5 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/routers/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/routers/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDeleteRoutePolicy: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -260,7 +263,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -269,6 +272,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetNatIpInfo: @@ -306,7 +310,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -315,6 +319,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetNatMappingInfo: @@ -352,7 +357,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -361,6 +366,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetRoutePolicy: @@ -398,7 +404,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -407,6 +413,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetRouterStatus: @@ -444,7 +451,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -453,6 +460,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -491,7 +499,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -500,7 +508,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -509,6 +517,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -546,7 +555,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -555,6 +564,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseListBgpRoutes: @@ -592,7 +602,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -601,6 +611,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseListRoutePolicies: @@ -638,7 +649,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -647,6 +658,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -685,7 +697,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -694,7 +706,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -703,6 +715,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatchRoutePolicy: @@ -741,7 +754,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -750,7 +763,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -759,6 +772,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePreview: @@ -797,7 +811,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -806,7 +820,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -815,6 +829,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdate: @@ -853,7 +868,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -862,7 +877,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -871,6 +886,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdateRoutePolicy: @@ -909,7 +925,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -918,7 +934,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -927,6 +943,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/routes/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/routes/client.py index 53cbccb2682e..d60ff35316f0 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/routes/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/routes/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the RoutesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/routes/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/routes/transports/rest.py index 0eac2691c2c7..693e849ae913 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/routes/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/routes/transports/rest.py @@ -321,39 +321,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/routes/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/routes/transports/rest_base.py index 02ffd8371dd8..e276f3332e3e 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/routes/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/routes/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -215,7 +217,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/security_policies/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/security_policies/client.py index 93f398388544..0aa12b015f58 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/security_policies/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/security_policies/client.py @@ -534,9 +534,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the SecurityPoliciesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/security_policies/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/security_policies/transports/rest.py index db062a809557..9bab34e44143 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/security_policies/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/security_policies/transports/rest.py @@ -778,39 +778,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/security_policies/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/security_policies/transports/rest_base.py index 3b40a35c5895..48198366f307 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/security_policies/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/security_policies/transports/rest_base.py @@ -123,7 +123,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -132,7 +132,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -141,6 +141,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseAggregatedList: @@ -178,7 +179,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -187,6 +188,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetRule: @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -363,7 +368,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -372,7 +377,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -381,6 +386,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -418,7 +424,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -427,6 +433,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseListPreconfiguredExpressionSets: @@ -468,7 +475,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -477,6 +484,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -515,7 +523,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -524,7 +532,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -533,6 +541,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatchRule: @@ -571,7 +580,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -580,7 +589,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -589,6 +598,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseRemoveRule: @@ -626,7 +636,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -635,6 +645,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetLabels: @@ -673,7 +684,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -682,7 +693,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -691,6 +702,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/service_attachments/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/service_attachments/client.py index 2fb6210447c7..c18c751e3ee8 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/service_attachments/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/service_attachments/client.py @@ -536,9 +536,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the ServiceAttachmentsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/service_attachments/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/service_attachments/transports/rest.py index 518723192ef4..81e6086828f9 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/service_attachments/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/service_attachments/transports/rest.py @@ -617,39 +617,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/service_attachments/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/service_attachments/transports/rest_base.py index 13810acdc534..888934ed7e7a 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/service_attachments/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/service_attachments/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetIamPolicy: @@ -260,7 +263,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -269,6 +272,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -307,7 +311,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -362,7 +367,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -371,6 +376,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -409,7 +415,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -418,7 +424,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -427,6 +433,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetIamPolicy: @@ -465,7 +472,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -474,7 +481,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -483,6 +490,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -521,7 +529,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -530,7 +538,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -539,6 +547,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/snapshot_settings_service/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/snapshot_settings_service/client.py index 3d15dae8d892..8f3b56a31bdd 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/snapshot_settings_service/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/snapshot_settings_service/client.py @@ -537,9 +537,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the SnapshotSettingsServiceTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/snapshot_settings_service/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/snapshot_settings_service/transports/rest.py index d1c31843ae40..b818193539fd 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/snapshot_settings_service/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/snapshot_settings_service/transports/rest.py @@ -223,39 +223,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/snapshot_settings_service/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/snapshot_settings_service/transports/rest_base.py index e2d77c1a39d7..5c2eff687580 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/snapshot_settings_service/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/snapshot_settings_service/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -169,7 +170,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -178,7 +179,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -187,6 +188,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/snapshots/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/snapshots/client.py index 16d7a1166026..cb42b4710c0e 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/snapshots/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/snapshots/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the SnapshotsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/snapshots/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/snapshots/transports/rest.py index 108435da1548..e05512d73e81 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/snapshots/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/snapshots/transports/rest.py @@ -544,39 +544,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/snapshots/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/snapshots/transports/rest_base.py index 97de33c21c59..9a10a6fca611 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/snapshots/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/snapshots/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetIamPolicy: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -261,7 +264,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetIamPolicy: @@ -363,7 +368,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -372,7 +377,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -381,6 +386,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetLabels: @@ -419,7 +425,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -428,7 +434,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -437,6 +443,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -475,7 +482,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -484,7 +491,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -493,6 +500,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_certificates/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_certificates/client.py index 0d7ce58c63a7..53f71adf3c0c 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_certificates/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_certificates/client.py @@ -534,9 +534,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the SslCertificatesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_certificates/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_certificates/transports/rest.py index e26433a71313..60414e48c7f9 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_certificates/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_certificates/transports/rest.py @@ -392,39 +392,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_certificates/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_certificates/transports/rest_base.py index e72b0bac96b1..f6c4bf99b21e 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_certificates/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_certificates/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -261,7 +264,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_policies/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_policies/client.py index a96de10015b3..efde67635eb5 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_policies/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_policies/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the SslPoliciesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_policies/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_policies/transports/rest.py index 399b7c8f67f2..8f0bb36b4d38 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_policies/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_policies/transports/rest.py @@ -494,39 +494,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_policies/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_policies/transports/rest_base.py index de064cef77f4..74dd061c5157 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_policies/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_policies/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -261,7 +264,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseListAvailableFeatures: @@ -362,7 +367,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -371,6 +376,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -409,7 +415,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -418,7 +424,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -427,6 +433,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/storage_pool_types/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/storage_pool_types/client.py index d475c9225d20..fa36084f0daf 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/storage_pool_types/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/storage_pool_types/client.py @@ -531,9 +531,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the StoragePoolTypesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/storage_pool_types/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/storage_pool_types/transports/rest.py index ddc7a2283c3d..0bf296e20d5d 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/storage_pool_types/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/storage_pool_types/transports/rest.py @@ -284,39 +284,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/storage_pool_types/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/storage_pool_types/transports/rest_base.py index bd18e3de371b..04fd56e562bd 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/storage_pool_types/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/storage_pool_types/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/storage_pools/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/storage_pools/client.py index 2e3b5dba8f15..4a3d93d0c3b7 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/storage_pools/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/storage_pools/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the StoragePoolsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/storage_pools/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/storage_pools/transports/rest.py index 999c04ad2b55..f2db38b44769 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/storage_pools/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/storage_pools/transports/rest.py @@ -665,39 +665,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/storage_pools/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/storage_pools/transports/rest_base.py index 1a3375dd015a..0639f2bb4dfe 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/storage_pools/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/storage_pools/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetIamPolicy: @@ -260,7 +263,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -269,6 +272,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -307,7 +311,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -362,7 +367,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -371,6 +376,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseListDisks: @@ -408,7 +414,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -417,6 +423,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetIamPolicy: @@ -455,7 +462,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -464,7 +471,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -473,6 +480,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -511,7 +519,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -520,7 +528,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -529,6 +537,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdate: @@ -567,7 +576,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -576,7 +585,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -585,6 +594,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/subnetworks/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/subnetworks/client.py index 00b65a5d3b3c..db4a105d49a8 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/subnetworks/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/subnetworks/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the SubnetworksTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/subnetworks/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/subnetworks/transports/rest.py index 7f9e53efab0c..5d1942794f2f 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/subnetworks/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/subnetworks/transports/rest.py @@ -777,39 +777,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/subnetworks/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/subnetworks/transports/rest_base.py index b8ac70fba782..f0aabd4d5c58 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/subnetworks/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/subnetworks/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseExpandIpCidrRange: @@ -215,7 +217,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetIamPolicy: @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -363,7 +368,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -372,7 +377,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -381,6 +386,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -418,7 +424,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -427,6 +433,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseListUsable: @@ -464,7 +471,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -473,6 +480,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -511,7 +519,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -520,7 +528,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -529,6 +537,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetIamPolicy: @@ -567,7 +576,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -576,7 +585,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -585,6 +594,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetPrivateIpGoogleAccess: @@ -623,7 +633,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -632,7 +642,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -641,6 +651,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -679,7 +690,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -688,7 +699,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -697,6 +708,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_grpc_proxies/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_grpc_proxies/client.py index 5a41be98c9a8..c645b0dabc95 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_grpc_proxies/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_grpc_proxies/client.py @@ -536,9 +536,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the TargetGrpcProxiesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_grpc_proxies/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_grpc_proxies/transports/rest.py index 912451b599d4..50dbf1dd35d7 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_grpc_proxies/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_grpc_proxies/transports/rest.py @@ -387,39 +387,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_grpc_proxies/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_grpc_proxies/transports/rest_base.py index 3bab6646841e..a774564c74ab 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_grpc_proxies/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_grpc_proxies/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -215,7 +217,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -317,7 +321,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -326,7 +330,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -335,6 +339,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_http_proxies/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_http_proxies/client.py index af9a604a6431..fe7f1314c121 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_http_proxies/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_http_proxies/client.py @@ -536,9 +536,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the TargetHttpProxiesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_http_proxies/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_http_proxies/transports/rest.py index 5ad7c633b98e..839cb900ebda 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_http_proxies/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_http_proxies/transports/rest.py @@ -500,39 +500,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_http_proxies/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_http_proxies/transports/rest_base.py index 7d5d7b62c57c..ea6e3073bca6 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_http_proxies/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_http_proxies/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -261,7 +264,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -363,7 +368,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -372,7 +377,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -381,6 +386,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetUrlMap: @@ -419,7 +425,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -428,7 +434,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -437,6 +443,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_https_proxies/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_https_proxies/client.py index 13a0def27d8a..4b0b121e8cbb 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_https_proxies/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_https_proxies/client.py @@ -536,9 +536,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the TargetHttpsProxiesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_https_proxies/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_https_proxies/transports/rest.py index 656283fdda3f..c7d18738c8a7 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_https_proxies/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_https_proxies/transports/rest.py @@ -725,39 +725,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_https_proxies/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_https_proxies/transports/rest_base.py index 44c65150d05b..43326f30ea1a 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_https_proxies/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_https_proxies/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -261,7 +264,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -363,7 +368,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -372,7 +377,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -381,6 +386,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetCertificateMap: @@ -419,7 +425,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -428,7 +434,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -437,6 +443,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetQuicOverride: @@ -475,7 +482,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -484,7 +491,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -493,6 +500,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetSslCertificates: @@ -531,7 +539,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -540,7 +548,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -549,6 +557,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetSslPolicy: @@ -587,7 +596,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -596,7 +605,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -605,6 +614,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetUrlMap: @@ -643,7 +653,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -652,7 +662,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -661,6 +671,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_instances/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_instances/client.py index 4c2fd1af8003..28a9610f5008 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_instances/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_instances/client.py @@ -534,9 +534,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the TargetInstancesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_instances/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_instances/transports/rest.py index 1985ae868340..45abb2453649 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_instances/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_instances/transports/rest.py @@ -508,39 +508,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_instances/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_instances/transports/rest_base.py index b5fbc8ae718f..cac408b4440e 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_instances/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_instances/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -261,7 +264,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetSecurityPolicy: @@ -363,7 +368,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -372,7 +377,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -381,6 +386,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -419,7 +425,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -428,7 +434,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -437,6 +443,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_pools/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_pools/client.py index ae0c1b5d3372..fbde49435983 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_pools/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_pools/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the TargetPoolsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_pools/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_pools/transports/rest.py index 9ad450f2e762..864067beced4 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_pools/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_pools/transports/rest.py @@ -833,39 +833,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_pools/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_pools/transports/rest_base.py index a5e64e961c4b..f0ef13beb60c 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_pools/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_pools/transports/rest_base.py @@ -123,7 +123,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -132,7 +132,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -141,6 +141,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseAddInstance: @@ -179,7 +180,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -188,7 +189,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -197,6 +198,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseAggregatedList: @@ -234,7 +236,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -243,6 +245,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -280,7 +283,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -289,6 +292,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -326,7 +330,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -335,6 +339,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetHealth: @@ -373,7 +378,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -382,7 +387,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -391,6 +396,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -429,7 +435,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -438,7 +444,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -447,6 +453,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -484,7 +491,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -493,6 +500,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseRemoveHealthCheck: @@ -531,7 +539,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -540,7 +548,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -549,6 +557,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseRemoveInstance: @@ -587,7 +596,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -596,7 +605,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -605,6 +614,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetBackup: @@ -643,7 +653,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -652,7 +662,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -661,6 +671,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetSecurityPolicy: @@ -699,7 +710,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -708,7 +719,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -717,6 +728,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -755,7 +767,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -764,7 +776,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -773,6 +785,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_ssl_proxies/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_ssl_proxies/client.py index 42730fcdffbb..f32f6d25824b 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_ssl_proxies/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_ssl_proxies/client.py @@ -534,9 +534,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the TargetSslProxiesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_ssl_proxies/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_ssl_proxies/transports/rest.py index 10884627fc58..0171b008df05 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_ssl_proxies/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_ssl_proxies/transports/rest.py @@ -614,39 +614,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_ssl_proxies/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_ssl_proxies/transports/rest_base.py index 5e0ba20b8d0c..f6e5a3c79e03 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_ssl_proxies/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_ssl_proxies/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -215,7 +217,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -224,7 +226,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -233,6 +235,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetBackendService: @@ -317,7 +321,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -326,7 +330,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -335,6 +339,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetCertificateMap: @@ -373,7 +378,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -382,7 +387,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -391,6 +396,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetProxyHeader: @@ -429,7 +435,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -438,7 +444,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -447,6 +453,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetSslCertificates: @@ -485,7 +492,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -494,7 +501,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -503,6 +510,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetSslPolicy: @@ -541,7 +549,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -550,7 +558,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -559,6 +567,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_tcp_proxies/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_tcp_proxies/client.py index 838e35cb0145..2b8871fc31b1 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_tcp_proxies/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_tcp_proxies/client.py @@ -534,9 +534,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the TargetTcpProxiesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_tcp_proxies/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_tcp_proxies/transports/rest.py index e8069c20c846..104425890a09 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_tcp_proxies/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_tcp_proxies/transports/rest.py @@ -504,39 +504,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_tcp_proxies/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_tcp_proxies/transports/rest_base.py index 4dcf08b6bdfd..a182acbd8f64 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_tcp_proxies/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_tcp_proxies/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -261,7 +264,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetBackendService: @@ -363,7 +368,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -372,7 +377,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -381,6 +386,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetProxyHeader: @@ -419,7 +425,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -428,7 +434,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -437,6 +443,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_vpn_gateways/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_vpn_gateways/client.py index 04c046ebd2db..cd4b37df0ae4 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_vpn_gateways/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_vpn_gateways/client.py @@ -536,9 +536,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the TargetVpnGatewaysTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_vpn_gateways/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_vpn_gateways/transports/rest.py index 9ec5f2b00aeb..c6802a51f1ca 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_vpn_gateways/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_vpn_gateways/transports/rest.py @@ -447,39 +447,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_vpn_gateways/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_vpn_gateways/transports/rest_base.py index cffe8cec1572..9495905b2c84 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_vpn_gateways/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_vpn_gateways/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -261,7 +264,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetLabels: @@ -363,7 +368,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -372,7 +377,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -381,6 +386,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/url_maps/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/url_maps/client.py index d34f8b8d1a47..bc161ba86643 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/url_maps/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/url_maps/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the UrlMapsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/url_maps/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/url_maps/transports/rest.py index c354aae2d8c5..219a56884128 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/url_maps/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/url_maps/transports/rest.py @@ -593,39 +593,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/url_maps/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/url_maps/transports/rest_base.py index 1e02334767eb..6004aef2a5f2 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/url_maps/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/url_maps/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -261,7 +264,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInvalidateCache: @@ -317,7 +321,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -326,7 +330,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -335,6 +339,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -372,7 +377,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -381,6 +386,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BasePatch: @@ -419,7 +425,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -428,7 +434,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -437,6 +443,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseUpdate: @@ -475,7 +482,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -484,7 +491,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -493,6 +500,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseValidate: @@ -531,7 +539,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -540,7 +548,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -549,6 +557,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_gateways/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_gateways/client.py index 1e086d4f8ffe..9e3c833743a4 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_gateways/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_gateways/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the VpnGatewaysTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_gateways/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_gateways/transports/rest.py index 449a2e200c2c..4acea46041fc 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_gateways/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_gateways/transports/rest.py @@ -557,39 +557,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_gateways/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_gateways/transports/rest_base.py index 16725a1bba01..6c2ec2d49946 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_gateways/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_gateways/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetStatus: @@ -260,7 +263,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -269,6 +272,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -307,7 +311,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -362,7 +367,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -371,6 +376,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetLabels: @@ -409,7 +415,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -418,7 +424,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -427,6 +433,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseTestIamPermissions: @@ -465,7 +472,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -474,7 +481,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -483,6 +490,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_tunnels/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_tunnels/client.py index b1c4157bdac1..e4a4a118180b 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_tunnels/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_tunnels/client.py @@ -530,9 +530,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the VpnTunnelsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_tunnels/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_tunnels/transports/rest.py index 193b7a4566e2..06b8fd1a3024 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_tunnels/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_tunnels/transports/rest.py @@ -435,39 +435,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_tunnels/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_tunnels/transports/rest_base.py index 6bcaba7ad1c1..b8d7fe6b0143 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_tunnels/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_tunnels/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseDelete: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseInsert: @@ -261,7 +264,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -270,7 +273,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -279,6 +282,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -316,7 +320,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -325,6 +329,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseSetLabels: @@ -363,7 +368,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -372,7 +377,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -381,6 +386,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/zone_operations/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/zone_operations/client.py index a9ec99c8387f..a40114e0b0b1 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/zone_operations/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/zone_operations/client.py @@ -529,9 +529,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the ZoneOperationsTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/zone_operations/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/zone_operations/transports/rest.py index c69b56115c4a..2e8646575f5d 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/zone_operations/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/zone_operations/transports/rest.py @@ -335,39 +335,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/zone_operations/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/zone_operations/transports/rest_base.py index cffb57c06665..63a6fcbf8b32 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/zone_operations/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/zone_operations/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGet: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -214,7 +216,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -223,6 +225,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseWait: @@ -260,7 +263,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -269,6 +272,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/zones/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/zones/client.py index 5f5defe02330..848e646d90f1 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/zones/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/zones/client.py @@ -527,9 +527,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the ZonesTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/zones/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/zones/transports/rest.py index 5deed2c360c6..cd36bb5a83f9 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/zones/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/zones/transports/rest.py @@ -217,39 +217,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'compute.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'compute.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/zones/transports/rest_base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/zones/transports/rest_base.py index 0e8078632d2e..d063f2308493 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/zones/transports/rest_base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/zones/transports/rest_base.py @@ -122,7 +122,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -131,6 +131,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseList: @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/types/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/types/__init__.py index 0a211eb44f15..1fdff31b4056 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/types/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/types/__init__.py @@ -1511,6 +1511,9 @@ SubnetworksScopedList, SubnetworksScopedWarning, SubnetworksSetPrivateIpGoogleAccessRequest, + SubnetworkUtilizationDetails, + SubnetworkUtilizationDetailsIPV4Utilization, + SubnetworkUtilizationDetailsIPV6Utilization, Subsetting, SuspendInstanceRequest, SuspendInstancesInstanceGroupManagerRequest, @@ -3183,6 +3186,9 @@ "SubnetworksScopedList", "SubnetworksScopedWarning", "SubnetworksSetPrivateIpGoogleAccessRequest", + "SubnetworkUtilizationDetails", + "SubnetworkUtilizationDetailsIPV4Utilization", + "SubnetworkUtilizationDetailsIPV6Utilization", "Subsetting", "SuspendInstanceRequest", "SuspendInstancesInstanceGroupManagerRequest", diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/types/compute.py b/packages/google-cloud-compute/google/cloud/compute_v1/types/compute.py index 75954a61316c..5de12110557a 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/types/compute.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/types/compute.py @@ -1516,6 +1516,9 @@ "SubnetworkLogConfig", "SubnetworkParams", "SubnetworkSecondaryRange", + "SubnetworkUtilizationDetails", + "SubnetworkUtilizationDetailsIPV4Utilization", + "SubnetworkUtilizationDetailsIPV6Utilization", "SubnetworksExpandIpCidrRangeRequest", "SubnetworksScopedList", "SubnetworksScopedWarning", @@ -36251,6 +36254,9 @@ class GetSubnetworkRequest(proto.Message): r"""A request message for Subnetworks.Get. See the method description for details. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Attributes: project (str): Project ID for this request. @@ -36258,8 +36264,33 @@ class GetSubnetworkRequest(proto.Message): Name of the region scoping this request. subnetwork (str): Name of the Subnetwork resource to return. + views (str): + Defines the extra views returned back in the subnetwork + resource. Supported values: - WITH_UTILIZATION: Utilization + data is included in the response. Check the Views enum for + the list of possible values. + + This field is a member of `oneof`_ ``_views``. """ + class Views(proto.Enum): + r"""Defines the extra views returned back in the subnetwork resource. + Supported values: - WITH_UTILIZATION: Utilization data is included + in the response. + + Values: + UNDEFINED_VIEWS (0): + A value indicating that the enum field is not + set. + DEFAULT (115302945): + No description available. + WITH_UTILIZATION (504090633): + Utilization data is included in the response. + """ + UNDEFINED_VIEWS = 0 + DEFAULT = 115302945 + WITH_UTILIZATION = 504090633 + project: str = proto.Field( proto.STRING, number=227560217, @@ -36272,6 +36303,11 @@ class GetSubnetworkRequest(proto.Message): proto.STRING, number=307827694, ) + views: str = proto.Field( + proto.STRING, + number=112204398, + optional=True, + ) class GetTargetGrpcProxyRequest(proto.Message): @@ -55309,6 +55345,11 @@ class InterconnectLocation(proto.Message): [Output Only] Server-defined URL for the resource. This field is a member of `oneof`_ ``_self_link``. + single_region_production_critical_peer_locations (MutableSequence[str]): + [Output Only] URLs of the other locations that can pair up + with this location to support Single-Region 99.99% SLA. E.g. + iad-zone1-1 and iad-zone2-5467 are Single-Region 99.99% peer + locations of each other. status (str): [Output Only] The status of this InterconnectLocation, which can take one of the following values: - CLOSED: The @@ -55501,6 +55542,12 @@ class Status(proto.Enum): number=456214797, optional=True, ) + single_region_production_critical_peer_locations: MutableSequence[ + str + ] = proto.RepeatedField( + proto.STRING, + number=439537103, + ) status: str = proto.Field( proto.STRING, number=181260274, @@ -56113,6 +56160,13 @@ class InterconnectRemoteLocation(proto.Message): requestedLinkCount cannot exceed max_lag_size_10_gbps. This field is a member of `oneof`_ ``_max_lag_size10_gbps``. + max_lag_size400_gbps (int): + [Output Only] The maximum number of 400 Gbps ports supported + in a link aggregation group (LAG). When linkType is 400 + Gbps, requestedLinkCount cannot exceed + max_lag_size_400_gbps. + + This field is a member of `oneof`_ ``_max_lag_size400_gbps``. name (str): [Output Only] Name of the resource. @@ -56290,6 +56344,11 @@ class Status(proto.Enum): number=294007573, optional=True, ) + max_lag_size400_gbps: int = proto.Field( + proto.INT32, + number=104941138, + optional=True, + ) name: str = proto.Field( proto.STRING, number=3373707, @@ -70835,8 +70894,33 @@ class ListSubnetworksRequest(proto.Message): resources, with an error code. This field is a member of `oneof`_ ``_return_partial_success``. + views (str): + Defines the extra views returned back in the subnetwork + resource. Supported values: - WITH_UTILIZATION: Utilization + data is included in the response. Check the Views enum for + the list of possible values. + + This field is a member of `oneof`_ ``_views``. """ + class Views(proto.Enum): + r"""Defines the extra views returned back in the subnetwork resource. + Supported values: - WITH_UTILIZATION: Utilization data is included + in the response. + + Values: + UNDEFINED_VIEWS (0): + A value indicating that the enum field is not + set. + DEFAULT (115302945): + No description available. + WITH_UTILIZATION (504090633): + Utilization data is included in the response. + """ + UNDEFINED_VIEWS = 0 + DEFAULT = 115302945 + WITH_UTILIZATION = 504090633 + filter: str = proto.Field( proto.STRING, number=336120696, @@ -70870,6 +70954,11 @@ class ListSubnetworksRequest(proto.Message): number=517198390, optional=True, ) + views: str = proto.Field( + proto.STRING, + number=112204398, + optional=True, + ) class ListTargetGrpcProxiesRequest(proto.Message): @@ -92428,6 +92517,11 @@ class RequestMirrorPolicy(proto.Message): supported as a mirrored backend service. This field is a member of `oneof`_ ``_backend_service``. + mirror_percent (float): + The percentage of requests to be mirrored to + ``backend_service``. + + This field is a member of `oneof`_ ``_mirror_percent``. """ backend_service: str = proto.Field( @@ -92435,6 +92529,11 @@ class RequestMirrorPolicy(proto.Message): number=306946058, optional=True, ) + mirror_percent: float = proto.Field( + proto.DOUBLE, + number=277432261, + optional=True, + ) class RequestRemovePeeringNetworkRequest(proto.Message): @@ -112676,6 +112775,12 @@ class Subnetwork(proto.Message): Output only. [Output Only] The array of internal IPv6 network ranges reserved from the subnetwork's internal IPv6 range for system use. + utilization_details (google.cloud.compute_v1.types.SubnetworkUtilizationDetails): + Output only. [Output Only] The current IP utilization of all + subnetwork ranges. Contains the total number of allocated + and free IPs in each range. + + This field is a member of `oneof`_ ``_utilization_details``. """ class Ipv6AccessType(proto.Enum): @@ -113019,6 +113124,12 @@ class State(proto.Enum): proto.STRING, number=432294995, ) + utilization_details: "SubnetworkUtilizationDetails" = proto.Field( + proto.MESSAGE, + number=125404453, + optional=True, + message="SubnetworkUtilizationDetails", + ) class SubnetworkAggregatedList(proto.Message): @@ -113389,6 +113500,127 @@ class SubnetworkSecondaryRange(proto.Message): ) +class SubnetworkUtilizationDetails(proto.Message): + r"""The current IP utilization of all subnetwork ranges. Contains + the total number of allocated and free IPs in each range. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + external_ipv6_instance_utilization (google.cloud.compute_v1.types.SubnetworkUtilizationDetailsIPV6Utilization): + Utilizations of external IPV6 IP range. + + This field is a member of `oneof`_ ``_external_ipv6_instance_utilization``. + external_ipv6_lb_utilization (google.cloud.compute_v1.types.SubnetworkUtilizationDetailsIPV6Utilization): + Utilizations of external IPV6 IP range for + NetLB. + + This field is a member of `oneof`_ ``_external_ipv6_lb_utilization``. + internal_ipv6_utilization (google.cloud.compute_v1.types.SubnetworkUtilizationDetailsIPV6Utilization): + Utilizations of internal IPV6 IP range. + + This field is a member of `oneof`_ ``_internal_ipv6_utilization``. + ipv4_utilizations (MutableSequence[google.cloud.compute_v1.types.SubnetworkUtilizationDetailsIPV4Utilization]): + Utilizations of all IPV4 IP ranges. For + primary ranges, the range name will be empty. + """ + + external_ipv6_instance_utilization: "SubnetworkUtilizationDetailsIPV6Utilization" = proto.Field( + proto.MESSAGE, + number=419750236, + optional=True, + message="SubnetworkUtilizationDetailsIPV6Utilization", + ) + external_ipv6_lb_utilization: "SubnetworkUtilizationDetailsIPV6Utilization" = ( + proto.Field( + proto.MESSAGE, + number=136563645, + optional=True, + message="SubnetworkUtilizationDetailsIPV6Utilization", + ) + ) + internal_ipv6_utilization: "SubnetworkUtilizationDetailsIPV6Utilization" = ( + proto.Field( + proto.MESSAGE, + number=69707020, + optional=True, + message="SubnetworkUtilizationDetailsIPV6Utilization", + ) + ) + ipv4_utilizations: MutableSequence[ + "SubnetworkUtilizationDetailsIPV4Utilization" + ] = proto.RepeatedField( + proto.MESSAGE, + number=206180011, + message="SubnetworkUtilizationDetailsIPV4Utilization", + ) + + +class SubnetworkUtilizationDetailsIPV4Utilization(proto.Message): + r"""The IPV4 utilization of a single IP range. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + range_name (str): + Will be set for secondary range. Empty for + primary IPv4 range. + + This field is a member of `oneof`_ ``_range_name``. + total_allocated_ip (int): + + This field is a member of `oneof`_ ``_total_allocated_ip``. + total_free_ip (int): + + This field is a member of `oneof`_ ``_total_free_ip``. + """ + + range_name: str = proto.Field( + proto.STRING, + number=332216397, + optional=True, + ) + total_allocated_ip: int = proto.Field( + proto.INT64, + number=279055546, + optional=True, + ) + total_free_ip: int = proto.Field( + proto.INT64, + number=105624031, + optional=True, + ) + + +class SubnetworkUtilizationDetailsIPV6Utilization(proto.Message): + r"""The IPV6 utilization of a single IP range. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + total_allocated_ip (google.cloud.compute_v1.types.Uint128): + + This field is a member of `oneof`_ ``_total_allocated_ip``. + total_free_ip (google.cloud.compute_v1.types.Uint128): + + This field is a member of `oneof`_ ``_total_free_ip``. + """ + + total_allocated_ip: "Uint128" = proto.Field( + proto.MESSAGE, + number=279055546, + optional=True, + message="Uint128", + ) + total_free_ip: "Uint128" = proto.Field( + proto.MESSAGE, + number=105624031, + optional=True, + message="Uint128", + ) + + class SubnetworksExpandIpCidrRangeRequest(proto.Message): r""" diff --git a/packages/google-cloud-compute/noxfile.py b/packages/google-cloud-compute/noxfile.py index e31507138c7b..58915722857c 100644 --- a/packages/google-cloud-compute/noxfile.py +++ b/packages/google-cloud-compute/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-compute/samples/README.me b/packages/google-cloud-compute/samples/README.me deleted file mode 100644 index 96174390c4a0..000000000000 --- a/packages/google-cloud-compute/samples/README.me +++ /dev/null @@ -1,4 +0,0 @@ -Samples migrated -================ - -New location: https://github.com/GoogleCloudPlatform/python-docs-samples/tree/main/compute/client_library diff --git a/packages/google-cloud-compute/testing/constraints-3.14.txt b/packages/google-cloud-compute/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-cloud-compute/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_accelerator_types.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_accelerator_types.py index 8160ef8450cc..f4e5d629edbe 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_accelerator_types.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_accelerator_types.py @@ -1083,7 +1083,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1355,7 +1355,7 @@ def test_get_rest_required_fields(request_type=compute.GetAcceleratorTypeRequest response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1562,7 +1562,7 @@ def test_list_rest_required_fields(request_type=compute.ListAcceleratorTypesRequ response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_addresses.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_addresses.py index 7fe576238867..669c4e38e065 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_addresses.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_addresses.py @@ -1041,7 +1041,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1314,7 +1314,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteAddressRequest): response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1521,7 +1521,7 @@ def test_delete_unary_rest_required_fields(request_type=compute.DeleteAddressReq response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1722,7 +1722,7 @@ def test_get_rest_required_fields(request_type=compute.GetAddressRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1926,7 +1926,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertAddressRequest): response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2126,7 +2126,7 @@ def test_insert_unary_rest_required_fields(request_type=compute.InsertAddressReq response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2329,7 +2329,7 @@ def test_list_rest_required_fields(request_type=compute.ListAddressesRequest): response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2599,7 +2599,7 @@ def test_move_rest_required_fields(request_type=compute.MoveAddressRequest): response = client.move(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2814,7 +2814,7 @@ def test_move_unary_rest_required_fields(request_type=compute.MoveAddressRequest response = client.move_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3029,7 +3029,7 @@ def test_set_labels_rest_required_fields(request_type=compute.SetLabelsAddressRe response = client.set_labels(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3246,7 +3246,7 @@ def test_set_labels_unary_rest_required_fields( response = client.set_labels_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3461,7 +3461,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_autoscalers.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_autoscalers.py index 31575e41426a..95808b3db3ea 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_autoscalers.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_autoscalers.py @@ -1049,7 +1049,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1325,7 +1325,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteAutoscalerReques response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1534,7 +1534,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1735,7 +1735,7 @@ def test_get_rest_required_fields(request_type=compute.GetAutoscalerRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1939,7 +1939,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertAutoscalerReques response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2145,7 +2145,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2352,7 +2352,7 @@ def test_list_rest_required_fields(request_type=compute.ListAutoscalersRequest): response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2623,7 +2623,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchAutoscalerRequest) response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2837,7 +2837,7 @@ def test_patch_unary_rest_required_fields(request_type=compute.PatchAutoscalerRe response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3051,7 +3051,7 @@ def test_update_rest_required_fields(request_type=compute.UpdateAutoscalerReques response = client.update(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3267,7 +3267,7 @@ def test_update_unary_rest_required_fields( response = client.update_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_backend_buckets.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_backend_buckets.py index b55ea16c2f0b..1ebfba9c8929 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_backend_buckets.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_backend_buckets.py @@ -1073,7 +1073,7 @@ def test_add_signed_url_key_rest_required_fields( response = client.add_signed_url_key(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1279,7 +1279,7 @@ def test_add_signed_url_key_unary_rest_required_fields( response = client.add_signed_url_key_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1478,7 +1478,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteBackendBucketReq response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1676,7 +1676,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1896,6 +1896,7 @@ def test_delete_signed_url_key_rest_required_fields( "keyName", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2124,6 +2125,7 @@ def test_delete_signed_url_key_unary_rest_required_fields( "keyName", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2322,7 +2324,7 @@ def test_get_rest_required_fields(request_type=compute.GetBackendBucketRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2516,7 +2518,7 @@ def test_get_iam_policy_rest_required_fields( response = client.get_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2709,7 +2711,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertBackendBucketReq response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2908,7 +2910,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3108,7 +3110,7 @@ def test_list_rest_required_fields(request_type=compute.ListBackendBucketsReques response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3367,7 +3369,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchBackendBucketReque response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3573,7 +3575,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3784,7 +3786,7 @@ def test_set_edge_security_policy_rest_required_fields( response = client.set_edge_security_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3995,7 +3997,7 @@ def test_set_edge_security_policy_unary_rest_required_fields( response = client.set_edge_security_policy_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4195,7 +4197,7 @@ def test_set_iam_policy_rest_required_fields( response = client.set_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4399,7 +4401,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4603,7 +4605,7 @@ def test_update_rest_required_fields(request_type=compute.UpdateBackendBucketReq response = client.update(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4809,7 +4811,7 @@ def test_update_unary_rest_required_fields( response = client.update_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_backend_services.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_backend_services.py index 84a8c54115ea..fd6caf85b3d0 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_backend_services.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_backend_services.py @@ -1087,7 +1087,7 @@ def test_add_signed_url_key_rest_required_fields( response = client.add_signed_url_key(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1293,7 +1293,7 @@ def test_add_signed_url_key_unary_rest_required_fields( response = client.add_signed_url_key_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1496,7 +1496,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1770,7 +1770,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteBackendServiceRe response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1968,7 +1968,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2188,6 +2188,7 @@ def test_delete_signed_url_key_rest_required_fields( "keyName", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2416,6 +2417,7 @@ def test_delete_signed_url_key_unary_rest_required_fields( "keyName", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2614,7 +2616,7 @@ def test_get_rest_required_fields(request_type=compute.GetBackendServiceRequest) response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2807,7 +2809,7 @@ def test_get_health_rest_required_fields( response = client.get_health(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3008,7 +3010,7 @@ def test_get_iam_policy_rest_required_fields( response = client.get_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3201,7 +3203,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertBackendServiceRe response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3400,7 +3402,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3600,7 +3602,7 @@ def test_list_rest_required_fields(request_type=compute.ListBackendServicesReque response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3860,7 +3862,7 @@ def test_list_usable_rest_required_fields( response = client.list_usable(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4119,7 +4121,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchBackendServiceRequ response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4325,7 +4327,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4536,7 +4538,7 @@ def test_set_edge_security_policy_rest_required_fields( response = client.set_edge_security_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4747,7 +4749,7 @@ def test_set_edge_security_policy_unary_rest_required_fields( response = client.set_edge_security_policy_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4947,7 +4949,7 @@ def test_set_iam_policy_rest_required_fields( response = client.set_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5157,7 +5159,7 @@ def test_set_security_policy_rest_required_fields( response = client.set_security_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5367,7 +5369,7 @@ def test_set_security_policy_unary_rest_required_fields( response = client.set_security_policy_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5571,7 +5573,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5775,7 +5777,7 @@ def test_update_rest_required_fields(request_type=compute.UpdateBackendServiceRe response = client.update(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5981,7 +5983,7 @@ def test_update_unary_rest_required_fields( response = client.update_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_disk_types.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_disk_types.py index a18016a75330..0c14d97fbcb9 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_disk_types.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_disk_types.py @@ -1036,7 +1036,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1303,7 +1303,7 @@ def test_get_rest_required_fields(request_type=compute.GetDiskTypeRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1510,7 +1510,7 @@ def test_list_rest_required_fields(request_type=compute.ListDiskTypesRequest): response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_disks.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_disks.py index 9ff8c9cb776c..92a1403003a0 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_disks.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_disks.py @@ -1028,7 +1028,7 @@ def test_add_resource_policies_rest_required_fields( response = client.add_resource_policies(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1246,7 +1246,7 @@ def test_add_resource_policies_unary_rest_required_fields( response = client.add_resource_policies_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1456,7 +1456,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1726,7 +1726,7 @@ def test_bulk_insert_rest_required_fields(request_type=compute.BulkInsertDiskReq response = client.bulk_insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1932,7 +1932,7 @@ def test_bulk_insert_unary_rest_required_fields( response = client.bulk_insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2143,7 +2143,7 @@ def test_bulk_set_labels_rest_required_fields( response = client.bulk_set_labels(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2367,7 +2367,7 @@ def test_bulk_set_labels_unary_rest_required_fields( response = client.bulk_set_labels_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2595,7 +2595,7 @@ def test_create_snapshot_rest_required_fields( response = client.create_snapshot(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2814,7 +2814,7 @@ def test_create_snapshot_unary_rest_required_fields( response = client.create_snapshot_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3025,7 +3025,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteDiskRequest): response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3228,7 +3228,7 @@ def test_delete_unary_rest_required_fields(request_type=compute.DeleteDiskReques response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3425,7 +3425,7 @@ def test_get_rest_required_fields(request_type=compute.GetDiskRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3626,7 +3626,7 @@ def test_get_iam_policy_rest_required_fields( response = client.get_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3835,7 +3835,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertDiskRequest): response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4045,7 +4045,7 @@ def test_insert_unary_rest_required_fields(request_type=compute.InsertDiskReques response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4253,7 +4253,7 @@ def test_list_rest_required_fields(request_type=compute.ListDisksRequest): response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4530,7 +4530,7 @@ def test_remove_resource_policies_rest_required_fields( response = client.remove_resource_policies(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4748,7 +4748,7 @@ def test_remove_resource_policies_unary_rest_required_fields( response = client.remove_resource_policies_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4959,7 +4959,7 @@ def test_resize_rest_required_fields(request_type=compute.ResizeDiskRequest): response = client.resize(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5166,7 +5166,7 @@ def test_resize_unary_rest_required_fields(request_type=compute.ResizeDiskReques response = client.resize_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5369,7 +5369,7 @@ def test_set_iam_policy_rest_required_fields( response = client.set_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5584,7 +5584,7 @@ def test_set_labels_rest_required_fields(request_type=compute.SetLabelsDiskReque response = client.set_labels(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5801,7 +5801,7 @@ def test_set_labels_unary_rest_required_fields( response = client.set_labels_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6023,7 +6023,7 @@ def test_start_async_replication_rest_required_fields( response = client.start_async_replication(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6241,7 +6241,7 @@ def test_start_async_replication_unary_rest_required_fields( response = client.start_async_replication_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6458,7 +6458,7 @@ def test_stop_async_replication_rest_required_fields( response = client.stop_async_replication(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6668,7 +6668,7 @@ def test_stop_async_replication_unary_rest_required_fields( response = client.stop_async_replication_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6875,7 +6875,7 @@ def test_stop_group_async_replication_rest_required_fields( response = client.stop_group_async_replication(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -7086,7 +7086,7 @@ def test_stop_group_async_replication_unary_rest_required_fields( response = client.stop_group_async_replication_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -7296,7 +7296,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -7517,7 +7517,7 @@ def test_update_rest_required_fields(request_type=compute.UpdateDiskRequest): response = client.update(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -7736,7 +7736,7 @@ def test_update_unary_rest_required_fields(request_type=compute.UpdateDiskReques response = client.update_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_external_vpn_gateways.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_external_vpn_gateways.py index 812b3633cb97..deae0ce95ef4 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_external_vpn_gateways.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_external_vpn_gateways.py @@ -1110,7 +1110,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1308,7 +1308,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1498,7 +1498,7 @@ def test_get_rest_required_fields(request_type=compute.GetExternalVpnGatewayRequ response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1693,7 +1693,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1892,7 +1892,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2092,7 +2092,7 @@ def test_list_rest_required_fields(request_type=compute.ListExternalVpnGatewaysR response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2351,7 +2351,7 @@ def test_set_labels_rest_required_fields( response = client.set_labels(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2555,7 +2555,7 @@ def test_set_labels_unary_rest_required_fields( response = client.set_labels_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2759,7 +2759,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_firewall_policies.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_firewall_policies.py index a969a00a9b8f..52bb50ccae9f 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_firewall_policies.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_firewall_policies.py @@ -1090,7 +1090,7 @@ def test_add_association_rest_required_fields( response = client.add_association(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1299,7 +1299,7 @@ def test_add_association_unary_rest_required_fields( response = client.add_association_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1503,7 +1503,7 @@ def test_add_rule_rest_required_fields( response = client.add_rule(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1702,7 +1702,7 @@ def test_add_rule_unary_rest_required_fields( response = client.add_rule_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1905,7 +1905,7 @@ def test_clone_rules_rest_required_fields( response = client.clone_rules(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2102,7 +2102,7 @@ def test_clone_rules_unary_rest_required_fields( response = client.clone_rules_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2292,7 +2292,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteFirewallPolicyRe response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2476,7 +2476,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2652,7 +2652,7 @@ def test_get_rest_required_fields(request_type=compute.GetFirewallPolicyRequest) response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2832,7 +2832,7 @@ def test_get_association_rest_required_fields( response = client.get_association(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3012,7 +3012,7 @@ def test_get_iam_policy_rest_required_fields( response = client.get_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3194,7 +3194,7 @@ def test_get_rule_rest_required_fields( response = client.get_rule(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3390,6 +3390,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertFirewallPolicyRe "parentId", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3614,6 +3615,7 @@ def test_insert_unary_rest_required_fields( "parentId", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3974,6 +3976,7 @@ def test_move_rest_required_fields(request_type=compute.MoveFirewallPolicyReques "parentId", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4190,6 +4193,7 @@ def test_move_unary_rest_required_fields( "parentId", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4388,7 +4392,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchFirewallPolicyRequ response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4595,7 +4599,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4807,7 +4811,7 @@ def test_patch_rule_rest_required_fields( response = client.patch_rule(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5016,7 +5020,7 @@ def test_patch_rule_unary_rest_required_fields( response = client.patch_rule_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5228,7 +5232,7 @@ def test_remove_association_rest_required_fields( response = client.remove_association(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5429,7 +5433,7 @@ def test_remove_association_unary_rest_required_fields( response = client.remove_association_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5626,7 +5630,7 @@ def test_remove_rule_rest_required_fields( response = client.remove_rule(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5823,7 +5827,7 @@ def test_remove_rule_unary_rest_required_fields( response = client.remove_rule_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6010,7 +6014,7 @@ def test_set_iam_policy_rest_required_fields( response = client.set_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6207,7 +6211,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_firewalls.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_firewalls.py index 1f6af26f2b8b..b6fc98200190 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_firewalls.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_firewalls.py @@ -1037,7 +1037,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteFirewallRequest) response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1233,7 +1233,7 @@ def test_delete_unary_rest_required_fields(request_type=compute.DeleteFirewallRe response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1423,7 +1423,7 @@ def test_get_rest_required_fields(request_type=compute.GetFirewallRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1616,7 +1616,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertFirewallRequest) response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1813,7 +1813,7 @@ def test_insert_unary_rest_required_fields(request_type=compute.InsertFirewallRe response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2013,7 +2013,7 @@ def test_list_rest_required_fields(request_type=compute.ListFirewallsRequest): response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2272,7 +2272,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchFirewallRequest): response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2476,7 +2476,7 @@ def test_patch_unary_rest_required_fields(request_type=compute.PatchFirewallRequ response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2680,7 +2680,7 @@ def test_update_rest_required_fields(request_type=compute.UpdateFirewallRequest) response = client.update(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2884,7 +2884,7 @@ def test_update_unary_rest_required_fields(request_type=compute.UpdateFirewallRe response = client.update_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_forwarding_rules.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_forwarding_rules.py index c472a5164c8b..4c0538ceb17b 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_forwarding_rules.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_forwarding_rules.py @@ -1084,7 +1084,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1362,7 +1362,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteForwardingRuleRe response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1571,7 +1571,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1772,7 +1772,7 @@ def test_get_rest_required_fields(request_type=compute.GetForwardingRuleRequest) response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1976,7 +1976,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertForwardingRuleRe response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2182,7 +2182,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2389,7 +2389,7 @@ def test_list_rest_required_fields(request_type=compute.ListForwardingRulesReque response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2659,7 +2659,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchForwardingRuleRequ response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2876,7 +2876,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3093,7 +3093,7 @@ def test_set_labels_rest_required_fields( response = client.set_labels(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3310,7 +3310,7 @@ def test_set_labels_unary_rest_required_fields( response = client.set_labels_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3527,7 +3527,7 @@ def test_set_target_rest_required_fields( response = client.set_target(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3740,7 +3740,7 @@ def test_set_target_unary_rest_required_fields( response = client.set_target_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_global_addresses.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_global_addresses.py index 1ab3a8273e8e..2d352a512fea 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_global_addresses.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_global_addresses.py @@ -1080,7 +1080,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteGlobalAddressReq response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1278,7 +1278,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1468,7 +1468,7 @@ def test_get_rest_required_fields(request_type=compute.GetGlobalAddressRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1661,7 +1661,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertGlobalAddressReq response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1856,7 +1856,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2052,7 +2052,7 @@ def test_list_rest_required_fields(request_type=compute.ListGlobalAddressesReque response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2311,7 +2311,7 @@ def test_move_rest_required_fields(request_type=compute.MoveGlobalAddressRequest response = client.move(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2515,7 +2515,7 @@ def test_move_unary_rest_required_fields(request_type=compute.MoveGlobalAddressR response = client.move_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2719,7 +2719,7 @@ def test_set_labels_rest_required_fields( response = client.set_labels(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2923,7 +2923,7 @@ def test_set_labels_unary_rest_required_fields( response = client.set_labels_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3127,7 +3127,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_global_forwarding_rules.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_global_forwarding_rules.py index a7402738bda4..21fe71ad1838 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_global_forwarding_rules.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_global_forwarding_rules.py @@ -1112,7 +1112,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1310,7 +1310,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1500,7 +1500,7 @@ def test_get_rest_required_fields(request_type=compute.GetGlobalForwardingRuleRe response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1695,7 +1695,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1894,7 +1894,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2096,7 +2096,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2357,7 +2357,7 @@ def test_patch_rest_required_fields( response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2563,7 +2563,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2767,7 +2767,7 @@ def test_set_labels_rest_required_fields( response = client.set_labels(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2971,7 +2971,7 @@ def test_set_labels_unary_rest_required_fields( response = client.set_labels_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3177,7 +3177,7 @@ def test_set_target_rest_required_fields( response = client.set_target(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3379,7 +3379,7 @@ def test_set_target_unary_rest_required_fields( response = client.set_target_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_global_network_endpoint_groups.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_global_network_endpoint_groups.py index 3c816923b306..46ed33147578 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_global_network_endpoint_groups.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_global_network_endpoint_groups.py @@ -1134,7 +1134,7 @@ def test_attach_network_endpoints_rest_required_fields( response = client.attach_network_endpoints(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1349,7 +1349,7 @@ def test_attach_network_endpoints_unary_rest_required_fields( response = client.attach_network_endpoints_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1558,7 +1558,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1756,7 +1756,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1960,7 +1960,7 @@ def test_detach_network_endpoints_rest_required_fields( response = client.detach_network_endpoints(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2175,7 +2175,7 @@ def test_detach_network_endpoints_unary_rest_required_fields( response = client.detach_network_endpoints_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2378,7 +2378,7 @@ def test_get_rest_required_fields( response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2573,7 +2573,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2772,7 +2772,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2974,7 +2974,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3245,7 +3245,7 @@ def test_list_network_endpoints_rest_required_fields( response = client.list_network_endpoints(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_global_operations.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_global_operations.py index 985809249fdb..32ecfe120831 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_global_operations.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_global_operations.py @@ -1083,7 +1083,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1346,7 +1346,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteGlobalOperationR response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1536,7 +1536,7 @@ def test_get_rest_required_fields(request_type=compute.GetGlobalOperationRequest response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1732,7 +1732,7 @@ def test_list_rest_required_fields(request_type=compute.ListGlobalOperationsRequ response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1984,7 +1984,7 @@ def test_wait_rest_required_fields(request_type=compute.WaitGlobalOperationReque response = client.wait(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_global_organization_operations.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_global_organization_operations.py index 3e14983b7184..26acde117f71 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_global_organization_operations.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_global_organization_operations.py @@ -1119,7 +1119,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1301,7 +1301,7 @@ def test_get_rest_required_fields( response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_global_public_delegated_prefixes.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_global_public_delegated_prefixes.py index b1fc8b947a16..6fc90b688302 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_global_public_delegated_prefixes.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_global_public_delegated_prefixes.py @@ -1134,7 +1134,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1332,7 +1332,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1524,7 +1524,7 @@ def test_get_rest_required_fields( response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1719,7 +1719,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1918,7 +1918,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2120,7 +2120,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2381,7 +2381,7 @@ def test_patch_rest_required_fields( response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2587,7 +2587,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_health_checks.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_health_checks.py index dddc3e81556e..01e51b6a0b32 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_health_checks.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_health_checks.py @@ -1053,7 +1053,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1327,7 +1327,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteHealthCheckReque response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1525,7 +1525,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1715,7 +1715,7 @@ def test_get_rest_required_fields(request_type=compute.GetHealthCheckRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1908,7 +1908,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertHealthCheckReque response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2103,7 +2103,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2299,7 +2299,7 @@ def test_list_rest_required_fields(request_type=compute.ListHealthChecksRequest) response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2558,7 +2558,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchHealthCheckRequest response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2758,7 +2758,7 @@ def test_patch_unary_rest_required_fields(request_type=compute.PatchHealthCheckR response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2958,7 +2958,7 @@ def test_update_rest_required_fields(request_type=compute.UpdateHealthCheckReque response = client.update(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3160,7 +3160,7 @@ def test_update_unary_rest_required_fields( response = client.update_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_image_family_views.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_image_family_views.py index 37f9694754c1..38a3202771a4 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_image_family_views.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_image_family_views.py @@ -1076,7 +1076,7 @@ def test_get_rest_required_fields(request_type=compute.GetImageFamilyViewRequest response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_images.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_images.py index 60068e07da46..9fb31fe2da33 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_images.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_images.py @@ -1020,7 +1020,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteImageRequest): response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1216,7 +1216,7 @@ def test_delete_unary_rest_required_fields(request_type=compute.DeleteImageReque response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1413,7 +1413,7 @@ def test_deprecate_rest_required_fields(request_type=compute.DeprecateImageReque response = client.deprecate(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1619,7 +1619,7 @@ def test_deprecate_unary_rest_required_fields( response = client.deprecate_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1816,7 +1816,7 @@ def test_get_rest_required_fields(request_type=compute.GetImageRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2008,7 +2008,7 @@ def test_get_from_family_rest_required_fields( response = client.get_from_family(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2202,7 +2202,7 @@ def test_get_iam_policy_rest_required_fields( response = client.get_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2400,7 +2400,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertImageRequest): response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2602,7 +2602,7 @@ def test_insert_unary_rest_required_fields(request_type=compute.InsertImageReque response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2802,7 +2802,7 @@ def test_list_rest_required_fields(request_type=compute.ListImagesRequest): response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3060,7 +3060,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchImageRequest): response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3260,7 +3260,7 @@ def test_patch_unary_rest_required_fields(request_type=compute.PatchImageRequest response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3456,7 +3456,7 @@ def test_set_iam_policy_rest_required_fields( response = client.set_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3658,7 +3658,7 @@ def test_set_labels_rest_required_fields(request_type=compute.SetLabelsImageRequ response = client.set_labels(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3862,7 +3862,7 @@ def test_set_labels_unary_rest_required_fields( response = client.set_labels_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4066,7 +4066,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_instance_group_manager_resize_requests.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_instance_group_manager_resize_requests.py index e3a4d7dd6615..a59700702f5c 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_instance_group_manager_resize_requests.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_instance_group_manager_resize_requests.py @@ -1150,7 +1150,7 @@ def test_cancel_rest_required_fields( response = client.cancel(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1367,7 +1367,7 @@ def test_cancel_unary_rest_required_fields( response = client.cancel_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1584,7 +1584,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1801,7 +1801,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2012,7 +2012,7 @@ def test_get_rest_required_fields( response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2226,7 +2226,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2443,7 +2443,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2665,7 +2665,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_instance_group_managers.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_instance_group_managers.py index 015fa3b4797e..fdef1e8206b8 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_instance_group_managers.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_instance_group_managers.py @@ -1119,7 +1119,7 @@ def test_abandon_instances_rest_required_fields( response = client.abandon_instances(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1338,7 +1338,7 @@ def test_abandon_instances_unary_rest_required_fields( response = client.abandon_instances_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1552,7 +1552,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1836,7 +1836,7 @@ def test_apply_updates_to_instances_rest_required_fields( response = client.apply_updates_to_instances(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2056,7 +2056,7 @@ def test_apply_updates_to_instances_unary_rest_required_fields( response = client.apply_updates_to_instances_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2275,7 +2275,7 @@ def test_create_instances_rest_required_fields( response = client.create_instances(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2494,7 +2494,7 @@ def test_create_instances_unary_rest_required_fields( response = client.create_instances_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2710,7 +2710,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2919,7 +2919,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3131,7 +3131,7 @@ def test_delete_instances_rest_required_fields( response = client.delete_instances(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3350,7 +3350,7 @@ def test_delete_instances_unary_rest_required_fields( response = client.delete_instances_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3570,7 +3570,7 @@ def test_delete_per_instance_configs_rest_required_fields( response = client.delete_per_instance_configs(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3790,7 +3790,7 @@ def test_delete_per_instance_configs_unary_rest_required_fields( response = client.delete_per_instance_configs_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4000,7 +4000,7 @@ def test_get_rest_required_fields(request_type=compute.GetInstanceGroupManagerRe response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4206,7 +4206,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4420,7 +4420,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4637,7 +4637,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4914,7 +4914,7 @@ def test_list_errors_rest_required_fields( response = client.list_errors(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5209,7 +5209,7 @@ def test_list_managed_instances_rest_required_fields( response = client.list_managed_instances(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5507,7 +5507,7 @@ def test_list_per_instance_configs_rest_required_fields( response = client.list_per_instance_configs(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5795,7 +5795,7 @@ def test_patch_rest_required_fields( response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6020,7 +6020,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6250,7 +6250,7 @@ def test_patch_per_instance_configs_rest_required_fields( response = client.patch_per_instance_configs(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6476,7 +6476,7 @@ def test_patch_per_instance_configs_unary_rest_required_fields( response = client.patch_per_instance_configs_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6701,7 +6701,7 @@ def test_recreate_instances_rest_required_fields( response = client.recreate_instances(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6922,7 +6922,7 @@ def test_recreate_instances_unary_rest_required_fields( response = client.recreate_instances_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -7155,6 +7155,7 @@ def test_resize_rest_required_fields( "size", str(0), ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -7389,6 +7390,7 @@ def test_resize_unary_rest_required_fields( "size", str(0), ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -7609,7 +7611,7 @@ def test_resume_instances_rest_required_fields( response = client.resume_instances(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -7828,7 +7830,7 @@ def test_resume_instances_unary_rest_required_fields( response = client.resume_instances_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -8050,7 +8052,7 @@ def test_set_instance_template_rest_required_fields( response = client.set_instance_template(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -8272,7 +8274,7 @@ def test_set_instance_template_unary_rest_required_fields( response = client.set_instance_template_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -8491,7 +8493,7 @@ def test_set_target_pools_rest_required_fields( response = client.set_target_pools(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -8710,7 +8712,7 @@ def test_set_target_pools_unary_rest_required_fields( response = client.set_target_pools_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -8927,7 +8929,7 @@ def test_start_instances_rest_required_fields( response = client.start_instances(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -9144,7 +9146,7 @@ def test_start_instances_unary_rest_required_fields( response = client.start_instances_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -9361,7 +9363,7 @@ def test_stop_instances_rest_required_fields( response = client.stop_instances(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -9578,7 +9580,7 @@ def test_stop_instances_unary_rest_required_fields( response = client.stop_instances_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -9797,7 +9799,7 @@ def test_suspend_instances_rest_required_fields( response = client.suspend_instances(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -10016,7 +10018,7 @@ def test_suspend_instances_unary_rest_required_fields( response = client.suspend_instances_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -10238,7 +10240,7 @@ def test_update_per_instance_configs_rest_required_fields( response = client.update_per_instance_configs(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -10464,7 +10466,7 @@ def test_update_per_instance_configs_unary_rest_required_fields( response = client.update_per_instance_configs_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_instance_groups.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_instance_groups.py index f49b7be39a3a..7a930fae4a10 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_instance_groups.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_instance_groups.py @@ -1073,7 +1073,7 @@ def test_add_instances_rest_required_fields( response = client.add_instances(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1290,7 +1290,7 @@ def test_add_instances_unary_rest_required_fields( response = client.add_instances_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1504,7 +1504,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1782,7 +1782,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteInstanceGroupReq response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1991,7 +1991,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2192,7 +2192,7 @@ def test_get_rest_required_fields(request_type=compute.GetInstanceGroupRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2396,7 +2396,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertInstanceGroupReq response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2602,7 +2602,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2809,7 +2809,7 @@ def test_list_rest_required_fields(request_type=compute.ListInstanceGroupsReques response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3085,7 +3085,7 @@ def test_list_instances_rest_required_fields( response = client.list_instances(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3384,7 +3384,7 @@ def test_remove_instances_rest_required_fields( response = client.remove_instances(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3603,7 +3603,7 @@ def test_remove_instances_unary_rest_required_fields( response = client.remove_instances_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3820,7 +3820,7 @@ def test_set_named_ports_rest_required_fields( response = client.set_named_ports(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4037,7 +4037,7 @@ def test_set_named_ports_unary_rest_required_fields( response = client.set_named_ports_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4252,7 +4252,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_instance_settings_service.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_instance_settings_service.py index fb7f90bd9853..7f65fd417b2b 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_instance_settings_service.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_instance_settings_service.py @@ -1105,7 +1105,7 @@ def test_get_rest_required_fields(request_type=compute.GetInstanceSettingRequest response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1307,7 +1307,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchInstanceSettingReq response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1523,7 +1523,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_instance_templates.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_instance_templates.py index 9f52a0042828..3ad895ffdda8 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_instance_templates.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_instance_templates.py @@ -1098,7 +1098,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1374,7 +1374,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1572,7 +1572,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1762,7 +1762,7 @@ def test_get_rest_required_fields(request_type=compute.GetInstanceTemplateReques response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1956,7 +1956,7 @@ def test_get_iam_policy_rest_required_fields( response = client.get_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2151,7 +2151,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2350,7 +2350,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2550,7 +2550,7 @@ def test_list_rest_required_fields(request_type=compute.ListInstanceTemplatesReq response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2805,7 +2805,7 @@ def test_set_iam_policy_rest_required_fields( response = client.set_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3009,7 +3009,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_instances.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_instances.py index 562e523a2b33..e6fc90dba517 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_instances.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_instances.py @@ -1063,6 +1063,7 @@ def test_add_access_config_rest_required_fields( "networkInterface", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1307,6 +1308,7 @@ def test_add_access_config_unary_rest_required_fields( "networkInterface", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1537,7 +1539,7 @@ def test_add_network_interface_rest_required_fields( response = client.add_network_interface(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1763,7 +1765,7 @@ def test_add_network_interface_unary_rest_required_fields( response = client.add_network_interface_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1989,7 +1991,7 @@ def test_add_resource_policies_rest_required_fields( response = client.add_resource_policies(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2211,7 +2213,7 @@ def test_add_resource_policies_unary_rest_required_fields( response = client.add_resource_policies_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2425,7 +2427,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2706,7 +2708,7 @@ def test_attach_disk_rest_required_fields( response = client.attach_disk(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2933,7 +2935,7 @@ def test_attach_disk_unary_rest_required_fields( response = client.attach_disk_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3151,7 +3153,7 @@ def test_bulk_insert_rest_required_fields( response = client.bulk_insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3357,7 +3359,7 @@ def test_bulk_insert_unary_rest_required_fields( response = client.bulk_insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3564,7 +3566,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteInstanceRequest) response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3771,7 +3773,7 @@ def test_delete_unary_rest_required_fields(request_type=compute.DeleteInstanceRe response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4013,6 +4015,7 @@ def test_delete_access_config_rest_required_fields( "networkInterface", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4267,6 +4270,7 @@ def test_delete_access_config_unary_rest_required_fields( "networkInterface", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4513,6 +4517,7 @@ def test_delete_network_interface_rest_required_fields( "networkInterfaceName", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4755,6 +4760,7 @@ def test_delete_network_interface_unary_rest_required_fields( "networkInterfaceName", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4989,6 +4995,7 @@ def test_detach_disk_rest_required_fields( "deviceName", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5223,6 +5230,7 @@ def test_detach_disk_unary_rest_required_fields( "deviceName", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5432,7 +5440,7 @@ def test_get_rest_required_fields(request_type=compute.GetInstanceRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5656,6 +5664,7 @@ def test_get_effective_firewalls_rest_required_fields( "networkInterface", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5873,7 +5882,7 @@ def test_get_guest_attributes_rest_required_fields( response = client.get_guest_attributes(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6083,7 +6092,7 @@ def test_get_iam_policy_rest_required_fields( response = client.get_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6286,7 +6295,7 @@ def test_get_screenshot_rest_required_fields( response = client.get_screenshot(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6501,7 +6510,7 @@ def test_get_serial_port_output_rest_required_fields( response = client.get_serial_port_output(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6714,7 +6723,7 @@ def test_get_shielded_instance_identity_rest_required_fields( response = client.get_shielded_instance_identity(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6926,7 +6935,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertInstanceRequest) response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -7146,7 +7155,7 @@ def test_insert_unary_rest_required_fields(request_type=compute.InsertInstanceRe response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -7363,7 +7372,7 @@ def test_list_rest_required_fields(request_type=compute.ListInstancesRequest): response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -7638,7 +7647,7 @@ def test_list_referrers_rest_required_fields( response = client.list_referrers(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -7924,7 +7933,7 @@ def test_perform_maintenance_rest_required_fields( response = client.perform_maintenance(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -8137,7 +8146,7 @@ def test_perform_maintenance_unary_rest_required_fields( response = client.perform_maintenance_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -8352,7 +8361,7 @@ def test_remove_resource_policies_rest_required_fields( response = client.remove_resource_policies(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -8574,7 +8583,7 @@ def test_remove_resource_policies_unary_rest_required_fields( response = client.remove_resource_policies_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -8796,7 +8805,7 @@ def test_report_host_as_faulty_rest_required_fields( response = client.report_host_as_faulty(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -9018,7 +9027,7 @@ def test_report_host_as_faulty_unary_rest_required_fields( response = client.report_host_as_faulty_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -9232,7 +9241,7 @@ def test_reset_rest_required_fields(request_type=compute.ResetInstanceRequest): response = client.reset(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -9439,7 +9448,7 @@ def test_reset_unary_rest_required_fields(request_type=compute.ResetInstanceRequ response = client.reset_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -9646,7 +9655,7 @@ def test_resume_rest_required_fields(request_type=compute.ResumeInstanceRequest) response = client.resume(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -9853,7 +9862,7 @@ def test_resume_unary_rest_required_fields(request_type=compute.ResumeInstanceRe response = client.resume_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -10063,7 +10072,7 @@ def test_send_diagnostic_interrupt_rest_required_fields( response = client.send_diagnostic_interrupt(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -10282,7 +10291,7 @@ def test_set_deletion_protection_rest_required_fields( response = client.set_deletion_protection(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -10506,7 +10515,7 @@ def test_set_deletion_protection_unary_rest_required_fields( response = client.set_deletion_protection_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -10753,6 +10762,7 @@ def test_set_disk_auto_delete_rest_required_fields( "deviceName", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -11007,6 +11017,7 @@ def test_set_disk_auto_delete_unary_rest_required_fields( "deviceName", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -11223,7 +11234,7 @@ def test_set_iam_policy_rest_required_fields( response = client.set_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -11438,7 +11449,7 @@ def test_set_labels_rest_required_fields(request_type=compute.SetLabelsInstanceR response = client.set_labels(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -11655,7 +11666,7 @@ def test_set_labels_unary_rest_required_fields( response = client.set_labels_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -11877,7 +11888,7 @@ def test_set_machine_resources_rest_required_fields( response = client.set_machine_resources(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -12099,7 +12110,7 @@ def test_set_machine_resources_unary_rest_required_fields( response = client.set_machine_resources_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -12318,7 +12329,7 @@ def test_set_machine_type_rest_required_fields( response = client.set_machine_type(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -12537,7 +12548,7 @@ def test_set_machine_type_unary_rest_required_fields( response = client.set_machine_type_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -12754,7 +12765,7 @@ def test_set_metadata_rest_required_fields( response = client.set_metadata(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -12967,7 +12978,7 @@ def test_set_metadata_unary_rest_required_fields( response = client.set_metadata_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -13184,7 +13195,7 @@ def test_set_min_cpu_platform_rest_required_fields( response = client.set_min_cpu_platform(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -13405,7 +13416,7 @@ def test_set_min_cpu_platform_unary_rest_required_fields( response = client.set_min_cpu_platform_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -13620,7 +13631,7 @@ def test_set_name_rest_required_fields(request_type=compute.SetNameInstanceReque response = client.set_name(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -13837,7 +13848,7 @@ def test_set_name_unary_rest_required_fields( response = client.set_name_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -14054,7 +14065,7 @@ def test_set_scheduling_rest_required_fields( response = client.set_scheduling(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -14267,7 +14278,7 @@ def test_set_scheduling_unary_rest_required_fields( response = client.set_scheduling_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -14484,7 +14495,7 @@ def test_set_security_policy_rest_required_fields( response = client.set_security_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -14705,7 +14716,7 @@ def test_set_security_policy_unary_rest_required_fields( response = client.set_security_policy_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -14926,7 +14937,7 @@ def test_set_service_account_rest_required_fields( response = client.set_service_account(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -15147,7 +15158,7 @@ def test_set_service_account_unary_rest_required_fields( response = client.set_service_account_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -15373,7 +15384,7 @@ def test_set_shielded_instance_integrity_policy_rest_required_fields( response = client.set_shielded_instance_integrity_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -15603,7 +15614,7 @@ def test_set_shielded_instance_integrity_policy_unary_rest_required_fields( response = client.set_shielded_instance_integrity_policy_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -15822,7 +15833,7 @@ def test_set_tags_rest_required_fields(request_type=compute.SetTagsInstanceReque response = client.set_tags(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -16035,7 +16046,7 @@ def test_set_tags_unary_rest_required_fields( response = client.set_tags_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -16257,7 +16268,7 @@ def test_simulate_maintenance_event_rest_required_fields( response = client.simulate_maintenance_event(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -16481,7 +16492,7 @@ def test_simulate_maintenance_event_unary_rest_required_fields( response = client.simulate_maintenance_event_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -16693,7 +16704,7 @@ def test_start_rest_required_fields(request_type=compute.StartInstanceRequest): response = client.start(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -16900,7 +16911,7 @@ def test_start_unary_rest_required_fields(request_type=compute.StartInstanceRequ response = client.start_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -17115,7 +17126,7 @@ def test_start_with_encryption_key_rest_required_fields( response = client.start_with_encryption_key(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -17349,7 +17360,7 @@ def test_start_with_encryption_key_unary_rest_required_fields( response = client.start_with_encryption_key_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -17580,7 +17591,7 @@ def test_stop_rest_required_fields(request_type=compute.StopInstanceRequest): response = client.stop(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -17797,7 +17808,7 @@ def test_stop_unary_rest_required_fields(request_type=compute.StopInstanceReques response = client.stop_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -18014,7 +18025,7 @@ def test_suspend_rest_required_fields(request_type=compute.SuspendInstanceReques response = client.suspend(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -18233,7 +18244,7 @@ def test_suspend_unary_rest_required_fields( response = client.suspend_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -18446,7 +18457,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -18667,7 +18678,7 @@ def test_update_rest_required_fields(request_type=compute.UpdateInstanceRequest) response = client.update(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -18898,7 +18909,7 @@ def test_update_unary_rest_required_fields(request_type=compute.UpdateInstanceRe response = client.update_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -19146,6 +19157,7 @@ def test_update_access_config_rest_required_fields( "networkInterface", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -19392,6 +19404,7 @@ def test_update_access_config_unary_rest_required_fields( "networkInterface", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -19622,7 +19635,7 @@ def test_update_display_device_rest_required_fields( response = client.update_display_device(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -19840,7 +19853,7 @@ def test_update_display_device_unary_rest_required_fields( response = client.update_display_device_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -20075,6 +20088,7 @@ def test_update_network_interface_rest_required_fields( "networkInterface", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -20326,6 +20340,7 @@ def test_update_network_interface_unary_rest_required_fields( "networkInterface", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -20560,7 +20575,7 @@ def test_update_shielded_instance_config_rest_required_fields( response = client.update_shielded_instance_config(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -20784,7 +20799,7 @@ def test_update_shielded_instance_config_unary_rest_required_fields( response = client.update_shielded_instance_config_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_instant_snapshots.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_instant_snapshots.py index ef9c9329d411..2acb9ffa48af 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_instant_snapshots.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_instant_snapshots.py @@ -1090,7 +1090,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1368,7 +1368,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteInstantSnapshotR response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1577,7 +1577,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1778,7 +1778,7 @@ def test_get_rest_required_fields(request_type=compute.GetInstantSnapshotRequest response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1983,7 +1983,7 @@ def test_get_iam_policy_rest_required_fields( response = client.get_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2187,7 +2187,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertInstantSnapshotR response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2393,7 +2393,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2600,7 +2600,7 @@ def test_list_rest_required_fields(request_type=compute.ListInstantSnapshotsRequ response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2866,7 +2866,7 @@ def test_set_iam_policy_rest_required_fields( response = client.set_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3083,7 +3083,7 @@ def test_set_labels_rest_required_fields( response = client.set_labels(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3300,7 +3300,7 @@ def test_set_labels_unary_rest_required_fields( response = client.set_labels_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3515,7 +3515,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_interconnect_attachment_groups.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_interconnect_attachment_groups.py index f7e59307fb3e..076037bace28 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_interconnect_attachment_groups.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_interconnect_attachment_groups.py @@ -1137,7 +1137,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1343,7 +1343,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1543,7 +1543,7 @@ def test_get_rest_required_fields( response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1740,7 +1740,7 @@ def test_get_iam_policy_rest_required_fields( response = client.get_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1946,7 +1946,7 @@ def test_get_operational_status_rest_required_fields( response = client.get_operational_status(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2150,7 +2150,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2357,7 +2357,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2569,7 +2569,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2843,7 +2843,7 @@ def test_patch_rest_required_fields( response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3075,7 +3075,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3291,7 +3291,7 @@ def test_set_iam_policy_rest_required_fields( response = client.set_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3495,7 +3495,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_interconnect_attachments.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_interconnect_attachments.py index d5882ce6a501..0c7d89f44d04 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_interconnect_attachments.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_interconnect_attachments.py @@ -1116,7 +1116,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1398,7 +1398,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1609,7 +1609,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1814,7 +1814,7 @@ def test_get_rest_required_fields( response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2025,7 +2025,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2241,7 +2241,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2455,7 +2455,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2731,7 +2731,7 @@ def test_patch_rest_required_fields( response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2950,7 +2950,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3167,7 +3167,7 @@ def test_set_labels_rest_required_fields( response = client.set_labels(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3384,7 +3384,7 @@ def test_set_labels_unary_rest_required_fields( response = client.set_labels_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_interconnect_groups.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_interconnect_groups.py index 92d837363c30..9c6932666824 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_interconnect_groups.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_interconnect_groups.py @@ -1099,7 +1099,7 @@ def test_create_members_rest_required_fields( response = client.create_members(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1307,7 +1307,7 @@ def test_create_members_unary_rest_required_fields( response = client.create_members_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1516,7 +1516,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1714,7 +1714,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1904,7 +1904,7 @@ def test_get_rest_required_fields(request_type=compute.GetInterconnectGroupReque response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2098,7 +2098,7 @@ def test_get_iam_policy_rest_required_fields( response = client.get_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2297,7 +2297,7 @@ def test_get_operational_status_rest_required_fields( response = client.get_operational_status(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2494,7 +2494,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2709,7 +2709,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2925,7 +2925,7 @@ def test_list_rest_required_fields(request_type=compute.ListInterconnectGroupsRe response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3191,7 +3191,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchInterconnectGroupR response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3423,7 +3423,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3644,7 +3644,7 @@ def test_set_iam_policy_rest_required_fields( response = client.set_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3848,7 +3848,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_interconnect_locations.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_interconnect_locations.py index 104c4599df8d..dce4f740131a 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_interconnect_locations.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_interconnect_locations.py @@ -1097,7 +1097,7 @@ def test_get_rest_required_fields(request_type=compute.GetInterconnectLocationRe response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1295,7 +1295,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1579,6 +1579,9 @@ def test_get_rest_call_success(request_type): name="name_value", peeringdb_facility_id="peeringdb_facility_id_value", self_link="self_link_value", + single_region_production_critical_peer_locations=[ + "single_region_production_critical_peer_locations_value" + ], status="status_value", supports_pzs=True, ) @@ -1614,6 +1617,9 @@ def test_get_rest_call_success(request_type): assert response.name == "name_value" assert response.peeringdb_facility_id == "peeringdb_facility_id_value" assert response.self_link == "self_link_value" + assert response.single_region_production_critical_peer_locations == [ + "single_region_production_critical_peer_locations_value" + ] assert response.status == "status_value" assert response.supports_pzs is True diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_interconnect_remote_locations.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_interconnect_remote_locations.py index 1bb860d2be0c..ff45ed1e50e9 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_interconnect_remote_locations.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_interconnect_remote_locations.py @@ -1120,7 +1120,7 @@ def test_get_rest_required_fields( response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1321,7 +1321,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1606,6 +1606,7 @@ def test_get_rest_call_success(request_type): lacp="lacp_value", max_lag_size100_gbps=1935, max_lag_size10_gbps=1887, + max_lag_size400_gbps=1938, name="name_value", peeringdb_facility_id="peeringdb_facility_id_value", remote_service="remote_service_value", @@ -1641,6 +1642,7 @@ def test_get_rest_call_success(request_type): assert response.lacp == "lacp_value" assert response.max_lag_size100_gbps == 1935 assert response.max_lag_size10_gbps == 1887 + assert response.max_lag_size400_gbps == 1938 assert response.name == "name_value" assert response.peeringdb_facility_id == "peeringdb_facility_id_value" assert response.remote_service == "remote_service_value" diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_interconnects.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_interconnects.py index 641af194e71c..bb7e4dde505d 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_interconnects.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_interconnects.py @@ -1062,7 +1062,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteInterconnectRequ response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1260,7 +1260,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1450,7 +1450,7 @@ def test_get_rest_required_fields(request_type=compute.GetInterconnectRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1642,7 +1642,7 @@ def test_get_diagnostics_rest_required_fields( response = client.get_diagnostics(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1836,7 +1836,7 @@ def test_get_macsec_config_rest_required_fields( response = client.get_macsec_config(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2029,7 +2029,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertInterconnectRequ response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2224,7 +2224,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2420,7 +2420,7 @@ def test_list_rest_required_fields(request_type=compute.ListInterconnectsRequest response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2679,7 +2679,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchInterconnectReques response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2881,7 +2881,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3081,7 +3081,7 @@ def test_set_labels_rest_required_fields( response = client.set_labels(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3285,7 +3285,7 @@ def test_set_labels_unary_rest_required_fields( response = client.set_labels_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_license_codes.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_license_codes.py index 2225ae6f24f5..40edc360934c 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_license_codes.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_license_codes.py @@ -1035,7 +1035,7 @@ def test_get_rest_required_fields(request_type=compute.GetLicenseCodeRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1232,7 +1232,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_licenses.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_licenses.py index fe824f7c9030..11828b0e66b7 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_licenses.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_licenses.py @@ -1043,6 +1043,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteLicenseRequest): "license", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1257,6 +1258,7 @@ def test_delete_unary_rest_required_fields(request_type=compute.DeleteLicenseReq "license", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1462,6 +1464,7 @@ def test_get_rest_required_fields(request_type=compute.GetLicenseRequest): "license", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1656,7 +1659,7 @@ def test_get_iam_policy_rest_required_fields( response = client.get_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1849,7 +1852,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertLicenseRequest): response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2045,7 +2048,7 @@ def test_insert_unary_rest_required_fields(request_type=compute.InsertLicenseReq response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2244,7 +2247,7 @@ def test_list_rest_required_fields(request_type=compute.ListLicensesRequest): response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2498,7 +2501,7 @@ def test_set_iam_policy_rest_required_fields( response = client.set_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2702,7 +2705,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2920,6 +2923,7 @@ def test_update_rest_required_fields(request_type=compute.UpdateLicenseRequest): "license", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3144,6 +3148,7 @@ def test_update_unary_rest_required_fields(request_type=compute.UpdateLicenseReq "license", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_machine_images.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_machine_images.py index 13382cc56cf6..922d755c4294 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_machine_images.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_machine_images.py @@ -1062,7 +1062,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteMachineImageRequ response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1260,7 +1260,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1450,7 +1450,7 @@ def test_get_rest_required_fields(request_type=compute.GetMachineImageRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1644,7 +1644,7 @@ def test_get_iam_policy_rest_required_fields( response = client.get_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1842,7 +1842,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertMachineImageRequ response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2051,7 +2051,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2256,7 +2256,7 @@ def test_list_rest_required_fields(request_type=compute.ListMachineImagesRequest response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2511,7 +2511,7 @@ def test_set_iam_policy_rest_required_fields( response = client.set_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2715,7 +2715,7 @@ def test_set_labels_rest_required_fields( response = client.set_labels(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2919,7 +2919,7 @@ def test_set_labels_unary_rest_required_fields( response = client.set_labels_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3123,7 +3123,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_machine_types.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_machine_types.py index c2e64b9356ab..258362f84279 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_machine_types.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_machine_types.py @@ -1046,7 +1046,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1316,7 +1316,7 @@ def test_get_rest_required_fields(request_type=compute.GetMachineTypeRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1523,7 +1523,7 @@ def test_list_rest_required_fields(request_type=compute.ListMachineTypesRequest) response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_network_attachments.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_network_attachments.py index 3d44dc0efd7d..8547f4cc801a 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_network_attachments.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_network_attachments.py @@ -1102,7 +1102,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1382,7 +1382,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1591,7 +1591,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1792,7 +1792,7 @@ def test_get_rest_required_fields(request_type=compute.GetNetworkAttachmentReque response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1997,7 +1997,7 @@ def test_get_iam_policy_rest_required_fields( response = client.get_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2203,7 +2203,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2417,7 +2417,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2632,7 +2632,7 @@ def test_list_rest_required_fields(request_type=compute.ListNetworkAttachmentsRe response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2902,7 +2902,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchNetworkAttachmentR response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3127,7 +3127,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3346,7 +3346,7 @@ def test_set_iam_policy_rest_required_fields( response = client.set_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3561,7 +3561,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_network_edge_security_services.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_network_edge_security_services.py index 367c33a67735..2a19ac5df31d 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_network_edge_security_services.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_network_edge_security_services.py @@ -1132,7 +1132,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1418,7 +1418,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1632,7 +1632,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1840,7 +1840,7 @@ def test_get_rest_required_fields( response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2051,7 +2051,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2267,7 +2267,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2493,7 +2493,7 @@ def test_patch_rest_required_fields( response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2727,7 +2727,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_network_endpoint_groups.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_network_endpoint_groups.py index 8bd2681e397a..9643e4834cd9 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_network_endpoint_groups.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_network_endpoint_groups.py @@ -1114,7 +1114,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1400,7 +1400,7 @@ def test_attach_network_endpoints_rest_required_fields( response = client.attach_network_endpoints(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1626,7 +1626,7 @@ def test_attach_network_endpoints_unary_rest_required_fields( response = client.attach_network_endpoints_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1846,7 +1846,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2055,7 +2055,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2270,7 +2270,7 @@ def test_detach_network_endpoints_rest_required_fields( response = client.detach_network_endpoints(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2496,7 +2496,7 @@ def test_detach_network_endpoints_unary_rest_required_fields( response = client.detach_network_endpoints_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2708,7 +2708,7 @@ def test_get_rest_required_fields(request_type=compute.GetNetworkEndpointGroupRe response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2914,7 +2914,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3120,7 +3120,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3329,7 +3329,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3612,7 +3612,7 @@ def test_list_network_endpoints_rest_required_fields( response = client.list_network_endpoints(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3912,7 +3912,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_network_firewall_policies.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_network_firewall_policies.py index 88092f742c10..4156a9abe3b8 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_network_firewall_policies.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_network_firewall_policies.py @@ -1120,7 +1120,7 @@ def test_add_association_rest_required_fields( response = client.add_association(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1336,7 +1336,7 @@ def test_add_association_unary_rest_required_fields( response = client.add_association_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1558,7 +1558,7 @@ def test_add_packet_mirroring_rule_rest_required_fields( response = client.add_packet_mirroring_rule(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1781,7 +1781,7 @@ def test_add_packet_mirroring_rule_unary_rest_required_fields( response = client.add_packet_mirroring_rule_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1999,7 +1999,7 @@ def test_add_rule_rest_required_fields( response = client.add_rule(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2217,7 +2217,7 @@ def test_add_rule_unary_rest_required_fields( response = client.add_rule_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2430,7 +2430,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2711,7 +2711,7 @@ def test_clone_rules_rest_required_fields( response = client.clone_rules(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2919,7 +2919,7 @@ def test_clone_rules_unary_rest_required_fields( response = client.clone_rules_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3122,7 +3122,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3320,7 +3320,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3510,7 +3510,7 @@ def test_get_rest_required_fields(request_type=compute.GetNetworkFirewallPolicyR response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3704,7 +3704,7 @@ def test_get_association_rest_required_fields( response = client.get_association(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3898,7 +3898,7 @@ def test_get_iam_policy_rest_required_fields( response = client.get_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4097,7 +4097,7 @@ def test_get_packet_mirroring_rule_rest_required_fields( response = client.get_packet_mirroring_rule(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4291,7 +4291,7 @@ def test_get_rule_rest_required_fields( response = client.get_rule(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4486,7 +4486,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4693,7 +4693,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4903,7 +4903,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5164,7 +5164,7 @@ def test_patch_rest_required_fields( response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5378,7 +5378,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5602,7 +5602,7 @@ def test_patch_packet_mirroring_rule_rest_required_fields( response = client.patch_packet_mirroring_rule(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5823,7 +5823,7 @@ def test_patch_packet_mirroring_rule_unary_rest_required_fields( response = client.patch_packet_mirroring_rule_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6041,7 +6041,7 @@ def test_patch_rule_rest_required_fields( response = client.patch_rule(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6257,7 +6257,7 @@ def test_patch_rule_unary_rest_required_fields( response = client.patch_rule_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6476,7 +6476,7 @@ def test_remove_association_rest_required_fields( response = client.remove_association(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6688,7 +6688,7 @@ def test_remove_association_unary_rest_required_fields( response = client.remove_association_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6901,7 +6901,7 @@ def test_remove_packet_mirroring_rule_rest_required_fields( response = client.remove_packet_mirroring_rule(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -7114,7 +7114,7 @@ def test_remove_packet_mirroring_rule_unary_rest_required_fields( response = client.remove_packet_mirroring_rule_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -7324,7 +7324,7 @@ def test_remove_rule_rest_required_fields( response = client.remove_rule(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -7532,7 +7532,7 @@ def test_remove_rule_unary_rest_required_fields( response = client.remove_rule_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -7730,7 +7730,7 @@ def test_set_iam_policy_rest_required_fields( response = client.set_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -7934,7 +7934,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_network_profiles.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_network_profiles.py index 4895e80b2619..ea4ded9438c5 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_network_profiles.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_network_profiles.py @@ -1067,7 +1067,7 @@ def test_get_rest_required_fields(request_type=compute.GetNetworkProfileRequest) response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1263,7 +1263,7 @@ def test_list_rest_required_fields(request_type=compute.ListNetworkProfilesReque response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_networks.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_networks.py index 8b659d6be9db..fc7853fe143d 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_networks.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_networks.py @@ -1033,7 +1033,7 @@ def test_add_peering_rest_required_fields( response = client.add_peering(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1239,7 +1239,7 @@ def test_add_peering_unary_rest_required_fields( response = client.add_peering_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1442,7 +1442,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteNetworkRequest): response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1638,7 +1638,7 @@ def test_delete_unary_rest_required_fields(request_type=compute.DeleteNetworkReq response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1828,7 +1828,7 @@ def test_get_rest_required_fields(request_type=compute.GetNetworkRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2027,7 +2027,7 @@ def test_get_effective_firewalls_rest_required_fields( response = client.get_effective_firewalls(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2220,7 +2220,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertNetworkRequest): response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2412,7 +2412,7 @@ def test_insert_unary_rest_required_fields(request_type=compute.InsertNetworkReq response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2607,7 +2607,7 @@ def test_list_rest_required_fields(request_type=compute.ListNetworksRequest): response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2877,7 +2877,7 @@ def test_list_peering_routes_rest_required_fields( response = client.list_peering_routes(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3148,7 +3148,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchNetworkRequest): response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3348,7 +3348,7 @@ def test_patch_unary_rest_required_fields(request_type=compute.PatchNetworkReque response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3550,7 +3550,7 @@ def test_remove_peering_rest_required_fields( response = client.remove_peering(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3756,7 +3756,7 @@ def test_remove_peering_unary_rest_required_fields( response = client.remove_peering_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3967,7 +3967,7 @@ def test_request_remove_peering_rest_required_fields( response = client.request_remove_peering(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4178,7 +4178,7 @@ def test_request_remove_peering_unary_rest_required_fields( response = client.request_remove_peering_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4388,7 +4388,7 @@ def test_switch_to_custom_mode_rest_required_fields( response = client.switch_to_custom_mode(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4591,7 +4591,7 @@ def test_switch_to_custom_mode_unary_rest_required_fields( response = client.switch_to_custom_mode_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4790,7 +4790,7 @@ def test_update_peering_rest_required_fields( response = client.update_peering(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4996,7 +4996,7 @@ def test_update_peering_unary_rest_required_fields( response = client.update_peering_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_node_groups.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_node_groups.py index d1ab5365f9a6..3c720e015040 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_node_groups.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_node_groups.py @@ -1046,7 +1046,7 @@ def test_add_nodes_rest_required_fields(request_type=compute.AddNodesNodeGroupRe response = client.add_nodes(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1263,7 +1263,7 @@ def test_add_nodes_unary_rest_required_fields( response = client.add_nodes_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1477,7 +1477,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1750,7 +1750,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteNodeGroupRequest response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1957,7 +1957,7 @@ def test_delete_unary_rest_required_fields(request_type=compute.DeleteNodeGroupR response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2167,7 +2167,7 @@ def test_delete_nodes_rest_required_fields( response = client.delete_nodes(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2384,7 +2384,7 @@ def test_delete_nodes_unary_rest_required_fields( response = client.delete_nodes_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2592,7 +2592,7 @@ def test_get_rest_required_fields(request_type=compute.GetNodeGroupRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2797,7 +2797,7 @@ def test_get_iam_policy_rest_required_fields( response = client.get_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3018,6 +3018,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertNodeGroupRequest "initialNodeCount", str(0), ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3247,6 +3248,7 @@ def test_insert_unary_rest_required_fields(request_type=compute.InsertNodeGroupR "initialNodeCount", str(0), ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3462,7 +3464,7 @@ def test_list_rest_required_fields(request_type=compute.ListNodeGroupsRequest): response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3737,7 +3739,7 @@ def test_list_nodes_rest_required_fields( response = client.list_nodes(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4018,7 +4020,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchNodeGroupRequest): response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4233,7 +4235,7 @@ def test_patch_unary_rest_required_fields(request_type=compute.PatchNodeGroupReq response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4454,7 +4456,7 @@ def test_perform_maintenance_rest_required_fields( response = client.perform_maintenance(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4675,7 +4677,7 @@ def test_perform_maintenance_unary_rest_required_fields( response = client.perform_maintenance_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4886,7 +4888,7 @@ def test_set_iam_policy_rest_required_fields( response = client.set_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5105,7 +5107,7 @@ def test_set_node_template_rest_required_fields( response = client.set_node_template(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5324,7 +5326,7 @@ def test_set_node_template_unary_rest_required_fields( response = client.set_node_template_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5546,7 +5548,7 @@ def test_simulate_maintenance_event_rest_required_fields( response = client.simulate_maintenance_event(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5768,7 +5770,7 @@ def test_simulate_maintenance_event_unary_rest_required_fields( response = client.simulate_maintenance_event_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5983,7 +5985,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_node_templates.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_node_templates.py index cf6410f17daf..ac01bfdd2377 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_node_templates.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_node_templates.py @@ -1066,7 +1066,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1344,7 +1344,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteNodeTemplateRequ response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1553,7 +1553,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1754,7 +1754,7 @@ def test_get_rest_required_fields(request_type=compute.GetNodeTemplateRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1959,7 +1959,7 @@ def test_get_iam_policy_rest_required_fields( response = client.get_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2163,7 +2163,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertNodeTemplateRequ response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2369,7 +2369,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2576,7 +2576,7 @@ def test_list_rest_required_fields(request_type=compute.ListNodeTemplatesRequest response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2842,7 +2842,7 @@ def test_set_iam_policy_rest_required_fields( response = client.set_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3057,7 +3057,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_node_types.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_node_types.py index 6ddf504f6b8a..182b4d73ca9d 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_node_types.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_node_types.py @@ -1036,7 +1036,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1303,7 +1303,7 @@ def test_get_rest_required_fields(request_type=compute.GetNodeTypeRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1510,7 +1510,7 @@ def test_list_rest_required_fields(request_type=compute.ListNodeTypesRequest): response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_packet_mirrorings.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_packet_mirrorings.py index aee79b292cc5..cc19f54f9a09 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_packet_mirrorings.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_packet_mirrorings.py @@ -1090,7 +1090,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1368,7 +1368,7 @@ def test_delete_rest_required_fields(request_type=compute.DeletePacketMirroringR response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1577,7 +1577,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1778,7 +1778,7 @@ def test_get_rest_required_fields(request_type=compute.GetPacketMirroringRequest response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1982,7 +1982,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertPacketMirroringR response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2192,7 +2192,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2403,7 +2403,7 @@ def test_list_rest_required_fields(request_type=compute.ListPacketMirroringsRequ response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2673,7 +2673,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchPacketMirroringReq response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2894,7 +2894,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3113,7 +3113,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_projects.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_projects.py index ed8a7e59adbd..0709bf4e6e53 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_projects.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_projects.py @@ -1030,7 +1030,7 @@ def test_disable_xpn_host_rest_required_fields( response = client.disable_xpn_host(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1215,7 +1215,7 @@ def test_disable_xpn_host_unary_rest_required_fields( response = client.disable_xpn_host_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1403,7 +1403,7 @@ def test_disable_xpn_resource_rest_required_fields( response = client.disable_xpn_resource(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1606,7 +1606,7 @@ def test_disable_xpn_resource_unary_rest_required_fields( response = client.disable_xpn_resource_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1804,7 +1804,7 @@ def test_enable_xpn_host_rest_required_fields( response = client.enable_xpn_host(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1987,7 +1987,7 @@ def test_enable_xpn_host_unary_rest_required_fields( response = client.enable_xpn_host_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2175,7 +2175,7 @@ def test_enable_xpn_resource_rest_required_fields( response = client.enable_xpn_resource(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2378,7 +2378,7 @@ def test_enable_xpn_resource_unary_rest_required_fields( response = client.enable_xpn_resource_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2568,7 +2568,7 @@ def test_get_rest_required_fields(request_type=compute.GetProjectRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2744,7 +2744,7 @@ def test_get_xpn_host_rest_required_fields( response = client.get_xpn_host(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2933,7 +2933,7 @@ def test_get_xpn_resources_rest_required_fields( response = client.get_xpn_resources(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3193,7 +3193,7 @@ def test_list_xpn_hosts_rest_required_fields( response = client.list_xpn_hosts(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3461,7 +3461,7 @@ def test_move_disk_rest_required_fields(request_type=compute.MoveDiskProjectRequ response = client.move_disk(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3659,7 +3659,7 @@ def test_move_disk_unary_rest_required_fields( response = client.move_disk_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3857,7 +3857,7 @@ def test_move_instance_rest_required_fields( response = client.move_instance(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4055,7 +4055,7 @@ def test_move_instance_unary_rest_required_fields( response = client.move_instance_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4257,7 +4257,7 @@ def test_set_cloud_armor_tier_rest_required_fields( response = client.set_cloud_armor_tier(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4460,7 +4460,7 @@ def test_set_cloud_armor_tier_unary_rest_required_fields( response = client.set_cloud_armor_tier_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4664,7 +4664,7 @@ def test_set_common_instance_metadata_rest_required_fields( response = client.set_common_instance_metadata(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4864,7 +4864,7 @@ def test_set_common_instance_metadata_unary_rest_required_fields( response = client.set_common_instance_metadata_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5066,7 +5066,7 @@ def test_set_default_network_tier_rest_required_fields( response = client.set_default_network_tier(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5270,7 +5270,7 @@ def test_set_default_network_tier_unary_rest_required_fields( response = client.set_default_network_tier_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5474,7 +5474,7 @@ def test_set_usage_export_bucket_rest_required_fields( response = client.set_usage_export_bucket(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5678,7 +5678,7 @@ def test_set_usage_export_bucket_unary_rest_required_fields( response = client.set_usage_export_bucket_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_public_advertised_prefixes.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_public_advertised_prefixes.py index 59f1c4c8dc61..30140719d5bf 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_public_advertised_prefixes.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_public_advertised_prefixes.py @@ -1120,7 +1120,7 @@ def test_announce_rest_required_fields( response = client.announce(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1320,7 +1320,7 @@ def test_announce_unary_rest_required_fields( response = client.announce_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1520,7 +1520,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1720,7 +1720,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1914,7 +1914,7 @@ def test_get_rest_required_fields( response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2109,7 +2109,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2308,7 +2308,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2510,7 +2510,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2775,7 +2775,7 @@ def test_patch_rest_required_fields( response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2983,7 +2983,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3190,7 +3190,7 @@ def test_withdraw_rest_required_fields( response = client.withdraw(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3390,7 +3390,7 @@ def test_withdraw_unary_rest_required_fields( response = client.withdraw_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_public_delegated_prefixes.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_public_delegated_prefixes.py index 837832d7a94e..cf04e7d02e2d 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_public_delegated_prefixes.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_public_delegated_prefixes.py @@ -1116,7 +1116,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1396,7 +1396,7 @@ def test_announce_rest_required_fields( response = client.announce(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1605,7 +1605,7 @@ def test_announce_unary_rest_required_fields( response = client.announce_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1814,7 +1814,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2023,7 +2023,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2226,7 +2226,7 @@ def test_get_rest_required_fields( response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2432,7 +2432,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2638,7 +2638,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2847,7 +2847,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3119,7 +3119,7 @@ def test_patch_rest_required_fields( response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3336,7 +3336,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3552,7 +3552,7 @@ def test_withdraw_rest_required_fields( response = client.withdraw(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3761,7 +3761,7 @@ def test_withdraw_unary_rest_required_fields( response = client.withdraw_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_autoscalers.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_autoscalers.py index fa33f89803e7..d0c000ee2cfd 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_autoscalers.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_autoscalers.py @@ -1100,7 +1100,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1309,7 +1309,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1510,7 +1510,7 @@ def test_get_rest_required_fields(request_type=compute.GetRegionAutoscalerReques response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1716,7 +1716,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1922,7 +1922,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2129,7 +2129,7 @@ def test_list_rest_required_fields(request_type=compute.ListRegionAutoscalersReq response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2400,7 +2400,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchRegionAutoscalerRe response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2616,7 +2616,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2832,7 +2832,7 @@ def test_update_rest_required_fields( response = client.update(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3048,7 +3048,7 @@ def test_update_unary_rest_required_fields( response = client.update_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_backend_services.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_backend_services.py index d90b0c381fd5..5846f7f81569 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_backend_services.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_backend_services.py @@ -1116,7 +1116,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1325,7 +1325,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1526,7 +1526,7 @@ def test_get_rest_required_fields(request_type=compute.GetRegionBackendServiceRe response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1730,7 +1730,7 @@ def test_get_health_rest_required_fields( response = client.get_health(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1942,7 +1942,7 @@ def test_get_iam_policy_rest_required_fields( response = client.get_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2148,7 +2148,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2354,7 +2354,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2563,7 +2563,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2834,7 +2834,7 @@ def test_list_usable_rest_required_fields( response = client.list_usable(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3106,7 +3106,7 @@ def test_patch_rest_required_fields( response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3323,7 +3323,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3534,7 +3534,7 @@ def test_set_iam_policy_rest_required_fields( response = client.set_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3755,7 +3755,7 @@ def test_set_security_policy_rest_required_fields( response = client.set_security_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3976,7 +3976,7 @@ def test_set_security_policy_unary_rest_required_fields( response = client.set_security_policy_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4191,7 +4191,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4408,7 +4408,7 @@ def test_update_rest_required_fields( response = client.update(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4625,7 +4625,7 @@ def test_update_unary_rest_required_fields( response = client.update_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_commitments.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_commitments.py index 2f6573f0ca3a..fa3fc2daf6ed 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_commitments.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_commitments.py @@ -1098,7 +1098,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1368,7 +1368,7 @@ def test_get_rest_required_fields(request_type=compute.GetRegionCommitmentReques response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1574,7 +1574,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1776,7 +1776,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1979,7 +1979,7 @@ def test_list_rest_required_fields(request_type=compute.ListRegionCommitmentsReq response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2257,7 +2257,7 @@ def test_update_rest_required_fields( response = client.update(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2482,7 +2482,7 @@ def test_update_unary_rest_required_fields( response = client.update_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_disk_types.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_disk_types.py index 45af952e5369..2c8ff053b99b 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_disk_types.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_disk_types.py @@ -1071,7 +1071,7 @@ def test_get_rest_required_fields(request_type=compute.GetRegionDiskTypeRequest) response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1278,7 +1278,7 @@ def test_list_rest_required_fields(request_type=compute.ListRegionDiskTypesReque response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_disks.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_disks.py index ea653eca53f0..a689b628f619 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_disks.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_disks.py @@ -1057,7 +1057,7 @@ def test_add_resource_policies_rest_required_fields( response = client.add_resource_policies(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1275,7 +1275,7 @@ def test_add_resource_policies_unary_rest_required_fields( response = client.add_resource_policies_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1484,7 +1484,7 @@ def test_bulk_insert_rest_required_fields( response = client.bulk_insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1690,7 +1690,7 @@ def test_bulk_insert_unary_rest_required_fields( response = client.bulk_insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1900,7 +1900,7 @@ def test_create_snapshot_rest_required_fields( response = client.create_snapshot(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2109,7 +2109,7 @@ def test_create_snapshot_unary_rest_required_fields( response = client.create_snapshot_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2315,7 +2315,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteRegionDiskReques response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2520,7 +2520,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2717,7 +2717,7 @@ def test_get_rest_required_fields(request_type=compute.GetRegionDiskRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2918,7 +2918,7 @@ def test_get_iam_policy_rest_required_fields( response = client.get_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3127,7 +3127,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertRegionDiskReques response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3339,7 +3339,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3547,7 +3547,7 @@ def test_list_rest_required_fields(request_type=compute.ListRegionDisksRequest): response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3824,7 +3824,7 @@ def test_remove_resource_policies_rest_required_fields( response = client.remove_resource_policies(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4042,7 +4042,7 @@ def test_remove_resource_policies_unary_rest_required_fields( response = client.remove_resource_policies_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4253,7 +4253,7 @@ def test_resize_rest_required_fields(request_type=compute.ResizeRegionDiskReques response = client.resize(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4466,7 +4466,7 @@ def test_resize_unary_rest_required_fields( response = client.resize_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4673,7 +4673,7 @@ def test_set_iam_policy_rest_required_fields( response = client.set_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4890,7 +4890,7 @@ def test_set_labels_rest_required_fields( response = client.set_labels(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5107,7 +5107,7 @@ def test_set_labels_unary_rest_required_fields( response = client.set_labels_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5329,7 +5329,7 @@ def test_start_async_replication_rest_required_fields( response = client.start_async_replication(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5547,7 +5547,7 @@ def test_start_async_replication_unary_rest_required_fields( response = client.start_async_replication_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5764,7 +5764,7 @@ def test_stop_async_replication_rest_required_fields( response = client.stop_async_replication(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5974,7 +5974,7 @@ def test_stop_async_replication_unary_rest_required_fields( response = client.stop_async_replication_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6181,7 +6181,7 @@ def test_stop_group_async_replication_rest_required_fields( response = client.stop_group_async_replication(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6392,7 +6392,7 @@ def test_stop_group_async_replication_unary_rest_required_fields( response = client.stop_group_async_replication_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6602,7 +6602,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6823,7 +6823,7 @@ def test_update_rest_required_fields(request_type=compute.UpdateRegionDiskReques response = client.update(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -7044,7 +7044,7 @@ def test_update_unary_rest_required_fields( response = client.update_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_health_check_services.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_health_check_services.py index c357ffd14f75..5c82c6152cc3 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_health_check_services.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_health_check_services.py @@ -1128,7 +1128,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1337,7 +1337,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1540,7 +1540,7 @@ def test_get_rest_required_fields( response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1746,7 +1746,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1952,7 +1952,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2161,7 +2161,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2433,7 +2433,7 @@ def test_patch_rest_required_fields( response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2650,7 +2650,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_health_checks.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_health_checks.py index 157f6a7f2272..380ab16e9c44 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_health_checks.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_health_checks.py @@ -1104,7 +1104,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1313,7 +1313,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1514,7 +1514,7 @@ def test_get_rest_required_fields(request_type=compute.GetRegionHealthCheckReque response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1720,7 +1720,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1922,7 +1922,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2125,7 +2125,7 @@ def test_list_rest_required_fields(request_type=compute.ListRegionHealthChecksRe response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2395,7 +2395,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchRegionHealthCheckR response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2608,7 +2608,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2821,7 +2821,7 @@ def test_update_rest_required_fields( response = client.update(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3034,7 +3034,7 @@ def test_update_unary_rest_required_fields( response = client.update_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_instance_group_managers.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_instance_group_managers.py index 9432484397ee..6500bd8533cf 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_instance_group_managers.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_instance_group_managers.py @@ -1135,7 +1135,7 @@ def test_abandon_instances_rest_required_fields( response = client.abandon_instances(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1354,7 +1354,7 @@ def test_abandon_instances_unary_rest_required_fields( response = client.abandon_instances_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1574,7 +1574,7 @@ def test_apply_updates_to_instances_rest_required_fields( response = client.apply_updates_to_instances(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1794,7 +1794,7 @@ def test_apply_updates_to_instances_unary_rest_required_fields( response = client.apply_updates_to_instances_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2013,7 +2013,7 @@ def test_create_instances_rest_required_fields( response = client.create_instances(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2232,7 +2232,7 @@ def test_create_instances_unary_rest_required_fields( response = client.create_instances_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2448,7 +2448,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2657,7 +2657,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2869,7 +2869,7 @@ def test_delete_instances_rest_required_fields( response = client.delete_instances(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3088,7 +3088,7 @@ def test_delete_instances_unary_rest_required_fields( response = client.delete_instances_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3308,7 +3308,7 @@ def test_delete_per_instance_configs_rest_required_fields( response = client.delete_per_instance_configs(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3528,7 +3528,7 @@ def test_delete_per_instance_configs_unary_rest_required_fields( response = client.delete_per_instance_configs_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3740,7 +3740,7 @@ def test_get_rest_required_fields( response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3946,7 +3946,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4160,7 +4160,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4377,7 +4377,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4656,7 +4656,7 @@ def test_list_errors_rest_required_fields( response = client.list_errors(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4954,7 +4954,7 @@ def test_list_managed_instances_rest_required_fields( response = client.list_managed_instances(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5254,7 +5254,7 @@ def test_list_per_instance_configs_rest_required_fields( response = client.list_per_instance_configs(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5542,7 +5542,7 @@ def test_patch_rest_required_fields( response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5767,7 +5767,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5997,7 +5997,7 @@ def test_patch_per_instance_configs_rest_required_fields( response = client.patch_per_instance_configs(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6223,7 +6223,7 @@ def test_patch_per_instance_configs_unary_rest_required_fields( response = client.patch_per_instance_configs_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6448,7 +6448,7 @@ def test_recreate_instances_rest_required_fields( response = client.recreate_instances(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6669,7 +6669,7 @@ def test_recreate_instances_unary_rest_required_fields( response = client.recreate_instances_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6902,6 +6902,7 @@ def test_resize_rest_required_fields( "size", str(0), ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -7136,6 +7137,7 @@ def test_resize_unary_rest_required_fields( "size", str(0), ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -7356,7 +7358,7 @@ def test_resume_instances_rest_required_fields( response = client.resume_instances(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -7575,7 +7577,7 @@ def test_resume_instances_unary_rest_required_fields( response = client.resume_instances_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -7797,7 +7799,7 @@ def test_set_instance_template_rest_required_fields( response = client.set_instance_template(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -8019,7 +8021,7 @@ def test_set_instance_template_unary_rest_required_fields( response = client.set_instance_template_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -8238,7 +8240,7 @@ def test_set_target_pools_rest_required_fields( response = client.set_target_pools(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -8457,7 +8459,7 @@ def test_set_target_pools_unary_rest_required_fields( response = client.set_target_pools_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -8674,7 +8676,7 @@ def test_start_instances_rest_required_fields( response = client.start_instances(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -8891,7 +8893,7 @@ def test_start_instances_unary_rest_required_fields( response = client.start_instances_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -9108,7 +9110,7 @@ def test_stop_instances_rest_required_fields( response = client.stop_instances(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -9325,7 +9327,7 @@ def test_stop_instances_unary_rest_required_fields( response = client.stop_instances_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -9544,7 +9546,7 @@ def test_suspend_instances_rest_required_fields( response = client.suspend_instances(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -9763,7 +9765,7 @@ def test_suspend_instances_unary_rest_required_fields( response = client.suspend_instances_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -9985,7 +9987,7 @@ def test_update_per_instance_configs_rest_required_fields( response = client.update_per_instance_configs(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -10211,7 +10213,7 @@ def test_update_per_instance_configs_unary_rest_required_fields( response = client.update_per_instance_configs_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_instance_groups.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_instance_groups.py index 53ed5d4d2e57..0cc185fd45ce 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_instance_groups.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_instance_groups.py @@ -1106,7 +1106,7 @@ def test_get_rest_required_fields(request_type=compute.GetRegionInstanceGroupReq response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1315,7 +1315,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1591,7 +1591,7 @@ def test_list_instances_rest_required_fields( response = client.list_instances(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1888,7 +1888,7 @@ def test_set_named_ports_rest_required_fields( response = client.set_named_ports(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2105,7 +2105,7 @@ def test_set_named_ports_unary_rest_required_fields( response = client.set_named_ports_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2320,7 +2320,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_instance_templates.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_instance_templates.py index 0239c9188c95..f0225e9089b2 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_instance_templates.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_instance_templates.py @@ -1118,7 +1118,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1327,7 +1327,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1530,7 +1530,7 @@ def test_get_rest_required_fields( response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1736,7 +1736,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1942,7 +1942,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2151,7 +2151,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_instances.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_instances.py index 993a6fb87598..df64e3a4e7b5 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_instances.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_instances.py @@ -1082,7 +1082,7 @@ def test_bulk_insert_rest_required_fields( response = client.bulk_insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1288,7 +1288,7 @@ def test_bulk_insert_unary_rest_required_fields( response = client.bulk_insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_instant_snapshots.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_instant_snapshots.py index aa11bd51c380..6486c2e2f874 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_instant_snapshots.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_instant_snapshots.py @@ -1118,7 +1118,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1327,7 +1327,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1528,7 +1528,7 @@ def test_get_rest_required_fields(request_type=compute.GetRegionInstantSnapshotR response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1733,7 +1733,7 @@ def test_get_iam_policy_rest_required_fields( response = client.get_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1939,7 +1939,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2145,7 +2145,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2354,7 +2354,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2620,7 +2620,7 @@ def test_set_iam_policy_rest_required_fields( response = client.set_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2837,7 +2837,7 @@ def test_set_labels_rest_required_fields( response = client.set_labels(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3054,7 +3054,7 @@ def test_set_labels_unary_rest_required_fields( response = client.set_labels_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3269,7 +3269,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_network_endpoint_groups.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_network_endpoint_groups.py index f38ae357e3f0..ad7ebf248938 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_network_endpoint_groups.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_network_endpoint_groups.py @@ -1138,7 +1138,7 @@ def test_attach_network_endpoints_rest_required_fields( response = client.attach_network_endpoints(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1364,7 +1364,7 @@ def test_attach_network_endpoints_unary_rest_required_fields( response = client.attach_network_endpoints_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1584,7 +1584,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1793,7 +1793,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2008,7 +2008,7 @@ def test_detach_network_endpoints_rest_required_fields( response = client.detach_network_endpoints(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2234,7 +2234,7 @@ def test_detach_network_endpoints_unary_rest_required_fields( response = client.detach_network_endpoints_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2448,7 +2448,7 @@ def test_get_rest_required_fields( response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2654,7 +2654,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2860,7 +2860,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3069,7 +3069,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3351,7 +3351,7 @@ def test_list_network_endpoints_rest_required_fields( response = client.list_network_endpoints(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_network_firewall_policies.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_network_firewall_policies.py index be049aadf98c..6acff7356656 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_network_firewall_policies.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_network_firewall_policies.py @@ -1144,7 +1144,7 @@ def test_add_association_rest_required_fields( response = client.add_association(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1371,7 +1371,7 @@ def test_add_association_unary_rest_required_fields( response = client.add_association_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1599,7 +1599,7 @@ def test_add_rule_rest_required_fields( response = client.add_rule(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1828,7 +1828,7 @@ def test_add_rule_unary_rest_required_fields( response = client.add_rule_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2055,7 +2055,7 @@ def test_clone_rules_rest_required_fields( response = client.clone_rules(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2274,7 +2274,7 @@ def test_clone_rules_unary_rest_required_fields( response = client.clone_rules_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2488,7 +2488,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2697,7 +2697,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2900,7 +2900,7 @@ def test_get_rest_required_fields( response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3105,7 +3105,7 @@ def test_get_association_rest_required_fields( response = client.get_association(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3327,6 +3327,7 @@ def test_get_effective_firewalls_rest_required_fields( "network", "", ), + ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3534,7 +3535,7 @@ def test_get_iam_policy_rest_required_fields( response = client.get_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3739,7 +3740,7 @@ def test_get_rule_rest_required_fields( response = client.get_rule(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3945,7 +3946,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4159,7 +4160,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4376,7 +4377,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4648,7 +4649,7 @@ def test_patch_rest_required_fields( response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4873,7 +4874,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5103,7 +5104,7 @@ def test_patch_rule_rest_required_fields( response = client.patch_rule(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5330,7 +5331,7 @@ def test_patch_rule_unary_rest_required_fields( response = client.patch_rule_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5560,7 +5561,7 @@ def test_remove_association_rest_required_fields( response = client.remove_association(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5783,7 +5784,7 @@ def test_remove_association_unary_rest_required_fields( response = client.remove_association_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6002,7 +6003,7 @@ def test_remove_rule_rest_required_fields( response = client.remove_rule(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6221,7 +6222,7 @@ def test_remove_rule_unary_rest_required_fields( response = client.remove_rule_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6430,7 +6431,7 @@ def test_set_iam_policy_rest_required_fields( response = client.set_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6645,7 +6646,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_notification_endpoints.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_notification_endpoints.py index 348793784b40..cad1ae5945be 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_notification_endpoints.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_notification_endpoints.py @@ -1132,7 +1132,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1341,7 +1341,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1544,7 +1544,7 @@ def test_get_rest_required_fields( response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1750,7 +1750,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1956,7 +1956,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2165,7 +2165,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_operations.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_operations.py index 023362f10dc5..6385191181fc 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_operations.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_operations.py @@ -1077,7 +1077,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteRegionOperationR response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1278,7 +1278,7 @@ def test_get_rest_required_fields(request_type=compute.GetRegionOperationRequest response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1485,7 +1485,7 @@ def test_list_rest_required_fields(request_type=compute.ListRegionOperationsRequ response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1748,7 +1748,7 @@ def test_wait_rest_required_fields(request_type=compute.WaitRegionOperationReque response = client.wait(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_security_policies.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_security_policies.py index dfb6cfdbfdb3..b9797f88a541 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_security_policies.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_security_policies.py @@ -1119,7 +1119,7 @@ def test_add_rule_rest_required_fields( response = client.add_rule(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1336,7 +1336,7 @@ def test_add_rule_unary_rest_required_fields( response = client.add_rule_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1552,7 +1552,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1761,7 +1761,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1962,7 +1962,7 @@ def test_get_rest_required_fields(request_type=compute.GetRegionSecurityPolicyRe response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2167,7 +2167,7 @@ def test_get_rule_rest_required_fields( response = client.get_rule(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2378,7 +2378,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2602,7 +2602,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2824,7 +2824,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3101,7 +3101,7 @@ def test_patch_rest_required_fields( response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3336,7 +3336,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3572,7 +3572,7 @@ def test_patch_rule_rest_required_fields( response = client.patch_rule(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3801,7 +3801,7 @@ def test_patch_rule_unary_rest_required_fields( response = client.patch_rule_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4023,7 +4023,7 @@ def test_remove_rule_rest_required_fields( response = client.remove_rule(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4232,7 +4232,7 @@ def test_remove_rule_unary_rest_required_fields( response = client.remove_rule_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4442,7 +4442,7 @@ def test_set_labels_rest_required_fields( response = client.set_labels(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4659,7 +4659,7 @@ def test_set_labels_unary_rest_required_fields( response = client.set_labels_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_ssl_certificates.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_ssl_certificates.py index dfde81ea778e..f4bf6d7b187c 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_ssl_certificates.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_ssl_certificates.py @@ -1116,7 +1116,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1325,7 +1325,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1526,7 +1526,7 @@ def test_get_rest_required_fields(request_type=compute.GetRegionSslCertificateRe response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1732,7 +1732,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1938,7 +1938,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2147,7 +2147,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_ssl_policies.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_ssl_policies.py index 6275f62332f0..a07009441a4d 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_ssl_policies.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_ssl_policies.py @@ -1098,7 +1098,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteRegionSslPolicyR response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1307,7 +1307,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1508,7 +1508,7 @@ def test_get_rest_required_fields(request_type=compute.GetRegionSslPolicyRequest response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1712,7 +1712,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertRegionSslPolicyR response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1918,7 +1918,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2125,7 +2125,7 @@ def test_list_rest_required_fields(request_type=compute.ListRegionSslPoliciesReq response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2403,7 +2403,7 @@ def test_list_available_features_rest_required_fields( response = client.list_available_features(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2612,7 +2612,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchRegionSslPolicyReq response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2829,7 +2829,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_target_http_proxies.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_target_http_proxies.py index fac8219aa7d2..3c609c1eca16 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_target_http_proxies.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_target_http_proxies.py @@ -1118,7 +1118,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1327,7 +1327,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1528,7 +1528,7 @@ def test_get_rest_required_fields(request_type=compute.GetRegionTargetHttpProxyR response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1734,7 +1734,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1940,7 +1940,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2149,7 +2149,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2421,7 +2421,7 @@ def test_set_url_map_rest_required_fields( response = client.set_url_map(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2634,7 +2634,7 @@ def test_set_url_map_unary_rest_required_fields( response = client.set_url_map_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_target_https_proxies.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_target_https_proxies.py index 8eff771554e2..1deef3fc5e24 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_target_https_proxies.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_target_https_proxies.py @@ -1122,7 +1122,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1331,7 +1331,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1534,7 +1534,7 @@ def test_get_rest_required_fields( response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1740,7 +1740,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1946,7 +1946,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2155,7 +2155,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2427,7 +2427,7 @@ def test_patch_rest_required_fields( response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2644,7 +2644,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2865,7 +2865,7 @@ def test_set_ssl_certificates_rest_required_fields( response = client.set_ssl_certificates(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3086,7 +3086,7 @@ def test_set_ssl_certificates_unary_rest_required_fields( response = client.set_ssl_certificates_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3303,7 +3303,7 @@ def test_set_url_map_rest_required_fields( response = client.set_url_map(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3516,7 +3516,7 @@ def test_set_url_map_unary_rest_required_fields( response = client.set_url_map_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_target_tcp_proxies.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_target_tcp_proxies.py index 57814b361f96..9bf419f462c5 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_target_tcp_proxies.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_target_tcp_proxies.py @@ -1118,7 +1118,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1327,7 +1327,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1528,7 +1528,7 @@ def test_get_rest_required_fields(request_type=compute.GetRegionTargetTcpProxyRe response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1734,7 +1734,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1940,7 +1940,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2149,7 +2149,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_url_maps.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_url_maps.py index cc717f2df094..1f977233c646 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_url_maps.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_url_maps.py @@ -1066,7 +1066,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteRegionUrlMapRequ response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1275,7 +1275,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1476,7 +1476,7 @@ def test_get_rest_required_fields(request_type=compute.GetRegionUrlMapRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1680,7 +1680,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertRegionUrlMapRequ response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1886,7 +1886,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2093,7 +2093,7 @@ def test_list_rest_required_fields(request_type=compute.ListRegionUrlMapsRequest response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2363,7 +2363,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchRegionUrlMapReques response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2580,7 +2580,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2795,7 +2795,7 @@ def test_update_rest_required_fields(request_type=compute.UpdateRegionUrlMapRequ response = client.update(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3012,7 +3012,7 @@ def test_update_unary_rest_required_fields( response = client.update_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3223,7 +3223,7 @@ def test_validate_rest_required_fields( response = client.validate(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3781,7 +3781,10 @@ def test_insert_rest_call_success(request_type): }, }, "max_stream_duration": {}, - "request_mirror_policy": {"backend_service": "backend_service_value"}, + "request_mirror_policy": { + "backend_service": "backend_service_value", + "mirror_percent": 0.1515, + }, "retry_policy": { "num_retries": 1197, "per_try_timeout": {}, @@ -4333,7 +4336,10 @@ def test_patch_rest_call_success(request_type): }, }, "max_stream_duration": {}, - "request_mirror_policy": {"backend_service": "backend_service_value"}, + "request_mirror_policy": { + "backend_service": "backend_service_value", + "mirror_percent": 0.1515, + }, "retry_policy": { "num_retries": 1197, "per_try_timeout": {}, @@ -4754,7 +4760,10 @@ def test_update_rest_call_success(request_type): }, }, "max_stream_duration": {}, - "request_mirror_policy": {"backend_service": "backend_service_value"}, + "request_mirror_policy": { + "backend_service": "backend_service_value", + "mirror_percent": 0.1515, + }, "retry_policy": { "num_retries": 1197, "per_try_timeout": {}, @@ -5179,7 +5188,10 @@ def test_validate_rest_call_success(request_type): }, }, "max_stream_duration": {}, - "request_mirror_policy": {"backend_service": "backend_service_value"}, + "request_mirror_policy": { + "backend_service": "backend_service_value", + "mirror_percent": 0.1515, + }, "retry_policy": { "num_retries": 1197, "per_try_timeout": {}, diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_zones.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_zones.py index 04ef50438f76..b64e4866689f 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_zones.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_zones.py @@ -1042,7 +1042,7 @@ def test_list_rest_required_fields(request_type=compute.ListRegionZonesRequest): response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_regions.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_regions.py index 391e27d6d85b..590b1cd39c29 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_regions.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_regions.py @@ -1008,7 +1008,7 @@ def test_get_rest_required_fields(request_type=compute.GetRegionRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1204,7 +1204,7 @@ def test_list_rest_required_fields(request_type=compute.ListRegionsRequest): response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_reservation_blocks.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_reservation_blocks.py index dc96347275d7..98636fdba0d7 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_reservation_blocks.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_reservation_blocks.py @@ -1098,7 +1098,7 @@ def test_get_rest_required_fields(request_type=compute.GetReservationBlockReques response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1313,7 +1313,7 @@ def test_list_rest_required_fields(request_type=compute.ListReservationBlocksReq response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1606,7 +1606,7 @@ def test_perform_maintenance_rest_required_fields( response = client.perform_maintenance(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1835,7 +1835,7 @@ def test_perform_maintenance_unary_rest_required_fields( response = client.perform_maintenance_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_reservation_sub_blocks.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_reservation_sub_blocks.py index f79af8cce967..b51acaaf2220 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_reservation_sub_blocks.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_reservation_sub_blocks.py @@ -1110,7 +1110,7 @@ def test_get_rest_required_fields(request_type=compute.GetReservationSubBlockReq response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1327,7 +1327,7 @@ def test_list_rest_required_fields( response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1619,7 +1619,7 @@ def test_perform_maintenance_rest_required_fields( response = client.perform_maintenance(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1840,7 +1840,7 @@ def test_perform_maintenance_unary_rest_required_fields( response = client.perform_maintenance_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_reservations.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_reservations.py index aea9b0369bf7..73c45797ab02 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_reservations.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_reservations.py @@ -1053,7 +1053,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1329,7 +1329,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteReservationReque response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1538,7 +1538,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1739,7 +1739,7 @@ def test_get_rest_required_fields(request_type=compute.GetReservationRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1944,7 +1944,7 @@ def test_get_iam_policy_rest_required_fields( response = client.get_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2148,7 +2148,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertReservationReque response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2358,7 +2358,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2569,7 +2569,7 @@ def test_list_rest_required_fields(request_type=compute.ListReservationsRequest) response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2845,7 +2845,7 @@ def test_perform_maintenance_rest_required_fields( response = client.perform_maintenance(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3066,7 +3066,7 @@ def test_perform_maintenance_unary_rest_required_fields( response = client.perform_maintenance_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3281,7 +3281,7 @@ def test_resize_rest_required_fields(request_type=compute.ResizeReservationReque response = client.resize(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3498,7 +3498,7 @@ def test_resize_unary_rest_required_fields( response = client.resize_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3709,7 +3709,7 @@ def test_set_iam_policy_rest_required_fields( response = client.set_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3924,7 +3924,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4145,7 +4145,7 @@ def test_update_rest_required_fields(request_type=compute.UpdateReservationReque response = client.update(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4378,7 +4378,7 @@ def test_update_unary_rest_required_fields( response = client.update_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_resource_policies.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_resource_policies.py index 57bfd916925e..8f3a5f913bbf 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_resource_policies.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_resource_policies.py @@ -1090,7 +1090,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1368,7 +1368,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteResourcePolicyRe response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1577,7 +1577,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1778,7 +1778,7 @@ def test_get_rest_required_fields(request_type=compute.GetResourcePolicyRequest) response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1983,7 +1983,7 @@ def test_get_iam_policy_rest_required_fields( response = client.get_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2187,7 +2187,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertResourcePolicyRe response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2393,7 +2393,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2600,7 +2600,7 @@ def test_list_rest_required_fields(request_type=compute.ListResourcePoliciesRequ response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2875,7 +2875,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchResourcePolicyRequ response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3102,7 +3102,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3318,7 +3318,7 @@ def test_set_iam_policy_rest_required_fields( response = client.set_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3533,7 +3533,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_routers.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_routers.py index 5417f75137e0..ec7d404b730e 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_routers.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_routers.py @@ -1025,7 +1025,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1298,7 +1298,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteRouterRequest): response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1505,7 +1505,7 @@ def test_delete_unary_rest_required_fields(request_type=compute.DeleteRouterRequ response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1723,7 +1723,7 @@ def test_delete_route_policy_rest_required_fields( response = client.delete_route_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1946,7 +1946,7 @@ def test_delete_route_policy_unary_rest_required_fields( response = client.delete_route_policy_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2152,7 +2152,7 @@ def test_get_rest_required_fields(request_type=compute.GetRouterRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2357,7 +2357,7 @@ def test_get_nat_ip_info_rest_required_fields( response = client.get_nat_ip_info(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2575,7 +2575,7 @@ def test_get_nat_mapping_info_rest_required_fields( response = client.get_nat_mapping_info(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2856,7 +2856,7 @@ def test_get_route_policy_rest_required_fields( response = client.get_route_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3061,7 +3061,7 @@ def test_get_router_status_rest_required_fields( response = client.get_router_status(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3265,7 +3265,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertRouterRequest): response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3469,7 +3469,7 @@ def test_insert_unary_rest_required_fields(request_type=compute.InsertRouterRequ response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3676,7 +3676,7 @@ def test_list_rest_required_fields(request_type=compute.ListRoutersRequest): response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3956,7 +3956,7 @@ def test_list_bgp_routes_rest_required_fields( response = client.list_bgp_routes(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4251,7 +4251,7 @@ def test_list_route_policies_rest_required_fields( response = client.list_route_policies(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4532,7 +4532,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchRouterRequest): response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4747,7 +4747,7 @@ def test_patch_unary_rest_required_fields(request_type=compute.PatchRouterReques response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4968,7 +4968,7 @@ def test_patch_route_policy_rest_required_fields( response = client.patch_route_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5185,7 +5185,7 @@ def test_patch_route_policy_unary_rest_required_fields( response = client.patch_route_policy_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5390,7 +5390,7 @@ def test_preview_rest_required_fields(request_type=compute.PreviewRouterRequest) response = client.preview(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5605,7 +5605,7 @@ def test_update_rest_required_fields(request_type=compute.UpdateRouterRequest): response = client.update(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5820,7 +5820,7 @@ def test_update_unary_rest_required_fields(request_type=compute.UpdateRouterRequ response = client.update_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6041,7 +6041,7 @@ def test_update_route_policy_rest_required_fields( response = client.update_route_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -6258,7 +6258,7 @@ def test_update_route_policy_unary_rest_required_fields( response = client.update_route_policy_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_routes.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_routes.py index d931c8c9112d..15a62532ec5b 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_routes.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_routes.py @@ -1020,7 +1020,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteRouteRequest): response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1216,7 +1216,7 @@ def test_delete_unary_rest_required_fields(request_type=compute.DeleteRouteReque response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1406,7 +1406,7 @@ def test_get_rest_required_fields(request_type=compute.GetRouteRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1599,7 +1599,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertRouteRequest): response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1795,7 +1795,7 @@ def test_insert_unary_rest_required_fields(request_type=compute.InsertRouteReque response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1994,7 +1994,7 @@ def test_list_rest_required_fields(request_type=compute.ListRoutesRequest): response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_security_policies.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_security_policies.py index 7bdf61c786d0..8a8d66fc1c57 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_security_policies.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_security_policies.py @@ -1089,7 +1089,7 @@ def test_add_rule_rest_required_fields( response = client.add_rule(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1295,7 +1295,7 @@ def test_add_rule_unary_rest_required_fields( response = client.add_rule_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1502,7 +1502,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1776,7 +1776,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteSecurityPolicyRe response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1974,7 +1974,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2164,7 +2164,7 @@ def test_get_rest_required_fields(request_type=compute.GetSecurityPolicyRequest) response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2358,7 +2358,7 @@ def test_get_rule_rest_required_fields( response = client.get_rule(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2556,7 +2556,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertSecurityPolicyRe response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2773,7 +2773,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2986,7 +2986,7 @@ def test_list_rest_required_fields(request_type=compute.ListSecurityPoliciesRequ response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3255,7 +3255,7 @@ def test_list_preconfigured_expression_sets_rest_required_fields( response = client.list_preconfigured_expression_sets(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3466,7 +3466,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchSecurityPolicyRequ response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3690,7 +3690,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3915,7 +3915,7 @@ def test_patch_rule_rest_required_fields( response = client.patch_rule(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4133,7 +4133,7 @@ def test_patch_rule_unary_rest_required_fields( response = client.patch_rule_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4344,7 +4344,7 @@ def test_remove_rule_rest_required_fields( response = client.remove_rule(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4542,7 +4542,7 @@ def test_remove_rule_unary_rest_required_fields( response = client.remove_rule_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4739,7 +4739,7 @@ def test_set_labels_rest_required_fields( response = client.set_labels(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4943,7 +4943,7 @@ def test_set_labels_unary_rest_required_fields( response = client.set_labels_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_service_attachments.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_service_attachments.py index c270eeebc6c2..41c2611d43a0 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_service_attachments.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_service_attachments.py @@ -1102,7 +1102,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1382,7 +1382,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1591,7 +1591,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1794,7 +1794,7 @@ def test_get_rest_required_fields(request_type=compute.GetServiceAttachmentReque response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1999,7 +1999,7 @@ def test_get_iam_policy_rest_required_fields( response = client.get_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2205,7 +2205,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2419,7 +2419,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2634,7 +2634,7 @@ def test_list_rest_required_fields(request_type=compute.ListServiceAttachmentsRe response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2904,7 +2904,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchServiceAttachmentR response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3129,7 +3129,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3348,7 +3348,7 @@ def test_set_iam_policy_rest_required_fields( response = client.set_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3563,7 +3563,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_snapshot_settings_service.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_snapshot_settings_service.py index 2b1e47c28992..f3be97a52ec9 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_snapshot_settings_service.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_snapshot_settings_service.py @@ -1101,7 +1101,7 @@ def test_get_rest_required_fields(request_type=compute.GetSnapshotSettingRequest response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1289,7 +1289,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchSnapshotSettingReq response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1510,7 +1510,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_snapshots.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_snapshots.py index 636dd2d7c181..c324bf110f62 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_snapshots.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_snapshots.py @@ -1037,7 +1037,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteSnapshotRequest) response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1233,7 +1233,7 @@ def test_delete_unary_rest_required_fields(request_type=compute.DeleteSnapshotRe response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1423,7 +1423,7 @@ def test_get_rest_required_fields(request_type=compute.GetSnapshotRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1617,7 +1617,7 @@ def test_get_iam_policy_rest_required_fields( response = client.get_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1810,7 +1810,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertSnapshotRequest) response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2003,7 +2003,7 @@ def test_insert_unary_rest_required_fields(request_type=compute.InsertSnapshotRe response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2199,7 +2199,7 @@ def test_list_rest_required_fields(request_type=compute.ListSnapshotsRequest): response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2454,7 +2454,7 @@ def test_set_iam_policy_rest_required_fields( response = client.set_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2656,7 +2656,7 @@ def test_set_labels_rest_required_fields(request_type=compute.SetLabelsSnapshotR response = client.set_labels(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2860,7 +2860,7 @@ def test_set_labels_unary_rest_required_fields( response = client.set_labels_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3064,7 +3064,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_ssl_certificates.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_ssl_certificates.py index 7065e189a84e..bfc3085b0f40 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_ssl_certificates.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_ssl_certificates.py @@ -1084,7 +1084,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1358,7 +1358,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteSslCertificateRe response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1556,7 +1556,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1746,7 +1746,7 @@ def test_get_rest_required_fields(request_type=compute.GetSslCertificateRequest) response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1939,7 +1939,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertSslCertificateRe response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2138,7 +2138,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2338,7 +2338,7 @@ def test_list_rest_required_fields(request_type=compute.ListSslCertificatesReque response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_ssl_policies.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_ssl_policies.py index 1c9ddf4071db..69e16b5aeefa 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_ssl_policies.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_ssl_policies.py @@ -1049,7 +1049,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1321,7 +1321,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteSslPolicyRequest response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1517,7 +1517,7 @@ def test_delete_unary_rest_required_fields(request_type=compute.DeleteSslPolicyR response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1707,7 +1707,7 @@ def test_get_rest_required_fields(request_type=compute.GetSslPolicyRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1900,7 +1900,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertSslPolicyRequest response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2097,7 +2097,7 @@ def test_insert_unary_rest_required_fields(request_type=compute.InsertSslPolicyR response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2297,7 +2297,7 @@ def test_list_rest_required_fields(request_type=compute.ListSslPoliciesRequest): response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2564,7 +2564,7 @@ def test_list_available_features_rest_required_fields( response = client.list_available_features(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2762,7 +2762,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchSslPolicyRequest): response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2966,7 +2966,7 @@ def test_patch_unary_rest_required_fields(request_type=compute.PatchSslPolicyReq response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_storage_pool_types.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_storage_pool_types.py index 8e987aeb7d91..1dfce21627de 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_storage_pool_types.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_storage_pool_types.py @@ -1083,7 +1083,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1355,7 +1355,7 @@ def test_get_rest_required_fields(request_type=compute.GetStoragePoolTypeRequest response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1562,7 +1562,7 @@ def test_list_rest_required_fields(request_type=compute.ListStoragePoolTypesRequ response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_storage_pools.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_storage_pools.py index 836321fdfe90..e7125257e04b 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_storage_pools.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_storage_pools.py @@ -1053,7 +1053,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1329,7 +1329,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteStoragePoolReque response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1538,7 +1538,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1739,7 +1739,7 @@ def test_get_rest_required_fields(request_type=compute.GetStoragePoolRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1944,7 +1944,7 @@ def test_get_iam_policy_rest_required_fields( response = client.get_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2148,7 +2148,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertStoragePoolReque response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2354,7 +2354,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2561,7 +2561,7 @@ def test_list_rest_required_fields(request_type=compute.ListStoragePoolsRequest) response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2836,7 +2836,7 @@ def test_list_disks_rest_required_fields( response = client.list_disks(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3113,7 +3113,7 @@ def test_set_iam_policy_rest_required_fields( response = client.set_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3328,7 +3328,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3548,7 +3548,7 @@ def test_update_rest_required_fields(request_type=compute.UpdateStoragePoolReque response = client.update(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3775,7 +3775,7 @@ def test_update_unary_rest_required_fields( response = client.update_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_subnetworks.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_subnetworks.py index 9d236de43da2..fd9854672998 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_subnetworks.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_subnetworks.py @@ -1049,7 +1049,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1325,7 +1325,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteSubnetworkReques response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1534,7 +1534,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1748,7 +1748,7 @@ def test_expand_ip_cidr_range_rest_required_fields( response = client.expand_ip_cidr_range(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1969,7 +1969,7 @@ def test_expand_ip_cidr_range_unary_rest_required_fields( response = client.expand_ip_cidr_range_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2130,6 +2130,8 @@ def test_get_rest_required_fields(request_type=compute.GetSubnetworkRequest): unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() ).get._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("views",)) jsonified_request.update(unset_fields) # verify required fields with non-default values are left alone @@ -2177,7 +2179,7 @@ def test_get_rest_required_fields(request_type=compute.GetSubnetworkRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2189,7 +2191,7 @@ def test_get_rest_unset_required_fields(): unset_fields = transport.get._get_unset_required_fields({}) assert set(unset_fields) == ( - set(()) + set(("views",)) & set( ( "project", @@ -2382,7 +2384,7 @@ def test_get_iam_policy_rest_required_fields( response = client.get_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2586,7 +2588,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertSubnetworkReques response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2792,7 +2794,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2952,6 +2954,7 @@ def test_list_rest_required_fields(request_type=compute.ListSubnetworksRequest): "order_by", "page_token", "return_partial_success", + "views", ) ) jsonified_request.update(unset_fields) @@ -2999,7 +3002,7 @@ def test_list_rest_required_fields(request_type=compute.ListSubnetworksRequest): response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3018,6 +3021,7 @@ def test_list_rest_unset_required_fields(): "orderBy", "pageToken", "returnPartialSuccess", + "views", ) ) & set( @@ -3267,7 +3271,7 @@ def test_list_usable_rest_required_fields( response = client.list_usable(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3538,7 +3542,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchSubnetworkRequest) response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3763,7 +3767,7 @@ def test_patch_unary_rest_required_fields(request_type=compute.PatchSubnetworkRe response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3979,7 +3983,7 @@ def test_set_iam_policy_rest_required_fields( response = client.set_iam_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4201,7 +4205,7 @@ def test_set_private_ip_google_access_rest_required_fields( response = client.set_private_ip_google_access(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4423,7 +4427,7 @@ def test_set_private_ip_google_access_unary_rest_required_fields( response = client.set_private_ip_google_access_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4640,7 +4644,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5777,6 +5781,21 @@ def test_insert_rest_call_success(request_type): "system_reserved_internal_ipv6_ranges_value1", "system_reserved_internal_ipv6_ranges_value2", ], + "utilization_details": { + "external_ipv6_instance_utilization": { + "total_allocated_ip": {"high": 416, "low": 338}, + "total_free_ip": {}, + }, + "external_ipv6_lb_utilization": {}, + "internal_ipv6_utilization": {}, + "ipv4_utilizations": [ + { + "range_name": "range_name_value", + "total_allocated_ip": 1892, + "total_free_ip": 1373, + } + ], + }, } # The version of a generated dependency at test runtime may differ from the version used during generation. # Delete any fields which are not present in the current runtime dependency @@ -6331,6 +6350,21 @@ def test_patch_rest_call_success(request_type): "system_reserved_internal_ipv6_ranges_value1", "system_reserved_internal_ipv6_ranges_value2", ], + "utilization_details": { + "external_ipv6_instance_utilization": { + "total_allocated_ip": {"high": 416, "low": 338}, + "total_free_ip": {}, + }, + "external_ipv6_lb_utilization": {}, + "internal_ipv6_utilization": {}, + "ipv4_utilizations": [ + { + "range_name": "range_name_value", + "total_allocated_ip": 1892, + "total_free_ip": 1373, + } + ], + }, } # The version of a generated dependency at test runtime may differ from the version used during generation. # Delete any fields which are not present in the current runtime dependency diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_grpc_proxies.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_grpc_proxies.py index e4259e451228..e73d43821de7 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_grpc_proxies.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_grpc_proxies.py @@ -1094,7 +1094,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteTargetGrpcProxyR response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1292,7 +1292,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1482,7 +1482,7 @@ def test_get_rest_required_fields(request_type=compute.GetTargetGrpcProxyRequest response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1675,7 +1675,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertTargetGrpcProxyR response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1874,7 +1874,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2074,7 +2074,7 @@ def test_list_rest_required_fields(request_type=compute.ListTargetGrpcProxiesReq response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2333,7 +2333,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchTargetGrpcProxyReq response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2539,7 +2539,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_http_proxies.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_http_proxies.py index fcd998ff09f0..62f2985bbeaa 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_http_proxies.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_http_proxies.py @@ -1098,7 +1098,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1372,7 +1372,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteTargetHttpProxyR response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1570,7 +1570,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1760,7 +1760,7 @@ def test_get_rest_required_fields(request_type=compute.GetTargetHttpProxyRequest response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1953,7 +1953,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertTargetHttpProxyR response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2152,7 +2152,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2352,7 +2352,7 @@ def test_list_rest_required_fields(request_type=compute.ListTargetHttpProxiesReq response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2611,7 +2611,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchTargetHttpProxyReq response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2817,7 +2817,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3023,7 +3023,7 @@ def test_set_url_map_rest_required_fields( response = client.set_url_map(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3225,7 +3225,7 @@ def test_set_url_map_unary_rest_required_fields( response = client.set_url_map_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_https_proxies.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_https_proxies.py index 2a84e53e9a9e..9782394a13ec 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_https_proxies.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_https_proxies.py @@ -1102,7 +1102,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1378,7 +1378,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1576,7 +1576,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1766,7 +1766,7 @@ def test_get_rest_required_fields(request_type=compute.GetTargetHttpsProxyReques response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1961,7 +1961,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2160,7 +2160,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2360,7 +2360,7 @@ def test_list_rest_required_fields(request_type=compute.ListTargetHttpsProxiesRe response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2619,7 +2619,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchTargetHttpsProxyRe response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2825,7 +2825,7 @@ def test_patch_unary_rest_required_fields( response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3035,7 +3035,7 @@ def test_set_certificate_map_rest_required_fields( response = client.set_certificate_map(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3245,7 +3245,7 @@ def test_set_certificate_map_unary_rest_required_fields( response = client.set_certificate_map_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3453,7 +3453,7 @@ def test_set_quic_override_rest_required_fields( response = client.set_quic_override(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3661,7 +3661,7 @@ def test_set_quic_override_unary_rest_required_fields( response = client.set_quic_override_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3871,7 +3871,7 @@ def test_set_ssl_certificates_rest_required_fields( response = client.set_ssl_certificates(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4081,7 +4081,7 @@ def test_set_ssl_certificates_unary_rest_required_fields( response = client.set_ssl_certificates_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4287,7 +4287,7 @@ def test_set_ssl_policy_rest_required_fields( response = client.set_ssl_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4493,7 +4493,7 @@ def test_set_ssl_policy_unary_rest_required_fields( response = client.set_ssl_policy_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4699,7 +4699,7 @@ def test_set_url_map_rest_required_fields( response = client.set_url_map(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4901,7 +4901,7 @@ def test_set_url_map_unary_rest_required_fields( response = client.set_url_map_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_instances.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_instances.py index 35c78d3114ac..7af079585d5d 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_instances.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_instances.py @@ -1084,7 +1084,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1362,7 +1362,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteTargetInstanceRe response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1571,7 +1571,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1772,7 +1772,7 @@ def test_get_rest_required_fields(request_type=compute.GetTargetInstanceRequest) response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1976,7 +1976,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertTargetInstanceRe response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2182,7 +2182,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2389,7 +2389,7 @@ def test_list_rest_required_fields(request_type=compute.ListTargetInstancesReque response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2665,7 +2665,7 @@ def test_set_security_policy_rest_required_fields( response = client.set_security_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2886,7 +2886,7 @@ def test_set_security_policy_unary_rest_required_fields( response = client.set_security_policy_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3101,7 +3101,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_pools.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_pools.py index 879a779776cd..0af3204e9742 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_pools.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_pools.py @@ -1054,7 +1054,7 @@ def test_add_health_check_rest_required_fields( response = client.add_health_check(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1277,7 +1277,7 @@ def test_add_health_check_unary_rest_required_fields( response = client.add_health_check_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1498,7 +1498,7 @@ def test_add_instance_rest_required_fields( response = client.add_instance(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1715,7 +1715,7 @@ def test_add_instance_unary_rest_required_fields( response = client.add_instance_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1929,7 +1929,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2205,7 +2205,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteTargetPoolReques response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2414,7 +2414,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2615,7 +2615,7 @@ def test_get_rest_required_fields(request_type=compute.GetTargetPoolRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2819,7 +2819,7 @@ def test_get_health_rest_required_fields( response = client.get_health(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3030,7 +3030,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertTargetPoolReques response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3232,7 +3232,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3435,7 +3435,7 @@ def test_list_rest_required_fields(request_type=compute.ListTargetPoolsRequest): response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3711,7 +3711,7 @@ def test_remove_health_check_rest_required_fields( response = client.remove_health_check(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3936,7 +3936,7 @@ def test_remove_health_check_unary_rest_required_fields( response = client.remove_health_check_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4157,7 +4157,7 @@ def test_remove_instance_rest_required_fields( response = client.remove_instance(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4374,7 +4374,7 @@ def test_remove_instance_unary_rest_required_fields( response = client.remove_instance_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4596,7 +4596,7 @@ def test_set_backup_rest_required_fields( response = client.set_backup(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4819,7 +4819,7 @@ def test_set_backup_unary_rest_required_fields( response = client.set_backup_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5041,7 +5041,7 @@ def test_set_security_policy_rest_required_fields( response = client.set_security_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5262,7 +5262,7 @@ def test_set_security_policy_unary_rest_required_fields( response = client.set_security_policy_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -5477,7 +5477,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_ssl_proxies.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_ssl_proxies.py index 7553a82697f3..c5c5861327f9 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_ssl_proxies.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_ssl_proxies.py @@ -1086,7 +1086,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteTargetSslProxyRe response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1284,7 +1284,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1474,7 +1474,7 @@ def test_get_rest_required_fields(request_type=compute.GetTargetSslProxyRequest) response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1667,7 +1667,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertTargetSslProxyRe response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1866,7 +1866,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2066,7 +2066,7 @@ def test_list_rest_required_fields(request_type=compute.ListTargetSslProxiesRequ response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2331,7 +2331,7 @@ def test_set_backend_service_rest_required_fields( response = client.set_backend_service(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2541,7 +2541,7 @@ def test_set_backend_service_unary_rest_required_fields( response = client.set_backend_service_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2751,7 +2751,7 @@ def test_set_certificate_map_rest_required_fields( response = client.set_certificate_map(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2961,7 +2961,7 @@ def test_set_certificate_map_unary_rest_required_fields( response = client.set_certificate_map_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3169,7 +3169,7 @@ def test_set_proxy_header_rest_required_fields( response = client.set_proxy_header(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3377,7 +3377,7 @@ def test_set_proxy_header_unary_rest_required_fields( response = client.set_proxy_header_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3587,7 +3587,7 @@ def test_set_ssl_certificates_rest_required_fields( response = client.set_ssl_certificates(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3797,7 +3797,7 @@ def test_set_ssl_certificates_unary_rest_required_fields( response = client.set_ssl_certificates_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4003,7 +4003,7 @@ def test_set_ssl_policy_rest_required_fields( response = client.set_ssl_policy(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4209,7 +4209,7 @@ def test_set_ssl_policy_unary_rest_required_fields( response = client.set_ssl_policy_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_tcp_proxies.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_tcp_proxies.py index 143cf327448c..f532ea810aca 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_tcp_proxies.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_tcp_proxies.py @@ -1090,7 +1090,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1364,7 +1364,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteTargetTcpProxyRe response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1562,7 +1562,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1752,7 +1752,7 @@ def test_get_rest_required_fields(request_type=compute.GetTargetTcpProxyRequest) response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1945,7 +1945,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertTargetTcpProxyRe response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2144,7 +2144,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2344,7 +2344,7 @@ def test_list_rest_required_fields(request_type=compute.ListTargetTcpProxiesRequ response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2609,7 +2609,7 @@ def test_set_backend_service_rest_required_fields( response = client.set_backend_service(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2819,7 +2819,7 @@ def test_set_backend_service_unary_rest_required_fields( response = client.set_backend_service_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3027,7 +3027,7 @@ def test_set_proxy_header_rest_required_fields( response = client.set_proxy_header(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3235,7 +3235,7 @@ def test_set_proxy_header_unary_rest_required_fields( response = client.set_proxy_header_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_vpn_gateways.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_vpn_gateways.py index 5e95948ee55e..1287026d374f 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_vpn_gateways.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_vpn_gateways.py @@ -1098,7 +1098,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1378,7 +1378,7 @@ def test_delete_rest_required_fields( response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1587,7 +1587,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1788,7 +1788,7 @@ def test_get_rest_required_fields(request_type=compute.GetTargetVpnGatewayReques response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1994,7 +1994,7 @@ def test_insert_rest_required_fields( response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2200,7 +2200,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2407,7 +2407,7 @@ def test_list_rest_required_fields(request_type=compute.ListTargetVpnGatewaysReq response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2679,7 +2679,7 @@ def test_set_labels_rest_required_fields( response = client.set_labels(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2896,7 +2896,7 @@ def test_set_labels_unary_rest_required_fields( response = client.set_labels_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_url_maps.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_url_maps.py index f28823e0191f..0df1dbbbca10 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_url_maps.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_url_maps.py @@ -1027,7 +1027,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1296,7 +1296,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteUrlMapRequest): response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1492,7 +1492,7 @@ def test_delete_unary_rest_required_fields(request_type=compute.DeleteUrlMapRequ response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1682,7 +1682,7 @@ def test_get_rest_required_fields(request_type=compute.GetUrlMapRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1875,7 +1875,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertUrlMapRequest): response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2071,7 +2071,7 @@ def test_insert_unary_rest_required_fields(request_type=compute.InsertUrlMapRequ response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2275,7 +2275,7 @@ def test_invalidate_cache_rest_required_fields( response = client.invalidate_cache(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2483,7 +2483,7 @@ def test_invalidate_cache_unary_rest_required_fields( response = client.invalidate_cache_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2686,7 +2686,7 @@ def test_list_rest_required_fields(request_type=compute.ListUrlMapsRequest): response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2944,7 +2944,7 @@ def test_patch_rest_required_fields(request_type=compute.PatchUrlMapRequest): response = client.patch(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3148,7 +3148,7 @@ def test_patch_unary_rest_required_fields(request_type=compute.PatchUrlMapReques response = client.patch_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3352,7 +3352,7 @@ def test_update_rest_required_fields(request_type=compute.UpdateUrlMapRequest): response = client.update(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3556,7 +3556,7 @@ def test_update_unary_rest_required_fields(request_type=compute.UpdateUrlMapRequ response = client.update_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3754,7 +3754,7 @@ def test_validate_rest_required_fields(request_type=compute.ValidateUrlMapReques response = client.validate(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -4434,7 +4434,10 @@ def test_insert_rest_call_success(request_type): }, }, "max_stream_duration": {}, - "request_mirror_policy": {"backend_service": "backend_service_value"}, + "request_mirror_policy": { + "backend_service": "backend_service_value", + "mirror_percent": 0.1515, + }, "retry_policy": { "num_retries": 1197, "per_try_timeout": {}, @@ -5225,7 +5228,10 @@ def test_patch_rest_call_success(request_type): }, }, "max_stream_duration": {}, - "request_mirror_policy": {"backend_service": "backend_service_value"}, + "request_mirror_policy": { + "backend_service": "backend_service_value", + "mirror_percent": 0.1515, + }, "retry_policy": { "num_retries": 1197, "per_try_timeout": {}, @@ -5642,7 +5648,10 @@ def test_update_rest_call_success(request_type): }, }, "max_stream_duration": {}, - "request_mirror_policy": {"backend_service": "backend_service_value"}, + "request_mirror_policy": { + "backend_service": "backend_service_value", + "mirror_percent": 0.1515, + }, "retry_policy": { "num_retries": 1197, "per_try_timeout": {}, @@ -6067,7 +6076,10 @@ def test_validate_rest_call_success(request_type): }, }, "max_stream_duration": {}, - "request_mirror_policy": {"backend_service": "backend_service_value"}, + "request_mirror_policy": { + "backend_service": "backend_service_value", + "mirror_percent": 0.1515, + }, "retry_policy": { "num_retries": 1197, "per_try_timeout": {}, diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_vpn_gateways.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_vpn_gateways.py index ae837b81f1a8..0adf499a05d1 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_vpn_gateways.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_vpn_gateways.py @@ -1049,7 +1049,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1325,7 +1325,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteVpnGatewayReques response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1534,7 +1534,7 @@ def test_delete_unary_rest_required_fields( response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1735,7 +1735,7 @@ def test_get_rest_required_fields(request_type=compute.GetVpnGatewayRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1938,7 +1938,7 @@ def test_get_status_rest_required_fields( response = client.get_status(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2142,7 +2142,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertVpnGatewayReques response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2348,7 +2348,7 @@ def test_insert_unary_rest_required_fields( response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2555,7 +2555,7 @@ def test_list_rest_required_fields(request_type=compute.ListVpnGatewaysRequest): response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2827,7 +2827,7 @@ def test_set_labels_rest_required_fields( response = client.set_labels(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3044,7 +3044,7 @@ def test_set_labels_unary_rest_required_fields( response = client.set_labels_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -3259,7 +3259,7 @@ def test_test_iam_permissions_rest_required_fields( response = client.test_iam_permissions(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_vpn_tunnels.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_vpn_tunnels.py index 8f9b4bd9f9a9..c8916d355f87 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_vpn_tunnels.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_vpn_tunnels.py @@ -1045,7 +1045,7 @@ def test_aggregated_list_rest_required_fields( response = client.aggregated_list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1318,7 +1318,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteVpnTunnelRequest response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1525,7 +1525,7 @@ def test_delete_unary_rest_required_fields(request_type=compute.DeleteVpnTunnelR response = client.delete_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1726,7 +1726,7 @@ def test_get_rest_required_fields(request_type=compute.GetVpnTunnelRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1930,7 +1930,7 @@ def test_insert_rest_required_fields(request_type=compute.InsertVpnTunnelRequest response = client.insert(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2138,7 +2138,7 @@ def test_insert_unary_rest_required_fields(request_type=compute.InsertVpnTunnelR response = client.insert_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2349,7 +2349,7 @@ def test_list_rest_required_fields(request_type=compute.ListVpnTunnelsRequest): response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2621,7 +2621,7 @@ def test_set_labels_rest_required_fields( response = client.set_labels(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -2838,7 +2838,7 @@ def test_set_labels_unary_rest_required_fields( response = client.set_labels_unary(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_zone_operations.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_zone_operations.py index 6742ad29da08..b61cbab8d298 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_zone_operations.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_zone_operations.py @@ -1057,7 +1057,7 @@ def test_delete_rest_required_fields(request_type=compute.DeleteZoneOperationReq response = client.delete(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1258,7 +1258,7 @@ def test_get_rest_required_fields(request_type=compute.GetZoneOperationRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1465,7 +1465,7 @@ def test_list_rest_required_fields(request_type=compute.ListZoneOperationsReques response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1728,7 +1728,7 @@ def test_wait_rest_required_fields(request_type=compute.WaitZoneOperationRequest response = client.wait(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_zones.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_zones.py index fab056ad5325..38f9ce900b15 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_zones.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_zones.py @@ -1003,7 +1003,7 @@ def test_get_rest_required_fields(request_type=compute.GetZoneRequest): response = client.get(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -1198,7 +1198,7 @@ def test_list_rest_required_fields(request_type=compute.ListZonesRequest): response = client.list(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-confidentialcomputing/.OwlBot.yaml b/packages/google-cloud-confidentialcomputing/.OwlBot.yaml deleted file mode 100644 index f986b4a256e0..000000000000 --- a/packages/google-cloud-confidentialcomputing/.OwlBot.yaml +++ /dev/null @@ -1,21 +0,0 @@ -# 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-preserve-regex: - - /owl-bot-staging/google-cloud-confidentialcomputing/v1alpha - -deep-copy-regex: - - source: /google/cloud/confidentialcomputing/(.*)/.*-py - dest: /owl-bot-staging/google-cloud-confidentialcomputing/$1 -api-name: google-cloud-confidentialcomputing diff --git a/packages/google-cloud-confidentialcomputing/.repo-metadata.json b/packages/google-cloud-confidentialcomputing/.repo-metadata.json index ed24bdbe5ca5..19a7c294b7d3 100644 --- a/packages/google-cloud-confidentialcomputing/.repo-metadata.json +++ b/packages/google-cloud-confidentialcomputing/.repo-metadata.json @@ -13,4 +13,4 @@ "api_id": "confidentialcomputing.googleapis.com", "default_version": "v1", "api_shortname": "confidentialcomputing" -} +} \ No newline at end of file diff --git a/packages/google-cloud-confidentialcomputing/noxfile.py b/packages/google-cloud-confidentialcomputing/noxfile.py index 357c2ed2ce63..30c98386e041 100644 --- a/packages/google-cloud-confidentialcomputing/noxfile.py +++ b/packages/google-cloud-confidentialcomputing/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-confidentialcomputing/testing/constraints-3.14.txt b/packages/google-cloud-confidentialcomputing/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-cloud-confidentialcomputing/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-cloud-config/.OwlBot.yaml b/packages/google-cloud-config/.OwlBot.yaml deleted file mode 100644 index 46bac73bda0e..000000000000 --- a/packages/google-cloud-config/.OwlBot.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# 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/config/(.*)/.*-py - dest: /owl-bot-staging/google-cloud-config/$1 -api-name: google-cloud-config diff --git a/packages/google-cloud-config/.repo-metadata.json b/packages/google-cloud-config/.repo-metadata.json index 5ea2b75deabb..7b34db407376 100644 --- a/packages/google-cloud-config/.repo-metadata.json +++ b/packages/google-cloud-config/.repo-metadata.json @@ -1,16 +1,16 @@ { - "name": "config", - "name_pretty": "Infrastructure Manager API", - "api_description": "Infrastructure Manager API", - "product_documentation": "https://cloud.google.com/infrastructure-manager/docs/overview", - "client_documentation": "https://cloud.google.com/python/docs/reference/config/latest", - "issue_tracker": "https://issuetracker.google.com/issues/new?component=536700", - "release_level": "preview", - "language": "python", - "library_type": "GAPIC_AUTO", - "repo": "googleapis/google-cloud-python", - "distribution_name": "google-cloud-config", - "api_id": "config.googleapis.com", - "default_version": "v1", - "api_shortname": "config" -} + "name": "config", + "name_pretty": "Infrastructure Manager API", + "api_description": "Infrastructure Manager API", + "product_documentation": "https://cloud.google.com/infrastructure-manager/docs/overview", + "client_documentation": "https://cloud.google.com/python/docs/reference/config/latest", + "issue_tracker": "https://issuetracker.google.com/issues/new?component=536700", + "release_level": "preview", + "language": "python", + "library_type": "GAPIC_AUTO", + "repo": "googleapis/google-cloud-python", + "distribution_name": "google-cloud-config", + "api_id": "config.googleapis.com", + "default_version": "v1", + "api_shortname": "config" +} \ No newline at end of file diff --git a/packages/google-cloud-config/noxfile.py b/packages/google-cloud-config/noxfile.py index bb77d000ced9..c12bc530ffb7 100644 --- a/packages/google-cloud-config/noxfile.py +++ b/packages/google-cloud-config/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-config/testing/constraints-3.14.txt b/packages/google-cloud-config/testing/constraints-3.14.txt new file mode 100644 index 000000000000..2010e549cceb --- /dev/null +++ b/packages/google-cloud-config/testing/constraints-3.14.txt @@ -0,0 +1,12 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 +grpc-google-iam-v1>=0 diff --git a/packages/google-cloud-configdelivery/.OwlBot.yaml b/packages/google-cloud-configdelivery/.OwlBot.yaml deleted file mode 100644 index 720bd2d4919b..000000000000 --- a/packages/google-cloud-configdelivery/.OwlBot.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# 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/configdelivery/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-configdelivery/$1 -api-name: google-cloud-configdelivery diff --git a/packages/google-cloud-configdelivery/google/cloud/configdelivery/gapic_version.py b/packages/google-cloud-configdelivery/google/cloud/configdelivery/gapic_version.py index 20a9cd975b02..ecfa5bc16606 100644 --- a/packages/google-cloud-configdelivery/google/cloud/configdelivery/gapic_version.py +++ b/packages/google-cloud-configdelivery/google/cloud/configdelivery/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.1.3" # {x-release-please-version} diff --git a/packages/google-cloud-configdelivery/google/cloud/configdelivery_v1/gapic_version.py b/packages/google-cloud-configdelivery/google/cloud/configdelivery_v1/gapic_version.py index 20a9cd975b02..ecfa5bc16606 100644 --- a/packages/google-cloud-configdelivery/google/cloud/configdelivery_v1/gapic_version.py +++ b/packages/google-cloud-configdelivery/google/cloud/configdelivery_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.1.3" # {x-release-please-version} diff --git a/packages/google-cloud-configdelivery/google/cloud/configdelivery_v1alpha/gapic_version.py b/packages/google-cloud-configdelivery/google/cloud/configdelivery_v1alpha/gapic_version.py index 20a9cd975b02..ecfa5bc16606 100644 --- a/packages/google-cloud-configdelivery/google/cloud/configdelivery_v1alpha/gapic_version.py +++ b/packages/google-cloud-configdelivery/google/cloud/configdelivery_v1alpha/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.1.3" # {x-release-please-version} diff --git a/packages/google-cloud-configdelivery/google/cloud/configdelivery_v1beta/gapic_version.py b/packages/google-cloud-configdelivery/google/cloud/configdelivery_v1beta/gapic_version.py index 20a9cd975b02..ecfa5bc16606 100644 --- a/packages/google-cloud-configdelivery/google/cloud/configdelivery_v1beta/gapic_version.py +++ b/packages/google-cloud-configdelivery/google/cloud/configdelivery_v1beta/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.1.3" # {x-release-please-version} diff --git a/packages/google-cloud-configdelivery/noxfile.py b/packages/google-cloud-configdelivery/noxfile.py index e1c3dff0e6b7..957ec92b2242 100644 --- a/packages/google-cloud-configdelivery/noxfile.py +++ b/packages/google-cloud-configdelivery/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-configdelivery/samples/generated_samples/snippet_metadata_google.cloud.configdelivery.v1.json b/packages/google-cloud-configdelivery/samples/generated_samples/snippet_metadata_google.cloud.configdelivery.v1.json index ed1f6c6f4134..e6383a079c1b 100644 --- a/packages/google-cloud-configdelivery/samples/generated_samples/snippet_metadata_google.cloud.configdelivery.v1.json +++ b/packages/google-cloud-configdelivery/samples/generated_samples/snippet_metadata_google.cloud.configdelivery.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-configdelivery", - "version": "0.1.0" + "version": "0.1.3" }, "snippets": [ { diff --git a/packages/google-cloud-configdelivery/samples/generated_samples/snippet_metadata_google.cloud.configdelivery.v1alpha.json b/packages/google-cloud-configdelivery/samples/generated_samples/snippet_metadata_google.cloud.configdelivery.v1alpha.json index 244722e85a6f..6eaafd283268 100644 --- a/packages/google-cloud-configdelivery/samples/generated_samples/snippet_metadata_google.cloud.configdelivery.v1alpha.json +++ b/packages/google-cloud-configdelivery/samples/generated_samples/snippet_metadata_google.cloud.configdelivery.v1alpha.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-configdelivery", - "version": "0.1.0" + "version": "0.1.3" }, "snippets": [ { diff --git a/packages/google-cloud-configdelivery/samples/generated_samples/snippet_metadata_google.cloud.configdelivery.v1beta.json b/packages/google-cloud-configdelivery/samples/generated_samples/snippet_metadata_google.cloud.configdelivery.v1beta.json index 8ace205a12fe..2dc8bea0dd5f 100644 --- a/packages/google-cloud-configdelivery/samples/generated_samples/snippet_metadata_google.cloud.configdelivery.v1beta.json +++ b/packages/google-cloud-configdelivery/samples/generated_samples/snippet_metadata_google.cloud.configdelivery.v1beta.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-configdelivery", - "version": "0.1.0" + "version": "0.1.3" }, "snippets": [ { diff --git a/packages/google-cloud-configdelivery/testing/constraints-3.14.txt b/packages/google-cloud-configdelivery/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-cloud-configdelivery/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-cloud-contact-center-insights/.OwlBot.yaml b/packages/google-cloud-contact-center-insights/.OwlBot.yaml deleted file mode 100644 index 358f202069bc..000000000000 --- a/packages/google-cloud-contact-center-insights/.OwlBot.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright 2021 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -deep-remove-regex: - - /owl-bot-staging - -deep-copy-regex: - - source: /google/cloud/contactcenterinsights/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-contact-center-insights/$1 - -begin-after-commit-hash: 70f7f0525414fe4dfeb2fc2e81546b073f83a621 -api-name: google-cloud-contact-center-insights diff --git a/packages/google-cloud-contact-center-insights/google/cloud/contact_center_insights/gapic_version.py b/packages/google-cloud-contact-center-insights/google/cloud/contact_center_insights/gapic_version.py index 20a9cd975b02..31251925b501 100644 --- a/packages/google-cloud-contact-center-insights/google/cloud/contact_center_insights/gapic_version.py +++ b/packages/google-cloud-contact-center-insights/google/cloud/contact_center_insights/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.23.3" # {x-release-please-version} diff --git a/packages/google-cloud-contact-center-insights/google/cloud/contact_center_insights_v1/gapic_version.py b/packages/google-cloud-contact-center-insights/google/cloud/contact_center_insights_v1/gapic_version.py index 20a9cd975b02..31251925b501 100644 --- a/packages/google-cloud-contact-center-insights/google/cloud/contact_center_insights_v1/gapic_version.py +++ b/packages/google-cloud-contact-center-insights/google/cloud/contact_center_insights_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.23.3" # {x-release-please-version} diff --git a/packages/google-cloud-contact-center-insights/noxfile.py b/packages/google-cloud-contact-center-insights/noxfile.py index 61c2433f94ef..70ae3b9134e9 100644 --- a/packages/google-cloud-contact-center-insights/noxfile.py +++ b/packages/google-cloud-contact-center-insights/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-contact-center-insights/samples/generated_samples/snippet_metadata_google.cloud.contactcenterinsights.v1.json b/packages/google-cloud-contact-center-insights/samples/generated_samples/snippet_metadata_google.cloud.contactcenterinsights.v1.json index 53fac2587492..a413d720be4b 100644 --- a/packages/google-cloud-contact-center-insights/samples/generated_samples/snippet_metadata_google.cloud.contactcenterinsights.v1.json +++ b/packages/google-cloud-contact-center-insights/samples/generated_samples/snippet_metadata_google.cloud.contactcenterinsights.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-contact-center-insights", - "version": "0.1.0" + "version": "1.23.3" }, "snippets": [ { diff --git a/packages/google-cloud-contact-center-insights/testing/constraints-3.14.txt b/packages/google-cloud-contact-center-insights/testing/constraints-3.14.txt new file mode 100644 index 000000000000..2010e549cceb --- /dev/null +++ b/packages/google-cloud-contact-center-insights/testing/constraints-3.14.txt @@ -0,0 +1,12 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 +grpc-google-iam-v1>=0 diff --git a/packages/google-cloud-container/.OwlBot.yaml b/packages/google-cloud-container/.OwlBot.yaml deleted file mode 100644 index 6905797488c6..000000000000 --- a/packages/google-cloud-container/.OwlBot.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 2021 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -deep-remove-regex: - - /owl-bot-staging - -deep-copy-regex: - - source: /google/container/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-container/$1 - -begin-after-commit-hash: 130ce904e5d546c312943d10f48799590f9c0f66 - -api-name: google-cloud-container diff --git a/packages/google-cloud-container/google/cloud/container/gapic_version.py b/packages/google-cloud-container/google/cloud/container/gapic_version.py index 20a9cd975b02..a4c89e91fba9 100644 --- a/packages/google-cloud-container/google/cloud/container/gapic_version.py +++ b/packages/google-cloud-container/google/cloud/container/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "2.59.0" # {x-release-please-version} diff --git a/packages/google-cloud-container/google/cloud/container_v1/gapic_version.py b/packages/google-cloud-container/google/cloud/container_v1/gapic_version.py index 20a9cd975b02..a4c89e91fba9 100644 --- a/packages/google-cloud-container/google/cloud/container_v1/gapic_version.py +++ b/packages/google-cloud-container/google/cloud/container_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "2.59.0" # {x-release-please-version} diff --git a/packages/google-cloud-container/google/cloud/container_v1beta1/gapic_version.py b/packages/google-cloud-container/google/cloud/container_v1beta1/gapic_version.py index 20a9cd975b02..a4c89e91fba9 100644 --- a/packages/google-cloud-container/google/cloud/container_v1beta1/gapic_version.py +++ b/packages/google-cloud-container/google/cloud/container_v1beta1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "2.59.0" # {x-release-please-version} diff --git a/packages/google-cloud-container/noxfile.py b/packages/google-cloud-container/noxfile.py index 1ace96d181d9..ccf56906c226 100644 --- a/packages/google-cloud-container/noxfile.py +++ b/packages/google-cloud-container/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-container/samples/generated_samples/snippet_metadata_google.container.v1.json b/packages/google-cloud-container/samples/generated_samples/snippet_metadata_google.container.v1.json index 5a4e5f65251a..f5fa0a19d917 100644 --- a/packages/google-cloud-container/samples/generated_samples/snippet_metadata_google.container.v1.json +++ b/packages/google-cloud-container/samples/generated_samples/snippet_metadata_google.container.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-container", - "version": "0.1.0" + "version": "2.59.0" }, "snippets": [ { diff --git a/packages/google-cloud-container/samples/generated_samples/snippet_metadata_google.container.v1beta1.json b/packages/google-cloud-container/samples/generated_samples/snippet_metadata_google.container.v1beta1.json index 581d8fef7a46..c9146bf01f03 100644 --- a/packages/google-cloud-container/samples/generated_samples/snippet_metadata_google.container.v1beta1.json +++ b/packages/google-cloud-container/samples/generated_samples/snippet_metadata_google.container.v1beta1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-container", - "version": "0.1.0" + "version": "2.59.0" }, "snippets": [ { diff --git a/packages/google-cloud-container/testing/constraints-3.14.txt b/packages/google-cloud-container/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-cloud-container/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-cloud-containeranalysis/.OwlBot.yaml b/packages/google-cloud-containeranalysis/.OwlBot.yaml deleted file mode 100644 index 96442220a7ce..000000000000 --- a/packages/google-cloud-containeranalysis/.OwlBot.yaml +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright 2021 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -deep-remove-regex: - - /owl-bot-staging - -deep-preserve-regex: - - /owl-bot-staging/google-cloud-containeranalysis/v1beta1 - -deep-copy-regex: - - source: /google/devtools/containeranalysis/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-containeranalysis/$1 - -begin-after-commit-hash: 6a5da3f1274b088752f074da5bc9e30bd1beb27e - -api-name: google-cloud-containeranalysis diff --git a/packages/google-cloud-containeranalysis/google/cloud/devtools/containeranalysis/gapic_version.py b/packages/google-cloud-containeranalysis/google/cloud/devtools/containeranalysis/gapic_version.py index 20a9cd975b02..c450a40b4269 100644 --- a/packages/google-cloud-containeranalysis/google/cloud/devtools/containeranalysis/gapic_version.py +++ b/packages/google-cloud-containeranalysis/google/cloud/devtools/containeranalysis/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "2.18.1" # {x-release-please-version} diff --git a/packages/google-cloud-containeranalysis/google/cloud/devtools/containeranalysis_v1/gapic_version.py b/packages/google-cloud-containeranalysis/google/cloud/devtools/containeranalysis_v1/gapic_version.py index 20a9cd975b02..c450a40b4269 100644 --- a/packages/google-cloud-containeranalysis/google/cloud/devtools/containeranalysis_v1/gapic_version.py +++ b/packages/google-cloud-containeranalysis/google/cloud/devtools/containeranalysis_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "2.18.1" # {x-release-please-version} diff --git a/packages/google-cloud-containeranalysis/noxfile.py b/packages/google-cloud-containeranalysis/noxfile.py index a6654c6cfe17..b9d5a0ea29de 100644 --- a/packages/google-cloud-containeranalysis/noxfile.py +++ b/packages/google-cloud-containeranalysis/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-containeranalysis/samples/generated_samples/snippet_metadata_google.devtools.containeranalysis.v1.json b/packages/google-cloud-containeranalysis/samples/generated_samples/snippet_metadata_google.devtools.containeranalysis.v1.json index 52089696015b..55fb8e2e0fea 100644 --- a/packages/google-cloud-containeranalysis/samples/generated_samples/snippet_metadata_google.devtools.containeranalysis.v1.json +++ b/packages/google-cloud-containeranalysis/samples/generated_samples/snippet_metadata_google.devtools.containeranalysis.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-containeranalysis", - "version": "0.1.0" + "version": "2.18.1" }, "snippets": [ { diff --git a/packages/google-cloud-containeranalysis/testing/constraints-3.14.txt b/packages/google-cloud-containeranalysis/testing/constraints-3.14.txt new file mode 100644 index 000000000000..2010e549cceb --- /dev/null +++ b/packages/google-cloud-containeranalysis/testing/constraints-3.14.txt @@ -0,0 +1,12 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 +grpc-google-iam-v1>=0 diff --git a/packages/google-cloud-contentwarehouse/.OwlBot.yaml b/packages/google-cloud-contentwarehouse/.OwlBot.yaml deleted file mode 100644 index 91e87422b739..000000000000 --- a/packages/google-cloud-contentwarehouse/.OwlBot.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# 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/contentwarehouse/(.*)/.*-py - dest: /owl-bot-staging/google-cloud-contentwarehouse/$1 -api-name: google-cloud-contentwarehouse diff --git a/packages/google-cloud-contentwarehouse/.repo-metadata.json b/packages/google-cloud-contentwarehouse/.repo-metadata.json index eaf029653413..da861f025b6c 100644 --- a/packages/google-cloud-contentwarehouse/.repo-metadata.json +++ b/packages/google-cloud-contentwarehouse/.repo-metadata.json @@ -13,4 +13,4 @@ "api_id": "contentwarehouse.googleapis.com", "default_version": "v1", "api_shortname": "contentwarehouse" -} +} \ No newline at end of file diff --git a/packages/google-cloud-contentwarehouse/google/cloud/contentwarehouse/gapic_version.py b/packages/google-cloud-contentwarehouse/google/cloud/contentwarehouse/gapic_version.py index 20a9cd975b02..7ef021982689 100644 --- a/packages/google-cloud-contentwarehouse/google/cloud/contentwarehouse/gapic_version.py +++ b/packages/google-cloud-contentwarehouse/google/cloud/contentwarehouse/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.7.16" # {x-release-please-version} diff --git a/packages/google-cloud-contentwarehouse/google/cloud/contentwarehouse_v1/gapic_version.py b/packages/google-cloud-contentwarehouse/google/cloud/contentwarehouse_v1/gapic_version.py index 20a9cd975b02..7ef021982689 100644 --- a/packages/google-cloud-contentwarehouse/google/cloud/contentwarehouse_v1/gapic_version.py +++ b/packages/google-cloud-contentwarehouse/google/cloud/contentwarehouse_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.7.16" # {x-release-please-version} diff --git a/packages/google-cloud-contentwarehouse/noxfile.py b/packages/google-cloud-contentwarehouse/noxfile.py index 8bc13833b531..6c422d266288 100644 --- a/packages/google-cloud-contentwarehouse/noxfile.py +++ b/packages/google-cloud-contentwarehouse/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-contentwarehouse/samples/generated_samples/snippet_metadata_google.cloud.contentwarehouse.v1.json b/packages/google-cloud-contentwarehouse/samples/generated_samples/snippet_metadata_google.cloud.contentwarehouse.v1.json index 3d6fe0e86ed6..927feb08b6fa 100644 --- a/packages/google-cloud-contentwarehouse/samples/generated_samples/snippet_metadata_google.cloud.contentwarehouse.v1.json +++ b/packages/google-cloud-contentwarehouse/samples/generated_samples/snippet_metadata_google.cloud.contentwarehouse.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-contentwarehouse", - "version": "0.1.0" + "version": "0.7.16" }, "snippets": [ { diff --git a/packages/google-cloud-contentwarehouse/testing/constraints-3.14.txt b/packages/google-cloud-contentwarehouse/testing/constraints-3.14.txt new file mode 100644 index 000000000000..4592d78ae759 --- /dev/null +++ b/packages/google-cloud-contentwarehouse/testing/constraints-3.14.txt @@ -0,0 +1,13 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 +google-cloud-documentai>=3 +grpc-google-iam-v1>=0 diff --git a/packages/google-cloud-data-fusion/.OwlBot.yaml b/packages/google-cloud-data-fusion/.OwlBot.yaml deleted file mode 100644 index 1a7f78308287..000000000000 --- a/packages/google-cloud-data-fusion/.OwlBot.yaml +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright 2021 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -deep-remove-regex: - - /owl-bot-staging - -deep-preserve-regex: - - /owl-bot-staging/google-cloud-data-fusion/v1beta1 - -deep-copy-regex: - - source: /google/cloud/datafusion/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-data-fusion/$1 - -begin-after-commit-hash: 70f7f0525414fe4dfeb2fc2e81546b073f83a621 -api-name: google-cloud-data-fusion diff --git a/packages/google-cloud-data-fusion/google/cloud/data_fusion/gapic_version.py b/packages/google-cloud-data-fusion/google/cloud/data_fusion/gapic_version.py index 20a9cd975b02..ebd49ec05d67 100644 --- a/packages/google-cloud-data-fusion/google/cloud/data_fusion/gapic_version.py +++ b/packages/google-cloud-data-fusion/google/cloud/data_fusion/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.13.3" # {x-release-please-version} diff --git a/packages/google-cloud-data-fusion/google/cloud/data_fusion_v1/gapic_version.py b/packages/google-cloud-data-fusion/google/cloud/data_fusion_v1/gapic_version.py index 20a9cd975b02..ebd49ec05d67 100644 --- a/packages/google-cloud-data-fusion/google/cloud/data_fusion_v1/gapic_version.py +++ b/packages/google-cloud-data-fusion/google/cloud/data_fusion_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.13.3" # {x-release-please-version} diff --git a/packages/google-cloud-data-fusion/noxfile.py b/packages/google-cloud-data-fusion/noxfile.py index 5810a373753d..859f90d8386a 100644 --- a/packages/google-cloud-data-fusion/noxfile.py +++ b/packages/google-cloud-data-fusion/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-data-fusion/samples/generated_samples/snippet_metadata_google.cloud.datafusion.v1.json b/packages/google-cloud-data-fusion/samples/generated_samples/snippet_metadata_google.cloud.datafusion.v1.json index fce0307055b9..dbdb6b5f6c8d 100644 --- a/packages/google-cloud-data-fusion/samples/generated_samples/snippet_metadata_google.cloud.datafusion.v1.json +++ b/packages/google-cloud-data-fusion/samples/generated_samples/snippet_metadata_google.cloud.datafusion.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-data-fusion", - "version": "0.1.0" + "version": "1.13.3" }, "snippets": [ { diff --git a/packages/google-cloud-data-fusion/testing/constraints-3.14.txt b/packages/google-cloud-data-fusion/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-cloud-data-fusion/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-cloud-dlp/noxfile.py b/packages/google-cloud-dlp/noxfile.py index 82c1c6ed7fab..d4757ec432e7 100644 --- a/packages/google-cloud-dlp/noxfile.py +++ b/packages/google-cloud-dlp/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-dlp/testing/constraints-3.14.txt b/packages/google-cloud-dlp/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-cloud-dlp/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-cloud-eventarc/.repo-metadata.json b/packages/google-cloud-eventarc/.repo-metadata.json index 958646d3309e..ed2bec25f9c9 100644 --- a/packages/google-cloud-eventarc/.repo-metadata.json +++ b/packages/google-cloud-eventarc/.repo-metadata.json @@ -13,4 +13,4 @@ "default_version": "v1", "api_shortname": "eventarc", "api_description": "lets you asynchronously deliver events from Google services, SaaS, and your own apps using loosely coupled services that react to state changes. Eventarc requires no infrastructure management, you can optimize productivity and costs while building a modern, event-driven solution." -} +} \ No newline at end of file diff --git a/packages/google-cloud-eventarc/noxfile.py b/packages/google-cloud-eventarc/noxfile.py index b2175222cae6..dfff30f32bc8 100644 --- a/packages/google-cloud-eventarc/noxfile.py +++ b/packages/google-cloud-eventarc/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-eventarc/testing/constraints-3.14.txt b/packages/google-cloud-eventarc/testing/constraints-3.14.txt new file mode 100644 index 000000000000..2010e549cceb --- /dev/null +++ b/packages/google-cloud-eventarc/testing/constraints-3.14.txt @@ -0,0 +1,12 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 +grpc-google-iam-v1>=0 diff --git a/packages/google-cloud-storagebatchoperations/.OwlBot.yaml b/packages/google-cloud-storagebatchoperations/.OwlBot.yaml deleted file mode 100644 index 8af27030ca12..000000000000 --- a/packages/google-cloud-storagebatchoperations/.OwlBot.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# 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/storagebatchoperations/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-storagebatchoperations/$1 -api-name: google-cloud-storagebatchoperations diff --git a/packages/google-cloud-storagebatchoperations/google/cloud/storagebatchoperations/gapic_version.py b/packages/google-cloud-storagebatchoperations/google/cloud/storagebatchoperations/gapic_version.py index 20a9cd975b02..ecfa5bc16606 100644 --- a/packages/google-cloud-storagebatchoperations/google/cloud/storagebatchoperations/gapic_version.py +++ b/packages/google-cloud-storagebatchoperations/google/cloud/storagebatchoperations/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.1.3" # {x-release-please-version} diff --git a/packages/google-cloud-storagebatchoperations/google/cloud/storagebatchoperations_v1/gapic_version.py b/packages/google-cloud-storagebatchoperations/google/cloud/storagebatchoperations_v1/gapic_version.py index 20a9cd975b02..ecfa5bc16606 100644 --- a/packages/google-cloud-storagebatchoperations/google/cloud/storagebatchoperations_v1/gapic_version.py +++ b/packages/google-cloud-storagebatchoperations/google/cloud/storagebatchoperations_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.1.3" # {x-release-please-version} diff --git a/packages/google-cloud-storagebatchoperations/noxfile.py b/packages/google-cloud-storagebatchoperations/noxfile.py index 322224fcb260..59d8636e4791 100644 --- a/packages/google-cloud-storagebatchoperations/noxfile.py +++ b/packages/google-cloud-storagebatchoperations/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-storagebatchoperations/samples/generated_samples/snippet_metadata_google.cloud.storagebatchoperations.v1.json b/packages/google-cloud-storagebatchoperations/samples/generated_samples/snippet_metadata_google.cloud.storagebatchoperations.v1.json index bcbed4715bdb..98b307679203 100644 --- a/packages/google-cloud-storagebatchoperations/samples/generated_samples/snippet_metadata_google.cloud.storagebatchoperations.v1.json +++ b/packages/google-cloud-storagebatchoperations/samples/generated_samples/snippet_metadata_google.cloud.storagebatchoperations.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-storagebatchoperations", - "version": "0.1.0" + "version": "0.1.3" }, "snippets": [ { diff --git a/packages/google-cloud-storagebatchoperations/testing/constraints-3.14.txt b/packages/google-cloud-storagebatchoperations/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-cloud-storagebatchoperations/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-cloud-storageinsights/.OwlBot.yaml b/packages/google-cloud-storageinsights/.OwlBot.yaml deleted file mode 100644 index 3f60379369a3..000000000000 --- a/packages/google-cloud-storageinsights/.OwlBot.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# 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/storageinsights/(.*)/.*-py - dest: /owl-bot-staging/google-cloud-storageinsights/$1 -api-name: google-cloud-storageinsights diff --git a/packages/google-cloud-storageinsights/google/cloud/storageinsights/gapic_version.py b/packages/google-cloud-storageinsights/google/cloud/storageinsights/gapic_version.py index 20a9cd975b02..0f88f246e913 100644 --- a/packages/google-cloud-storageinsights/google/cloud/storageinsights/gapic_version.py +++ b/packages/google-cloud-storageinsights/google/cloud/storageinsights/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.1.16" # {x-release-please-version} diff --git a/packages/google-cloud-storageinsights/google/cloud/storageinsights_v1/gapic_version.py b/packages/google-cloud-storageinsights/google/cloud/storageinsights_v1/gapic_version.py index 20a9cd975b02..0f88f246e913 100644 --- a/packages/google-cloud-storageinsights/google/cloud/storageinsights_v1/gapic_version.py +++ b/packages/google-cloud-storageinsights/google/cloud/storageinsights_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.1.16" # {x-release-please-version} diff --git a/packages/google-cloud-storageinsights/noxfile.py b/packages/google-cloud-storageinsights/noxfile.py index 75ef2f465002..c3936d631a79 100644 --- a/packages/google-cloud-storageinsights/noxfile.py +++ b/packages/google-cloud-storageinsights/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-storageinsights/samples/generated_samples/snippet_metadata_google.cloud.storageinsights.v1.json b/packages/google-cloud-storageinsights/samples/generated_samples/snippet_metadata_google.cloud.storageinsights.v1.json index 70fd0bebd5ca..d504660b80ef 100644 --- a/packages/google-cloud-storageinsights/samples/generated_samples/snippet_metadata_google.cloud.storageinsights.v1.json +++ b/packages/google-cloud-storageinsights/samples/generated_samples/snippet_metadata_google.cloud.storageinsights.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-storageinsights", - "version": "0.1.0" + "version": "0.1.16" }, "snippets": [ { diff --git a/packages/google-cloud-storageinsights/testing/constraints-3.14.txt b/packages/google-cloud-storageinsights/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-cloud-storageinsights/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-cloud-support/.OwlBot.yaml b/packages/google-cloud-support/.OwlBot.yaml deleted file mode 100644 index 9348685f6f06..000000000000 --- a/packages/google-cloud-support/.OwlBot.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# 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/support/(.*)/.*-py - dest: /owl-bot-staging/google-cloud-support/$1 -api-name: google-cloud-support diff --git a/packages/google-cloud-support/google/cloud/support/gapic_version.py b/packages/google-cloud-support/google/cloud/support/gapic_version.py index 20a9cd975b02..f83a0255864f 100644 --- a/packages/google-cloud-support/google/cloud/support/gapic_version.py +++ b/packages/google-cloud-support/google/cloud/support/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.1.19" # {x-release-please-version} diff --git a/packages/google-cloud-support/google/cloud/support_v2/gapic_version.py b/packages/google-cloud-support/google/cloud/support_v2/gapic_version.py index 20a9cd975b02..f83a0255864f 100644 --- a/packages/google-cloud-support/google/cloud/support_v2/gapic_version.py +++ b/packages/google-cloud-support/google/cloud/support_v2/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.1.19" # {x-release-please-version} diff --git a/packages/google-cloud-support/google/cloud/support_v2beta/gapic_version.py b/packages/google-cloud-support/google/cloud/support_v2beta/gapic_version.py index 20a9cd975b02..f83a0255864f 100644 --- a/packages/google-cloud-support/google/cloud/support_v2beta/gapic_version.py +++ b/packages/google-cloud-support/google/cloud/support_v2beta/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.1.19" # {x-release-please-version} diff --git a/packages/google-cloud-support/noxfile.py b/packages/google-cloud-support/noxfile.py index f1b160fdda3a..d5946a395baf 100644 --- a/packages/google-cloud-support/noxfile.py +++ b/packages/google-cloud-support/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-support/samples/generated_samples/snippet_metadata_google.cloud.support.v2.json b/packages/google-cloud-support/samples/generated_samples/snippet_metadata_google.cloud.support.v2.json index 0e2ed2a1f18f..a5a550877173 100644 --- a/packages/google-cloud-support/samples/generated_samples/snippet_metadata_google.cloud.support.v2.json +++ b/packages/google-cloud-support/samples/generated_samples/snippet_metadata_google.cloud.support.v2.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-support", - "version": "0.1.0" + "version": "0.1.19" }, "snippets": [ { diff --git a/packages/google-cloud-support/samples/generated_samples/snippet_metadata_google.cloud.support.v2beta.json b/packages/google-cloud-support/samples/generated_samples/snippet_metadata_google.cloud.support.v2beta.json index 82ce419ee28f..590ab712e3b3 100644 --- a/packages/google-cloud-support/samples/generated_samples/snippet_metadata_google.cloud.support.v2beta.json +++ b/packages/google-cloud-support/samples/generated_samples/snippet_metadata_google.cloud.support.v2beta.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-support", - "version": "0.1.0" + "version": "0.1.19" }, "snippets": [ { diff --git a/packages/google-cloud-support/testing/constraints-3.14.txt b/packages/google-cloud-support/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-cloud-support/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-cloud-talent/.OwlBot.yaml b/packages/google-cloud-talent/.OwlBot.yaml deleted file mode 100644 index 91f33158e52d..000000000000 --- a/packages/google-cloud-talent/.OwlBot.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 2021 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -deep-remove-regex: - - /owl-bot-staging - -deep-copy-regex: - - source: /google/cloud/talent/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-talent/$1 - -begin-after-commit-hash: 15a0e742d765a1c7afcf41b9e1554f8b03b578fc - -api-name: google-cloud-talent diff --git a/packages/google-cloud-talent/.repo-metadata.json b/packages/google-cloud-talent/.repo-metadata.json index 0a57060e5327..d9d9396625b0 100644 --- a/packages/google-cloud-talent/.repo-metadata.json +++ b/packages/google-cloud-talent/.repo-metadata.json @@ -14,4 +14,4 @@ "default_version": "v4", "api_shortname": "jobs", "api_description": "Cloud Talent Solution provides the capability to create, read, update, and delete job postings, as well as search jobs based on keywords and filters." -} \ No newline at end of file +} diff --git a/packages/google-cloud-talent/google/cloud/talent/gapic_version.py b/packages/google-cloud-talent/google/cloud/talent/gapic_version.py index 20a9cd975b02..85a7fbc8c07f 100644 --- a/packages/google-cloud-talent/google/cloud/talent/gapic_version.py +++ b/packages/google-cloud-talent/google/cloud/talent/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "2.17.2" # {x-release-please-version} diff --git a/packages/google-cloud-talent/google/cloud/talent_v4/gapic_version.py b/packages/google-cloud-talent/google/cloud/talent_v4/gapic_version.py index 20a9cd975b02..85a7fbc8c07f 100644 --- a/packages/google-cloud-talent/google/cloud/talent_v4/gapic_version.py +++ b/packages/google-cloud-talent/google/cloud/talent_v4/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "2.17.2" # {x-release-please-version} diff --git a/packages/google-cloud-talent/google/cloud/talent_v4beta1/gapic_version.py b/packages/google-cloud-talent/google/cloud/talent_v4beta1/gapic_version.py index 20a9cd975b02..85a7fbc8c07f 100644 --- a/packages/google-cloud-talent/google/cloud/talent_v4beta1/gapic_version.py +++ b/packages/google-cloud-talent/google/cloud/talent_v4beta1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "2.17.2" # {x-release-please-version} diff --git a/packages/google-cloud-talent/noxfile.py b/packages/google-cloud-talent/noxfile.py index e03d22083ffc..95997ba4f385 100644 --- a/packages/google-cloud-talent/noxfile.py +++ b/packages/google-cloud-talent/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-talent/samples/generated_samples/snippet_metadata_google.cloud.talent.v4.json b/packages/google-cloud-talent/samples/generated_samples/snippet_metadata_google.cloud.talent.v4.json index 8caa824f22f3..6dd3980e40d7 100644 --- a/packages/google-cloud-talent/samples/generated_samples/snippet_metadata_google.cloud.talent.v4.json +++ b/packages/google-cloud-talent/samples/generated_samples/snippet_metadata_google.cloud.talent.v4.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-talent", - "version": "0.1.0" + "version": "2.17.2" }, "snippets": [ { diff --git a/packages/google-cloud-talent/samples/generated_samples/snippet_metadata_google.cloud.talent.v4beta1.json b/packages/google-cloud-talent/samples/generated_samples/snippet_metadata_google.cloud.talent.v4beta1.json index 580e0ed3b33e..45b6fa7edee4 100644 --- a/packages/google-cloud-talent/samples/generated_samples/snippet_metadata_google.cloud.talent.v4beta1.json +++ b/packages/google-cloud-talent/samples/generated_samples/snippet_metadata_google.cloud.talent.v4beta1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-talent", - "version": "0.1.0" + "version": "2.17.2" }, "snippets": [ { diff --git a/packages/google-cloud-talent/testing/constraints-3.14.txt b/packages/google-cloud-talent/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-cloud-talent/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-cloud-tasks/.OwlBot.yaml b/packages/google-cloud-tasks/.OwlBot.yaml deleted file mode 100644 index b0c4fb502f97..000000000000 --- a/packages/google-cloud-tasks/.OwlBot.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 2021 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -deep-remove-regex: - - /owl-bot-staging - -deep-copy-regex: - - source: /google/cloud/tasks/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-tasks/$1 - -begin-after-commit-hash: 130ce904e5d546c312943d10f48799590f9c0f66 - -api-name: google-cloud-tasks diff --git a/packages/google-cloud-tasks/google/cloud/tasks/gapic_version.py b/packages/google-cloud-tasks/google/cloud/tasks/gapic_version.py index 20a9cd975b02..628839ef0d05 100644 --- a/packages/google-cloud-tasks/google/cloud/tasks/gapic_version.py +++ b/packages/google-cloud-tasks/google/cloud/tasks/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "2.19.3" # {x-release-please-version} diff --git a/packages/google-cloud-tasks/google/cloud/tasks_v2/gapic_version.py b/packages/google-cloud-tasks/google/cloud/tasks_v2/gapic_version.py index 20a9cd975b02..628839ef0d05 100644 --- a/packages/google-cloud-tasks/google/cloud/tasks_v2/gapic_version.py +++ b/packages/google-cloud-tasks/google/cloud/tasks_v2/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "2.19.3" # {x-release-please-version} diff --git a/packages/google-cloud-tasks/google/cloud/tasks_v2beta2/gapic_version.py b/packages/google-cloud-tasks/google/cloud/tasks_v2beta2/gapic_version.py index 20a9cd975b02..628839ef0d05 100644 --- a/packages/google-cloud-tasks/google/cloud/tasks_v2beta2/gapic_version.py +++ b/packages/google-cloud-tasks/google/cloud/tasks_v2beta2/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "2.19.3" # {x-release-please-version} diff --git a/packages/google-cloud-tasks/google/cloud/tasks_v2beta3/gapic_version.py b/packages/google-cloud-tasks/google/cloud/tasks_v2beta3/gapic_version.py index 20a9cd975b02..628839ef0d05 100644 --- a/packages/google-cloud-tasks/google/cloud/tasks_v2beta3/gapic_version.py +++ b/packages/google-cloud-tasks/google/cloud/tasks_v2beta3/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "2.19.3" # {x-release-please-version} diff --git a/packages/google-cloud-tasks/noxfile.py b/packages/google-cloud-tasks/noxfile.py index f95198afbb05..59706a7e857f 100644 --- a/packages/google-cloud-tasks/noxfile.py +++ b/packages/google-cloud-tasks/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-tasks/samples/generated_samples/snippet_metadata_google.cloud.tasks.v2.json b/packages/google-cloud-tasks/samples/generated_samples/snippet_metadata_google.cloud.tasks.v2.json index a40f846fdcce..dbecdaac7b2d 100644 --- a/packages/google-cloud-tasks/samples/generated_samples/snippet_metadata_google.cloud.tasks.v2.json +++ b/packages/google-cloud-tasks/samples/generated_samples/snippet_metadata_google.cloud.tasks.v2.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-tasks", - "version": "0.1.0" + "version": "2.19.3" }, "snippets": [ { diff --git a/packages/google-cloud-tasks/samples/generated_samples/snippet_metadata_google.cloud.tasks.v2beta2.json b/packages/google-cloud-tasks/samples/generated_samples/snippet_metadata_google.cloud.tasks.v2beta2.json index 2b3fcc2324d1..cc0ce77dccba 100644 --- a/packages/google-cloud-tasks/samples/generated_samples/snippet_metadata_google.cloud.tasks.v2beta2.json +++ b/packages/google-cloud-tasks/samples/generated_samples/snippet_metadata_google.cloud.tasks.v2beta2.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-tasks", - "version": "0.1.0" + "version": "2.19.3" }, "snippets": [ { diff --git a/packages/google-cloud-tasks/samples/generated_samples/snippet_metadata_google.cloud.tasks.v2beta3.json b/packages/google-cloud-tasks/samples/generated_samples/snippet_metadata_google.cloud.tasks.v2beta3.json index c3812fadd698..7840f5605fc1 100644 --- a/packages/google-cloud-tasks/samples/generated_samples/snippet_metadata_google.cloud.tasks.v2beta3.json +++ b/packages/google-cloud-tasks/samples/generated_samples/snippet_metadata_google.cloud.tasks.v2beta3.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-tasks", - "version": "0.1.0" + "version": "2.19.3" }, "snippets": [ { diff --git a/packages/google-cloud-tasks/testing/constraints-3.14.txt b/packages/google-cloud-tasks/testing/constraints-3.14.txt new file mode 100644 index 000000000000..2010e549cceb --- /dev/null +++ b/packages/google-cloud-tasks/testing/constraints-3.14.txt @@ -0,0 +1,12 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 +grpc-google-iam-v1>=0 diff --git a/packages/google-cloud-telcoautomation/.OwlBot.yaml b/packages/google-cloud-telcoautomation/.OwlBot.yaml deleted file mode 100644 index 47eea36970f3..000000000000 --- a/packages/google-cloud-telcoautomation/.OwlBot.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# 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/telcoautomation/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-telcoautomation/$1 -api-name: google-cloud-telcoautomation diff --git a/packages/google-cloud-telcoautomation/.repo-metadata.json b/packages/google-cloud-telcoautomation/.repo-metadata.json index 679267a66a76..fc080879d90d 100644 --- a/packages/google-cloud-telcoautomation/.repo-metadata.json +++ b/packages/google-cloud-telcoautomation/.repo-metadata.json @@ -13,4 +13,4 @@ "api_id": "telcoautomation.googleapis.com", "default_version": "v1", "api_shortname": "telcoautomation" -} \ No newline at end of file +} diff --git a/packages/google-cloud-telcoautomation/google/cloud/telcoautomation/gapic_version.py b/packages/google-cloud-telcoautomation/google/cloud/telcoautomation/gapic_version.py index 20a9cd975b02..f37d4caf1652 100644 --- a/packages/google-cloud-telcoautomation/google/cloud/telcoautomation/gapic_version.py +++ b/packages/google-cloud-telcoautomation/google/cloud/telcoautomation/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.2.11" # {x-release-please-version} diff --git a/packages/google-cloud-telcoautomation/google/cloud/telcoautomation_v1/gapic_version.py b/packages/google-cloud-telcoautomation/google/cloud/telcoautomation_v1/gapic_version.py index 20a9cd975b02..f37d4caf1652 100644 --- a/packages/google-cloud-telcoautomation/google/cloud/telcoautomation_v1/gapic_version.py +++ b/packages/google-cloud-telcoautomation/google/cloud/telcoautomation_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.2.11" # {x-release-please-version} diff --git a/packages/google-cloud-telcoautomation/google/cloud/telcoautomation_v1alpha1/gapic_version.py b/packages/google-cloud-telcoautomation/google/cloud/telcoautomation_v1alpha1/gapic_version.py index 20a9cd975b02..f37d4caf1652 100644 --- a/packages/google-cloud-telcoautomation/google/cloud/telcoautomation_v1alpha1/gapic_version.py +++ b/packages/google-cloud-telcoautomation/google/cloud/telcoautomation_v1alpha1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.2.11" # {x-release-please-version} diff --git a/packages/google-cloud-telcoautomation/noxfile.py b/packages/google-cloud-telcoautomation/noxfile.py index d5addec3538a..f9fdaac8dd49 100644 --- a/packages/google-cloud-telcoautomation/noxfile.py +++ b/packages/google-cloud-telcoautomation/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-telcoautomation/samples/generated_samples/snippet_metadata_google.cloud.telcoautomation.v1.json b/packages/google-cloud-telcoautomation/samples/generated_samples/snippet_metadata_google.cloud.telcoautomation.v1.json index 93aa6c2fef47..886e07e50a8b 100644 --- a/packages/google-cloud-telcoautomation/samples/generated_samples/snippet_metadata_google.cloud.telcoautomation.v1.json +++ b/packages/google-cloud-telcoautomation/samples/generated_samples/snippet_metadata_google.cloud.telcoautomation.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-telcoautomation", - "version": "0.1.0" + "version": "0.2.11" }, "snippets": [ { diff --git a/packages/google-cloud-telcoautomation/samples/generated_samples/snippet_metadata_google.cloud.telcoautomation.v1alpha1.json b/packages/google-cloud-telcoautomation/samples/generated_samples/snippet_metadata_google.cloud.telcoautomation.v1alpha1.json index 49a97e5ab862..b99fed4bc414 100644 --- a/packages/google-cloud-telcoautomation/samples/generated_samples/snippet_metadata_google.cloud.telcoautomation.v1alpha1.json +++ b/packages/google-cloud-telcoautomation/samples/generated_samples/snippet_metadata_google.cloud.telcoautomation.v1alpha1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-telcoautomation", - "version": "0.1.0" + "version": "0.2.11" }, "snippets": [ { diff --git a/packages/google-cloud-telcoautomation/testing/constraints-3.14.txt b/packages/google-cloud-telcoautomation/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-cloud-telcoautomation/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-cloud-texttospeech/.OwlBot.yaml b/packages/google-cloud-texttospeech/.OwlBot.yaml deleted file mode 100644 index 4f9fa6a823cb..000000000000 --- a/packages/google-cloud-texttospeech/.OwlBot.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 2021 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -deep-remove-regex: - - /owl-bot-staging - -deep-copy-regex: - - source: /google/cloud/texttospeech/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-texttospeech/$1 - -begin-after-commit-hash: f92897093108f24c013e9c15c3be2709417ba5d6 - -api-name: google-cloud-texttospeech diff --git a/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1/services/text_to_speech/async_client.py b/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1/services/text_to_speech/async_client.py index 0778432b412b..96d7f7d97f7e 100644 --- a/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1/services/text_to_speech/async_client.py +++ b/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1/services/text_to_speech/async_client.py @@ -222,9 +222,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the TextToSpeechTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1/services/text_to_speech/client.py b/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1/services/text_to_speech/client.py index 426c4a7901e8..bc26bdbd904f 100644 --- a/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1/services/text_to_speech/client.py +++ b/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1/services/text_to_speech/client.py @@ -556,9 +556,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the TextToSpeechTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1/services/text_to_speech/transports/rest.py b/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1/services/text_to_speech/transports/rest.py index a445603269dc..afc6269d8f53 100644 --- a/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1/services/text_to_speech/transports/rest.py +++ b/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1/services/text_to_speech/transports/rest.py @@ -278,39 +278,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'texttospeech.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'texttospeech.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1/services/text_to_speech/transports/rest_base.py b/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1/services/text_to_speech/transports/rest_base.py index 12b51123c346..a009a96bb9a2 100644 --- a/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1/services/text_to_speech/transports/rest_base.py +++ b/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1/services/text_to_speech/transports/rest_base.py @@ -113,10 +113,11 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseStreamingSynthesize: @@ -159,7 +160,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetOperation: diff --git a/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1/services/text_to_speech_long_audio_synthesize/async_client.py b/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1/services/text_to_speech_long_audio_synthesize/async_client.py index fe92b1cdca97..7b590de2f5ac 100644 --- a/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1/services/text_to_speech_long_audio_synthesize/async_client.py +++ b/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1/services/text_to_speech_long_audio_synthesize/async_client.py @@ -242,9 +242,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the TextToSpeechLongAudioSynthesizeTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1/services/text_to_speech_long_audio_synthesize/client.py b/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1/services/text_to_speech_long_audio_synthesize/client.py index 111222aa51fc..44bf5c698e0d 100644 --- a/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1/services/text_to_speech_long_audio_synthesize/client.py +++ b/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1/services/text_to_speech_long_audio_synthesize/client.py @@ -571,9 +571,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the TextToSpeechLongAudioSynthesizeTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1/services/text_to_speech_long_audio_synthesize/transports/rest.py b/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1/services/text_to_speech_long_audio_synthesize/transports/rest.py index dd7781bd8a43..64d65ae076e8 100644 --- a/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1/services/text_to_speech_long_audio_synthesize/transports/rest.py +++ b/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1/services/text_to_speech_long_audio_synthesize/transports/rest.py @@ -225,39 +225,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'texttospeech.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'texttospeech.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1/services/text_to_speech_long_audio_synthesize/transports/rest_base.py b/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1/services/text_to_speech_long_audio_synthesize/transports/rest_base.py index 4d696149e756..9ca1d4a8bd46 100644 --- a/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1/services/text_to_speech_long_audio_synthesize/transports/rest_base.py +++ b/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1/services/text_to_speech_long_audio_synthesize/transports/rest_base.py @@ -126,7 +126,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -135,7 +135,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -144,6 +144,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetOperation: diff --git a/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1beta1/services/text_to_speech/async_client.py b/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1beta1/services/text_to_speech/async_client.py index 1565a1a99295..2f102dac111b 100644 --- a/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1beta1/services/text_to_speech/async_client.py +++ b/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1beta1/services/text_to_speech/async_client.py @@ -222,9 +222,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the TextToSpeechTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1beta1/services/text_to_speech/client.py b/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1beta1/services/text_to_speech/client.py index 939be3ed084b..6ee9021cfd5d 100644 --- a/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1beta1/services/text_to_speech/client.py +++ b/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1beta1/services/text_to_speech/client.py @@ -556,9 +556,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the TextToSpeechTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1beta1/services/text_to_speech/transports/rest.py b/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1beta1/services/text_to_speech/transports/rest.py index 71ae8c911f06..c2b8b7a1f8d5 100644 --- a/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1beta1/services/text_to_speech/transports/rest.py +++ b/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1beta1/services/text_to_speech/transports/rest.py @@ -278,39 +278,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'texttospeech.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'texttospeech.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1beta1/services/text_to_speech/transports/rest_base.py b/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1beta1/services/text_to_speech/transports/rest_base.py index a7c27b0fabf5..60a6f928a5b2 100644 --- a/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1beta1/services/text_to_speech/transports/rest_base.py +++ b/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1beta1/services/text_to_speech/transports/rest_base.py @@ -113,10 +113,11 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseStreamingSynthesize: @@ -159,7 +160,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -168,7 +169,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -177,6 +178,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetOperation: diff --git a/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1beta1/services/text_to_speech_long_audio_synthesize/async_client.py b/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1beta1/services/text_to_speech_long_audio_synthesize/async_client.py index 84fd59e9becd..398fd7798dff 100644 --- a/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1beta1/services/text_to_speech_long_audio_synthesize/async_client.py +++ b/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1beta1/services/text_to_speech_long_audio_synthesize/async_client.py @@ -242,9 +242,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the TextToSpeechLongAudioSynthesizeTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1beta1/services/text_to_speech_long_audio_synthesize/client.py b/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1beta1/services/text_to_speech_long_audio_synthesize/client.py index 7e91705af0cb..386f99870a45 100644 --- a/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1beta1/services/text_to_speech_long_audio_synthesize/client.py +++ b/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1beta1/services/text_to_speech_long_audio_synthesize/client.py @@ -571,9 +571,6 @@ def __init__( If a Callable is given, it will be called with the same set of initialization arguments as used in the TextToSpeechLongAudioSynthesizeTransport constructor. If set to None, a transport is chosen automatically. - NOTE: "rest" transport functionality is currently in a - beta state (preview). We welcome your feedback via an - issue in this library's source repository. client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. diff --git a/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1beta1/services/text_to_speech_long_audio_synthesize/transports/rest.py b/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1beta1/services/text_to_speech_long_audio_synthesize/transports/rest.py index 32adb5b433cc..e55d32a8ff98 100644 --- a/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1beta1/services/text_to_speech_long_audio_synthesize/transports/rest.py +++ b/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1beta1/services/text_to_speech_long_audio_synthesize/transports/rest.py @@ -225,39 +225,35 @@ def __init__( ) -> None: """Instantiate the transport. - NOTE: This REST transport functionality is currently in a beta - state (preview). We welcome your feedback via a GitHub issue in - this library's repository. Thank you! - - Args: - host (Optional[str]): - The hostname to connect to (default: 'texttospeech.googleapis.com'). - credentials (Optional[google.auth.credentials.Credentials]): The - authorization credentials to attach to requests. These - credentials identify the application to the service; if none - are specified, the client will attempt to ascertain the - credentials from the environment. - - credentials_file (Optional[str]): A file with credentials that can - be loaded with :func:`google.auth.load_credentials_from_file`. - This argument is ignored if ``channel`` is provided. - scopes (Optional(Sequence[str])): A list of scopes. This argument is - ignored if ``channel`` is provided. - client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client - certificate to configure mutual TLS HTTP channel. It is ignored - if ``channel`` is provided. - quota_project_id (Optional[str]): An optional project to use for billing - and quota. - client_info (google.api_core.gapic_v1.client_info.ClientInfo): - The client info used to send a user-agent string along with - API requests. If ``None``, then default info will be used. - Generally, you only need to set this if you are developing - your own client library. - always_use_jwt_access (Optional[bool]): Whether self signed JWT should - be used for service account credentials. - url_scheme: the protocol scheme for the API endpoint. Normally - "https", but for testing or local servers, - "http" can be specified. + Args: + host (Optional[str]): + The hostname to connect to (default: 'texttospeech.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + + credentials_file (Optional[str]): A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if ``channel`` is provided. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if ``channel`` is provided. + client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client + certificate to configure mutual TLS HTTP channel. It is ignored + if ``channel`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you are developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + url_scheme: the protocol scheme for the API endpoint. Normally + "https", but for testing or local servers, + "http" can be specified. """ # Run the base constructor # TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc. diff --git a/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1beta1/services/text_to_speech_long_audio_synthesize/transports/rest_base.py b/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1beta1/services/text_to_speech_long_audio_synthesize/transports/rest_base.py index f53e907a68be..dfe398f9d18c 100644 --- a/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1beta1/services/text_to_speech_long_audio_synthesize/transports/rest_base.py +++ b/packages/google-cloud-texttospeech/google/cloud/texttospeech_v1beta1/services/text_to_speech_long_audio_synthesize/transports/rest_base.py @@ -126,7 +126,7 @@ def _get_request_body_json(transcoded_request): # Jsonify the request body body = json_format.MessageToJson( - transcoded_request["body"], use_integers_for_enums=False + transcoded_request["body"], use_integers_for_enums=True ) return body @@ -135,7 +135,7 @@ def _get_query_params_json(transcoded_request): query_params = json.loads( json_format.MessageToJson( transcoded_request["query_params"], - use_integers_for_enums=False, + use_integers_for_enums=True, ) ) query_params.update( @@ -144,6 +144,7 @@ def _get_query_params_json(transcoded_request): ) ) + query_params["$alt"] = "json;enum-encoding=int" return query_params class _BaseGetOperation: diff --git a/packages/google-cloud-texttospeech/noxfile.py b/packages/google-cloud-texttospeech/noxfile.py index ea056f9dfd58..af621bad8373 100644 --- a/packages/google-cloud-texttospeech/noxfile.py +++ b/packages/google-cloud-texttospeech/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-texttospeech/testing/constraints-3.14.txt b/packages/google-cloud-texttospeech/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-cloud-texttospeech/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-cloud-texttospeech/tests/unit/gapic/texttospeech_v1/test_text_to_speech.py b/packages/google-cloud-texttospeech/tests/unit/gapic/texttospeech_v1/test_text_to_speech.py index 0c2a8dfce17e..ea73c057ba62 100644 --- a/packages/google-cloud-texttospeech/tests/unit/gapic/texttospeech_v1/test_text_to_speech.py +++ b/packages/google-cloud-texttospeech/tests/unit/gapic/texttospeech_v1/test_text_to_speech.py @@ -1996,7 +1996,7 @@ def test_synthesize_speech_rest_required_fields( response = client.synthesize_speech(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-texttospeech/tests/unit/gapic/texttospeech_v1/test_text_to_speech_long_audio_synthesize.py b/packages/google-cloud-texttospeech/tests/unit/gapic/texttospeech_v1/test_text_to_speech_long_audio_synthesize.py index 2e01e72d1189..20a11323c795 100644 --- a/packages/google-cloud-texttospeech/tests/unit/gapic/texttospeech_v1/test_text_to_speech_long_audio_synthesize.py +++ b/packages/google-cloud-texttospeech/tests/unit/gapic/texttospeech_v1/test_text_to_speech_long_audio_synthesize.py @@ -1591,7 +1591,7 @@ def test_synthesize_long_audio_rest_required_fields( response = client.synthesize_long_audio(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-texttospeech/tests/unit/gapic/texttospeech_v1beta1/test_text_to_speech.py b/packages/google-cloud-texttospeech/tests/unit/gapic/texttospeech_v1beta1/test_text_to_speech.py index a8089b3e7852..8ca733339af5 100644 --- a/packages/google-cloud-texttospeech/tests/unit/gapic/texttospeech_v1beta1/test_text_to_speech.py +++ b/packages/google-cloud-texttospeech/tests/unit/gapic/texttospeech_v1beta1/test_text_to_speech.py @@ -1998,7 +1998,7 @@ def test_synthesize_speech_rest_required_fields( response = client.synthesize_speech(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-texttospeech/tests/unit/gapic/texttospeech_v1beta1/test_text_to_speech_long_audio_synthesize.py b/packages/google-cloud-texttospeech/tests/unit/gapic/texttospeech_v1beta1/test_text_to_speech_long_audio_synthesize.py index cb5f618d5673..8e23b5bc4600 100644 --- a/packages/google-cloud-texttospeech/tests/unit/gapic/texttospeech_v1beta1/test_text_to_speech_long_audio_synthesize.py +++ b/packages/google-cloud-texttospeech/tests/unit/gapic/texttospeech_v1beta1/test_text_to_speech_long_audio_synthesize.py @@ -1591,7 +1591,7 @@ def test_synthesize_long_audio_rest_required_fields( response = client.synthesize_long_audio(request) - expected_params = [] + expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params diff --git a/packages/google-cloud-tpu/.OwlBot.yaml b/packages/google-cloud-tpu/.OwlBot.yaml deleted file mode 100644 index c8f11e809320..000000000000 --- a/packages/google-cloud-tpu/.OwlBot.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright 2021 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -deep-remove-regex: - - /owl-bot-staging - -deep-copy-regex: - - source: /google/cloud/tpu/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-tpu/$1 - -begin-after-commit-hash: 70f7f0525414fe4dfeb2fc2e81546b073f83a621 -api-name: google-cloud-tpu diff --git a/packages/google-cloud-tpu/.repo-metadata.json b/packages/google-cloud-tpu/.repo-metadata.json index 0a13a44d954d..23985bbad197 100644 --- a/packages/google-cloud-tpu/.repo-metadata.json +++ b/packages/google-cloud-tpu/.repo-metadata.json @@ -13,4 +13,4 @@ "default_version": "v1", "api_shortname": "tpu", "api_description": "Cloud Tensor Processing Units (TPUs) are Google's custom-developed application-specific integrated circuits (ASICs) used to accelerate machine learning workloads." -} \ No newline at end of file +} diff --git a/packages/google-cloud-tpu/google/cloud/tpu/gapic_version.py b/packages/google-cloud-tpu/google/cloud/tpu/gapic_version.py index 20a9cd975b02..5b425aa2622a 100644 --- a/packages/google-cloud-tpu/google/cloud/tpu/gapic_version.py +++ b/packages/google-cloud-tpu/google/cloud/tpu/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.23.2" # {x-release-please-version} diff --git a/packages/google-cloud-tpu/google/cloud/tpu_v1/gapic_version.py b/packages/google-cloud-tpu/google/cloud/tpu_v1/gapic_version.py index 20a9cd975b02..5b425aa2622a 100644 --- a/packages/google-cloud-tpu/google/cloud/tpu_v1/gapic_version.py +++ b/packages/google-cloud-tpu/google/cloud/tpu_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.23.2" # {x-release-please-version} diff --git a/packages/google-cloud-tpu/google/cloud/tpu_v2/gapic_version.py b/packages/google-cloud-tpu/google/cloud/tpu_v2/gapic_version.py index 20a9cd975b02..5b425aa2622a 100644 --- a/packages/google-cloud-tpu/google/cloud/tpu_v2/gapic_version.py +++ b/packages/google-cloud-tpu/google/cloud/tpu_v2/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.23.2" # {x-release-please-version} diff --git a/packages/google-cloud-tpu/google/cloud/tpu_v2alpha1/gapic_version.py b/packages/google-cloud-tpu/google/cloud/tpu_v2alpha1/gapic_version.py index 20a9cd975b02..5b425aa2622a 100644 --- a/packages/google-cloud-tpu/google/cloud/tpu_v2alpha1/gapic_version.py +++ b/packages/google-cloud-tpu/google/cloud/tpu_v2alpha1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.23.2" # {x-release-please-version} diff --git a/packages/google-cloud-tpu/noxfile.py b/packages/google-cloud-tpu/noxfile.py index 27245b8bc972..600359b863a4 100644 --- a/packages/google-cloud-tpu/noxfile.py +++ b/packages/google-cloud-tpu/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-tpu/samples/generated_samples/snippet_metadata_google.cloud.tpu.v1.json b/packages/google-cloud-tpu/samples/generated_samples/snippet_metadata_google.cloud.tpu.v1.json index 0c1dfa7ef851..422f82d16391 100644 --- a/packages/google-cloud-tpu/samples/generated_samples/snippet_metadata_google.cloud.tpu.v1.json +++ b/packages/google-cloud-tpu/samples/generated_samples/snippet_metadata_google.cloud.tpu.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-tpu", - "version": "0.1.0" + "version": "1.23.2" }, "snippets": [ { diff --git a/packages/google-cloud-tpu/samples/generated_samples/snippet_metadata_google.cloud.tpu.v2.json b/packages/google-cloud-tpu/samples/generated_samples/snippet_metadata_google.cloud.tpu.v2.json index bca59a74df6e..84d8f4bcb956 100644 --- a/packages/google-cloud-tpu/samples/generated_samples/snippet_metadata_google.cloud.tpu.v2.json +++ b/packages/google-cloud-tpu/samples/generated_samples/snippet_metadata_google.cloud.tpu.v2.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-tpu", - "version": "0.1.0" + "version": "1.23.2" }, "snippets": [ { diff --git a/packages/google-cloud-tpu/samples/generated_samples/snippet_metadata_google.cloud.tpu.v2alpha1.json b/packages/google-cloud-tpu/samples/generated_samples/snippet_metadata_google.cloud.tpu.v2alpha1.json index 760d92d2f8bc..97f5b47de6d4 100644 --- a/packages/google-cloud-tpu/samples/generated_samples/snippet_metadata_google.cloud.tpu.v2alpha1.json +++ b/packages/google-cloud-tpu/samples/generated_samples/snippet_metadata_google.cloud.tpu.v2alpha1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-tpu", - "version": "0.1.0" + "version": "1.23.2" }, "snippets": [ { diff --git a/packages/google-cloud-tpu/testing/constraints-3.14.txt b/packages/google-cloud-tpu/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-cloud-tpu/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-cloud-trace/.OwlBot.yaml b/packages/google-cloud-trace/.OwlBot.yaml deleted file mode 100644 index 124bab9ea57a..000000000000 --- a/packages/google-cloud-trace/.OwlBot.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 2021 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -deep-remove-regex: - - /owl-bot-staging - -deep-copy-regex: - - source: /google/devtools/cloudtrace/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-trace/$1 - -begin-after-commit-hash: 6acf4a0a797f1082027985c55c4b14b60f673dd7 - -api-name: google-cloud-trace diff --git a/packages/google-cloud-trace/google/cloud/trace/gapic_version.py b/packages/google-cloud-trace/google/cloud/trace/gapic_version.py index 20a9cd975b02..f5ca8eb61c8c 100644 --- a/packages/google-cloud-trace/google/cloud/trace/gapic_version.py +++ b/packages/google-cloud-trace/google/cloud/trace/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.16.2" # {x-release-please-version} diff --git a/packages/google-cloud-trace/google/cloud/trace_v1/gapic_version.py b/packages/google-cloud-trace/google/cloud/trace_v1/gapic_version.py index 20a9cd975b02..f5ca8eb61c8c 100644 --- a/packages/google-cloud-trace/google/cloud/trace_v1/gapic_version.py +++ b/packages/google-cloud-trace/google/cloud/trace_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.16.2" # {x-release-please-version} diff --git a/packages/google-cloud-trace/google/cloud/trace_v2/gapic_version.py b/packages/google-cloud-trace/google/cloud/trace_v2/gapic_version.py index 20a9cd975b02..f5ca8eb61c8c 100644 --- a/packages/google-cloud-trace/google/cloud/trace_v2/gapic_version.py +++ b/packages/google-cloud-trace/google/cloud/trace_v2/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.16.2" # {x-release-please-version} diff --git a/packages/google-cloud-trace/noxfile.py b/packages/google-cloud-trace/noxfile.py index 90dd06e22294..c3f8322d60fb 100644 --- a/packages/google-cloud-trace/noxfile.py +++ b/packages/google-cloud-trace/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-trace/samples/generated_samples/snippet_metadata_google.devtools.cloudtrace.v1.json b/packages/google-cloud-trace/samples/generated_samples/snippet_metadata_google.devtools.cloudtrace.v1.json index a4f20614ce5b..e6eecf089eda 100644 --- a/packages/google-cloud-trace/samples/generated_samples/snippet_metadata_google.devtools.cloudtrace.v1.json +++ b/packages/google-cloud-trace/samples/generated_samples/snippet_metadata_google.devtools.cloudtrace.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-trace", - "version": "0.1.0" + "version": "1.16.2" }, "snippets": [ { diff --git a/packages/google-cloud-trace/samples/generated_samples/snippet_metadata_google.devtools.cloudtrace.v2.json b/packages/google-cloud-trace/samples/generated_samples/snippet_metadata_google.devtools.cloudtrace.v2.json index b7d6fcf9f839..a6653b32f16e 100644 --- a/packages/google-cloud-trace/samples/generated_samples/snippet_metadata_google.devtools.cloudtrace.v2.json +++ b/packages/google-cloud-trace/samples/generated_samples/snippet_metadata_google.devtools.cloudtrace.v2.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-trace", - "version": "0.1.0" + "version": "1.16.2" }, "snippets": [ { diff --git a/packages/google-cloud-trace/testing/constraints-3.14.txt b/packages/google-cloud-trace/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-cloud-trace/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-cloud-translate/.OwlBot.yaml b/packages/google-cloud-translate/.OwlBot.yaml deleted file mode 100644 index 31d4373d991b..000000000000 --- a/packages/google-cloud-translate/.OwlBot.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 2021 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -deep-remove-regex: - - /owl-bot-staging - -deep-copy-regex: - - source: /google/cloud/translate/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-translate/$1 - -begin-after-commit-hash: 19c469f0eefe7735eb3d6438773f12dd88060da1 - -api-name: google-cloud-translate diff --git a/packages/google-cloud-translate/google/cloud/translate/gapic_version.py b/packages/google-cloud-translate/google/cloud/translate/gapic_version.py index 20a9cd975b02..41991358e55b 100644 --- a/packages/google-cloud-translate/google/cloud/translate/gapic_version.py +++ b/packages/google-cloud-translate/google/cloud/translate/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "3.21.1" # {x-release-please-version} diff --git a/packages/google-cloud-translate/google/cloud/translate_v3/gapic_version.py b/packages/google-cloud-translate/google/cloud/translate_v3/gapic_version.py index 20a9cd975b02..41991358e55b 100644 --- a/packages/google-cloud-translate/google/cloud/translate_v3/gapic_version.py +++ b/packages/google-cloud-translate/google/cloud/translate_v3/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "3.21.1" # {x-release-please-version} diff --git a/packages/google-cloud-translate/google/cloud/translate_v3beta1/gapic_version.py b/packages/google-cloud-translate/google/cloud/translate_v3beta1/gapic_version.py index 20a9cd975b02..41991358e55b 100644 --- a/packages/google-cloud-translate/google/cloud/translate_v3beta1/gapic_version.py +++ b/packages/google-cloud-translate/google/cloud/translate_v3beta1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "3.21.1" # {x-release-please-version} diff --git a/packages/google-cloud-translate/noxfile.py b/packages/google-cloud-translate/noxfile.py index 078152958e83..4c33c31b517c 100644 --- a/packages/google-cloud-translate/noxfile.py +++ b/packages/google-cloud-translate/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-translate/samples/generated_samples/snippet_metadata_google.cloud.translation.v3.json b/packages/google-cloud-translate/samples/generated_samples/snippet_metadata_google.cloud.translation.v3.json index de406536e428..e6bdd5d7706d 100644 --- a/packages/google-cloud-translate/samples/generated_samples/snippet_metadata_google.cloud.translation.v3.json +++ b/packages/google-cloud-translate/samples/generated_samples/snippet_metadata_google.cloud.translation.v3.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-translate", - "version": "0.1.0" + "version": "3.21.1" }, "snippets": [ { diff --git a/packages/google-cloud-translate/samples/generated_samples/snippet_metadata_google.cloud.translation.v3beta1.json b/packages/google-cloud-translate/samples/generated_samples/snippet_metadata_google.cloud.translation.v3beta1.json index 74f2e4c9def9..dcd4c5abc0fe 100644 --- a/packages/google-cloud-translate/samples/generated_samples/snippet_metadata_google.cloud.translation.v3beta1.json +++ b/packages/google-cloud-translate/samples/generated_samples/snippet_metadata_google.cloud.translation.v3beta1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-translate", - "version": "0.1.0" + "version": "3.21.1" }, "snippets": [ { diff --git a/packages/google-cloud-translate/testing/constraints-3.14.txt b/packages/google-cloud-translate/testing/constraints-3.14.txt new file mode 100644 index 000000000000..2010e549cceb --- /dev/null +++ b/packages/google-cloud-translate/testing/constraints-3.14.txt @@ -0,0 +1,12 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 +grpc-google-iam-v1>=0 diff --git a/packages/google-cloud-video-live-stream/.repo-metadata.json b/packages/google-cloud-video-live-stream/.repo-metadata.json index ee00efee716c..b9a8c8c0d9a9 100644 --- a/packages/google-cloud-video-live-stream/.repo-metadata.json +++ b/packages/google-cloud-video-live-stream/.repo-metadata.json @@ -13,4 +13,4 @@ "default_version": "v1", "api_shortname": "livestream", "api_description": "transcodes mezzanine live signals into direct-to-consumer streaming formats, including Dynamic Adaptive Streaming over HTTP (DASH/MPEG-DASH), and HTTP Live Streaming (HLS), for multiple device platforms." -} \ No newline at end of file +} diff --git a/packages/google-cloud-video-live-stream/noxfile.py b/packages/google-cloud-video-live-stream/noxfile.py index 31806bf56df1..4d738ff08794 100644 --- a/packages/google-cloud-video-live-stream/noxfile.py +++ b/packages/google-cloud-video-live-stream/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-video-live-stream/testing/constraints-3.14.txt b/packages/google-cloud-video-live-stream/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-cloud-video-live-stream/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-cloud-video-transcoder/.OwlBot.yaml b/packages/google-cloud-video-transcoder/.OwlBot.yaml deleted file mode 100644 index 7093b946b5c6..000000000000 --- a/packages/google-cloud-video-transcoder/.OwlBot.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 2021 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -deep-remove-regex: - - /owl-bot-staging - -deep-copy-regex: - - source: /google/cloud/video/transcoder/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-video-transcoder/$1 - -begin-after-commit-hash: 19c469f0eefe7735eb3d6438773f12dd88060da1 - -api-name: google-cloud-video-transcoder diff --git a/packages/google-cloud-video-transcoder/.repo-metadata.json b/packages/google-cloud-video-transcoder/.repo-metadata.json index 40aa5b4e57c2..080835fb3b28 100644 --- a/packages/google-cloud-video-transcoder/.repo-metadata.json +++ b/packages/google-cloud-video-transcoder/.repo-metadata.json @@ -13,4 +13,4 @@ "default_version": "v1", "api_shortname": "transcoder", "api_description": "allows you to transcode videos into a variety of formats. The Transcoder API benefits broadcasters, production companies, businesses, and individuals looking to transform their video content for use across a variety of user devices." -} \ No newline at end of file +} diff --git a/packages/google-cloud-video-transcoder/google/cloud/video/transcoder/gapic_version.py b/packages/google-cloud-video-transcoder/google/cloud/video/transcoder/gapic_version.py index 20a9cd975b02..d47ed1c7f4a9 100644 --- a/packages/google-cloud-video-transcoder/google/cloud/video/transcoder/gapic_version.py +++ b/packages/google-cloud-video-transcoder/google/cloud/video/transcoder/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.17.0" # {x-release-please-version} diff --git a/packages/google-cloud-video-transcoder/google/cloud/video/transcoder_v1/gapic_version.py b/packages/google-cloud-video-transcoder/google/cloud/video/transcoder_v1/gapic_version.py index 20a9cd975b02..d47ed1c7f4a9 100644 --- a/packages/google-cloud-video-transcoder/google/cloud/video/transcoder_v1/gapic_version.py +++ b/packages/google-cloud-video-transcoder/google/cloud/video/transcoder_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.17.0" # {x-release-please-version} diff --git a/packages/google-cloud-video-transcoder/noxfile.py b/packages/google-cloud-video-transcoder/noxfile.py index ac288593e636..4b38447c254a 100644 --- a/packages/google-cloud-video-transcoder/noxfile.py +++ b/packages/google-cloud-video-transcoder/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-video-transcoder/samples/generated_samples/snippet_metadata_google.cloud.video.transcoder.v1.json b/packages/google-cloud-video-transcoder/samples/generated_samples/snippet_metadata_google.cloud.video.transcoder.v1.json index 5c4b962d53e7..9e4ef5f1fd22 100644 --- a/packages/google-cloud-video-transcoder/samples/generated_samples/snippet_metadata_google.cloud.video.transcoder.v1.json +++ b/packages/google-cloud-video-transcoder/samples/generated_samples/snippet_metadata_google.cloud.video.transcoder.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-video-transcoder", - "version": "0.1.0" + "version": "1.17.0" }, "snippets": [ { diff --git a/packages/google-cloud-video-transcoder/testing/constraints-3.14.txt b/packages/google-cloud-video-transcoder/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-cloud-video-transcoder/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-cloud-videointelligence/.OwlBot.yaml b/packages/google-cloud-videointelligence/.OwlBot.yaml deleted file mode 100644 index d019556c6eb3..000000000000 --- a/packages/google-cloud-videointelligence/.OwlBot.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 2021 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -deep-remove-regex: - - /owl-bot-staging - -deep-copy-regex: - - source: /google/cloud/videointelligence/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-videointelligence/$1 - -begin-after-commit-hash: 9f1fe1408a1799948f1b17add7c3a15145057718 - -api-name: google-cloud-videointelligence diff --git a/packages/google-cloud-videointelligence/.repo-metadata.json b/packages/google-cloud-videointelligence/.repo-metadata.json index 3ae50a94b80c..26312dba6fb0 100644 --- a/packages/google-cloud-videointelligence/.repo-metadata.json +++ b/packages/google-cloud-videointelligence/.repo-metadata.json @@ -14,4 +14,4 @@ "default_version": "v1", "api_shortname": "videointelligence", "api_description": "makes videos searchable, and discoverable, by extracting metadata with an easy to use API. You can now search every moment of every video file in your catalog and find every occurrence as well as its significance. It quickly annotates videos stored in Google Cloud Storage, and helps you identify key nouns entities of your video, and when they occur within the video. Separate signal from noise, by retrieving relevant information at the video, shot or per frame." -} \ No newline at end of file +} diff --git a/packages/google-cloud-videointelligence/google/cloud/videointelligence/gapic_version.py b/packages/google-cloud-videointelligence/google/cloud/videointelligence/gapic_version.py index 20a9cd975b02..544ac1b5414e 100644 --- a/packages/google-cloud-videointelligence/google/cloud/videointelligence/gapic_version.py +++ b/packages/google-cloud-videointelligence/google/cloud/videointelligence/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "2.16.2" # {x-release-please-version} diff --git a/packages/google-cloud-videointelligence/google/cloud/videointelligence_v1/gapic_version.py b/packages/google-cloud-videointelligence/google/cloud/videointelligence_v1/gapic_version.py index 20a9cd975b02..544ac1b5414e 100644 --- a/packages/google-cloud-videointelligence/google/cloud/videointelligence_v1/gapic_version.py +++ b/packages/google-cloud-videointelligence/google/cloud/videointelligence_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "2.16.2" # {x-release-please-version} diff --git a/packages/google-cloud-videointelligence/google/cloud/videointelligence_v1beta2/gapic_version.py b/packages/google-cloud-videointelligence/google/cloud/videointelligence_v1beta2/gapic_version.py index 20a9cd975b02..544ac1b5414e 100644 --- a/packages/google-cloud-videointelligence/google/cloud/videointelligence_v1beta2/gapic_version.py +++ b/packages/google-cloud-videointelligence/google/cloud/videointelligence_v1beta2/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "2.16.2" # {x-release-please-version} diff --git a/packages/google-cloud-videointelligence/google/cloud/videointelligence_v1p1beta1/gapic_version.py b/packages/google-cloud-videointelligence/google/cloud/videointelligence_v1p1beta1/gapic_version.py index 20a9cd975b02..544ac1b5414e 100644 --- a/packages/google-cloud-videointelligence/google/cloud/videointelligence_v1p1beta1/gapic_version.py +++ b/packages/google-cloud-videointelligence/google/cloud/videointelligence_v1p1beta1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "2.16.2" # {x-release-please-version} diff --git a/packages/google-cloud-videointelligence/google/cloud/videointelligence_v1p2beta1/gapic_version.py b/packages/google-cloud-videointelligence/google/cloud/videointelligence_v1p2beta1/gapic_version.py index 20a9cd975b02..544ac1b5414e 100644 --- a/packages/google-cloud-videointelligence/google/cloud/videointelligence_v1p2beta1/gapic_version.py +++ b/packages/google-cloud-videointelligence/google/cloud/videointelligence_v1p2beta1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "2.16.2" # {x-release-please-version} diff --git a/packages/google-cloud-videointelligence/google/cloud/videointelligence_v1p3beta1/gapic_version.py b/packages/google-cloud-videointelligence/google/cloud/videointelligence_v1p3beta1/gapic_version.py index 20a9cd975b02..544ac1b5414e 100644 --- a/packages/google-cloud-videointelligence/google/cloud/videointelligence_v1p3beta1/gapic_version.py +++ b/packages/google-cloud-videointelligence/google/cloud/videointelligence_v1p3beta1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "2.16.2" # {x-release-please-version} diff --git a/packages/google-cloud-videointelligence/noxfile.py b/packages/google-cloud-videointelligence/noxfile.py index 316047df827a..1d999e6c67bc 100644 --- a/packages/google-cloud-videointelligence/noxfile.py +++ b/packages/google-cloud-videointelligence/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-videointelligence/samples/generated_samples/snippet_metadata_google.cloud.videointelligence.v1.json b/packages/google-cloud-videointelligence/samples/generated_samples/snippet_metadata_google.cloud.videointelligence.v1.json index e198e62e8a23..6683785ea3a1 100644 --- a/packages/google-cloud-videointelligence/samples/generated_samples/snippet_metadata_google.cloud.videointelligence.v1.json +++ b/packages/google-cloud-videointelligence/samples/generated_samples/snippet_metadata_google.cloud.videointelligence.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-videointelligence", - "version": "0.1.0" + "version": "2.16.2" }, "snippets": [ { diff --git a/packages/google-cloud-videointelligence/samples/generated_samples/snippet_metadata_google.cloud.videointelligence.v1beta2.json b/packages/google-cloud-videointelligence/samples/generated_samples/snippet_metadata_google.cloud.videointelligence.v1beta2.json index 3f3ec25e9b73..ce22bf2d0c3f 100644 --- a/packages/google-cloud-videointelligence/samples/generated_samples/snippet_metadata_google.cloud.videointelligence.v1beta2.json +++ b/packages/google-cloud-videointelligence/samples/generated_samples/snippet_metadata_google.cloud.videointelligence.v1beta2.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-videointelligence", - "version": "0.1.0" + "version": "2.16.2" }, "snippets": [ { diff --git a/packages/google-cloud-videointelligence/samples/generated_samples/snippet_metadata_google.cloud.videointelligence.v1p1beta1.json b/packages/google-cloud-videointelligence/samples/generated_samples/snippet_metadata_google.cloud.videointelligence.v1p1beta1.json index 99531c7a7090..242a8267a021 100644 --- a/packages/google-cloud-videointelligence/samples/generated_samples/snippet_metadata_google.cloud.videointelligence.v1p1beta1.json +++ b/packages/google-cloud-videointelligence/samples/generated_samples/snippet_metadata_google.cloud.videointelligence.v1p1beta1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-videointelligence", - "version": "0.1.0" + "version": "2.16.2" }, "snippets": [ { diff --git a/packages/google-cloud-videointelligence/samples/generated_samples/snippet_metadata_google.cloud.videointelligence.v1p2beta1.json b/packages/google-cloud-videointelligence/samples/generated_samples/snippet_metadata_google.cloud.videointelligence.v1p2beta1.json index 5fad06591e51..7146768be54b 100644 --- a/packages/google-cloud-videointelligence/samples/generated_samples/snippet_metadata_google.cloud.videointelligence.v1p2beta1.json +++ b/packages/google-cloud-videointelligence/samples/generated_samples/snippet_metadata_google.cloud.videointelligence.v1p2beta1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-videointelligence", - "version": "0.1.0" + "version": "2.16.2" }, "snippets": [ { diff --git a/packages/google-cloud-videointelligence/samples/generated_samples/snippet_metadata_google.cloud.videointelligence.v1p3beta1.json b/packages/google-cloud-videointelligence/samples/generated_samples/snippet_metadata_google.cloud.videointelligence.v1p3beta1.json index b409a29f032a..33d9f47910a0 100644 --- a/packages/google-cloud-videointelligence/samples/generated_samples/snippet_metadata_google.cloud.videointelligence.v1p3beta1.json +++ b/packages/google-cloud-videointelligence/samples/generated_samples/snippet_metadata_google.cloud.videointelligence.v1p3beta1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-videointelligence", - "version": "0.1.0" + "version": "2.16.2" }, "snippets": [ { diff --git a/packages/google-cloud-videointelligence/testing/constraints-3.14.txt b/packages/google-cloud-videointelligence/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-cloud-videointelligence/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-cloud-vision/.OwlBot.yaml b/packages/google-cloud-vision/.OwlBot.yaml deleted file mode 100644 index f89f1a1827af..000000000000 --- a/packages/google-cloud-vision/.OwlBot.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 2021 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -deep-remove-regex: - - /owl-bot-staging - -deep-copy-regex: - - source: /google/cloud/vision/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-vision/$1 - -begin-after-commit-hash: e0ea8b51f30e2ff6104abd1e4c8d1eb67078c86a - -api-name: google-cloud-vision diff --git a/packages/google-cloud-vision/google/cloud/vision/gapic_version.py b/packages/google-cloud-vision/google/cloud/vision/gapic_version.py index 20a9cd975b02..515b53839c93 100644 --- a/packages/google-cloud-vision/google/cloud/vision/gapic_version.py +++ b/packages/google-cloud-vision/google/cloud/vision/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "3.10.2" # {x-release-please-version} diff --git a/packages/google-cloud-vision/google/cloud/vision_v1/gapic_version.py b/packages/google-cloud-vision/google/cloud/vision_v1/gapic_version.py index 20a9cd975b02..515b53839c93 100644 --- a/packages/google-cloud-vision/google/cloud/vision_v1/gapic_version.py +++ b/packages/google-cloud-vision/google/cloud/vision_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "3.10.2" # {x-release-please-version} diff --git a/packages/google-cloud-vision/google/cloud/vision_v1p1beta1/gapic_version.py b/packages/google-cloud-vision/google/cloud/vision_v1p1beta1/gapic_version.py index 20a9cd975b02..515b53839c93 100644 --- a/packages/google-cloud-vision/google/cloud/vision_v1p1beta1/gapic_version.py +++ b/packages/google-cloud-vision/google/cloud/vision_v1p1beta1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "3.10.2" # {x-release-please-version} diff --git a/packages/google-cloud-vision/google/cloud/vision_v1p2beta1/gapic_version.py b/packages/google-cloud-vision/google/cloud/vision_v1p2beta1/gapic_version.py index 20a9cd975b02..515b53839c93 100644 --- a/packages/google-cloud-vision/google/cloud/vision_v1p2beta1/gapic_version.py +++ b/packages/google-cloud-vision/google/cloud/vision_v1p2beta1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "3.10.2" # {x-release-please-version} diff --git a/packages/google-cloud-vision/google/cloud/vision_v1p3beta1/gapic_version.py b/packages/google-cloud-vision/google/cloud/vision_v1p3beta1/gapic_version.py index 20a9cd975b02..515b53839c93 100644 --- a/packages/google-cloud-vision/google/cloud/vision_v1p3beta1/gapic_version.py +++ b/packages/google-cloud-vision/google/cloud/vision_v1p3beta1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "3.10.2" # {x-release-please-version} diff --git a/packages/google-cloud-vision/google/cloud/vision_v1p4beta1/gapic_version.py b/packages/google-cloud-vision/google/cloud/vision_v1p4beta1/gapic_version.py index 20a9cd975b02..515b53839c93 100644 --- a/packages/google-cloud-vision/google/cloud/vision_v1p4beta1/gapic_version.py +++ b/packages/google-cloud-vision/google/cloud/vision_v1p4beta1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "3.10.2" # {x-release-please-version} diff --git a/packages/google-cloud-vision/noxfile.py b/packages/google-cloud-vision/noxfile.py index a10c061a4817..d228010f0945 100644 --- a/packages/google-cloud-vision/noxfile.py +++ b/packages/google-cloud-vision/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-vision/samples/README b/packages/google-cloud-vision/samples/README deleted file mode 100644 index 621045ed7468..000000000000 --- a/packages/google-cloud-vision/samples/README +++ /dev/null @@ -1,3 +0,0 @@ -These samples have moved. - -https://github.com/GoogleCloudPlatform/python-docs-samples/tree/main/vision/snippets \ No newline at end of file diff --git a/packages/google-cloud-vision/samples/generated_samples/snippet_metadata_google.cloud.vision.v1.json b/packages/google-cloud-vision/samples/generated_samples/snippet_metadata_google.cloud.vision.v1.json index 8508099e5ba2..4abe387e04c1 100644 --- a/packages/google-cloud-vision/samples/generated_samples/snippet_metadata_google.cloud.vision.v1.json +++ b/packages/google-cloud-vision/samples/generated_samples/snippet_metadata_google.cloud.vision.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-vision", - "version": "0.1.0" + "version": "3.10.2" }, "snippets": [ { diff --git a/packages/google-cloud-vision/samples/generated_samples/snippet_metadata_google.cloud.vision.v1p1beta1.json b/packages/google-cloud-vision/samples/generated_samples/snippet_metadata_google.cloud.vision.v1p1beta1.json index 3274884f3da9..12c9771c28b5 100644 --- a/packages/google-cloud-vision/samples/generated_samples/snippet_metadata_google.cloud.vision.v1p1beta1.json +++ b/packages/google-cloud-vision/samples/generated_samples/snippet_metadata_google.cloud.vision.v1p1beta1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-vision", - "version": "0.1.0" + "version": "3.10.2" }, "snippets": [ { diff --git a/packages/google-cloud-vision/samples/generated_samples/snippet_metadata_google.cloud.vision.v1p2beta1.json b/packages/google-cloud-vision/samples/generated_samples/snippet_metadata_google.cloud.vision.v1p2beta1.json index 1737a0ce6698..327dc873e0c4 100644 --- a/packages/google-cloud-vision/samples/generated_samples/snippet_metadata_google.cloud.vision.v1p2beta1.json +++ b/packages/google-cloud-vision/samples/generated_samples/snippet_metadata_google.cloud.vision.v1p2beta1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-vision", - "version": "0.1.0" + "version": "3.10.2" }, "snippets": [ { diff --git a/packages/google-cloud-vision/samples/generated_samples/snippet_metadata_google.cloud.vision.v1p3beta1.json b/packages/google-cloud-vision/samples/generated_samples/snippet_metadata_google.cloud.vision.v1p3beta1.json index da3759f8bc75..f00d90eb35be 100644 --- a/packages/google-cloud-vision/samples/generated_samples/snippet_metadata_google.cloud.vision.v1p3beta1.json +++ b/packages/google-cloud-vision/samples/generated_samples/snippet_metadata_google.cloud.vision.v1p3beta1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-vision", - "version": "0.1.0" + "version": "3.10.2" }, "snippets": [ { diff --git a/packages/google-cloud-vision/samples/generated_samples/snippet_metadata_google.cloud.vision.v1p4beta1.json b/packages/google-cloud-vision/samples/generated_samples/snippet_metadata_google.cloud.vision.v1p4beta1.json index e239e7f4ae0e..d0b8f6f6d7f7 100644 --- a/packages/google-cloud-vision/samples/generated_samples/snippet_metadata_google.cloud.vision.v1p4beta1.json +++ b/packages/google-cloud-vision/samples/generated_samples/snippet_metadata_google.cloud.vision.v1p4beta1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-vision", - "version": "0.1.0" + "version": "3.10.2" }, "snippets": [ { diff --git a/packages/google-cloud-vision/testing/constraints-3.14.txt b/packages/google-cloud-vision/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-cloud-vision/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-cloud-vision/tests/unit/test_helpers.py b/packages/google-cloud-vision/tests/unit/test_helpers.py deleted file mode 100644 index 99af50cff7a6..000000000000 --- a/packages/google-cloud-vision/tests/unit/test_helpers.py +++ /dev/null @@ -1,130 +0,0 @@ -# Copyright 2017, Google LLC All rights reserved. -# -# Licensed under the Apache License, Version 2.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. - -from __future__ import absolute_import - -import builtins -import io -import unittest - -from google.auth.credentials import Credentials -import mock - -import google.cloud.vision_v1 as vision_v1 -from google.cloud.vision_v1 import ImageAnnotatorClient - - -class TestSingleImageHelper(unittest.TestCase): - def setUp(self): - credentials = mock.Mock(spec=Credentials) - self.client = ImageAnnotatorClient(credentials=credentials) - - @mock.patch.object(ImageAnnotatorClient, "batch_annotate_images") - def test_all_features_default(self, batch_annotate): - # Set up an image annotation request with no features. - image = vision_v1.Image(source={"image_uri": "http://foo.com/img.jpg"}) - request = vision_v1.AnnotateImageRequest(image=image) - assert not request.features - - # Perform the single image request. - self.client.annotate_image(request) - - # Evalute the argument sent to batch_annotate_images. - assert batch_annotate.call_count == 1 - _, args, kwargs = batch_annotate.mock_calls[0] - - # Only a single request object should be sent. - assert len(kwargs["requests"]) == 1 - - # Evalute the request object to ensure it looks correct. - request_sent = kwargs["requests"][0] - all_features = self.client._get_all_features() - assert request_sent.image == request.image - assert len(request_sent.features) == len(all_features) - - @mock.patch.object(ImageAnnotatorClient, "batch_annotate_images") - def test_explicit_features(self, batch_annotate): - # Set up an image annotation request with no features. - image = vision_v1.Image(source={"image_uri": "http://foo.com/img.jpg"}) - request = vision_v1.AnnotateImageRequest( - image=image, - features=[ - vision_v1.Feature(type_=1), - vision_v1.Feature(type_=2), - vision_v1.Feature(type_=3), - ], - ) - - # Perform the single image request. - self.client.annotate_image(request) - - # Evalute the argument sent to batch_annotate_images. - assert batch_annotate.call_count == 1 - _, args, kwargs = batch_annotate.mock_calls[0] - - # Only a single request object should be sent. - assert len(kwargs["requests"]) == 1 - - # Evalute the request object to ensure it looks correct. - request_sent = kwargs["requests"][0] - assert request_sent.image == request.image - assert len(request_sent.features) == 3 - for feature, i in zip(request_sent.features, range(1, 4)): - assert feature.type_ == i - assert feature.max_results == 0 - - @mock.patch.object(ImageAnnotatorClient, "batch_annotate_images") - def test_image_file_handler(self, batch_annotate): - # Set up a file handler. - file_ = io.BytesIO(b"bogus==") - - # Perform the single image request. - self.client.annotate_image({"image": file_}) - - # Evaluate the argument sent to batch_annotate_images. - assert batch_annotate.call_count == 1 - _, args, kwargs = batch_annotate.mock_calls[0] - - # Only a single request object should be sent. - assert len(kwargs["requests"]) == 1 - - # Evalute the request object to ensure it looks correct. - request_sent = kwargs["requests"][0] - assert request_sent["image"]["content"] == b"bogus==" - - @mock.patch.object(ImageAnnotatorClient, "batch_annotate_images") - @mock.patch.object(builtins, "open") - def test_image_filename(self, io_open, batch_annotate): - # Make io.open send back a mock with a read method. - file_ = mock.MagicMock(spec=io.BytesIO) - io_open.return_value = file_ - file_.__enter__.return_value = file_ - file_.read.return_value = b"imagefile==" - - # Perform the single image request using a filename. - self.client.annotate_image({"image": {"source": {"filename": "image.jpeg"}}}) - - # Establish that my file was opened. - io_open.assert_called_once_with("image.jpeg", "rb") - - # Evalute the argument sent to batch_annotate_images. - assert batch_annotate.call_count == 1 - _, args, kwargs = batch_annotate.mock_calls[0] - - # Only a single request object should be sent. - assert len(kwargs["requests"]) == 1 - - # Evalute the request object to ensure it looks correct. - request_sent = kwargs["requests"][0] - assert request_sent["image"]["content"] == b"imagefile==" diff --git a/packages/google-cloud-visionai/.OwlBot.yaml b/packages/google-cloud-visionai/.OwlBot.yaml deleted file mode 100644 index 7e909c4a7dcb..000000000000 --- a/packages/google-cloud-visionai/.OwlBot.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# 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/visionai/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-visionai/$1 -api-name: google-cloud-visionai diff --git a/packages/google-cloud-visionai/google/cloud/visionai/gapic_version.py b/packages/google-cloud-visionai/google/cloud/visionai/gapic_version.py index 20a9cd975b02..e83d2be0b25c 100644 --- a/packages/google-cloud-visionai/google/cloud/visionai/gapic_version.py +++ b/packages/google-cloud-visionai/google/cloud/visionai/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.1.10" # {x-release-please-version} diff --git a/packages/google-cloud-visionai/google/cloud/visionai_v1/gapic_version.py b/packages/google-cloud-visionai/google/cloud/visionai_v1/gapic_version.py index 20a9cd975b02..e83d2be0b25c 100644 --- a/packages/google-cloud-visionai/google/cloud/visionai_v1/gapic_version.py +++ b/packages/google-cloud-visionai/google/cloud/visionai_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.1.10" # {x-release-please-version} diff --git a/packages/google-cloud-visionai/google/cloud/visionai_v1alpha1/gapic_version.py b/packages/google-cloud-visionai/google/cloud/visionai_v1alpha1/gapic_version.py index 20a9cd975b02..e83d2be0b25c 100644 --- a/packages/google-cloud-visionai/google/cloud/visionai_v1alpha1/gapic_version.py +++ b/packages/google-cloud-visionai/google/cloud/visionai_v1alpha1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.1.10" # {x-release-please-version} diff --git a/packages/google-cloud-visionai/noxfile.py b/packages/google-cloud-visionai/noxfile.py index 0e44c8065632..12d855c8fe2a 100644 --- a/packages/google-cloud-visionai/noxfile.py +++ b/packages/google-cloud-visionai/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-visionai/samples/generated_samples/snippet_metadata_google.cloud.visionai.v1.json b/packages/google-cloud-visionai/samples/generated_samples/snippet_metadata_google.cloud.visionai.v1.json index 55144efe90c6..1a6f8e69f0b0 100644 --- a/packages/google-cloud-visionai/samples/generated_samples/snippet_metadata_google.cloud.visionai.v1.json +++ b/packages/google-cloud-visionai/samples/generated_samples/snippet_metadata_google.cloud.visionai.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-visionai", - "version": "0.1.0" + "version": "0.1.10" }, "snippets": [ { diff --git a/packages/google-cloud-visionai/samples/generated_samples/snippet_metadata_google.cloud.visionai.v1alpha1.json b/packages/google-cloud-visionai/samples/generated_samples/snippet_metadata_google.cloud.visionai.v1alpha1.json index 11704c120259..7e6c1120b137 100644 --- a/packages/google-cloud-visionai/samples/generated_samples/snippet_metadata_google.cloud.visionai.v1alpha1.json +++ b/packages/google-cloud-visionai/samples/generated_samples/snippet_metadata_google.cloud.visionai.v1alpha1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-visionai", - "version": "0.1.0" + "version": "0.1.10" }, "snippets": [ { diff --git a/packages/google-cloud-visionai/testing/constraints-3.14.txt b/packages/google-cloud-visionai/testing/constraints-3.14.txt new file mode 100644 index 000000000000..2010e549cceb --- /dev/null +++ b/packages/google-cloud-visionai/testing/constraints-3.14.txt @@ -0,0 +1,12 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 +grpc-google-iam-v1>=0 diff --git a/packages/google-cloud-vm-migration/.OwlBot.yaml b/packages/google-cloud-vm-migration/.OwlBot.yaml deleted file mode 100644 index abb133a41ad2..000000000000 --- a/packages/google-cloud-vm-migration/.OwlBot.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright 2021 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -deep-remove-regex: - - /owl-bot-staging - -deep-copy-regex: - - source: /google/cloud/vmmigration/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-vm-migration/$1 - -begin-after-commit-hash: 70f7f0525414fe4dfeb2fc2e81546b073f83a621 -api-name: google-cloud-vm-migration diff --git a/packages/google-cloud-vm-migration/.repo-metadata.json b/packages/google-cloud-vm-migration/.repo-metadata.json index 341c64bb1221..0c834e4bbdcc 100644 --- a/packages/google-cloud-vm-migration/.repo-metadata.json +++ b/packages/google-cloud-vm-migration/.repo-metadata.json @@ -13,4 +13,4 @@ "default_version": "v1", "api_shortname": "vmmigration", "api_description": " for Compute Engine migrates VMs from your on-premises data center into Compute Engine." -} \ No newline at end of file +} diff --git a/packages/google-cloud-vm-migration/noxfile.py b/packages/google-cloud-vm-migration/noxfile.py index fe3b895f79f0..cc7371c0990b 100644 --- a/packages/google-cloud-vm-migration/noxfile.py +++ b/packages/google-cloud-vm-migration/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-vm-migration/testing/constraints-3.14.txt b/packages/google-cloud-vm-migration/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-cloud-vm-migration/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-cloud-vmwareengine/.OwlBot.yaml b/packages/google-cloud-vmwareengine/.OwlBot.yaml deleted file mode 100644 index ccb9ee192adc..000000000000 --- a/packages/google-cloud-vmwareengine/.OwlBot.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# 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/vmwareengine/(.*)/.*-py - dest: /owl-bot-staging/google-cloud-vmwareengine/$1 -api-name: google-cloud-vmwareengine diff --git a/packages/google-cloud-vmwareengine/.repo-metadata.json b/packages/google-cloud-vmwareengine/.repo-metadata.json index 9fe6ef777930..91f90a3b9efa 100644 --- a/packages/google-cloud-vmwareengine/.repo-metadata.json +++ b/packages/google-cloud-vmwareengine/.repo-metadata.json @@ -13,4 +13,4 @@ "api_id": "vmwareengine.googleapis.com", "default_version": "v1", "api_shortname": "vmwareengine" -} \ No newline at end of file +} diff --git a/packages/google-cloud-vmwareengine/google/cloud/vmwareengine/gapic_version.py b/packages/google-cloud-vmwareengine/google/cloud/vmwareengine/gapic_version.py index 20a9cd975b02..301b2c209f46 100644 --- a/packages/google-cloud-vmwareengine/google/cloud/vmwareengine/gapic_version.py +++ b/packages/google-cloud-vmwareengine/google/cloud/vmwareengine/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.8.3" # {x-release-please-version} diff --git a/packages/google-cloud-vmwareengine/google/cloud/vmwareengine_v1/gapic_version.py b/packages/google-cloud-vmwareengine/google/cloud/vmwareengine_v1/gapic_version.py index 20a9cd975b02..301b2c209f46 100644 --- a/packages/google-cloud-vmwareengine/google/cloud/vmwareengine_v1/gapic_version.py +++ b/packages/google-cloud-vmwareengine/google/cloud/vmwareengine_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.8.3" # {x-release-please-version} diff --git a/packages/google-cloud-vmwareengine/noxfile.py b/packages/google-cloud-vmwareengine/noxfile.py index 3e334b011143..19e46f630174 100644 --- a/packages/google-cloud-vmwareengine/noxfile.py +++ b/packages/google-cloud-vmwareengine/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-vmwareengine/samples/generated_samples/snippet_metadata_google.cloud.vmwareengine.v1.json b/packages/google-cloud-vmwareengine/samples/generated_samples/snippet_metadata_google.cloud.vmwareengine.v1.json index 6d234586a410..89fdbb057e53 100644 --- a/packages/google-cloud-vmwareengine/samples/generated_samples/snippet_metadata_google.cloud.vmwareengine.v1.json +++ b/packages/google-cloud-vmwareengine/samples/generated_samples/snippet_metadata_google.cloud.vmwareengine.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-vmwareengine", - "version": "0.1.0" + "version": "1.8.3" }, "snippets": [ { diff --git a/packages/google-cloud-vmwareengine/testing/constraints-3.14.txt b/packages/google-cloud-vmwareengine/testing/constraints-3.14.txt new file mode 100644 index 000000000000..2010e549cceb --- /dev/null +++ b/packages/google-cloud-vmwareengine/testing/constraints-3.14.txt @@ -0,0 +1,12 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 +grpc-google-iam-v1>=0 diff --git a/packages/google-cloud-vpc-access/.OwlBot.yaml b/packages/google-cloud-vpc-access/.OwlBot.yaml deleted file mode 100644 index 385a2b36bfdf..000000000000 --- a/packages/google-cloud-vpc-access/.OwlBot.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright 2021 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -deep-remove-regex: - - /owl-bot-staging - -deep-copy-regex: - - source: /google/cloud/vpcaccess/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-vpc-access/$1 - -begin-after-commit-hash: 70f7f0525414fe4dfeb2fc2e81546b073f83a621 -api-name: google-cloud-vpc-access diff --git a/packages/google-cloud-vpc-access/google/cloud/vpcaccess/gapic_version.py b/packages/google-cloud-vpc-access/google/cloud/vpcaccess/gapic_version.py index 20a9cd975b02..11ddf36c5505 100644 --- a/packages/google-cloud-vpc-access/google/cloud/vpcaccess/gapic_version.py +++ b/packages/google-cloud-vpc-access/google/cloud/vpcaccess/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.13.2" # {x-release-please-version} diff --git a/packages/google-cloud-vpc-access/google/cloud/vpcaccess_v1/gapic_version.py b/packages/google-cloud-vpc-access/google/cloud/vpcaccess_v1/gapic_version.py index 20a9cd975b02..11ddf36c5505 100644 --- a/packages/google-cloud-vpc-access/google/cloud/vpcaccess_v1/gapic_version.py +++ b/packages/google-cloud-vpc-access/google/cloud/vpcaccess_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.13.2" # {x-release-please-version} diff --git a/packages/google-cloud-vpc-access/noxfile.py b/packages/google-cloud-vpc-access/noxfile.py index e465948dc1fe..d3801a5b5bff 100644 --- a/packages/google-cloud-vpc-access/noxfile.py +++ b/packages/google-cloud-vpc-access/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-vpc-access/samples/generated_samples/snippet_metadata_google.cloud.vpcaccess.v1.json b/packages/google-cloud-vpc-access/samples/generated_samples/snippet_metadata_google.cloud.vpcaccess.v1.json index 97bc0f76d20d..f6833cb71663 100644 --- a/packages/google-cloud-vpc-access/samples/generated_samples/snippet_metadata_google.cloud.vpcaccess.v1.json +++ b/packages/google-cloud-vpc-access/samples/generated_samples/snippet_metadata_google.cloud.vpcaccess.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-vpc-access", - "version": "0.1.0" + "version": "1.13.2" }, "snippets": [ { diff --git a/packages/google-cloud-vpc-access/testing/constraints-3.14.txt b/packages/google-cloud-vpc-access/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-cloud-vpc-access/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-cloud-webrisk/.OwlBot.yaml b/packages/google-cloud-webrisk/.OwlBot.yaml deleted file mode 100644 index 748b420007b9..000000000000 --- a/packages/google-cloud-webrisk/.OwlBot.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 2021 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -deep-remove-regex: - - /owl-bot-staging - -deep-copy-regex: - - source: /google/cloud/webrisk/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-webrisk/$1 - -begin-after-commit-hash: 70f7f0525414fe4dfeb2fc2e81546b073f83a621 - -api-name: google-cloud-webrisk diff --git a/packages/google-cloud-webrisk/.repo-metadata.json b/packages/google-cloud-webrisk/.repo-metadata.json index d94dd5d863a9..b2142c67ddcc 100644 --- a/packages/google-cloud-webrisk/.repo-metadata.json +++ b/packages/google-cloud-webrisk/.repo-metadata.json @@ -14,4 +14,4 @@ "default_version": "v1", "api_shortname": "webrisk", "api_description": "is a Google Cloud service that lets client applications check URLs against Google's constantly updated lists of unsafe web resources. Unsafe web resources include social engineering sites—such as phishing and deceptive sites—and sites that host malware or unwanted software. With the Web Risk API, you can quickly identify known bad sites, warn users before they click infected links, and prevent users from posting links to known infected pages from your site. The Web Risk API includes data on more than a million unsafe URLs and stays up to date by examining billions of URLs each day." -} \ No newline at end of file +} diff --git a/packages/google-cloud-webrisk/google/cloud/webrisk/gapic_version.py b/packages/google-cloud-webrisk/google/cloud/webrisk/gapic_version.py index 20a9cd975b02..7eb477b17ccc 100644 --- a/packages/google-cloud-webrisk/google/cloud/webrisk/gapic_version.py +++ b/packages/google-cloud-webrisk/google/cloud/webrisk/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.18.1" # {x-release-please-version} diff --git a/packages/google-cloud-webrisk/google/cloud/webrisk_v1/gapic_version.py b/packages/google-cloud-webrisk/google/cloud/webrisk_v1/gapic_version.py index 20a9cd975b02..7eb477b17ccc 100644 --- a/packages/google-cloud-webrisk/google/cloud/webrisk_v1/gapic_version.py +++ b/packages/google-cloud-webrisk/google/cloud/webrisk_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.18.1" # {x-release-please-version} diff --git a/packages/google-cloud-webrisk/google/cloud/webrisk_v1beta1/gapic_version.py b/packages/google-cloud-webrisk/google/cloud/webrisk_v1beta1/gapic_version.py index 20a9cd975b02..7eb477b17ccc 100644 --- a/packages/google-cloud-webrisk/google/cloud/webrisk_v1beta1/gapic_version.py +++ b/packages/google-cloud-webrisk/google/cloud/webrisk_v1beta1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.18.1" # {x-release-please-version} diff --git a/packages/google-cloud-webrisk/noxfile.py b/packages/google-cloud-webrisk/noxfile.py index ebf7d3e790dd..cf2f0223619c 100644 --- a/packages/google-cloud-webrisk/noxfile.py +++ b/packages/google-cloud-webrisk/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-webrisk/samples/generated_samples/snippet_metadata_google.cloud.webrisk.v1.json b/packages/google-cloud-webrisk/samples/generated_samples/snippet_metadata_google.cloud.webrisk.v1.json index 8b7eb6057713..0dd206b9d399 100644 --- a/packages/google-cloud-webrisk/samples/generated_samples/snippet_metadata_google.cloud.webrisk.v1.json +++ b/packages/google-cloud-webrisk/samples/generated_samples/snippet_metadata_google.cloud.webrisk.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-webrisk", - "version": "0.1.0" + "version": "1.18.1" }, "snippets": [ { diff --git a/packages/google-cloud-webrisk/samples/generated_samples/snippet_metadata_google.cloud.webrisk.v1beta1.json b/packages/google-cloud-webrisk/samples/generated_samples/snippet_metadata_google.cloud.webrisk.v1beta1.json index e281efca18fe..2ff74dd75f2c 100644 --- a/packages/google-cloud-webrisk/samples/generated_samples/snippet_metadata_google.cloud.webrisk.v1beta1.json +++ b/packages/google-cloud-webrisk/samples/generated_samples/snippet_metadata_google.cloud.webrisk.v1beta1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-webrisk", - "version": "0.1.0" + "version": "1.18.1" }, "snippets": [ { diff --git a/packages/google-cloud-webrisk/testing/constraints-3.14.txt b/packages/google-cloud-webrisk/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-cloud-webrisk/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-cloud-websecurityscanner/.OwlBot.yaml b/packages/google-cloud-websecurityscanner/.OwlBot.yaml deleted file mode 100644 index 36cce9372a28..000000000000 --- a/packages/google-cloud-websecurityscanner/.OwlBot.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 2021 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -deep-remove-regex: - - /owl-bot-staging - -deep-copy-regex: - - source: /google/cloud/websecurityscanner/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-websecurityscanner/$1 - -begin-after-commit-hash: 67d7b988b9e342f05b6078b202eeb52d5e6f8c74 - -api-name: google-cloud-websecurityscanner diff --git a/packages/google-cloud-websecurityscanner/google/cloud/websecurityscanner/gapic_version.py b/packages/google-cloud-websecurityscanner/google/cloud/websecurityscanner/gapic_version.py index 20a9cd975b02..22efb4dff379 100644 --- a/packages/google-cloud-websecurityscanner/google/cloud/websecurityscanner/gapic_version.py +++ b/packages/google-cloud-websecurityscanner/google/cloud/websecurityscanner/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.17.3" # {x-release-please-version} diff --git a/packages/google-cloud-websecurityscanner/google/cloud/websecurityscanner_v1/gapic_version.py b/packages/google-cloud-websecurityscanner/google/cloud/websecurityscanner_v1/gapic_version.py index 20a9cd975b02..22efb4dff379 100644 --- a/packages/google-cloud-websecurityscanner/google/cloud/websecurityscanner_v1/gapic_version.py +++ b/packages/google-cloud-websecurityscanner/google/cloud/websecurityscanner_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.17.3" # {x-release-please-version} diff --git a/packages/google-cloud-websecurityscanner/google/cloud/websecurityscanner_v1alpha/gapic_version.py b/packages/google-cloud-websecurityscanner/google/cloud/websecurityscanner_v1alpha/gapic_version.py index 20a9cd975b02..22efb4dff379 100644 --- a/packages/google-cloud-websecurityscanner/google/cloud/websecurityscanner_v1alpha/gapic_version.py +++ b/packages/google-cloud-websecurityscanner/google/cloud/websecurityscanner_v1alpha/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.17.3" # {x-release-please-version} diff --git a/packages/google-cloud-websecurityscanner/google/cloud/websecurityscanner_v1beta/gapic_version.py b/packages/google-cloud-websecurityscanner/google/cloud/websecurityscanner_v1beta/gapic_version.py index 20a9cd975b02..22efb4dff379 100644 --- a/packages/google-cloud-websecurityscanner/google/cloud/websecurityscanner_v1beta/gapic_version.py +++ b/packages/google-cloud-websecurityscanner/google/cloud/websecurityscanner_v1beta/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.17.3" # {x-release-please-version} diff --git a/packages/google-cloud-websecurityscanner/noxfile.py b/packages/google-cloud-websecurityscanner/noxfile.py index 3bd46cd82746..2f8d598d3e63 100644 --- a/packages/google-cloud-websecurityscanner/noxfile.py +++ b/packages/google-cloud-websecurityscanner/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-websecurityscanner/samples/generated_samples/snippet_metadata_google.cloud.websecurityscanner.v1.json b/packages/google-cloud-websecurityscanner/samples/generated_samples/snippet_metadata_google.cloud.websecurityscanner.v1.json index 147488567a91..f4bd1efb25c2 100644 --- a/packages/google-cloud-websecurityscanner/samples/generated_samples/snippet_metadata_google.cloud.websecurityscanner.v1.json +++ b/packages/google-cloud-websecurityscanner/samples/generated_samples/snippet_metadata_google.cloud.websecurityscanner.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-websecurityscanner", - "version": "0.1.0" + "version": "1.17.3" }, "snippets": [ { diff --git a/packages/google-cloud-websecurityscanner/samples/generated_samples/snippet_metadata_google.cloud.websecurityscanner.v1alpha.json b/packages/google-cloud-websecurityscanner/samples/generated_samples/snippet_metadata_google.cloud.websecurityscanner.v1alpha.json index 21a75dfa6018..3f653ef81382 100644 --- a/packages/google-cloud-websecurityscanner/samples/generated_samples/snippet_metadata_google.cloud.websecurityscanner.v1alpha.json +++ b/packages/google-cloud-websecurityscanner/samples/generated_samples/snippet_metadata_google.cloud.websecurityscanner.v1alpha.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-websecurityscanner", - "version": "0.1.0" + "version": "1.17.3" }, "snippets": [ { diff --git a/packages/google-cloud-websecurityscanner/samples/generated_samples/snippet_metadata_google.cloud.websecurityscanner.v1beta.json b/packages/google-cloud-websecurityscanner/samples/generated_samples/snippet_metadata_google.cloud.websecurityscanner.v1beta.json index a41a6a4c4dd5..45c7151d0f31 100644 --- a/packages/google-cloud-websecurityscanner/samples/generated_samples/snippet_metadata_google.cloud.websecurityscanner.v1beta.json +++ b/packages/google-cloud-websecurityscanner/samples/generated_samples/snippet_metadata_google.cloud.websecurityscanner.v1beta.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-websecurityscanner", - "version": "0.1.0" + "version": "1.17.3" }, "snippets": [ { diff --git a/packages/google-cloud-websecurityscanner/testing/constraints-3.14.txt b/packages/google-cloud-websecurityscanner/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-cloud-websecurityscanner/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-cloud-workflows/.OwlBot.yaml b/packages/google-cloud-workflows/.OwlBot.yaml deleted file mode 100644 index 458474869c9d..000000000000 --- a/packages/google-cloud-workflows/.OwlBot.yaml +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright 2021 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -deep-remove-regex: - - /owl-bot-staging - -deep-copy-regex: - - source: /google/cloud/workflows/executions/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-workflows/$1 - - source: /google/cloud/workflows/(v.*)/.*-py - dest: /owl-bot-staging/google-cloud-workflows/$1 - -begin-after-commit-hash: acb4b773a6df45f9303067ffcb21387a7b6ad40d - -api-name: google-cloud-workflows diff --git a/packages/google-cloud-workflows/.repo-metadata.json b/packages/google-cloud-workflows/.repo-metadata.json index b1989d4127a1..5b6cc91db41c 100644 --- a/packages/google-cloud-workflows/.repo-metadata.json +++ b/packages/google-cloud-workflows/.repo-metadata.json @@ -13,4 +13,4 @@ "api_id": "workflows.googleapis.com", "default_version": "v1", "api_shortname": "workflows" -} \ No newline at end of file +} diff --git a/packages/google-cloud-workflows/google/cloud/workflows/executions/gapic_version.py b/packages/google-cloud-workflows/google/cloud/workflows/executions/gapic_version.py index 20a9cd975b02..15ff9beb6e4a 100644 --- a/packages/google-cloud-workflows/google/cloud/workflows/executions/gapic_version.py +++ b/packages/google-cloud-workflows/google/cloud/workflows/executions/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.18.2" # {x-release-please-version} diff --git a/packages/google-cloud-workflows/google/cloud/workflows/executions_v1/gapic_version.py b/packages/google-cloud-workflows/google/cloud/workflows/executions_v1/gapic_version.py index 20a9cd975b02..15ff9beb6e4a 100644 --- a/packages/google-cloud-workflows/google/cloud/workflows/executions_v1/gapic_version.py +++ b/packages/google-cloud-workflows/google/cloud/workflows/executions_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.18.2" # {x-release-please-version} diff --git a/packages/google-cloud-workflows/google/cloud/workflows/executions_v1beta/gapic_version.py b/packages/google-cloud-workflows/google/cloud/workflows/executions_v1beta/gapic_version.py index 20a9cd975b02..15ff9beb6e4a 100644 --- a/packages/google-cloud-workflows/google/cloud/workflows/executions_v1beta/gapic_version.py +++ b/packages/google-cloud-workflows/google/cloud/workflows/executions_v1beta/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.18.2" # {x-release-please-version} diff --git a/packages/google-cloud-workflows/google/cloud/workflows/gapic_version.py b/packages/google-cloud-workflows/google/cloud/workflows/gapic_version.py index 20a9cd975b02..15ff9beb6e4a 100644 --- a/packages/google-cloud-workflows/google/cloud/workflows/gapic_version.py +++ b/packages/google-cloud-workflows/google/cloud/workflows/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.18.2" # {x-release-please-version} diff --git a/packages/google-cloud-workflows/google/cloud/workflows_v1/gapic_version.py b/packages/google-cloud-workflows/google/cloud/workflows_v1/gapic_version.py index 20a9cd975b02..15ff9beb6e4a 100644 --- a/packages/google-cloud-workflows/google/cloud/workflows_v1/gapic_version.py +++ b/packages/google-cloud-workflows/google/cloud/workflows_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.18.2" # {x-release-please-version} diff --git a/packages/google-cloud-workflows/google/cloud/workflows_v1beta/gapic_version.py b/packages/google-cloud-workflows/google/cloud/workflows_v1beta/gapic_version.py index 20a9cd975b02..15ff9beb6e4a 100644 --- a/packages/google-cloud-workflows/google/cloud/workflows_v1beta/gapic_version.py +++ b/packages/google-cloud-workflows/google/cloud/workflows_v1beta/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "1.18.2" # {x-release-please-version} diff --git a/packages/google-cloud-workflows/noxfile.py b/packages/google-cloud-workflows/noxfile.py index 7252cb9106b3..0cfdb1851e98 100644 --- a/packages/google-cloud-workflows/noxfile.py +++ b/packages/google-cloud-workflows/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-workflows/samples/generated_samples/snippet_metadata_google.cloud.workflows.executions.v1.json b/packages/google-cloud-workflows/samples/generated_samples/snippet_metadata_google.cloud.workflows.executions.v1.json index fba2ed08eb7a..c10475854089 100644 --- a/packages/google-cloud-workflows/samples/generated_samples/snippet_metadata_google.cloud.workflows.executions.v1.json +++ b/packages/google-cloud-workflows/samples/generated_samples/snippet_metadata_google.cloud.workflows.executions.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-workflows-executions", - "version": "0.1.0" + "version": "1.18.2" }, "snippets": [ { diff --git a/packages/google-cloud-workflows/samples/generated_samples/snippet_metadata_google.cloud.workflows.executions.v1beta.json b/packages/google-cloud-workflows/samples/generated_samples/snippet_metadata_google.cloud.workflows.executions.v1beta.json index 6f534b55fa27..8a862ce3cabe 100644 --- a/packages/google-cloud-workflows/samples/generated_samples/snippet_metadata_google.cloud.workflows.executions.v1beta.json +++ b/packages/google-cloud-workflows/samples/generated_samples/snippet_metadata_google.cloud.workflows.executions.v1beta.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-workflows-executions", - "version": "0.1.0" + "version": "1.18.2" }, "snippets": [ { diff --git a/packages/google-cloud-workflows/samples/generated_samples/snippet_metadata_google.cloud.workflows.v1.json b/packages/google-cloud-workflows/samples/generated_samples/snippet_metadata_google.cloud.workflows.v1.json index 2903f30c0e57..695f4388f05e 100644 --- a/packages/google-cloud-workflows/samples/generated_samples/snippet_metadata_google.cloud.workflows.v1.json +++ b/packages/google-cloud-workflows/samples/generated_samples/snippet_metadata_google.cloud.workflows.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-workflows", - "version": "0.1.0" + "version": "1.18.2" }, "snippets": [ { diff --git a/packages/google-cloud-workflows/samples/generated_samples/snippet_metadata_google.cloud.workflows.v1beta.json b/packages/google-cloud-workflows/samples/generated_samples/snippet_metadata_google.cloud.workflows.v1beta.json index 1e4a9ce7a54e..9c99402003a1 100644 --- a/packages/google-cloud-workflows/samples/generated_samples/snippet_metadata_google.cloud.workflows.v1beta.json +++ b/packages/google-cloud-workflows/samples/generated_samples/snippet_metadata_google.cloud.workflows.v1beta.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-workflows", - "version": "0.1.0" + "version": "1.18.2" }, "snippets": [ { diff --git a/packages/google-cloud-workflows/testing/constraints-3.14.txt b/packages/google-cloud-workflows/testing/constraints-3.14.txt new file mode 100644 index 000000000000..c20a77817caa --- /dev/null +++ b/packages/google-cloud-workflows/testing/constraints-3.14.txt @@ -0,0 +1,11 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 diff --git a/packages/google-cloud-workstations/.OwlBot.yaml b/packages/google-cloud-workstations/.OwlBot.yaml deleted file mode 100644 index 2a12affc9bd0..000000000000 --- a/packages/google-cloud-workstations/.OwlBot.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# 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/workstations/(.*)/.*-py - dest: /owl-bot-staging/google-cloud-workstations/$1 -api-name: google-cloud-workstations diff --git a/packages/google-cloud-workstations/google/cloud/workstations/gapic_version.py b/packages/google-cloud-workstations/google/cloud/workstations/gapic_version.py index 20a9cd975b02..d860755fe135 100644 --- a/packages/google-cloud-workstations/google/cloud/workstations/gapic_version.py +++ b/packages/google-cloud-workstations/google/cloud/workstations/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.5.15" # {x-release-please-version} diff --git a/packages/google-cloud-workstations/google/cloud/workstations_v1/gapic_version.py b/packages/google-cloud-workstations/google/cloud/workstations_v1/gapic_version.py index 20a9cd975b02..d860755fe135 100644 --- a/packages/google-cloud-workstations/google/cloud/workstations_v1/gapic_version.py +++ b/packages/google-cloud-workstations/google/cloud/workstations_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.5.15" # {x-release-please-version} diff --git a/packages/google-cloud-workstations/google/cloud/workstations_v1beta/gapic_version.py b/packages/google-cloud-workstations/google/cloud/workstations_v1beta/gapic_version.py index 20a9cd975b02..d860755fe135 100644 --- a/packages/google-cloud-workstations/google/cloud/workstations_v1beta/gapic_version.py +++ b/packages/google-cloud-workstations/google/cloud/workstations_v1beta/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.0.0" # {x-release-please-version} +__version__ = "0.5.15" # {x-release-please-version} diff --git a/packages/google-cloud-workstations/noxfile.py b/packages/google-cloud-workstations/noxfile.py index b7beb00d6fbf..13dcf573c7a6 100644 --- a/packages/google-cloud-workstations/noxfile.py +++ b/packages/google-cloud-workstations/noxfile.py @@ -35,9 +35,11 @@ "3.11", "3.12", "3.13", + "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] +PRE_RELEASE_PYTHON = ALL_PYTHON[-1] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -57,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -222,7 +224,14 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -230,7 +239,7 @@ def unit(session, protobuf_implementation): ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. # The 'cpp' implementation requires Protobuf<4. if protobuf_implementation == "cpp": @@ -420,7 +429,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PRE_RELEASE_PYTHON) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -433,7 +442,14 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2388): + # Remove this check once support for Protobuf 3.x is dropped. + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/packages/google-cloud-workstations/samples/generated_samples/snippet_metadata_google.cloud.workstations.v1.json b/packages/google-cloud-workstations/samples/generated_samples/snippet_metadata_google.cloud.workstations.v1.json index c9f644c1d20c..ef4f0ca33bf8 100644 --- a/packages/google-cloud-workstations/samples/generated_samples/snippet_metadata_google.cloud.workstations.v1.json +++ b/packages/google-cloud-workstations/samples/generated_samples/snippet_metadata_google.cloud.workstations.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-workstations", - "version": "0.1.0" + "version": "0.5.15" }, "snippets": [ { diff --git a/packages/google-cloud-workstations/samples/generated_samples/snippet_metadata_google.cloud.workstations.v1beta.json b/packages/google-cloud-workstations/samples/generated_samples/snippet_metadata_google.cloud.workstations.v1beta.json index 2a6523f2cb2d..a89cecabf969 100644 --- a/packages/google-cloud-workstations/samples/generated_samples/snippet_metadata_google.cloud.workstations.v1beta.json +++ b/packages/google-cloud-workstations/samples/generated_samples/snippet_metadata_google.cloud.workstations.v1beta.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-workstations", - "version": "0.1.0" + "version": "0.5.15" }, "snippets": [ { diff --git a/packages/google-cloud-workstations/testing/constraints-3.14.txt b/packages/google-cloud-workstations/testing/constraints-3.14.txt new file mode 100644 index 000000000000..2010e549cceb --- /dev/null +++ b/packages/google-cloud-workstations/testing/constraints-3.14.txt @@ -0,0 +1,12 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +proto-plus>=1 +protobuf>=6 +grpc-google-iam-v1>=0 diff --git a/packages/googleapis-common-protos/README.rst b/packages/googleapis-common-protos/README.rst index d4b2e26f4590..604f335f88fa 100644 --- a/packages/googleapis-common-protos/README.rst +++ b/packages/googleapis-common-protos/README.rst @@ -162,7 +162,7 @@ Code-Based Examples import logging - from google.cloud.translate_v3 import translate + from google.cloud import library_v1 base_logger = logging.getLogger("google") base_logger.addHandler(logging.StreamHandler()) @@ -174,7 +174,7 @@ Code-Based Examples import logging - from google.cloud.translate_v3 import translate + from google.cloud import library_v1 base_logger = logging.getLogger("google.cloud.library_v1") base_logger.addHandler(logging.StreamHandler())