From b479ff841ed93a18393a188ee1d72edf9fb729ec Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 7 Nov 2024 10:44:08 -0800 Subject: [PATCH] fix: disable universe-domain validation (#13242) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 693215877 Source-Link: https://github.com/googleapis/googleapis/commit/bb6b53e326ce2db403d18be7158c265e07948920 Source-Link: https://github.com/googleapis/googleapis-gen/commit/db8b5a93484ad44055b2bacc4c7cf87e970fe0ed Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWFkcy1tYXJrZXRpbmdwbGF0Zm9ybS1hZG1pbi8uT3dsQm90LnlhbWwiLCJoIjoiZGI4YjVhOTM0ODRhZDQ0MDU1YjJiYWNjNGM3Y2Y4N2U5NzBmZTBlZCJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWFydGlmYWN0LXJlZ2lzdHJ5Ly5Pd2xCb3QueWFtbCIsImgiOiJkYjhiNWE5MzQ4NGFkNDQwNTViMmJhY2M0YzdjZjg3ZTk3MGZlMGVkIn0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJ1aWxkLy5Pd2xCb3QueWFtbCIsImgiOiJkYjhiNWE5MzQ4NGFkNDQwNTViMmJhY2M0YzdjZjg3ZTk3MGZlMGVkIn0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWNvbXB1dGUvLk93bEJvdC55YW1sIiwiaCI6ImRiOGI1YTkzNDg0YWQ0NDA1NWIyYmFjYzRjN2NmODdlOTcwZmUwZWQifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWNvbnRhaW5lci8uT3dsQm90LnlhbWwiLCJoIjoiZGI4YjVhOTM0ODRhZDQ0MDU1YjJiYWNjNGM3Y2Y4N2U5NzBmZTBlZCJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWNvbnRhaW5lcmFuYWx5c2lzLy5Pd2xCb3QueWFtbCIsImgiOiJkYjhiNWE5MzQ4NGFkNDQwNTViMmJhY2M0YzdjZjg3ZTk3MGZlMGVkIn0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRhdGFmbG93LWNsaWVudC8uT3dsQm90LnlhbWwiLCJoIjoiZGI4YjVhOTM0ODRhZDQ0MDU1YjJiYWNjNGM3Y2Y4N2U5NzBmZTBlZCJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRhdGFwcm9jLW1ldGFzdG9yZS8uT3dsQm90LnlhbWwiLCJoIjoiZGI4YjVhOTM0ODRhZDQ0MDU1YjJiYWNjNGM3Y2Y4N2U5NzBmZTBlZCJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRpYWxvZ2Zsb3ctY3gvLk93bEJvdC55YW1sIiwiaCI6ImRiOGI1YTkzNDg0YWQ0NDA1NWIyYmFjYzRjN2NmODdlOTcwZmUwZWQifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRpYWxvZ2Zsb3cvLk93bEJvdC55YW1sIiwiaCI6ImRiOGI1YTkzNDg0YWQ0NDA1NWIyYmFjYzRjN2NmODdlOTcwZmUwZWQifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRpc2NvdmVyeWVuZ2luZS8uT3dsQm90LnlhbWwiLCJoIjoiZGI4YjVhOTM0ODRhZDQ0MDU1YjJiYWNjNGM3Y2Y4N2U5NzBmZTBlZCJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRscC8uT3dsQm90LnlhbWwiLCJoIjoiZGI4YjVhOTM0ODRhZDQ0MDU1YjJiYWNjNGM3Y2Y4N2U5NzBmZTBlZCJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRvY3VtZW50YWkvLk93bEJvdC55YW1sIiwiaCI6ImRiOGI1YTkzNDg0YWQ0NDA1NWIyYmFjYzRjN2NmODdlOTcwZmUwZWQifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRvbWFpbnMvLk93bEJvdC55YW1sIiwiaCI6ImRiOGI1YTkzNDg0YWQ0NDA1NWIyYmFjYzRjN2NmODdlOTcwZmUwZWQifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWVkZ2Vjb250YWluZXIvLk93bEJvdC55YW1sIiwiaCI6ImRiOGI1YTkzNDg0YWQ0NDA1NWIyYmFjYzRjN2NmODdlOTcwZmUwZWQifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWVkZ2VuZXR3b3JrLy5Pd2xCb3QueWFtbCIsImgiOiJkYjhiNWE5MzQ4NGFkNDQwNTViMmJhY2M0YzdjZjg3ZTk3MGZlMGVkIn0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWVudGVycHJpc2Vrbm93bGVkZ2VncmFwaC8uT3dsQm90LnlhbWwiLCJoIjoiZGI4YjVhOTM0ODRhZDQ0MDU1YjJiYWNjNGM3Y2Y4N2U5NzBmZTBlZCJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWVzc2VudGlhbC1jb250YWN0cy8uT3dsQm90LnlhbWwiLCJoIjoiZGI4YjVhOTM0ODRhZDQ0MDU1YjJiYWNjNGM3Y2Y4N2U5NzBmZTBlZCJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWV2ZW50YXJjLXB1Ymxpc2hpbmcvLk93bEJvdC55YW1sIiwiaCI6ImRiOGI1YTkzNDg0YWQ0NDA1NWIyYmFjYzRjN2NmODdlOTcwZmUwZWQifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWV2ZW50YXJjLy5Pd2xCb3QueWFtbCIsImgiOiJkYjhiNWE5MzQ4NGFkNDQwNTViMmJhY2M0YzdjZjg3ZTk3MGZlMGVkIn0= --------- Co-authored-by: Owl Bot Co-authored-by: Victor Chudnovsky --- .../marketingplatform_admin/gapic_version.py | 2 +- .../gapic_version.py | 2 +- .../marketingplatform_admin_service/client.py | 40 +- ...oogle.marketingplatform.admin.v1alpha.json | 2 +- .../test_marketingplatform_admin_service.py | 88 - .../cloud/artifactregistry/gapic_version.py | 2 +- .../artifactregistry_v1/gapic_version.py | 2 +- .../services/artifact_registry/client.py | 40 +- .../artifactregistry_v1beta2/gapic_version.py | 2 +- .../services/artifact_registry/client.py | 40 +- ...a_google.devtools.artifactregistry.v1.json | 2 +- ...gle.devtools.artifactregistry.v1beta2.json | 2 +- .../test_artifact_registry.py | 80 - .../test_artifact_registry.py | 80 - .../devtools/cloudbuild/gapic_version.py | 2 +- .../devtools/cloudbuild_v1/gapic_version.py | 2 +- .../services/cloud_build/client.py | 40 +- .../devtools/cloudbuild_v2/gapic_version.py | 2 +- .../services/repository_manager/client.py | 40 +- ...etadata_google.devtools.cloudbuild.v1.json | 2 +- ...etadata_google.devtools.cloudbuild.v2.json | 2 +- .../gapic/cloudbuild_v1/test_cloud_build.py | 80 - .../cloudbuild_v2/test_repository_manager.py | 80 - .../google/cloud/container/gapic_version.py | 2 +- .../cloud/container_v1/gapic_version.py | 2 +- .../services/cluster_manager/client.py | 40 +- .../cloud/container_v1beta1/gapic_version.py | 2 +- .../services/cluster_manager/client.py | 40 +- .../snippet_metadata_google.container.v1.json | 2 +- ...pet_metadata_google.container.v1beta1.json | 2 +- .../container_v1/test_cluster_manager.py | 80 - .../container_v1beta1/test_cluster_manager.py | 79 - .../containeranalysis/gapic_version.py | 2 +- .../containeranalysis_v1/gapic_version.py | 2 +- .../services/container_analysis/client.py | 40 +- ..._google.devtools.containeranalysis.v1.json | 2 +- .../test_container_analysis.py | 80 - .../google/cloud/dataflow/gapic_version.py | 2 +- .../cloud/dataflow_v1beta3/gapic_version.py | 2 +- .../services/flex_templates_service/client.py | 40 +- .../services/jobs_v1_beta3/client.py | 40 +- .../services/messages_v1_beta3/client.py | 40 +- .../services/metrics_v1_beta3/client.py | 40 +- .../services/snapshots_v1_beta3/client.py | 40 +- .../services/templates_service/client.py | 40 +- ...ppet_metadata_google.dataflow.v1beta3.json | 2 +- .../test_flex_templates_service.py | 88 - .../dataflow_v1beta3/test_jobs_v1_beta3.py | 80 - .../test_messages_v1_beta3.py | 80 - .../dataflow_v1beta3/test_metrics_v1_beta3.py | 80 - .../test_snapshots_v1_beta3.py | 80 - .../test_templates_service.py | 80 - .../google/cloud/metastore/gapic_version.py | 2 +- .../cloud/metastore_v1/gapic_version.py | 2 +- .../services/dataproc_metastore/client.py | 40 +- .../dataproc_metastore_federation/client.py | 40 +- .../cloud/metastore_v1alpha/gapic_version.py | 2 +- .../services/dataproc_metastore/client.py | 40 +- .../dataproc_metastore_federation/client.py | 40 +- .../cloud/metastore_v1beta/gapic_version.py | 2 +- .../services/dataproc_metastore/client.py | 40 +- .../dataproc_metastore_federation/client.py | 40 +- ...et_metadata_google.cloud.metastore.v1.json | 2 +- ...tadata_google.cloud.metastore.v1alpha.json | 2 +- ...etadata_google.cloud.metastore.v1beta.json | 2 +- .../metastore_v1/test_dataproc_metastore.py | 80 - .../test_dataproc_metastore_federation.py | 88 - .../test_dataproc_metastore.py | 80 - .../test_dataproc_metastore_federation.py | 88 - .../test_dataproc_metastore.py | 80 - .../test_dataproc_metastore_federation.py | 88 - .../cloud/dialogflowcx/gapic_version.py | 2 +- .../cloud/dialogflowcx_v3/gapic_version.py | 2 +- .../services/agents/async_client.py | 14 +- .../dialogflowcx_v3/services/agents/client.py | 74 +- .../services/changelogs/async_client.py | 4 +- .../services/changelogs/client.py | 44 +- .../services/deployments/async_client.py | 4 +- .../services/deployments/client.py | 44 +- .../services/entity_types/async_client.py | 8 +- .../services/entity_types/client.py | 48 +- .../services/environments/async_client.py | 12 +- .../services/environments/client.py | 52 +- .../services/experiments/async_client.py | 12 +- .../services/experiments/client.py | 52 +- .../services/flows/async_client.py | 12 +- .../dialogflowcx_v3/services/flows/client.py | 52 +- .../services/generators/async_client.py | 8 +- .../services/generators/client.py | 48 +- .../services/intents/async_client.py | 8 +- .../services/intents/client.py | 48 +- .../services/pages/async_client.py | 8 +- .../dialogflowcx_v3/services/pages/client.py | 48 +- .../security_settings_service/async_client.py | 8 +- .../security_settings_service/client.py | 48 +- .../session_entity_types/async_client.py | 20 +- .../services/session_entity_types/client.py | 60 +- .../services/sessions/client.py | 40 +- .../services/test_cases/async_client.py | 12 +- .../services/test_cases/client.py | 52 +- .../transition_route_groups/async_client.py | 14 +- .../transition_route_groups/client.py | 54 +- .../services/versions/async_client.py | 12 +- .../services/versions/client.py | 52 +- .../services/webhooks/async_client.py | 8 +- .../services/webhooks/client.py | 48 +- .../types/advanced_settings.py | 2 +- .../cloud/dialogflowcx_v3/types/agent.py | 69 +- .../dialogflowcx_v3/types/audio_config.py | 8 + .../cloud/dialogflowcx_v3/types/changelog.py | 6 +- .../cloud/dialogflowcx_v3/types/deployment.py | 26 +- .../dialogflowcx_v3/types/entity_type.py | 20 +- .../dialogflowcx_v3/types/environment.py | 36 +- .../cloud/dialogflowcx_v3/types/experiment.py | 23 +- .../cloud/dialogflowcx_v3/types/flow.py | 33 +- .../dialogflowcx_v3/types/fulfillment.py | 2 +- .../types/generative_settings.py | 2 +- .../cloud/dialogflowcx_v3/types/generator.py | 75 +- .../cloud/dialogflowcx_v3/types/intent.py | 22 +- .../cloud/dialogflowcx_v3/types/page.py | 32 +- .../dialogflowcx_v3/types/response_message.py | 5 +- .../types/security_settings.py | 18 +- .../cloud/dialogflowcx_v3/types/session.py | 159 +- .../types/session_entity_type.py | 24 +- .../cloud/dialogflowcx_v3/types/test_case.py | 42 +- .../types/transition_route_group.py | 16 +- .../cloud/dialogflowcx_v3/types/version.py | 22 +- .../cloud/dialogflowcx_v3/types/webhook.py | 28 +- .../cloud/dialogflowcx_v3beta1/__init__.py | 2 + .../dialogflowcx_v3beta1/gapic_version.py | 2 +- .../services/agents/async_client.py | 53 +- .../services/agents/client.py | 110 +- .../services/agents/pagers.py | 42 +- .../services/agents/transports/base.py | 29 +- .../services/agents/transports/grpc.py | 3 +- .../agents/transports/grpc_asyncio.py | 63 +- .../services/agents/transports/rest.py | 1325 +-- .../services/changelogs/async_client.py | 41 +- .../services/changelogs/client.py | 78 +- .../services/changelogs/pagers.py | 42 +- .../services/changelogs/transports/base.py | 29 +- .../services/changelogs/transports/grpc.py | 3 +- .../changelogs/transports/grpc_asyncio.py | 45 +- .../services/changelogs/transports/rest.py | 564 +- .../conversation_history/async_client.py | 44 +- .../services/conversation_history/client.py | 80 +- .../services/conversation_history/pagers.py | 42 +- .../conversation_history/transports/base.py | 29 +- .../conversation_history/transports/grpc.py | 3 +- .../transports/grpc_asyncio.py | 47 +- .../conversation_history/transports/rest.py | 641 +- .../services/deployments/async_client.py | 41 +- .../services/deployments/client.py | 78 +- .../services/deployments/pagers.py | 42 +- .../services/deployments/transports/base.py | 29 +- .../services/deployments/transports/grpc.py | 3 +- .../deployments/transports/grpc_asyncio.py | 45 +- .../services/deployments/transports/rest.py | 558 +- .../services/entity_types/async_client.py | 45 +- .../services/entity_types/client.py | 82 +- .../services/entity_types/pagers.py | 42 +- .../services/entity_types/transports/base.py | 29 +- .../services/entity_types/transports/grpc.py | 3 +- .../entity_types/transports/grpc_asyncio.py | 55 +- .../services/entity_types/transports/rest.py | 999 +- .../services/environments/async_client.py | 53 +- .../services/environments/client.py | 90 +- .../services/environments/pagers.py | 98 +- .../services/environments/transports/base.py | 29 +- .../services/environments/transports/grpc.py | 3 +- .../environments/transports/grpc_asyncio.py | 59 +- .../services/environments/transports/rest.py | 1165 ++- .../services/examples/async_client.py | 45 +- .../services/examples/client.py | 82 +- .../services/examples/pagers.py | 42 +- .../services/examples/transports/base.py | 29 +- .../services/examples/transports/grpc.py | 3 +- .../examples/transports/grpc_asyncio.py | 51 +- .../services/examples/transports/rest.py | 829 +- .../services/experiments/async_client.py | 49 +- .../services/experiments/client.py | 86 +- .../services/experiments/pagers.py | 42 +- .../services/experiments/transports/base.py | 29 +- .../services/experiments/transports/grpc.py | 3 +- .../experiments/transports/grpc_asyncio.py | 55 +- .../services/experiments/transports/rest.py | 995 +- .../services/flows/async_client.py | 51 +- .../services/flows/client.py | 110 +- .../services/flows/pagers.py | 42 +- .../services/flows/transports/base.py | 29 +- .../services/flows/transports/grpc.py | 3 +- .../services/flows/transports/grpc_asyncio.py | 61 +- .../services/flows/transports/rest.py | 1232 +-- .../services/generators/async_client.py | 45 +- .../services/generators/client.py | 82 +- .../services/generators/pagers.py | 42 +- .../services/generators/transports/base.py | 29 +- .../services/generators/transports/grpc.py | 3 +- .../generators/transports/grpc_asyncio.py | 51 +- .../services/generators/transports/rest.py | 823 +- .../services/intents/async_client.py | 45 +- .../services/intents/client.py | 82 +- .../services/intents/pagers.py | 42 +- .../services/intents/transports/base.py | 29 +- .../services/intents/transports/grpc.py | 3 +- .../intents/transports/grpc_asyncio.py | 55 +- .../services/intents/transports/rest.py | 1001 +- .../services/pages/async_client.py | 47 +- .../services/pages/client.py | 106 +- .../services/pages/pagers.py | 42 +- .../services/pages/transports/base.py | 29 +- .../services/pages/transports/grpc.py | 3 +- .../services/pages/transports/grpc_asyncio.py | 51 +- .../services/pages/transports/rest.py | 803 +- .../services/playbooks/async_client.py | 55 +- .../services/playbooks/client.py | 92 +- .../services/playbooks/pagers.py | 70 +- .../services/playbooks/transports/base.py | 29 +- .../services/playbooks/transports/grpc.py | 3 +- .../playbooks/transports/grpc_asyncio.py | 59 +- .../services/playbooks/transports/rest.py | 1160 ++- .../security_settings_service/async_client.py | 46 +- .../security_settings_service/client.py | 82 +- .../security_settings_service/pagers.py | 42 +- .../transports/base.py | 29 +- .../transports/grpc.py | 3 +- .../transports/grpc_asyncio.py | 51 +- .../transports/rest.py | 829 +- .../session_entity_types/async_client.py | 58 +- .../services/session_entity_types/client.py | 94 +- .../services/session_entity_types/pagers.py | 42 +- .../session_entity_types/transports/base.py | 29 +- .../session_entity_types/transports/grpc.py | 3 +- .../transports/grpc_asyncio.py | 51 +- .../session_entity_types/transports/rest.py | 851 +- .../services/sessions/async_client.py | 35 +- .../services/sessions/client.py | 72 +- .../services/sessions/transports/base.py | 29 +- .../services/sessions/transports/grpc.py | 3 +- .../sessions/transports/grpc_asyncio.py | 53 +- .../services/sessions/transports/rest.py | 864 +- .../services/test_cases/async_client.py | 53 +- .../services/test_cases/client.py | 112 +- .../services/test_cases/pagers.py | 70 +- .../services/test_cases/transports/base.py | 29 +- .../services/test_cases/transports/grpc.py | 3 +- .../test_cases/transports/grpc_asyncio.py | 65 +- .../services/test_cases/transports/rest.py | 1445 +-- .../services/tools/async_client.py | 47 +- .../services/tools/client.py | 106 +- .../services/tools/pagers.py | 42 +- .../services/tools/transports/base.py | 29 +- .../services/tools/transports/grpc.py | 3 +- .../services/tools/transports/grpc_asyncio.py | 53 +- .../services/tools/transports/rest.py | 895 +- .../transition_route_groups/async_client.py | 52 +- .../transition_route_groups/client.py | 88 +- .../transition_route_groups/pagers.py | 42 +- .../transports/base.py | 29 +- .../transports/grpc.py | 3 +- .../transports/grpc_asyncio.py | 51 +- .../transports/rest.py | 847 +- .../services/versions/async_client.py | 49 +- .../services/versions/client.py | 86 +- .../services/versions/pagers.py | 42 +- .../services/versions/transports/base.py | 29 +- .../services/versions/transports/grpc.py | 3 +- .../versions/transports/grpc_asyncio.py | 55 +- .../services/versions/transports/rest.py | 1017 +- .../services/webhooks/async_client.py | 45 +- .../services/webhooks/client.py | 82 +- .../services/webhooks/pagers.py | 42 +- .../services/webhooks/transports/base.py | 29 +- .../services/webhooks/transports/grpc.py | 3 +- .../webhooks/transports/grpc_asyncio.py | 51 +- .../services/webhooks/transports/rest.py | 829 +- .../dialogflowcx_v3beta1/types/__init__.py | 2 + .../types/advanced_settings.py | 15 +- .../cloud/dialogflowcx_v3beta1/types/agent.py | 85 +- .../types/audio_config.py | 8 + .../types/bigquery_export.py | 52 + .../dialogflowcx_v3beta1/types/changelog.py | 6 +- .../types/conversation_history.py | 8 +- .../types/data_store_connection.py | 18 + .../dialogflowcx_v3beta1/types/deployment.py | 26 +- .../dialogflowcx_v3beta1/types/entity_type.py | 20 +- .../dialogflowcx_v3beta1/types/environment.py | 36 +- .../dialogflowcx_v3beta1/types/example.py | 26 +- .../dialogflowcx_v3beta1/types/experiment.py | 23 +- .../cloud/dialogflowcx_v3beta1/types/flow.py | 40 +- .../dialogflowcx_v3beta1/types/fulfillment.py | 2 +- .../types/generative_settings.py | 2 +- .../dialogflowcx_v3beta1/types/generator.py | 75 +- .../dialogflowcx_v3beta1/types/intent.py | 22 +- .../cloud/dialogflowcx_v3beta1/types/page.py | 42 +- .../dialogflowcx_v3beta1/types/playbook.py | 20 +- .../types/response_message.py | 5 +- .../types/safety_settings.py | 27 + .../types/security_settings.py | 18 +- .../dialogflowcx_v3beta1/types/session.py | 163 +- .../types/session_entity_type.py | 24 +- .../dialogflowcx_v3beta1/types/test_case.py | 56 +- .../cloud/dialogflowcx_v3beta1/types/tool.py | 108 +- .../types/transition_route_group.py | 18 +- .../dialogflowcx_v3beta1/types/version.py | 22 +- .../dialogflowcx_v3beta1/types/webhook.py | 28 +- ...etadata_google.cloud.dialogflow.cx.v3.json | 2 +- ...ta_google.cloud.dialogflow.cx.v3beta1.json | 2 +- .../unit/gapic/dialogflowcx_v3/test_agents.py | 152 +- .../gapic/dialogflowcx_v3/test_changelogs.py | 80 - .../gapic/dialogflowcx_v3/test_deployments.py | 80 - .../dialogflowcx_v3/test_entity_types.py | 80 - .../dialogflowcx_v3/test_environments.py | 80 - .../gapic/dialogflowcx_v3/test_experiments.py | 80 - .../unit/gapic/dialogflowcx_v3/test_flows.py | 80 - .../gapic/dialogflowcx_v3/test_generators.py | 92 +- .../gapic/dialogflowcx_v3/test_intents.py | 80 - .../unit/gapic/dialogflowcx_v3/test_pages.py | 80 - .../test_security_settings_service.py | 88 - .../test_session_entity_types.py | 80 - .../gapic/dialogflowcx_v3/test_sessions.py | 80 - .../gapic/dialogflowcx_v3/test_test_cases.py | 80 - .../test_transition_route_groups.py | 88 - .../gapic/dialogflowcx_v3/test_versions.py | 80 - .../gapic/dialogflowcx_v3/test_webhooks.py | 80 - .../gapic/dialogflowcx_v3beta1/test_agents.py | 6715 ++++++------- .../dialogflowcx_v3beta1/test_changelogs.py | 1839 ++-- .../test_conversation_history.py | 2865 +++--- .../dialogflowcx_v3beta1/test_deployments.py | 1853 ++-- .../dialogflowcx_v3beta1/test_entity_types.py | 4421 ++++----- .../dialogflowcx_v3beta1/test_environments.py | 5259 +++++----- .../dialogflowcx_v3beta1/test_examples.py | 3787 ++++---- .../dialogflowcx_v3beta1/test_experiments.py | 4591 ++++----- .../gapic/dialogflowcx_v3beta1/test_flows.py | 6212 ++++++------ .../dialogflowcx_v3beta1/test_generators.py | 3299 +++---- .../dialogflowcx_v3beta1/test_intents.py | 4243 +++++---- .../gapic/dialogflowcx_v3beta1/test_pages.py | 3784 ++++---- .../dialogflowcx_v3beta1/test_playbooks.py | 5283 +++++----- .../test_security_settings_service.py | 3620 +++---- .../test_session_entity_types.py | 4240 +++++---- .../dialogflowcx_v3beta1/test_sessions.py | 3335 +++---- .../dialogflowcx_v3beta1/test_test_cases.py | 8464 +++++++++-------- .../gapic/dialogflowcx_v3beta1/test_tools.py | 4965 +++++----- .../test_transition_route_groups.py | 5102 +++++----- .../dialogflowcx_v3beta1/test_versions.py | 4317 +++++---- .../dialogflowcx_v3beta1/test_webhooks.py | 3331 +++---- .../docs/dialogflow_v2beta1/services_.rst | 1 + .../docs/dialogflow_v2beta1/sip_trunks.rst | 10 + .../conversation_profiles/async_client.py | 4 + .../services/conversation_profiles/client.py | 22 + .../services/conversations/async_client.py | 2 + .../services/conversations/client.py | 22 + .../services/generators/async_client.py | 6 +- .../services/generators/client.py | 6 +- .../services/participants/async_client.py | 2 + .../services/participants/client.py | 22 + .../services/sessions/async_client.py | 2 + .../dialogflow_v2/services/sessions/client.py | 22 + .../cloud/dialogflow_v2/types/audio_config.py | 14 + .../types/conversation_profile.py | 7 + .../cloud/dialogflow_v2/types/generator.py | 10 +- .../cloud/dialogflow_v2/types/participant.py | 7 + .../cloud/dialogflow_v2beta1/__init__.py | 21 + .../dialogflow_v2beta1/gapic_metadata.json | 94 + .../services/agents/client.py | 40 +- .../services/answer_records/client.py | 40 +- .../services/contexts/client.py | 40 +- .../conversation_profiles/async_client.py | 4 + .../services/conversation_profiles/client.py | 62 +- .../services/conversations/async_client.py | 2 + .../services/conversations/client.py | 62 +- .../services/documents/client.py | 40 +- .../encryption_spec_service/client.py | 40 +- .../services/entity_types/client.py | 40 +- .../services/environments/client.py | 40 +- .../services/fulfillments/client.py | 40 +- .../services/generators/async_client.py | 4 +- .../services/generators/client.py | 44 +- .../services/intents/client.py | 40 +- .../services/knowledge_bases/client.py | 40 +- .../services/participants/async_client.py | 4 +- .../services/participants/client.py | 64 +- .../services/session_entity_types/client.py | 40 +- .../services/sessions/async_client.py | 6 +- .../services/sessions/client.py | 66 +- .../services/sip_trunks/__init__.py | 22 + .../services/sip_trunks/async_client.py | 1102 +++ .../services/sip_trunks/client.py | 1484 +++ .../services/sip_trunks/pagers.py | 193 + .../services/sip_trunks/transports/README.rst | 9 + .../sip_trunks/transports/__init__.py | 36 + .../services/sip_trunks/transports/base.py | 299 + .../services/sip_trunks/transports/grpc.py | 470 + .../sip_trunks/transports/grpc_asyncio.py | 544 ++ .../services/sip_trunks/transports/rest.py | 1401 +++ .../sip_trunks/transports/rest_base.py | 487 + .../services/versions/client.py | 40 +- .../dialogflow_v2beta1/types/__init__.py | 18 + .../dialogflow_v2beta1/types/audio_config.py | 22 + .../types/conversation_profile.py | 7 + .../dialogflow_v2beta1/types/generator.py | 11 +- .../dialogflow_v2beta1/types/participant.py | 11 +- .../cloud/dialogflow_v2beta1/types/session.py | 2 +- .../dialogflow_v2beta1/types/sip_trunk.py | 350 + ...cipants_streaming_analyze_content_async.py | 2 +- ...icipants_streaming_analyze_content_sync.py | 2 +- ..._generated_sessions_detect_intent_async.py | 2 +- ...1_generated_sessions_detect_intent_sync.py | 2 +- ..._sessions_streaming_detect_intent_async.py | 2 +- ...d_sessions_streaming_detect_intent_sync.py | 2 +- ...rated_sip_trunks_create_sip_trunk_async.py | 56 + ...erated_sip_trunks_create_sip_trunk_sync.py | 56 + ...rated_sip_trunks_delete_sip_trunk_async.py | 50 + ...erated_sip_trunks_delete_sip_trunk_sync.py | 50 + ...enerated_sip_trunks_get_sip_trunk_async.py | 52 + ...generated_sip_trunks_get_sip_trunk_sync.py | 52 + ...erated_sip_trunks_list_sip_trunks_async.py | 53 + ...nerated_sip_trunks_list_sip_trunks_sync.py | 53 + ...rated_sip_trunks_update_sip_trunk_async.py | 55 + ...erated_sip_trunks_update_sip_trunk_sync.py | 55 + ...adata_google.cloud.dialogflow.v2beta1.json | 815 ++ .../fixup_dialogflow_v2beta1_keywords.py | 5 + .../test_conversation_profiles.py | 54 +- .../gapic/dialogflow_v2/test_conversations.py | 50 +- .../gapic/dialogflow_v2/test_participants.py | 62 +- .../unit/gapic/dialogflow_v2/test_sessions.py | 70 +- .../gapic/dialogflow_v2beta1/test_agents.py | 80 - .../dialogflow_v2beta1/test_answer_records.py | 80 - .../gapic/dialogflow_v2beta1/test_contexts.py | 80 - .../test_conversation_profiles.py | 142 +- .../dialogflow_v2beta1/test_conversations.py | 130 +- .../dialogflow_v2beta1/test_documents.py | 80 - .../test_encryption_spec_service.py | 88 - .../dialogflow_v2beta1/test_entity_types.py | 80 - .../dialogflow_v2beta1/test_environments.py | 80 - .../dialogflow_v2beta1/test_fulfillments.py | 80 - .../dialogflow_v2beta1/test_generators.py | 80 - .../gapic/dialogflow_v2beta1/test_intents.py | 80 - .../test_knowledge_bases.py | 80 - .../dialogflow_v2beta1/test_participants.py | 142 +- .../test_session_entity_types.py | 80 - .../gapic/dialogflow_v2beta1/test_sessions.py | 150 +- .../dialogflow_v2beta1/test_sip_trunks.py | 6757 +++++++++++++ .../gapic/dialogflow_v2beta1/test_versions.py | 80 - .../cloud/discoveryengine/gapic_version.py | 2 +- .../cloud/discoveryengine_v1/gapic_version.py | 2 +- .../services/completion_service/client.py | 40 +- .../services/control_service/client.py | 40 +- .../conversational_search_service/client.py | 40 +- .../services/data_store_service/client.py | 40 +- .../services/document_service/client.py | 40 +- .../services/engine_service/client.py | 40 +- .../grounded_generation_service/client.py | 40 +- .../services/project_service/client.py | 40 +- .../services/rank_service/client.py | 40 +- .../services/recommendation_service/client.py | 40 +- .../services/schema_service/client.py | 40 +- .../services/search_service/client.py | 40 +- .../services/search_tuning_service/client.py | 40 +- .../site_search_engine_service/client.py | 40 +- .../services/user_event_service/client.py | 40 +- .../discoveryengine_v1alpha/gapic_version.py | 2 +- .../services/acl_config_service/client.py | 40 +- .../services/chunk_service/client.py | 40 +- .../services/completion_service/client.py | 40 +- .../services/control_service/client.py | 40 +- .../conversational_search_service/client.py | 40 +- .../services/data_store_service/client.py | 40 +- .../services/document_service/client.py | 40 +- .../services/engine_service/client.py | 40 +- .../estimate_billing_service/client.py | 40 +- .../services/evaluation_service/client.py | 40 +- .../grounded_generation_service/client.py | 40 +- .../services/project_service/client.py | 40 +- .../services/rank_service/client.py | 40 +- .../services/recommendation_service/client.py | 40 +- .../services/sample_query_service/client.py | 40 +- .../sample_query_set_service/client.py | 40 +- .../services/schema_service/client.py | 40 +- .../services/search_service/client.py | 40 +- .../services/search_tuning_service/client.py | 40 +- .../services/serving_config_service/client.py | 40 +- .../site_search_engine_service/client.py | 40 +- .../services/user_event_service/client.py | 40 +- .../discoveryengine_v1beta/gapic_version.py | 2 +- .../services/completion_service/client.py | 40 +- .../services/control_service/client.py | 40 +- .../conversational_search_service/client.py | 40 +- .../services/data_store_service/client.py | 40 +- .../services/document_service/client.py | 40 +- .../services/engine_service/client.py | 40 +- .../services/evaluation_service/client.py | 40 +- .../grounded_generation_service/client.py | 40 +- .../services/project_service/client.py | 40 +- .../services/rank_service/client.py | 40 +- .../services/recommendation_service/client.py | 40 +- .../services/sample_query_service/client.py | 40 +- .../sample_query_set_service/client.py | 40 +- .../services/schema_service/client.py | 40 +- .../services/search_service/client.py | 40 +- .../services/search_tuning_service/client.py | 40 +- .../services/serving_config_service/client.py | 40 +- .../site_search_engine_service/client.py | 40 +- .../services/user_event_service/client.py | 40 +- ...adata_google.cloud.discoveryengine.v1.json | 2 +- ..._google.cloud.discoveryengine.v1alpha.json | 2 +- ...a_google.cloud.discoveryengine.v1beta.json | 2 +- .../test_completion_service.py | 80 - .../test_control_service.py | 80 - .../test_conversational_search_service.py | 88 - .../test_data_store_service.py | 80 - .../test_document_service.py | 80 - .../discoveryengine_v1/test_engine_service.py | 80 - .../test_grounded_generation_service.py | 88 - .../test_project_service.py | 80 - .../discoveryengine_v1/test_rank_service.py | 80 - .../test_recommendation_service.py | 88 - .../discoveryengine_v1/test_schema_service.py | 80 - .../discoveryengine_v1/test_search_service.py | 80 - .../test_search_tuning_service.py | 88 - .../test_site_search_engine_service.py | 88 - .../test_user_event_service.py | 80 - .../test_acl_config_service.py | 80 - .../test_chunk_service.py | 80 - .../test_completion_service.py | 80 - .../test_control_service.py | 80 - .../test_conversational_search_service.py | 88 - .../test_data_store_service.py | 80 - .../test_document_service.py | 80 - .../test_engine_service.py | 80 - .../test_estimate_billing_service.py | 88 - .../test_evaluation_service.py | 80 - .../test_grounded_generation_service.py | 88 - .../test_project_service.py | 80 - .../test_rank_service.py | 80 - .../test_recommendation_service.py | 88 - .../test_sample_query_service.py | 80 - .../test_sample_query_set_service.py | 88 - .../test_schema_service.py | 80 - .../test_search_service.py | 80 - .../test_search_tuning_service.py | 88 - .../test_serving_config_service.py | 88 - .../test_site_search_engine_service.py | 88 - .../test_user_event_service.py | 80 - .../test_completion_service.py | 80 - .../test_control_service.py | 80 - .../test_conversational_search_service.py | 88 - .../test_data_store_service.py | 80 - .../test_document_service.py | 80 - .../test_engine_service.py | 80 - .../test_evaluation_service.py | 80 - .../test_grounded_generation_service.py | 88 - .../test_project_service.py | 80 - .../test_rank_service.py | 80 - .../test_recommendation_service.py | 88 - .../test_sample_query_service.py | 80 - .../test_sample_query_set_service.py | 88 - .../test_schema_service.py | 80 - .../test_search_service.py | 80 - .../test_search_tuning_service.py | 88 - .../test_serving_config_service.py | 88 - .../test_site_search_engine_service.py | 88 - .../test_user_event_service.py | 80 - .../google/cloud/dlp/gapic_version.py | 2 +- .../google/cloud/dlp_v2/gapic_version.py | 2 +- .../dlp_v2/services/dlp_service/client.py | 40 +- ...nippet_metadata_google.privacy.dlp.v2.json | 2 +- .../unit/gapic/dlp_v2/test_dlp_service.py | 80 - .../google/cloud/documentai/gapic_version.py | 2 +- .../cloud/documentai_v1/gapic_version.py | 2 +- .../document_processor_service/client.py | 40 +- .../cloud/documentai_v1beta3/gapic_version.py | 2 +- .../document_processor_service/client.py | 40 +- .../services/document_service/client.py | 40 +- ...t_metadata_google.cloud.documentai.v1.json | 2 +- ...adata_google.cloud.documentai.v1beta3.json | 2 +- .../test_document_processor_service.py | 88 - .../test_document_processor_service.py | 88 - .../test_document_service.py | 80 - .../google/cloud/domains/gapic_version.py | 2 +- .../google/cloud/domains_v1/gapic_version.py | 2 +- .../domains_v1/services/domains/client.py | 40 +- .../cloud/domains_v1beta1/gapic_version.py | 2 +- .../services/domains/client.py | 40 +- ...ppet_metadata_google.cloud.domains.v1.json | 2 +- ...metadata_google.cloud.domains.v1beta1.json | 2 +- .../unit/gapic/domains_v1/test_domains.py | 80 - .../gapic/domains_v1beta1/test_domains.py | 80 - .../cloud/edgecontainer/gapic_version.py | 2 +- .../cloud/edgecontainer_v1/gapic_version.py | 2 +- .../services/edge_container/client.py | 40 +- ...etadata_google.cloud.edgecontainer.v1.json | 2 +- .../edgecontainer_v1/test_edge_container.py | 80 - .../google/cloud/edgenetwork/gapic_version.py | 2 +- .../cloud/edgenetwork_v1/gapic_version.py | 2 +- .../services/edge_network/client.py | 40 +- ..._metadata_google.cloud.edgenetwork.v1.json | 2 +- .../gapic/edgenetwork_v1/test_edge_network.py | 80 - .../enterpriseknowledgegraph/gapic_version.py | 2 +- .../gapic_version.py | 2 +- .../client.py | 40 +- ...gle.cloud.enterpriseknowledgegraph.v1.json | 2 +- ...test_enterprise_knowledge_graph_service.py | 88 - .../cloud/essential_contacts/gapic_version.py | 2 +- .../essential_contacts_v1/gapic_version.py | 2 +- .../essential_contacts_service/client.py | 40 +- ...ata_google.cloud.essentialcontacts.v1.json | 2 +- .../test_essential_contacts_service.py | 88 - .../eventarc_publishing/gapic_version.py | 2 +- .../eventarc_publishing_v1/gapic_version.py | 2 +- .../services/publisher/client.py | 40 +- ...a_google.cloud.eventarc.publishing.v1.json | 2 +- .../eventarc_publishing_v1/test_publisher.py | 80 - .../google/cloud/eventarc/gapic_version.py | 2 +- .../google/cloud/eventarc_v1/gapic_version.py | 2 +- .../eventarc_v1/services/eventarc/client.py | 40 +- ...pet_metadata_google.cloud.eventarc.v1.json | 2 +- .../unit/gapic/eventarc_v1/test_eventarc.py | 80 - 618 files changed, 78298 insertions(+), 71134 deletions(-) create mode 100644 packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/types/bigquery_export.py create mode 100644 packages/google-cloud-dialogflow/docs/dialogflow_v2beta1/sip_trunks.rst create mode 100644 packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/sip_trunks/__init__.py create mode 100644 packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/sip_trunks/async_client.py create mode 100644 packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/sip_trunks/client.py create mode 100644 packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/sip_trunks/pagers.py create mode 100644 packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/sip_trunks/transports/README.rst create mode 100644 packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/sip_trunks/transports/__init__.py create mode 100644 packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/sip_trunks/transports/base.py create mode 100644 packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/sip_trunks/transports/grpc.py create mode 100644 packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/sip_trunks/transports/grpc_asyncio.py create mode 100644 packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/sip_trunks/transports/rest.py create mode 100644 packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/sip_trunks/transports/rest_base.py create mode 100644 packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/types/sip_trunk.py create mode 100644 packages/google-cloud-dialogflow/samples/generated_samples/dialogflow_v2beta1_generated_sip_trunks_create_sip_trunk_async.py create mode 100644 packages/google-cloud-dialogflow/samples/generated_samples/dialogflow_v2beta1_generated_sip_trunks_create_sip_trunk_sync.py create mode 100644 packages/google-cloud-dialogflow/samples/generated_samples/dialogflow_v2beta1_generated_sip_trunks_delete_sip_trunk_async.py create mode 100644 packages/google-cloud-dialogflow/samples/generated_samples/dialogflow_v2beta1_generated_sip_trunks_delete_sip_trunk_sync.py create mode 100644 packages/google-cloud-dialogflow/samples/generated_samples/dialogflow_v2beta1_generated_sip_trunks_get_sip_trunk_async.py create mode 100644 packages/google-cloud-dialogflow/samples/generated_samples/dialogflow_v2beta1_generated_sip_trunks_get_sip_trunk_sync.py create mode 100644 packages/google-cloud-dialogflow/samples/generated_samples/dialogflow_v2beta1_generated_sip_trunks_list_sip_trunks_async.py create mode 100644 packages/google-cloud-dialogflow/samples/generated_samples/dialogflow_v2beta1_generated_sip_trunks_list_sip_trunks_sync.py create mode 100644 packages/google-cloud-dialogflow/samples/generated_samples/dialogflow_v2beta1_generated_sip_trunks_update_sip_trunk_async.py create mode 100644 packages/google-cloud-dialogflow/samples/generated_samples/dialogflow_v2beta1_generated_sip_trunks_update_sip_trunk_sync.py create mode 100644 packages/google-cloud-dialogflow/tests/unit/gapic/dialogflow_v2beta1/test_sip_trunks.py diff --git a/packages/google-ads-marketingplatform-admin/google/ads/marketingplatform_admin/gapic_version.py b/packages/google-ads-marketingplatform-admin/google/ads/marketingplatform_admin/gapic_version.py index 0c7cc68730c4..558c8aab67c5 100644 --- a/packages/google-ads-marketingplatform-admin/google/ads/marketingplatform_admin/gapic_version.py +++ b/packages/google-ads-marketingplatform-admin/google/ads/marketingplatform_admin/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.1.1" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-ads-marketingplatform-admin/google/ads/marketingplatform_admin_v1alpha/gapic_version.py b/packages/google-ads-marketingplatform-admin/google/ads/marketingplatform_admin_v1alpha/gapic_version.py index 0c7cc68730c4..558c8aab67c5 100644 --- a/packages/google-ads-marketingplatform-admin/google/ads/marketingplatform_admin_v1alpha/gapic_version.py +++ b/packages/google-ads-marketingplatform-admin/google/ads/marketingplatform_admin_v1alpha/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.1.1" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-ads-marketingplatform-admin/google/ads/marketingplatform_admin_v1alpha/services/marketingplatform_admin_service/client.py b/packages/google-ads-marketingplatform-admin/google/ads/marketingplatform_admin_v1alpha/services/marketingplatform_admin_service/client.py index f31761153ab6..5128a184339f 100644 --- a/packages/google-ads-marketingplatform-admin/google/ads/marketingplatform_admin_v1alpha/services/marketingplatform_admin_service/client.py +++ b/packages/google-ads-marketingplatform-admin/google/ads/marketingplatform_admin_v1alpha/services/marketingplatform_admin_service/client.py @@ -517,36 +517,6 @@ def _get_universe_domain( raise ValueError("Universe Domain cannot be an empty string.") return universe_domain - @staticmethod - def _compare_universes( - client_universe: str, credentials: ga_credentials.Credentials - ) -> bool: - """Returns True iff the universe domains used by the client and credentials match. - - Args: - client_universe (str): The universe domain configured via the client options. - credentials (ga_credentials.Credentials): The credentials being used in the client. - - Returns: - bool: True iff client_universe matches the universe in credentials. - - Raises: - ValueError: when client_universe does not match the universe in credentials. - """ - - default_universe = MarketingplatformAdminServiceClient._DEFAULT_UNIVERSE - credentials_universe = getattr(credentials, "universe_domain", default_universe) - - if client_universe != credentials_universe: - raise ValueError( - "The configured universe domain " - f"({client_universe}) does not match the universe domain " - f"found in the credentials ({credentials_universe}). " - "If you haven't configured the universe domain explicitly, " - f"`{default_universe}` is the default." - ) - return True - def _validate_universe_domain(self): """Validates client's and credentials' universe domains are consistent. @@ -556,13 +526,9 @@ def _validate_universe_domain(self): Raises: ValueError: If the configured universe domain is not valid. """ - self._is_universe_domain_valid = ( - self._is_universe_domain_valid - or MarketingplatformAdminServiceClient._compare_universes( - self.universe_domain, self.transport._credentials - ) - ) - return self._is_universe_domain_valid + + # NOTE (b/349488459): universe validation is disabled until further notice. + return True @property def api_endpoint(self): diff --git a/packages/google-ads-marketingplatform-admin/samples/generated_samples/snippet_metadata_google.marketingplatform.admin.v1alpha.json b/packages/google-ads-marketingplatform-admin/samples/generated_samples/snippet_metadata_google.marketingplatform.admin.v1alpha.json index 30ef02019efe..72abc6186c7b 100644 --- a/packages/google-ads-marketingplatform-admin/samples/generated_samples/snippet_metadata_google.marketingplatform.admin.v1alpha.json +++ b/packages/google-ads-marketingplatform-admin/samples/generated_samples/snippet_metadata_google.marketingplatform.admin.v1alpha.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-ads-marketingplatform-admin", - "version": "0.1.1" + "version": "0.1.0" }, "snippets": [ { diff --git a/packages/google-ads-marketingplatform-admin/tests/unit/gapic/marketingplatform_admin_v1alpha/test_marketingplatform_admin_service.py b/packages/google-ads-marketingplatform-admin/tests/unit/gapic/marketingplatform_admin_v1alpha/test_marketingplatform_admin_service.py index 40b9d151000f..96938b18f7ab 100644 --- a/packages/google-ads-marketingplatform-admin/tests/unit/gapic/marketingplatform_admin_v1alpha/test_marketingplatform_admin_service.py +++ b/packages/google-ads-marketingplatform-admin/tests/unit/gapic/marketingplatform_admin_v1alpha/test_marketingplatform_admin_service.py @@ -350,94 +350,6 @@ def test__get_universe_domain(): assert str(excinfo.value) == "Universe Domain cannot be an empty string." -@pytest.mark.parametrize( - "client_class,transport_class,transport_name", - [ - ( - MarketingplatformAdminServiceClient, - transports.MarketingplatformAdminServiceGrpcTransport, - "grpc", - ), - ( - MarketingplatformAdminServiceClient, - transports.MarketingplatformAdminServiceRestTransport, - "rest", - ), - ], -) -def test__validate_universe_domain(client_class, transport_class, transport_name): - client = client_class( - transport=transport_class(credentials=ga_credentials.AnonymousCredentials()) - ) - assert client._validate_universe_domain() == True - - # Test the case when universe is already validated. - assert client._validate_universe_domain() == True - - if transport_name == "grpc": - # Test the case where credentials are provided by the - # `local_channel_credentials`. The default universes in both match. - channel = grpc.secure_channel( - "http://localhost/", grpc.local_channel_credentials() - ) - client = client_class(transport=transport_class(channel=channel)) - assert client._validate_universe_domain() == True - - # Test the case where credentials do not exist: e.g. a transport is provided - # with no credentials. Validation should still succeed because there is no - # mismatch with non-existent credentials. - channel = grpc.secure_channel( - "http://localhost/", grpc.local_channel_credentials() - ) - transport = transport_class(channel=channel) - transport._credentials = None - client = client_class(transport=transport) - assert client._validate_universe_domain() == True - - # TODO: This is needed to cater for older versions of google-auth - # Make this test unconditional once the minimum supported version of - # google-auth becomes 2.23.0 or higher. - google_auth_major, google_auth_minor = [ - int(part) for part in google.auth.__version__.split(".")[0:2] - ] - if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23): - credentials = ga_credentials.AnonymousCredentials() - credentials._universe_domain = "foo.com" - # Test the case when there is a universe mismatch from the credentials. - client = client_class(transport=transport_class(credentials=credentials)) - with pytest.raises(ValueError) as excinfo: - client._validate_universe_domain() - assert ( - str(excinfo.value) - == "The configured universe domain (googleapis.com) does not match the universe domain found in the credentials (foo.com). If you haven't configured the universe domain explicitly, `googleapis.com` is the default." - ) - - # Test the case when there is a universe mismatch from the client. - # - # TODO: Make this test unconditional once the minimum supported version of - # google-api-core becomes 2.15.0 or higher. - api_core_major, api_core_minor = [ - int(part) for part in api_core_version.__version__.split(".")[0:2] - ] - if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15): - client = client_class( - client_options={"universe_domain": "bar.com"}, - transport=transport_class( - credentials=ga_credentials.AnonymousCredentials(), - ), - ) - with pytest.raises(ValueError) as excinfo: - client._validate_universe_domain() - assert ( - str(excinfo.value) - == "The configured universe domain (bar.com) does not match the universe domain found in the credentials (googleapis.com). If you haven't configured the universe domain explicitly, `googleapis.com` is the default." - ) - - # Test that ValueError is raised if universe_domain is provided via client options and credentials is None - with pytest.raises(ValueError): - client._compare_universes("foo.bar", None) - - @pytest.mark.parametrize( "client_class,transport_name", [ 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 43155ded0db3..558c8aab67c5 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__ = "1.13.0" # {x-release-please-version} +__version__ = "0.0.0" # {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 43155ded0db3..558c8aab67c5 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__ = "1.13.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/services/artifact_registry/client.py b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/services/artifact_registry/client.py index a0d0cebe9588..fd86532583e5 100644 --- a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/services/artifact_registry/client.py +++ b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/services/artifact_registry/client.py @@ -854,36 +854,6 @@ def _get_universe_domain( raise ValueError("Universe Domain cannot be an empty string.") return universe_domain - @staticmethod - def _compare_universes( - client_universe: str, credentials: ga_credentials.Credentials - ) -> bool: - """Returns True iff the universe domains used by the client and credentials match. - - Args: - client_universe (str): The universe domain configured via the client options. - credentials (ga_credentials.Credentials): The credentials being used in the client. - - Returns: - bool: True iff client_universe matches the universe in credentials. - - Raises: - ValueError: when client_universe does not match the universe in credentials. - """ - - default_universe = ArtifactRegistryClient._DEFAULT_UNIVERSE - credentials_universe = getattr(credentials, "universe_domain", default_universe) - - if client_universe != credentials_universe: - raise ValueError( - "The configured universe domain " - f"({client_universe}) does not match the universe domain " - f"found in the credentials ({credentials_universe}). " - "If you haven't configured the universe domain explicitly, " - f"`{default_universe}` is the default." - ) - return True - def _validate_universe_domain(self): """Validates client's and credentials' universe domains are consistent. @@ -893,13 +863,9 @@ def _validate_universe_domain(self): Raises: ValueError: If the configured universe domain is not valid. """ - self._is_universe_domain_valid = ( - self._is_universe_domain_valid - or ArtifactRegistryClient._compare_universes( - self.universe_domain, self.transport._credentials - ) - ) - return self._is_universe_domain_valid + + # NOTE (b/349488459): universe validation is disabled until further notice. + return True @property def api_endpoint(self): 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 43155ded0db3..558c8aab67c5 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__ = "1.13.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1beta2/services/artifact_registry/client.py b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1beta2/services/artifact_registry/client.py index 4cc2b146421e..f696780b4097 100644 --- a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1beta2/services/artifact_registry/client.py +++ b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1beta2/services/artifact_registry/client.py @@ -631,36 +631,6 @@ def _get_universe_domain( raise ValueError("Universe Domain cannot be an empty string.") return universe_domain - @staticmethod - def _compare_universes( - client_universe: str, credentials: ga_credentials.Credentials - ) -> bool: - """Returns True iff the universe domains used by the client and credentials match. - - Args: - client_universe (str): The universe domain configured via the client options. - credentials (ga_credentials.Credentials): The credentials being used in the client. - - Returns: - bool: True iff client_universe matches the universe in credentials. - - Raises: - ValueError: when client_universe does not match the universe in credentials. - """ - - default_universe = ArtifactRegistryClient._DEFAULT_UNIVERSE - credentials_universe = getattr(credentials, "universe_domain", default_universe) - - if client_universe != credentials_universe: - raise ValueError( - "The configured universe domain " - f"({client_universe}) does not match the universe domain " - f"found in the credentials ({credentials_universe}). " - "If you haven't configured the universe domain explicitly, " - f"`{default_universe}` is the default." - ) - return True - def _validate_universe_domain(self): """Validates client's and credentials' universe domains are consistent. @@ -670,13 +640,9 @@ def _validate_universe_domain(self): Raises: ValueError: If the configured universe domain is not valid. """ - self._is_universe_domain_valid = ( - self._is_universe_domain_valid - or ArtifactRegistryClient._compare_universes( - self.universe_domain, self.transport._credentials - ) - ) - return self._is_universe_domain_valid + + # NOTE (b/349488459): universe validation is disabled until further notice. + return True @property def api_endpoint(self): 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 606018f3f91d..a1f492c7ad92 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": "1.13.0" + "version": "0.1.0" }, "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 013fc826dac1..c22cba2a0008 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": "1.13.0" + "version": "0.1.0" }, "snippets": [ { diff --git a/packages/google-cloud-artifact-registry/tests/unit/gapic/artifactregistry_v1/test_artifact_registry.py b/packages/google-cloud-artifact-registry/tests/unit/gapic/artifactregistry_v1/test_artifact_registry.py index bbb41a4d2ed8..579c52851bd6 100644 --- a/packages/google-cloud-artifact-registry/tests/unit/gapic/artifactregistry_v1/test_artifact_registry.py +++ b/packages/google-cloud-artifact-registry/tests/unit/gapic/artifactregistry_v1/test_artifact_registry.py @@ -357,86 +357,6 @@ def test__get_universe_domain(): assert str(excinfo.value) == "Universe Domain cannot be an empty string." -@pytest.mark.parametrize( - "client_class,transport_class,transport_name", - [ - (ArtifactRegistryClient, transports.ArtifactRegistryGrpcTransport, "grpc"), - (ArtifactRegistryClient, transports.ArtifactRegistryRestTransport, "rest"), - ], -) -def test__validate_universe_domain(client_class, transport_class, transport_name): - client = client_class( - transport=transport_class(credentials=ga_credentials.AnonymousCredentials()) - ) - assert client._validate_universe_domain() == True - - # Test the case when universe is already validated. - assert client._validate_universe_domain() == True - - if transport_name == "grpc": - # Test the case where credentials are provided by the - # `local_channel_credentials`. The default universes in both match. - channel = grpc.secure_channel( - "http://localhost/", grpc.local_channel_credentials() - ) - client = client_class(transport=transport_class(channel=channel)) - assert client._validate_universe_domain() == True - - # Test the case where credentials do not exist: e.g. a transport is provided - # with no credentials. Validation should still succeed because there is no - # mismatch with non-existent credentials. - channel = grpc.secure_channel( - "http://localhost/", grpc.local_channel_credentials() - ) - transport = transport_class(channel=channel) - transport._credentials = None - client = client_class(transport=transport) - assert client._validate_universe_domain() == True - - # TODO: This is needed to cater for older versions of google-auth - # Make this test unconditional once the minimum supported version of - # google-auth becomes 2.23.0 or higher. - google_auth_major, google_auth_minor = [ - int(part) for part in google.auth.__version__.split(".")[0:2] - ] - if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23): - credentials = ga_credentials.AnonymousCredentials() - credentials._universe_domain = "foo.com" - # Test the case when there is a universe mismatch from the credentials. - client = client_class(transport=transport_class(credentials=credentials)) - with pytest.raises(ValueError) as excinfo: - client._validate_universe_domain() - assert ( - str(excinfo.value) - == "The configured universe domain (googleapis.com) does not match the universe domain found in the credentials (foo.com). If you haven't configured the universe domain explicitly, `googleapis.com` is the default." - ) - - # Test the case when there is a universe mismatch from the client. - # - # TODO: Make this test unconditional once the minimum supported version of - # google-api-core becomes 2.15.0 or higher. - api_core_major, api_core_minor = [ - int(part) for part in api_core_version.__version__.split(".")[0:2] - ] - if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15): - client = client_class( - client_options={"universe_domain": "bar.com"}, - transport=transport_class( - credentials=ga_credentials.AnonymousCredentials(), - ), - ) - with pytest.raises(ValueError) as excinfo: - client._validate_universe_domain() - assert ( - str(excinfo.value) - == "The configured universe domain (bar.com) does not match the universe domain found in the credentials (googleapis.com). If you haven't configured the universe domain explicitly, `googleapis.com` is the default." - ) - - # Test that ValueError is raised if universe_domain is provided via client options and credentials is None - with pytest.raises(ValueError): - client._compare_universes("foo.bar", None) - - @pytest.mark.parametrize( "client_class,transport_name", [ diff --git a/packages/google-cloud-artifact-registry/tests/unit/gapic/artifactregistry_v1beta2/test_artifact_registry.py b/packages/google-cloud-artifact-registry/tests/unit/gapic/artifactregistry_v1beta2/test_artifact_registry.py index 164e14733131..049506cc9b08 100644 --- a/packages/google-cloud-artifact-registry/tests/unit/gapic/artifactregistry_v1beta2/test_artifact_registry.py +++ b/packages/google-cloud-artifact-registry/tests/unit/gapic/artifactregistry_v1beta2/test_artifact_registry.py @@ -344,86 +344,6 @@ def test__get_universe_domain(): assert str(excinfo.value) == "Universe Domain cannot be an empty string." -@pytest.mark.parametrize( - "client_class,transport_class,transport_name", - [ - (ArtifactRegistryClient, transports.ArtifactRegistryGrpcTransport, "grpc"), - (ArtifactRegistryClient, transports.ArtifactRegistryRestTransport, "rest"), - ], -) -def test__validate_universe_domain(client_class, transport_class, transport_name): - client = client_class( - transport=transport_class(credentials=ga_credentials.AnonymousCredentials()) - ) - assert client._validate_universe_domain() == True - - # Test the case when universe is already validated. - assert client._validate_universe_domain() == True - - if transport_name == "grpc": - # Test the case where credentials are provided by the - # `local_channel_credentials`. The default universes in both match. - channel = grpc.secure_channel( - "http://localhost/", grpc.local_channel_credentials() - ) - client = client_class(transport=transport_class(channel=channel)) - assert client._validate_universe_domain() == True - - # Test the case where credentials do not exist: e.g. a transport is provided - # with no credentials. Validation should still succeed because there is no - # mismatch with non-existent credentials. - channel = grpc.secure_channel( - "http://localhost/", grpc.local_channel_credentials() - ) - transport = transport_class(channel=channel) - transport._credentials = None - client = client_class(transport=transport) - assert client._validate_universe_domain() == True - - # TODO: This is needed to cater for older versions of google-auth - # Make this test unconditional once the minimum supported version of - # google-auth becomes 2.23.0 or higher. - google_auth_major, google_auth_minor = [ - int(part) for part in google.auth.__version__.split(".")[0:2] - ] - if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23): - credentials = ga_credentials.AnonymousCredentials() - credentials._universe_domain = "foo.com" - # Test the case when there is a universe mismatch from the credentials. - client = client_class(transport=transport_class(credentials=credentials)) - with pytest.raises(ValueError) as excinfo: - client._validate_universe_domain() - assert ( - str(excinfo.value) - == "The configured universe domain (googleapis.com) does not match the universe domain found in the credentials (foo.com). If you haven't configured the universe domain explicitly, `googleapis.com` is the default." - ) - - # Test the case when there is a universe mismatch from the client. - # - # TODO: Make this test unconditional once the minimum supported version of - # google-api-core becomes 2.15.0 or higher. - api_core_major, api_core_minor = [ - int(part) for part in api_core_version.__version__.split(".")[0:2] - ] - if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15): - client = client_class( - client_options={"universe_domain": "bar.com"}, - transport=transport_class( - credentials=ga_credentials.AnonymousCredentials(), - ), - ) - with pytest.raises(ValueError) as excinfo: - client._validate_universe_domain() - assert ( - str(excinfo.value) - == "The configured universe domain (bar.com) does not match the universe domain found in the credentials (googleapis.com). If you haven't configured the universe domain explicitly, `googleapis.com` is the default." - ) - - # Test that ValueError is raised if universe_domain is provided via client options and credentials is None - with pytest.raises(ValueError): - client._compare_universes("foo.bar", None) - - @pytest.mark.parametrize( "client_class,transport_name", [ 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 3d01951c9fa8..558c8aab67c5 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__ = "3.27.0" # {x-release-please-version} +__version__ = "0.0.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 3d01951c9fa8..558c8aab67c5 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__ = "3.27.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v1/services/cloud_build/client.py b/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v1/services/cloud_build/client.py index d1e9a72217b8..b851a7ccd636 100644 --- a/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v1/services/cloud_build/client.py +++ b/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v1/services/cloud_build/client.py @@ -696,36 +696,6 @@ def _get_universe_domain( raise ValueError("Universe Domain cannot be an empty string.") return universe_domain - @staticmethod - def _compare_universes( - client_universe: str, credentials: ga_credentials.Credentials - ) -> bool: - """Returns True iff the universe domains used by the client and credentials match. - - Args: - client_universe (str): The universe domain configured via the client options. - credentials (ga_credentials.Credentials): The credentials being used in the client. - - Returns: - bool: True iff client_universe matches the universe in credentials. - - Raises: - ValueError: when client_universe does not match the universe in credentials. - """ - - default_universe = CloudBuildClient._DEFAULT_UNIVERSE - credentials_universe = getattr(credentials, "universe_domain", default_universe) - - if client_universe != credentials_universe: - raise ValueError( - "The configured universe domain " - f"({client_universe}) does not match the universe domain " - f"found in the credentials ({credentials_universe}). " - "If you haven't configured the universe domain explicitly, " - f"`{default_universe}` is the default." - ) - return True - def _validate_universe_domain(self): """Validates client's and credentials' universe domains are consistent. @@ -735,13 +705,9 @@ def _validate_universe_domain(self): Raises: ValueError: If the configured universe domain is not valid. """ - self._is_universe_domain_valid = ( - self._is_universe_domain_valid - or CloudBuildClient._compare_universes( - self.universe_domain, self.transport._credentials - ) - ) - return self._is_universe_domain_valid + + # NOTE (b/349488459): universe validation is disabled until further notice. + return True @property def api_endpoint(self): 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 3d01951c9fa8..558c8aab67c5 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__ = "3.27.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v2/services/repository_manager/client.py b/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v2/services/repository_manager/client.py index e8f2725e4880..bd2250d96314 100644 --- a/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v2/services/repository_manager/client.py +++ b/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v2/services/repository_manager/client.py @@ -543,36 +543,6 @@ def _get_universe_domain( raise ValueError("Universe Domain cannot be an empty string.") return universe_domain - @staticmethod - def _compare_universes( - client_universe: str, credentials: ga_credentials.Credentials - ) -> bool: - """Returns True iff the universe domains used by the client and credentials match. - - Args: - client_universe (str): The universe domain configured via the client options. - credentials (ga_credentials.Credentials): The credentials being used in the client. - - Returns: - bool: True iff client_universe matches the universe in credentials. - - Raises: - ValueError: when client_universe does not match the universe in credentials. - """ - - default_universe = RepositoryManagerClient._DEFAULT_UNIVERSE - credentials_universe = getattr(credentials, "universe_domain", default_universe) - - if client_universe != credentials_universe: - raise ValueError( - "The configured universe domain " - f"({client_universe}) does not match the universe domain " - f"found in the credentials ({credentials_universe}). " - "If you haven't configured the universe domain explicitly, " - f"`{default_universe}` is the default." - ) - return True - def _validate_universe_domain(self): """Validates client's and credentials' universe domains are consistent. @@ -582,13 +552,9 @@ def _validate_universe_domain(self): Raises: ValueError: If the configured universe domain is not valid. """ - self._is_universe_domain_valid = ( - self._is_universe_domain_valid - or RepositoryManagerClient._compare_universes( - self.universe_domain, self.transport._credentials - ) - ) - return self._is_universe_domain_valid + + # NOTE (b/349488459): universe validation is disabled until further notice. + return True @property def api_endpoint(self): 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 b75bb8ddecaf..e379efab560f 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": "3.27.0" + "version": "0.1.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 dc19c4473c2e..818d3fc2029c 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": "3.27.0" + "version": "0.1.0" }, "snippets": [ { diff --git a/packages/google-cloud-build/tests/unit/gapic/cloudbuild_v1/test_cloud_build.py b/packages/google-cloud-build/tests/unit/gapic/cloudbuild_v1/test_cloud_build.py index 6e8b26799dd6..c03d84e29e05 100644 --- a/packages/google-cloud-build/tests/unit/gapic/cloudbuild_v1/test_cloud_build.py +++ b/packages/google-cloud-build/tests/unit/gapic/cloudbuild_v1/test_cloud_build.py @@ -311,86 +311,6 @@ def test__get_universe_domain(): assert str(excinfo.value) == "Universe Domain cannot be an empty string." -@pytest.mark.parametrize( - "client_class,transport_class,transport_name", - [ - (CloudBuildClient, transports.CloudBuildGrpcTransport, "grpc"), - (CloudBuildClient, transports.CloudBuildRestTransport, "rest"), - ], -) -def test__validate_universe_domain(client_class, transport_class, transport_name): - client = client_class( - transport=transport_class(credentials=ga_credentials.AnonymousCredentials()) - ) - assert client._validate_universe_domain() == True - - # Test the case when universe is already validated. - assert client._validate_universe_domain() == True - - if transport_name == "grpc": - # Test the case where credentials are provided by the - # `local_channel_credentials`. The default universes in both match. - channel = grpc.secure_channel( - "http://localhost/", grpc.local_channel_credentials() - ) - client = client_class(transport=transport_class(channel=channel)) - assert client._validate_universe_domain() == True - - # Test the case where credentials do not exist: e.g. a transport is provided - # with no credentials. Validation should still succeed because there is no - # mismatch with non-existent credentials. - channel = grpc.secure_channel( - "http://localhost/", grpc.local_channel_credentials() - ) - transport = transport_class(channel=channel) - transport._credentials = None - client = client_class(transport=transport) - assert client._validate_universe_domain() == True - - # TODO: This is needed to cater for older versions of google-auth - # Make this test unconditional once the minimum supported version of - # google-auth becomes 2.23.0 or higher. - google_auth_major, google_auth_minor = [ - int(part) for part in google.auth.__version__.split(".")[0:2] - ] - if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23): - credentials = ga_credentials.AnonymousCredentials() - credentials._universe_domain = "foo.com" - # Test the case when there is a universe mismatch from the credentials. - client = client_class(transport=transport_class(credentials=credentials)) - with pytest.raises(ValueError) as excinfo: - client._validate_universe_domain() - assert ( - str(excinfo.value) - == "The configured universe domain (googleapis.com) does not match the universe domain found in the credentials (foo.com). If you haven't configured the universe domain explicitly, `googleapis.com` is the default." - ) - - # Test the case when there is a universe mismatch from the client. - # - # TODO: Make this test unconditional once the minimum supported version of - # google-api-core becomes 2.15.0 or higher. - api_core_major, api_core_minor = [ - int(part) for part in api_core_version.__version__.split(".")[0:2] - ] - if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15): - client = client_class( - client_options={"universe_domain": "bar.com"}, - transport=transport_class( - credentials=ga_credentials.AnonymousCredentials(), - ), - ) - with pytest.raises(ValueError) as excinfo: - client._validate_universe_domain() - assert ( - str(excinfo.value) - == "The configured universe domain (bar.com) does not match the universe domain found in the credentials (googleapis.com). If you haven't configured the universe domain explicitly, `googleapis.com` is the default." - ) - - # Test that ValueError is raised if universe_domain is provided via client options and credentials is None - with pytest.raises(ValueError): - client._compare_universes("foo.bar", None) - - @pytest.mark.parametrize( "client_class,transport_name", [ diff --git a/packages/google-cloud-build/tests/unit/gapic/cloudbuild_v2/test_repository_manager.py b/packages/google-cloud-build/tests/unit/gapic/cloudbuild_v2/test_repository_manager.py index f9069b00a3dd..5be3cfbec46e 100644 --- a/packages/google-cloud-build/tests/unit/gapic/cloudbuild_v2/test_repository_manager.py +++ b/packages/google-cloud-build/tests/unit/gapic/cloudbuild_v2/test_repository_manager.py @@ -344,86 +344,6 @@ def test__get_universe_domain(): assert str(excinfo.value) == "Universe Domain cannot be an empty string." -@pytest.mark.parametrize( - "client_class,transport_class,transport_name", - [ - (RepositoryManagerClient, transports.RepositoryManagerGrpcTransport, "grpc"), - (RepositoryManagerClient, transports.RepositoryManagerRestTransport, "rest"), - ], -) -def test__validate_universe_domain(client_class, transport_class, transport_name): - client = client_class( - transport=transport_class(credentials=ga_credentials.AnonymousCredentials()) - ) - assert client._validate_universe_domain() == True - - # Test the case when universe is already validated. - assert client._validate_universe_domain() == True - - if transport_name == "grpc": - # Test the case where credentials are provided by the - # `local_channel_credentials`. The default universes in both match. - channel = grpc.secure_channel( - "http://localhost/", grpc.local_channel_credentials() - ) - client = client_class(transport=transport_class(channel=channel)) - assert client._validate_universe_domain() == True - - # Test the case where credentials do not exist: e.g. a transport is provided - # with no credentials. Validation should still succeed because there is no - # mismatch with non-existent credentials. - channel = grpc.secure_channel( - "http://localhost/", grpc.local_channel_credentials() - ) - transport = transport_class(channel=channel) - transport._credentials = None - client = client_class(transport=transport) - assert client._validate_universe_domain() == True - - # TODO: This is needed to cater for older versions of google-auth - # Make this test unconditional once the minimum supported version of - # google-auth becomes 2.23.0 or higher. - google_auth_major, google_auth_minor = [ - int(part) for part in google.auth.__version__.split(".")[0:2] - ] - if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23): - credentials = ga_credentials.AnonymousCredentials() - credentials._universe_domain = "foo.com" - # Test the case when there is a universe mismatch from the credentials. - client = client_class(transport=transport_class(credentials=credentials)) - with pytest.raises(ValueError) as excinfo: - client._validate_universe_domain() - assert ( - str(excinfo.value) - == "The configured universe domain (googleapis.com) does not match the universe domain found in the credentials (foo.com). If you haven't configured the universe domain explicitly, `googleapis.com` is the default." - ) - - # Test the case when there is a universe mismatch from the client. - # - # TODO: Make this test unconditional once the minimum supported version of - # google-api-core becomes 2.15.0 or higher. - api_core_major, api_core_minor = [ - int(part) for part in api_core_version.__version__.split(".")[0:2] - ] - if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15): - client = client_class( - client_options={"universe_domain": "bar.com"}, - transport=transport_class( - credentials=ga_credentials.AnonymousCredentials(), - ), - ) - with pytest.raises(ValueError) as excinfo: - client._validate_universe_domain() - assert ( - str(excinfo.value) - == "The configured universe domain (bar.com) does not match the universe domain found in the credentials (googleapis.com). If you haven't configured the universe domain explicitly, `googleapis.com` is the default." - ) - - # Test that ValueError is raised if universe_domain is provided via client options and credentials is None - with pytest.raises(ValueError): - client._compare_universes("foo.bar", None) - - @pytest.mark.parametrize( "client_class,transport_name", [ 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 1fddec69a0c4..558c8aab67c5 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__ = "2.53.0" # {x-release-please-version} +__version__ = "0.0.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 1fddec69a0c4..558c8aab67c5 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__ = "2.53.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-container/google/cloud/container_v1/services/cluster_manager/client.py b/packages/google-cloud-container/google/cloud/container_v1/services/cluster_manager/client.py index 75c0a1e5b254..9e5cd6cd33d3 100644 --- a/packages/google-cloud-container/google/cloud/container_v1/services/cluster_manager/client.py +++ b/packages/google-cloud-container/google/cloud/container_v1/services/cluster_manager/client.py @@ -506,36 +506,6 @@ def _get_universe_domain( raise ValueError("Universe Domain cannot be an empty string.") return universe_domain - @staticmethod - def _compare_universes( - client_universe: str, credentials: ga_credentials.Credentials - ) -> bool: - """Returns True iff the universe domains used by the client and credentials match. - - Args: - client_universe (str): The universe domain configured via the client options. - credentials (ga_credentials.Credentials): The credentials being used in the client. - - Returns: - bool: True iff client_universe matches the universe in credentials. - - Raises: - ValueError: when client_universe does not match the universe in credentials. - """ - - default_universe = ClusterManagerClient._DEFAULT_UNIVERSE - credentials_universe = getattr(credentials, "universe_domain", default_universe) - - if client_universe != credentials_universe: - raise ValueError( - "The configured universe domain " - f"({client_universe}) does not match the universe domain " - f"found in the credentials ({credentials_universe}). " - "If you haven't configured the universe domain explicitly, " - f"`{default_universe}` is the default." - ) - return True - def _validate_universe_domain(self): """Validates client's and credentials' universe domains are consistent. @@ -545,13 +515,9 @@ def _validate_universe_domain(self): Raises: ValueError: If the configured universe domain is not valid. """ - self._is_universe_domain_valid = ( - self._is_universe_domain_valid - or ClusterManagerClient._compare_universes( - self.universe_domain, self.transport._credentials - ) - ) - return self._is_universe_domain_valid + + # NOTE (b/349488459): universe validation is disabled until further notice. + return True @property def api_endpoint(self): 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 1fddec69a0c4..558c8aab67c5 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__ = "2.53.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-container/google/cloud/container_v1beta1/services/cluster_manager/client.py b/packages/google-cloud-container/google/cloud/container_v1beta1/services/cluster_manager/client.py index 13487da71d47..ce533e8e0a44 100644 --- a/packages/google-cloud-container/google/cloud/container_v1beta1/services/cluster_manager/client.py +++ b/packages/google-cloud-container/google/cloud/container_v1beta1/services/cluster_manager/client.py @@ -456,36 +456,6 @@ def _get_universe_domain( raise ValueError("Universe Domain cannot be an empty string.") return universe_domain - @staticmethod - def _compare_universes( - client_universe: str, credentials: ga_credentials.Credentials - ) -> bool: - """Returns True iff the universe domains used by the client and credentials match. - - Args: - client_universe (str): The universe domain configured via the client options. - credentials (ga_credentials.Credentials): The credentials being used in the client. - - Returns: - bool: True iff client_universe matches the universe in credentials. - - Raises: - ValueError: when client_universe does not match the universe in credentials. - """ - - default_universe = ClusterManagerClient._DEFAULT_UNIVERSE - credentials_universe = getattr(credentials, "universe_domain", default_universe) - - if client_universe != credentials_universe: - raise ValueError( - "The configured universe domain " - f"({client_universe}) does not match the universe domain " - f"found in the credentials ({credentials_universe}). " - "If you haven't configured the universe domain explicitly, " - f"`{default_universe}` is the default." - ) - return True - def _validate_universe_domain(self): """Validates client's and credentials' universe domains are consistent. @@ -495,13 +465,9 @@ def _validate_universe_domain(self): Raises: ValueError: If the configured universe domain is not valid. """ - self._is_universe_domain_valid = ( - self._is_universe_domain_valid - or ClusterManagerClient._compare_universes( - self.universe_domain, self.transport._credentials - ) - ) - return self._is_universe_domain_valid + + # NOTE (b/349488459): universe validation is disabled until further notice. + return True @property def api_endpoint(self): 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 bb340bf23f09..2a343a6434fa 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": "2.53.0" + "version": "0.1.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 98c22cf48897..afdb562b267e 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": "2.53.0" + "version": "0.1.0" }, "snippets": [ { diff --git a/packages/google-cloud-container/tests/unit/gapic/container_v1/test_cluster_manager.py b/packages/google-cloud-container/tests/unit/gapic/container_v1/test_cluster_manager.py index 6b59ca97c527..335cbc3a0795 100644 --- a/packages/google-cloud-container/tests/unit/gapic/container_v1/test_cluster_manager.py +++ b/packages/google-cloud-container/tests/unit/gapic/container_v1/test_cluster_manager.py @@ -323,86 +323,6 @@ def test__get_universe_domain(): assert str(excinfo.value) == "Universe Domain cannot be an empty string." -@pytest.mark.parametrize( - "client_class,transport_class,transport_name", - [ - (ClusterManagerClient, transports.ClusterManagerGrpcTransport, "grpc"), - (ClusterManagerClient, transports.ClusterManagerRestTransport, "rest"), - ], -) -def test__validate_universe_domain(client_class, transport_class, transport_name): - client = client_class( - transport=transport_class(credentials=ga_credentials.AnonymousCredentials()) - ) - assert client._validate_universe_domain() == True - - # Test the case when universe is already validated. - assert client._validate_universe_domain() == True - - if transport_name == "grpc": - # Test the case where credentials are provided by the - # `local_channel_credentials`. The default universes in both match. - channel = grpc.secure_channel( - "http://localhost/", grpc.local_channel_credentials() - ) - client = client_class(transport=transport_class(channel=channel)) - assert client._validate_universe_domain() == True - - # Test the case where credentials do not exist: e.g. a transport is provided - # with no credentials. Validation should still succeed because there is no - # mismatch with non-existent credentials. - channel = grpc.secure_channel( - "http://localhost/", grpc.local_channel_credentials() - ) - transport = transport_class(channel=channel) - transport._credentials = None - client = client_class(transport=transport) - assert client._validate_universe_domain() == True - - # TODO: This is needed to cater for older versions of google-auth - # Make this test unconditional once the minimum supported version of - # google-auth becomes 2.23.0 or higher. - google_auth_major, google_auth_minor = [ - int(part) for part in google.auth.__version__.split(".")[0:2] - ] - if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23): - credentials = ga_credentials.AnonymousCredentials() - credentials._universe_domain = "foo.com" - # Test the case when there is a universe mismatch from the credentials. - client = client_class(transport=transport_class(credentials=credentials)) - with pytest.raises(ValueError) as excinfo: - client._validate_universe_domain() - assert ( - str(excinfo.value) - == "The configured universe domain (googleapis.com) does not match the universe domain found in the credentials (foo.com). If you haven't configured the universe domain explicitly, `googleapis.com` is the default." - ) - - # Test the case when there is a universe mismatch from the client. - # - # TODO: Make this test unconditional once the minimum supported version of - # google-api-core becomes 2.15.0 or higher. - api_core_major, api_core_minor = [ - int(part) for part in api_core_version.__version__.split(".")[0:2] - ] - if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15): - client = client_class( - client_options={"universe_domain": "bar.com"}, - transport=transport_class( - credentials=ga_credentials.AnonymousCredentials(), - ), - ) - with pytest.raises(ValueError) as excinfo: - client._validate_universe_domain() - assert ( - str(excinfo.value) - == "The configured universe domain (bar.com) does not match the universe domain found in the credentials (googleapis.com). If you haven't configured the universe domain explicitly, `googleapis.com` is the default." - ) - - # Test that ValueError is raised if universe_domain is provided via client options and credentials is None - with pytest.raises(ValueError): - client._compare_universes("foo.bar", None) - - @pytest.mark.parametrize( "client_class,transport_name", [ diff --git a/packages/google-cloud-container/tests/unit/gapic/container_v1beta1/test_cluster_manager.py b/packages/google-cloud-container/tests/unit/gapic/container_v1beta1/test_cluster_manager.py index caa61018517f..593f7711426f 100644 --- a/packages/google-cloud-container/tests/unit/gapic/container_v1beta1/test_cluster_manager.py +++ b/packages/google-cloud-container/tests/unit/gapic/container_v1beta1/test_cluster_manager.py @@ -318,85 +318,6 @@ def test__get_universe_domain(): assert str(excinfo.value) == "Universe Domain cannot be an empty string." -@pytest.mark.parametrize( - "client_class,transport_class,transport_name", - [ - (ClusterManagerClient, transports.ClusterManagerGrpcTransport, "grpc"), - ], -) -def test__validate_universe_domain(client_class, transport_class, transport_name): - client = client_class( - transport=transport_class(credentials=ga_credentials.AnonymousCredentials()) - ) - assert client._validate_universe_domain() == True - - # Test the case when universe is already validated. - assert client._validate_universe_domain() == True - - if transport_name == "grpc": - # Test the case where credentials are provided by the - # `local_channel_credentials`. The default universes in both match. - channel = grpc.secure_channel( - "http://localhost/", grpc.local_channel_credentials() - ) - client = client_class(transport=transport_class(channel=channel)) - assert client._validate_universe_domain() == True - - # Test the case where credentials do not exist: e.g. a transport is provided - # with no credentials. Validation should still succeed because there is no - # mismatch with non-existent credentials. - channel = grpc.secure_channel( - "http://localhost/", grpc.local_channel_credentials() - ) - transport = transport_class(channel=channel) - transport._credentials = None - client = client_class(transport=transport) - assert client._validate_universe_domain() == True - - # TODO: This is needed to cater for older versions of google-auth - # Make this test unconditional once the minimum supported version of - # google-auth becomes 2.23.0 or higher. - google_auth_major, google_auth_minor = [ - int(part) for part in google.auth.__version__.split(".")[0:2] - ] - if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23): - credentials = ga_credentials.AnonymousCredentials() - credentials._universe_domain = "foo.com" - # Test the case when there is a universe mismatch from the credentials. - client = client_class(transport=transport_class(credentials=credentials)) - with pytest.raises(ValueError) as excinfo: - client._validate_universe_domain() - assert ( - str(excinfo.value) - == "The configured universe domain (googleapis.com) does not match the universe domain found in the credentials (foo.com). If you haven't configured the universe domain explicitly, `googleapis.com` is the default." - ) - - # Test the case when there is a universe mismatch from the client. - # - # TODO: Make this test unconditional once the minimum supported version of - # google-api-core becomes 2.15.0 or higher. - api_core_major, api_core_minor = [ - int(part) for part in api_core_version.__version__.split(".")[0:2] - ] - if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15): - client = client_class( - client_options={"universe_domain": "bar.com"}, - transport=transport_class( - credentials=ga_credentials.AnonymousCredentials(), - ), - ) - with pytest.raises(ValueError) as excinfo: - client._validate_universe_domain() - assert ( - str(excinfo.value) - == "The configured universe domain (bar.com) does not match the universe domain found in the credentials (googleapis.com). If you haven't configured the universe domain explicitly, `googleapis.com` is the default." - ) - - # Test that ValueError is raised if universe_domain is provided via client options and credentials is None - with pytest.raises(ValueError): - client._compare_universes("foo.bar", None) - - @pytest.mark.parametrize( "client_class,transport_name", [ 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 60165d54bf8a..558c8aab67c5 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__ = "2.15.0" # {x-release-please-version} +__version__ = "0.0.0" # {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 60165d54bf8a..558c8aab67c5 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__ = "2.15.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-containeranalysis/google/cloud/devtools/containeranalysis_v1/services/container_analysis/client.py b/packages/google-cloud-containeranalysis/google/cloud/devtools/containeranalysis_v1/services/container_analysis/client.py index 3b0dec1774db..05d27b82ffaf 100644 --- a/packages/google-cloud-containeranalysis/google/cloud/devtools/containeranalysis_v1/services/container_analysis/client.py +++ b/packages/google-cloud-containeranalysis/google/cloud/devtools/containeranalysis_v1/services/container_analysis/client.py @@ -458,36 +458,6 @@ def _get_universe_domain( raise ValueError("Universe Domain cannot be an empty string.") return universe_domain - @staticmethod - def _compare_universes( - client_universe: str, credentials: ga_credentials.Credentials - ) -> bool: - """Returns True iff the universe domains used by the client and credentials match. - - Args: - client_universe (str): The universe domain configured via the client options. - credentials (ga_credentials.Credentials): The credentials being used in the client. - - Returns: - bool: True iff client_universe matches the universe in credentials. - - Raises: - ValueError: when client_universe does not match the universe in credentials. - """ - - default_universe = ContainerAnalysisClient._DEFAULT_UNIVERSE - credentials_universe = getattr(credentials, "universe_domain", default_universe) - - if client_universe != credentials_universe: - raise ValueError( - "The configured universe domain " - f"({client_universe}) does not match the universe domain " - f"found in the credentials ({credentials_universe}). " - "If you haven't configured the universe domain explicitly, " - f"`{default_universe}` is the default." - ) - return True - def _validate_universe_domain(self): """Validates client's and credentials' universe domains are consistent. @@ -497,13 +467,9 @@ def _validate_universe_domain(self): Raises: ValueError: If the configured universe domain is not valid. """ - self._is_universe_domain_valid = ( - self._is_universe_domain_valid - or ContainerAnalysisClient._compare_universes( - self.universe_domain, self.transport._credentials - ) - ) - return self._is_universe_domain_valid + + # NOTE (b/349488459): universe validation is disabled until further notice. + return True @property def api_endpoint(self): 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 102e20913343..dab3e1ef2940 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": "2.15.0" + "version": "0.1.0" }, "snippets": [ { diff --git a/packages/google-cloud-containeranalysis/tests/unit/gapic/containeranalysis_v1/test_container_analysis.py b/packages/google-cloud-containeranalysis/tests/unit/gapic/containeranalysis_v1/test_container_analysis.py index 0463344ce81b..531c34d66051 100644 --- a/packages/google-cloud-containeranalysis/tests/unit/gapic/containeranalysis_v1/test_container_analysis.py +++ b/packages/google-cloud-containeranalysis/tests/unit/gapic/containeranalysis_v1/test_container_analysis.py @@ -331,86 +331,6 @@ def test__get_universe_domain(): assert str(excinfo.value) == "Universe Domain cannot be an empty string." -@pytest.mark.parametrize( - "client_class,transport_class,transport_name", - [ - (ContainerAnalysisClient, transports.ContainerAnalysisGrpcTransport, "grpc"), - (ContainerAnalysisClient, transports.ContainerAnalysisRestTransport, "rest"), - ], -) -def test__validate_universe_domain(client_class, transport_class, transport_name): - client = client_class( - transport=transport_class(credentials=ga_credentials.AnonymousCredentials()) - ) - assert client._validate_universe_domain() == True - - # Test the case when universe is already validated. - assert client._validate_universe_domain() == True - - if transport_name == "grpc": - # Test the case where credentials are provided by the - # `local_channel_credentials`. The default universes in both match. - channel = grpc.secure_channel( - "http://localhost/", grpc.local_channel_credentials() - ) - client = client_class(transport=transport_class(channel=channel)) - assert client._validate_universe_domain() == True - - # Test the case where credentials do not exist: e.g. a transport is provided - # with no credentials. Validation should still succeed because there is no - # mismatch with non-existent credentials. - channel = grpc.secure_channel( - "http://localhost/", grpc.local_channel_credentials() - ) - transport = transport_class(channel=channel) - transport._credentials = None - client = client_class(transport=transport) - assert client._validate_universe_domain() == True - - # TODO: This is needed to cater for older versions of google-auth - # Make this test unconditional once the minimum supported version of - # google-auth becomes 2.23.0 or higher. - google_auth_major, google_auth_minor = [ - int(part) for part in google.auth.__version__.split(".")[0:2] - ] - if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23): - credentials = ga_credentials.AnonymousCredentials() - credentials._universe_domain = "foo.com" - # Test the case when there is a universe mismatch from the credentials. - client = client_class(transport=transport_class(credentials=credentials)) - with pytest.raises(ValueError) as excinfo: - client._validate_universe_domain() - assert ( - str(excinfo.value) - == "The configured universe domain (googleapis.com) does not match the universe domain found in the credentials (foo.com). If you haven't configured the universe domain explicitly, `googleapis.com` is the default." - ) - - # Test the case when there is a universe mismatch from the client. - # - # TODO: Make this test unconditional once the minimum supported version of - # google-api-core becomes 2.15.0 or higher. - api_core_major, api_core_minor = [ - int(part) for part in api_core_version.__version__.split(".")[0:2] - ] - if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15): - client = client_class( - client_options={"universe_domain": "bar.com"}, - transport=transport_class( - credentials=ga_credentials.AnonymousCredentials(), - ), - ) - with pytest.raises(ValueError) as excinfo: - client._validate_universe_domain() - assert ( - str(excinfo.value) - == "The configured universe domain (bar.com) does not match the universe domain found in the credentials (googleapis.com). If you haven't configured the universe domain explicitly, `googleapis.com` is the default." - ) - - # Test that ValueError is raised if universe_domain is provided via client options and credentials is None - with pytest.raises(ValueError): - client._compare_universes("foo.bar", None) - - @pytest.mark.parametrize( "client_class,transport_name", [ diff --git a/packages/google-cloud-dataflow-client/google/cloud/dataflow/gapic_version.py b/packages/google-cloud-dataflow-client/google/cloud/dataflow/gapic_version.py index 7e84c98cf883..558c8aab67c5 100644 --- a/packages/google-cloud-dataflow-client/google/cloud/dataflow/gapic_version.py +++ b/packages/google-cloud-dataflow-client/google/cloud/dataflow/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.8.13" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-dataflow-client/google/cloud/dataflow_v1beta3/gapic_version.py b/packages/google-cloud-dataflow-client/google/cloud/dataflow_v1beta3/gapic_version.py index 7e84c98cf883..558c8aab67c5 100644 --- a/packages/google-cloud-dataflow-client/google/cloud/dataflow_v1beta3/gapic_version.py +++ b/packages/google-cloud-dataflow-client/google/cloud/dataflow_v1beta3/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.8.13" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-dataflow-client/google/cloud/dataflow_v1beta3/services/flex_templates_service/client.py b/packages/google-cloud-dataflow-client/google/cloud/dataflow_v1beta3/services/flex_templates_service/client.py index 71e049ca39e5..efe8d4659faf 100644 --- a/packages/google-cloud-dataflow-client/google/cloud/dataflow_v1beta3/services/flex_templates_service/client.py +++ b/packages/google-cloud-dataflow-client/google/cloud/dataflow_v1beta3/services/flex_templates_service/client.py @@ -440,36 +440,6 @@ def _get_universe_domain( raise ValueError("Universe Domain cannot be an empty string.") return universe_domain - @staticmethod - def _compare_universes( - client_universe: str, credentials: ga_credentials.Credentials - ) -> bool: - """Returns True iff the universe domains used by the client and credentials match. - - Args: - client_universe (str): The universe domain configured via the client options. - credentials (ga_credentials.Credentials): The credentials being used in the client. - - Returns: - bool: True iff client_universe matches the universe in credentials. - - Raises: - ValueError: when client_universe does not match the universe in credentials. - """ - - default_universe = FlexTemplatesServiceClient._DEFAULT_UNIVERSE - credentials_universe = getattr(credentials, "universe_domain", default_universe) - - if client_universe != credentials_universe: - raise ValueError( - "The configured universe domain " - f"({client_universe}) does not match the universe domain " - f"found in the credentials ({credentials_universe}). " - "If you haven't configured the universe domain explicitly, " - f"`{default_universe}` is the default." - ) - return True - def _validate_universe_domain(self): """Validates client's and credentials' universe domains are consistent. @@ -479,13 +449,9 @@ def _validate_universe_domain(self): Raises: ValueError: If the configured universe domain is not valid. """ - self._is_universe_domain_valid = ( - self._is_universe_domain_valid - or FlexTemplatesServiceClient._compare_universes( - self.universe_domain, self.transport._credentials - ) - ) - return self._is_universe_domain_valid + + # NOTE (b/349488459): universe validation is disabled until further notice. + return True @property def api_endpoint(self): diff --git a/packages/google-cloud-dataflow-client/google/cloud/dataflow_v1beta3/services/jobs_v1_beta3/client.py b/packages/google-cloud-dataflow-client/google/cloud/dataflow_v1beta3/services/jobs_v1_beta3/client.py index 1f3019cd8a89..c1c135e57f95 100644 --- a/packages/google-cloud-dataflow-client/google/cloud/dataflow_v1beta3/services/jobs_v1_beta3/client.py +++ b/packages/google-cloud-dataflow-client/google/cloud/dataflow_v1beta3/services/jobs_v1_beta3/client.py @@ -443,36 +443,6 @@ def _get_universe_domain( raise ValueError("Universe Domain cannot be an empty string.") return universe_domain - @staticmethod - def _compare_universes( - client_universe: str, credentials: ga_credentials.Credentials - ) -> bool: - """Returns True iff the universe domains used by the client and credentials match. - - Args: - client_universe (str): The universe domain configured via the client options. - credentials (ga_credentials.Credentials): The credentials being used in the client. - - Returns: - bool: True iff client_universe matches the universe in credentials. - - Raises: - ValueError: when client_universe does not match the universe in credentials. - """ - - default_universe = JobsV1Beta3Client._DEFAULT_UNIVERSE - credentials_universe = getattr(credentials, "universe_domain", default_universe) - - if client_universe != credentials_universe: - raise ValueError( - "The configured universe domain " - f"({client_universe}) does not match the universe domain " - f"found in the credentials ({credentials_universe}). " - "If you haven't configured the universe domain explicitly, " - f"`{default_universe}` is the default." - ) - return True - def _validate_universe_domain(self): """Validates client's and credentials' universe domains are consistent. @@ -482,13 +452,9 @@ def _validate_universe_domain(self): Raises: ValueError: If the configured universe domain is not valid. """ - self._is_universe_domain_valid = ( - self._is_universe_domain_valid - or JobsV1Beta3Client._compare_universes( - self.universe_domain, self.transport._credentials - ) - ) - return self._is_universe_domain_valid + + # NOTE (b/349488459): universe validation is disabled until further notice. + return True @property def api_endpoint(self): diff --git a/packages/google-cloud-dataflow-client/google/cloud/dataflow_v1beta3/services/messages_v1_beta3/client.py b/packages/google-cloud-dataflow-client/google/cloud/dataflow_v1beta3/services/messages_v1_beta3/client.py index c32452797c5a..d0fa910acb3c 100644 --- a/packages/google-cloud-dataflow-client/google/cloud/dataflow_v1beta3/services/messages_v1_beta3/client.py +++ b/packages/google-cloud-dataflow-client/google/cloud/dataflow_v1beta3/services/messages_v1_beta3/client.py @@ -441,36 +441,6 @@ def _get_universe_domain( raise ValueError("Universe Domain cannot be an empty string.") return universe_domain - @staticmethod - def _compare_universes( - client_universe: str, credentials: ga_credentials.Credentials - ) -> bool: - """Returns True iff the universe domains used by the client and credentials match. - - Args: - client_universe (str): The universe domain configured via the client options. - credentials (ga_credentials.Credentials): The credentials being used in the client. - - Returns: - bool: True iff client_universe matches the universe in credentials. - - Raises: - ValueError: when client_universe does not match the universe in credentials. - """ - - default_universe = MessagesV1Beta3Client._DEFAULT_UNIVERSE - credentials_universe = getattr(credentials, "universe_domain", default_universe) - - if client_universe != credentials_universe: - raise ValueError( - "The configured universe domain " - f"({client_universe}) does not match the universe domain " - f"found in the credentials ({credentials_universe}). " - "If you haven't configured the universe domain explicitly, " - f"`{default_universe}` is the default." - ) - return True - def _validate_universe_domain(self): """Validates client's and credentials' universe domains are consistent. @@ -480,13 +450,9 @@ def _validate_universe_domain(self): Raises: ValueError: If the configured universe domain is not valid. """ - self._is_universe_domain_valid = ( - self._is_universe_domain_valid - or MessagesV1Beta3Client._compare_universes( - self.universe_domain, self.transport._credentials - ) - ) - return self._is_universe_domain_valid + + # NOTE (b/349488459): universe validation is disabled until further notice. + return True @property def api_endpoint(self): diff --git a/packages/google-cloud-dataflow-client/google/cloud/dataflow_v1beta3/services/metrics_v1_beta3/client.py b/packages/google-cloud-dataflow-client/google/cloud/dataflow_v1beta3/services/metrics_v1_beta3/client.py index 9c6570dea285..028e20a2a4b7 100644 --- a/packages/google-cloud-dataflow-client/google/cloud/dataflow_v1beta3/services/metrics_v1_beta3/client.py +++ b/packages/google-cloud-dataflow-client/google/cloud/dataflow_v1beta3/services/metrics_v1_beta3/client.py @@ -443,36 +443,6 @@ def _get_universe_domain( raise ValueError("Universe Domain cannot be an empty string.") return universe_domain - @staticmethod - def _compare_universes( - client_universe: str, credentials: ga_credentials.Credentials - ) -> bool: - """Returns True iff the universe domains used by the client and credentials match. - - Args: - client_universe (str): The universe domain configured via the client options. - credentials (ga_credentials.Credentials): The credentials being used in the client. - - Returns: - bool: True iff client_universe matches the universe in credentials. - - Raises: - ValueError: when client_universe does not match the universe in credentials. - """ - - default_universe = MetricsV1Beta3Client._DEFAULT_UNIVERSE - credentials_universe = getattr(credentials, "universe_domain", default_universe) - - if client_universe != credentials_universe: - raise ValueError( - "The configured universe domain " - f"({client_universe}) does not match the universe domain " - f"found in the credentials ({credentials_universe}). " - "If you haven't configured the universe domain explicitly, " - f"`{default_universe}` is the default." - ) - return True - def _validate_universe_domain(self): """Validates client's and credentials' universe domains are consistent. @@ -482,13 +452,9 @@ def _validate_universe_domain(self): Raises: ValueError: If the configured universe domain is not valid. """ - self._is_universe_domain_valid = ( - self._is_universe_domain_valid - or MetricsV1Beta3Client._compare_universes( - self.universe_domain, self.transport._credentials - ) - ) - return self._is_universe_domain_valid + + # NOTE (b/349488459): universe validation is disabled until further notice. + return True @property def api_endpoint(self): diff --git a/packages/google-cloud-dataflow-client/google/cloud/dataflow_v1beta3/services/snapshots_v1_beta3/client.py b/packages/google-cloud-dataflow-client/google/cloud/dataflow_v1beta3/services/snapshots_v1_beta3/client.py index 568607068769..c67cd9e45839 100644 --- a/packages/google-cloud-dataflow-client/google/cloud/dataflow_v1beta3/services/snapshots_v1_beta3/client.py +++ b/packages/google-cloud-dataflow-client/google/cloud/dataflow_v1beta3/services/snapshots_v1_beta3/client.py @@ -443,36 +443,6 @@ def _get_universe_domain( raise ValueError("Universe Domain cannot be an empty string.") return universe_domain - @staticmethod - def _compare_universes( - client_universe: str, credentials: ga_credentials.Credentials - ) -> bool: - """Returns True iff the universe domains used by the client and credentials match. - - Args: - client_universe (str): The universe domain configured via the client options. - credentials (ga_credentials.Credentials): The credentials being used in the client. - - Returns: - bool: True iff client_universe matches the universe in credentials. - - Raises: - ValueError: when client_universe does not match the universe in credentials. - """ - - default_universe = SnapshotsV1Beta3Client._DEFAULT_UNIVERSE - credentials_universe = getattr(credentials, "universe_domain", default_universe) - - if client_universe != credentials_universe: - raise ValueError( - "The configured universe domain " - f"({client_universe}) does not match the universe domain " - f"found in the credentials ({credentials_universe}). " - "If you haven't configured the universe domain explicitly, " - f"`{default_universe}` is the default." - ) - return True - def _validate_universe_domain(self): """Validates client's and credentials' universe domains are consistent. @@ -482,13 +452,9 @@ def _validate_universe_domain(self): Raises: ValueError: If the configured universe domain is not valid. """ - self._is_universe_domain_valid = ( - self._is_universe_domain_valid - or SnapshotsV1Beta3Client._compare_universes( - self.universe_domain, self.transport._credentials - ) - ) - return self._is_universe_domain_valid + + # NOTE (b/349488459): universe validation is disabled until further notice. + return True @property def api_endpoint(self): diff --git a/packages/google-cloud-dataflow-client/google/cloud/dataflow_v1beta3/services/templates_service/client.py b/packages/google-cloud-dataflow-client/google/cloud/dataflow_v1beta3/services/templates_service/client.py index 53466a958396..a2aa8bc13ddd 100644 --- a/packages/google-cloud-dataflow-client/google/cloud/dataflow_v1beta3/services/templates_service/client.py +++ b/packages/google-cloud-dataflow-client/google/cloud/dataflow_v1beta3/services/templates_service/client.py @@ -443,36 +443,6 @@ def _get_universe_domain( raise ValueError("Universe Domain cannot be an empty string.") return universe_domain - @staticmethod - def _compare_universes( - client_universe: str, credentials: ga_credentials.Credentials - ) -> bool: - """Returns True iff the universe domains used by the client and credentials match. - - Args: - client_universe (str): The universe domain configured via the client options. - credentials (ga_credentials.Credentials): The credentials being used in the client. - - Returns: - bool: True iff client_universe matches the universe in credentials. - - Raises: - ValueError: when client_universe does not match the universe in credentials. - """ - - default_universe = TemplatesServiceClient._DEFAULT_UNIVERSE - credentials_universe = getattr(credentials, "universe_domain", default_universe) - - if client_universe != credentials_universe: - raise ValueError( - "The configured universe domain " - f"({client_universe}) does not match the universe domain " - f"found in the credentials ({credentials_universe}). " - "If you haven't configured the universe domain explicitly, " - f"`{default_universe}` is the default." - ) - return True - def _validate_universe_domain(self): """Validates client's and credentials' universe domains are consistent. @@ -482,13 +452,9 @@ def _validate_universe_domain(self): Raises: ValueError: If the configured universe domain is not valid. """ - self._is_universe_domain_valid = ( - self._is_universe_domain_valid - or TemplatesServiceClient._compare_universes( - self.universe_domain, self.transport._credentials - ) - ) - return self._is_universe_domain_valid + + # NOTE (b/349488459): universe validation is disabled until further notice. + return True @property def api_endpoint(self): diff --git a/packages/google-cloud-dataflow-client/samples/generated_samples/snippet_metadata_google.dataflow.v1beta3.json b/packages/google-cloud-dataflow-client/samples/generated_samples/snippet_metadata_google.dataflow.v1beta3.json index 4ac5f8638ca0..07ae5fac5096 100644 --- a/packages/google-cloud-dataflow-client/samples/generated_samples/snippet_metadata_google.dataflow.v1beta3.json +++ b/packages/google-cloud-dataflow-client/samples/generated_samples/snippet_metadata_google.dataflow.v1beta3.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-dataflow-client", - "version": "0.8.13" + "version": "0.1.0" }, "snippets": [ { diff --git a/packages/google-cloud-dataflow-client/tests/unit/gapic/dataflow_v1beta3/test_flex_templates_service.py b/packages/google-cloud-dataflow-client/tests/unit/gapic/dataflow_v1beta3/test_flex_templates_service.py index 9f17c1c01342..e2a90857777a 100644 --- a/packages/google-cloud-dataflow-client/tests/unit/gapic/dataflow_v1beta3/test_flex_templates_service.py +++ b/packages/google-cloud-dataflow-client/tests/unit/gapic/dataflow_v1beta3/test_flex_templates_service.py @@ -332,94 +332,6 @@ def test__get_universe_domain(): assert str(excinfo.value) == "Universe Domain cannot be an empty string." -@pytest.mark.parametrize( - "client_class,transport_class,transport_name", - [ - ( - FlexTemplatesServiceClient, - transports.FlexTemplatesServiceGrpcTransport, - "grpc", - ), - ( - FlexTemplatesServiceClient, - transports.FlexTemplatesServiceRestTransport, - "rest", - ), - ], -) -def test__validate_universe_domain(client_class, transport_class, transport_name): - client = client_class( - transport=transport_class(credentials=ga_credentials.AnonymousCredentials()) - ) - assert client._validate_universe_domain() == True - - # Test the case when universe is already validated. - assert client._validate_universe_domain() == True - - if transport_name == "grpc": - # Test the case where credentials are provided by the - # `local_channel_credentials`. The default universes in both match. - channel = grpc.secure_channel( - "http://localhost/", grpc.local_channel_credentials() - ) - client = client_class(transport=transport_class(channel=channel)) - assert client._validate_universe_domain() == True - - # Test the case where credentials do not exist: e.g. a transport is provided - # with no credentials. Validation should still succeed because there is no - # mismatch with non-existent credentials. - channel = grpc.secure_channel( - "http://localhost/", grpc.local_channel_credentials() - ) - transport = transport_class(channel=channel) - transport._credentials = None - client = client_class(transport=transport) - assert client._validate_universe_domain() == True - - # TODO: This is needed to cater for older versions of google-auth - # Make this test unconditional once the minimum supported version of - # google-auth becomes 2.23.0 or higher. - google_auth_major, google_auth_minor = [ - int(part) for part in google.auth.__version__.split(".")[0:2] - ] - if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23): - credentials = ga_credentials.AnonymousCredentials() - credentials._universe_domain = "foo.com" - # Test the case when there is a universe mismatch from the credentials. - client = client_class(transport=transport_class(credentials=credentials)) - with pytest.raises(ValueError) as excinfo: - client._validate_universe_domain() - assert ( - str(excinfo.value) - == "The configured universe domain (googleapis.com) does not match the universe domain found in the credentials (foo.com). If you haven't configured the universe domain explicitly, `googleapis.com` is the default." - ) - - # Test the case when there is a universe mismatch from the client. - # - # TODO: Make this test unconditional once the minimum supported version of - # google-api-core becomes 2.15.0 or higher. - api_core_major, api_core_minor = [ - int(part) for part in api_core_version.__version__.split(".")[0:2] - ] - if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15): - client = client_class( - client_options={"universe_domain": "bar.com"}, - transport=transport_class( - credentials=ga_credentials.AnonymousCredentials(), - ), - ) - with pytest.raises(ValueError) as excinfo: - client._validate_universe_domain() - assert ( - str(excinfo.value) - == "The configured universe domain (bar.com) does not match the universe domain found in the credentials (googleapis.com). If you haven't configured the universe domain explicitly, `googleapis.com` is the default." - ) - - # Test that ValueError is raised if universe_domain is provided via client options and credentials is None - with pytest.raises(ValueError): - client._compare_universes("foo.bar", None) - - @pytest.mark.parametrize( "client_class,transport_name", [ diff --git a/packages/google-cloud-dataflow-client/tests/unit/gapic/dataflow_v1beta3/test_jobs_v1_beta3.py b/packages/google-cloud-dataflow-client/tests/unit/gapic/dataflow_v1beta3/test_jobs_v1_beta3.py index 9685bbc2d89d..f793b62dcd57 100644 --- a/packages/google-cloud-dataflow-client/tests/unit/gapic/dataflow_v1beta3/test_jobs_v1_beta3.py +++ b/packages/google-cloud-dataflow-client/tests/unit/gapic/dataflow_v1beta3/test_jobs_v1_beta3.py @@ -303,86 +303,6 @@ def test__get_universe_domain(): assert str(excinfo.value) == "Universe Domain cannot be an empty string." -@pytest.mark.parametrize( - "client_class,transport_class,transport_name", - [ - (JobsV1Beta3Client, transports.JobsV1Beta3GrpcTransport, "grpc"), - (JobsV1Beta3Client, transports.JobsV1Beta3RestTransport, "rest"), - ], -) -def test__validate_universe_domain(client_class, transport_class, transport_name): - client = client_class( - transport=transport_class(credentials=ga_credentials.AnonymousCredentials()) - ) - assert client._validate_universe_domain() == True - - # Test the case when universe is already validated. - assert client._validate_universe_domain() == True - - if transport_name == "grpc": - # Test the case where credentials are provided by the - # `local_channel_credentials`. The default universes in both match. - channel = grpc.secure_channel( - "http://localhost/", grpc.local_channel_credentials() - ) - client = client_class(transport=transport_class(channel=channel)) - assert client._validate_universe_domain() == True - - # Test the case where credentials do not exist: e.g. a transport is provided - # with no credentials. Validation should still succeed because there is no - # mismatch with non-existent credentials. - channel = grpc.secure_channel( - "http://localhost/", grpc.local_channel_credentials() - ) - transport = transport_class(channel=channel) - transport._credentials = None - client = client_class(transport=transport) - assert client._validate_universe_domain() == True - - # TODO: This is needed to cater for older versions of google-auth - # Make this test unconditional once the minimum supported version of - # google-auth becomes 2.23.0 or higher. - google_auth_major, google_auth_minor = [ - int(part) for part in google.auth.__version__.split(".")[0:2] - ] - if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23): - credentials = ga_credentials.AnonymousCredentials() - credentials._universe_domain = "foo.com" - # Test the case when there is a universe mismatch from the credentials. - client = client_class(transport=transport_class(credentials=credentials)) - with pytest.raises(ValueError) as excinfo: - client._validate_universe_domain() - assert ( - str(excinfo.value) - == "The configured universe domain (googleapis.com) does not match the universe domain found in the credentials (foo.com). If you haven't configured the universe domain explicitly, `googleapis.com` is the default." - ) - - # Test the case when there is a universe mismatch from the client. - # - # TODO: Make this test unconditional once the minimum supported version of - # google-api-core becomes 2.15.0 or higher. - api_core_major, api_core_minor = [ - int(part) for part in api_core_version.__version__.split(".")[0:2] - ] - if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15): - client = client_class( - client_options={"universe_domain": "bar.com"}, - transport=transport_class( - credentials=ga_credentials.AnonymousCredentials(), - ), - ) - with pytest.raises(ValueError) as excinfo: - client._validate_universe_domain() - assert ( - str(excinfo.value) - == "The configured universe domain (bar.com) does not match the universe domain found in the credentials (googleapis.com). If you haven't configured the universe domain explicitly, `googleapis.com` is the default." - ) - - # Test that ValueError is raised if universe_domain is provided via client options and credentials is None - with pytest.raises(ValueError): - client._compare_universes("foo.bar", None) - - @pytest.mark.parametrize( "client_class,transport_name", [ diff --git a/packages/google-cloud-dataflow-client/tests/unit/gapic/dataflow_v1beta3/test_messages_v1_beta3.py b/packages/google-cloud-dataflow-client/tests/unit/gapic/dataflow_v1beta3/test_messages_v1_beta3.py index 90347c6fe0ab..d6ef650a385d 100644 --- a/packages/google-cloud-dataflow-client/tests/unit/gapic/dataflow_v1beta3/test_messages_v1_beta3.py +++ b/packages/google-cloud-dataflow-client/tests/unit/gapic/dataflow_v1beta3/test_messages_v1_beta3.py @@ -319,86 +319,6 @@ def test__get_universe_domain(): assert str(excinfo.value) == "Universe Domain cannot be an empty string." -@pytest.mark.parametrize( - "client_class,transport_class,transport_name", - [ - (MessagesV1Beta3Client, transports.MessagesV1Beta3GrpcTransport, "grpc"), - (MessagesV1Beta3Client, transports.MessagesV1Beta3RestTransport, "rest"), - ], -) -def test__validate_universe_domain(client_class, transport_class, transport_name): - client = client_class( - transport=transport_class(credentials=ga_credentials.AnonymousCredentials()) - ) - assert client._validate_universe_domain() == True - - # Test the case when universe is already validated. - assert client._validate_universe_domain() == True - - if transport_name == "grpc": - # Test the case where credentials are provided by the - # `local_channel_credentials`. The default universes in both match. - channel = grpc.secure_channel( - "http://localhost/", grpc.local_channel_credentials() - ) - client = client_class(transport=transport_class(channel=channel)) - assert client._validate_universe_domain() == True - - # Test the case where credentials do not exist: e.g. a transport is provided - # with no credentials. Validation should still succeed because there is no - # mismatch with non-existent credentials. - channel = grpc.secure_channel( - "http://localhost/", grpc.local_channel_credentials() - ) - transport = transport_class(channel=channel) - transport._credentials = None - client = client_class(transport=transport) - assert client._validate_universe_domain() == True - - # TODO: This is needed to cater for older versions of google-auth - # Make this test unconditional once the minimum supported version of - # google-auth becomes 2.23.0 or higher. - google_auth_major, google_auth_minor = [ - int(part) for part in google.auth.__version__.split(".")[0:2] - ] - if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23): - credentials = ga_credentials.AnonymousCredentials() - credentials._universe_domain = "foo.com" - # Test the case when there is a universe mismatch from the credentials. - client = client_class(transport=transport_class(credentials=credentials)) - with pytest.raises(ValueError) as excinfo: - client._validate_universe_domain() - assert ( - str(excinfo.value) - == "The configured universe domain (googleapis.com) does not match the universe domain found in the credentials (foo.com). If you haven't configured the universe domain explicitly, `googleapis.com` is the default." - ) - - # Test the case when there is a universe mismatch from the client. - # - # TODO: Make this test unconditional once the minimum supported version of - # google-api-core becomes 2.15.0 or higher. - api_core_major, api_core_minor = [ - int(part) for part in api_core_version.__version__.split(".")[0:2] - ] - if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15): - client = client_class( - client_options={"universe_domain": "bar.com"}, - transport=transport_class( - credentials=ga_credentials.AnonymousCredentials(), - ), - ) - with pytest.raises(ValueError) as excinfo: - client._validate_universe_domain() - assert ( - str(excinfo.value) - == "The configured universe domain (bar.com) does not match the universe domain found in the credentials (googleapis.com). If you haven't configured the universe domain explicitly, `googleapis.com` is the default." - ) - - # Test that ValueError is raised if universe_domain is provided via client options and credentials is None - with pytest.raises(ValueError): - client._compare_universes("foo.bar", None) - - @pytest.mark.parametrize( "client_class,transport_name", [ diff --git a/packages/google-cloud-dataflow-client/tests/unit/gapic/dataflow_v1beta3/test_metrics_v1_beta3.py b/packages/google-cloud-dataflow-client/tests/unit/gapic/dataflow_v1beta3/test_metrics_v1_beta3.py index 59fd01c605fb..5b739b491ec3 100644 --- a/packages/google-cloud-dataflow-client/tests/unit/gapic/dataflow_v1beta3/test_metrics_v1_beta3.py +++ b/packages/google-cloud-dataflow-client/tests/unit/gapic/dataflow_v1beta3/test_metrics_v1_beta3.py @@ -319,86 +319,6 @@ def test__get_universe_domain(): assert str(excinfo.value) == "Universe Domain cannot be an empty string." -@pytest.mark.parametrize( - "client_class,transport_class,transport_name", - [ - (MetricsV1Beta3Client, transports.MetricsV1Beta3GrpcTransport, "grpc"), - (MetricsV1Beta3Client, transports.MetricsV1Beta3RestTransport, "rest"), - ], -) -def test__validate_universe_domain(client_class, transport_class, transport_name): - client = client_class( - transport=transport_class(credentials=ga_credentials.AnonymousCredentials()) - ) - assert client._validate_universe_domain() == True - - # Test the case when universe is already validated. - assert client._validate_universe_domain() == True - - if transport_name == "grpc": - # Test the case where credentials are provided by the - # `local_channel_credentials`. The default universes in both match. - channel = grpc.secure_channel( - "http://localhost/", grpc.local_channel_credentials() - ) - client = client_class(transport=transport_class(channel=channel)) - assert client._validate_universe_domain() == True - - # Test the case where credentials do not exist: e.g. a transport is provided - # with no credentials. Validation should still succeed because there is no - # mismatch with non-existent credentials. - channel = grpc.secure_channel( - "http://localhost/", grpc.local_channel_credentials() - ) - transport = transport_class(channel=channel) - transport._credentials = None - client = client_class(transport=transport) - assert client._validate_universe_domain() == True - - # TODO: This is needed to cater for older versions of google-auth - # Make this test unconditional once the minimum supported version of - # google-auth becomes 2.23.0 or higher. - google_auth_major, google_auth_minor = [ - int(part) for part in google.auth.__version__.split(".")[0:2] - ] - if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23): - credentials = ga_credentials.AnonymousCredentials() - credentials._universe_domain = "foo.com" - # Test the case when there is a universe mismatch from the credentials. - client = client_class(transport=transport_class(credentials=credentials)) - with pytest.raises(ValueError) as excinfo: - client._validate_universe_domain() - assert ( - str(excinfo.value) - == "The configured universe domain (googleapis.com) does not match the universe domain found in the credentials (foo.com). If you haven't configured the universe domain explicitly, `googleapis.com` is the default." - ) - - # Test the case when there is a universe mismatch from the client. - # - # TODO: Make this test unconditional once the minimum supported version of - # google-api-core becomes 2.15.0 or higher. - api_core_major, api_core_minor = [ - int(part) for part in api_core_version.__version__.split(".")[0:2] - ] - if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15): - client = client_class( - client_options={"universe_domain": "bar.com"}, - transport=transport_class( - credentials=ga_credentials.AnonymousCredentials(), - ), - ) - with pytest.raises(ValueError) as excinfo: - client._validate_universe_domain() - assert ( - str(excinfo.value) - == "The configured universe domain (bar.com) does not match the universe domain found in the credentials (googleapis.com). If you haven't configured the universe domain explicitly, `googleapis.com` is the default." - ) - - # Test that ValueError is raised if universe_domain is provided via client options and credentials is None - with pytest.raises(ValueError): - client._compare_universes("foo.bar", None) - - @pytest.mark.parametrize( "client_class,transport_name", [ diff --git a/packages/google-cloud-dataflow-client/tests/unit/gapic/dataflow_v1beta3/test_snapshots_v1_beta3.py b/packages/google-cloud-dataflow-client/tests/unit/gapic/dataflow_v1beta3/test_snapshots_v1_beta3.py index d030c0faabf5..2ba1f6ad5e76 100644 --- a/packages/google-cloud-dataflow-client/tests/unit/gapic/dataflow_v1beta3/test_snapshots_v1_beta3.py +++ b/packages/google-cloud-dataflow-client/tests/unit/gapic/dataflow_v1beta3/test_snapshots_v1_beta3.py @@ -320,86 +320,6 @@ def test__get_universe_domain(): assert str(excinfo.value) == "Universe Domain cannot be an empty string." -@pytest.mark.parametrize( - "client_class,transport_class,transport_name", - [ - (SnapshotsV1Beta3Client, transports.SnapshotsV1Beta3GrpcTransport, "grpc"), - (SnapshotsV1Beta3Client, transports.SnapshotsV1Beta3RestTransport, "rest"), - ], -) -def test__validate_universe_domain(client_class, transport_class, transport_name): - client = client_class( - transport=transport_class(credentials=ga_credentials.AnonymousCredentials()) - ) - assert client._validate_universe_domain() == True - - # Test the case when universe is already validated. - assert client._validate_universe_domain() == True - - if transport_name == "grpc": - # Test the case where credentials are provided by the - # `local_channel_credentials`. The default universes in both match. - channel = grpc.secure_channel( - "http://localhost/", grpc.local_channel_credentials() - ) - client = client_class(transport=transport_class(channel=channel)) - assert client._validate_universe_domain() == True - - # Test the case where credentials do not exist: e.g. a transport is provided - # with no credentials. Validation should still succeed because there is no - # mismatch with non-existent credentials. - channel = grpc.secure_channel( - "http://localhost/", grpc.local_channel_credentials() - ) - transport = transport_class(channel=channel) - transport._credentials = None - client = client_class(transport=transport) - assert client._validate_universe_domain() == True - - # TODO: This is needed to cater for older versions of google-auth - # Make this test unconditional once the minimum supported version of - # google-auth becomes 2.23.0 or higher. - google_auth_major, google_auth_minor = [ - int(part) for part in google.auth.__version__.split(".")[0:2] - ] - if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23): - credentials = ga_credentials.AnonymousCredentials() - credentials._universe_domain = "foo.com" - # Test the case when there is a universe mismatch from the credentials. - client = client_class(transport=transport_class(credentials=credentials)) - with pytest.raises(ValueError) as excinfo: - client._validate_universe_domain() - assert ( - str(excinfo.value) - == "The configured universe domain (googleapis.com) does not match the universe domain found in the credentials (foo.com). If you haven't configured the universe domain explicitly, `googleapis.com` is the default." - ) - - # Test the case when there is a universe mismatch from the client. - # - # TODO: Make this test unconditional once the minimum supported version of - # google-api-core becomes 2.15.0 or higher. - api_core_major, api_core_minor = [ - int(part) for part in api_core_version.__version__.split(".")[0:2] - ] - if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15): - client = client_class( - client_options={"universe_domain": "bar.com"}, - transport=transport_class( - credentials=ga_credentials.AnonymousCredentials(), - ), - ) - with pytest.raises(ValueError) as excinfo: - client._validate_universe_domain() - assert ( - str(excinfo.value) - == "The configured universe domain (bar.com) does not match the universe domain found in the credentials (googleapis.com). If you haven't configured the universe domain explicitly, `googleapis.com` is the default." - ) - - # Test that ValueError is raised if universe_domain is provided via client options and credentials is None - with pytest.raises(ValueError): - client._compare_universes("foo.bar", None) - - @pytest.mark.parametrize( "client_class,transport_name", [ diff --git a/packages/google-cloud-dataflow-client/tests/unit/gapic/dataflow_v1beta3/test_templates_service.py b/packages/google-cloud-dataflow-client/tests/unit/gapic/dataflow_v1beta3/test_templates_service.py index c92481b04820..c11d688433e5 100644 --- a/packages/google-cloud-dataflow-client/tests/unit/gapic/dataflow_v1beta3/test_templates_service.py +++ b/packages/google-cloud-dataflow-client/tests/unit/gapic/dataflow_v1beta3/test_templates_service.py @@ -320,86 +320,6 @@ def test__get_universe_domain(): assert str(excinfo.value) == "Universe Domain cannot be an empty string." -@pytest.mark.parametrize( - "client_class,transport_class,transport_name", - [ - (TemplatesServiceClient, transports.TemplatesServiceGrpcTransport, "grpc"), - (TemplatesServiceClient, transports.TemplatesServiceRestTransport, "rest"), - ], -) -def test__validate_universe_domain(client_class, transport_class, transport_name): - client = client_class( - transport=transport_class(credentials=ga_credentials.AnonymousCredentials()) - ) - assert client._validate_universe_domain() == True - - # Test the case when universe is already validated. - assert client._validate_universe_domain() == True - - if transport_name == "grpc": - # Test the case where credentials are provided by the - # `local_channel_credentials`. The default universes in both match. - channel = grpc.secure_channel( - "http://localhost/", grpc.local_channel_credentials() - ) - client = client_class(transport=transport_class(channel=channel)) - assert client._validate_universe_domain() == True - - # Test the case where credentials do not exist: e.g. a transport is provided - # with no credentials. Validation should still succeed because there is no - # mismatch with non-existent credentials. - channel = grpc.secure_channel( - "http://localhost/", grpc.local_channel_credentials() - ) - transport = transport_class(channel=channel) - transport._credentials = None - client = client_class(transport=transport) - assert client._validate_universe_domain() == True - - # TODO: This is needed to cater for older versions of google-auth - # Make this test unconditional once the minimum supported version of - # google-auth becomes 2.23.0 or higher. - google_auth_major, google_auth_minor = [ - int(part) for part in google.auth.__version__.split(".")[0:2] - ] - if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23): - credentials = ga_credentials.AnonymousCredentials() - credentials._universe_domain = "foo.com" - # Test the case when there is a universe mismatch from the credentials. - client = client_class(transport=transport_class(credentials=credentials)) - with pytest.raises(ValueError) as excinfo: - client._validate_universe_domain() - assert ( - str(excinfo.value) - == "The configured universe domain (googleapis.com) does not match the universe domain found in the credentials (foo.com). If you haven't configured the universe domain explicitly, `googleapis.com` is the default." - ) - - # Test the case when there is a universe mismatch from the client. - # - # TODO: Make this test unconditional once the minimum supported version of - # google-api-core becomes 2.15.0 or higher. - api_core_major, api_core_minor = [ - int(part) for part in api_core_version.__version__.split(".")[0:2] - ] - if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15): - client = client_class( - client_options={"universe_domain": "bar.com"}, - transport=transport_class( - credentials=ga_credentials.AnonymousCredentials(), - ), - ) - with pytest.raises(ValueError) as excinfo: - client._validate_universe_domain() - assert ( - str(excinfo.value) - == "The configured universe domain (bar.com) does not match the universe domain found in the credentials (googleapis.com). If you haven't configured the universe domain explicitly, `googleapis.com` is the default." - ) - - # Test that ValueError is raised if universe_domain is provided via client options and credentials is None - with pytest.raises(ValueError): - client._compare_universes("foo.bar", None) - - @pytest.mark.parametrize( "client_class,transport_name", [ diff --git a/packages/google-cloud-dataproc-metastore/google/cloud/metastore/gapic_version.py b/packages/google-cloud-dataproc-metastore/google/cloud/metastore/gapic_version.py index 3e0ea3b28f0a..558c8aab67c5 100644 --- a/packages/google-cloud-dataproc-metastore/google/cloud/metastore/gapic_version.py +++ b/packages/google-cloud-dataproc-metastore/google/cloud/metastore/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.16.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-dataproc-metastore/google/cloud/metastore_v1/gapic_version.py b/packages/google-cloud-dataproc-metastore/google/cloud/metastore_v1/gapic_version.py index 3e0ea3b28f0a..558c8aab67c5 100644 --- a/packages/google-cloud-dataproc-metastore/google/cloud/metastore_v1/gapic_version.py +++ b/packages/google-cloud-dataproc-metastore/google/cloud/metastore_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.16.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-dataproc-metastore/google/cloud/metastore_v1/services/dataproc_metastore/client.py b/packages/google-cloud-dataproc-metastore/google/cloud/metastore_v1/services/dataproc_metastore/client.py index 209ae0b88b2b..ebd4b4426d95 100644 --- a/packages/google-cloud-dataproc-metastore/google/cloud/metastore_v1/services/dataproc_metastore/client.py +++ b/packages/google-cloud-dataproc-metastore/google/cloud/metastore_v1/services/dataproc_metastore/client.py @@ -582,36 +582,6 @@ def _get_universe_domain( raise ValueError("Universe Domain cannot be an empty string.") return universe_domain - @staticmethod - def _compare_universes( - client_universe: str, credentials: ga_credentials.Credentials - ) -> bool: - """Returns True iff the universe domains used by the client and credentials match. - - Args: - client_universe (str): The universe domain configured via the client options. - credentials (ga_credentials.Credentials): The credentials being used in the client. - - Returns: - bool: True iff client_universe matches the universe in credentials. - - Raises: - ValueError: when client_universe does not match the universe in credentials. - """ - - default_universe = DataprocMetastoreClient._DEFAULT_UNIVERSE - credentials_universe = getattr(credentials, "universe_domain", default_universe) - - if client_universe != credentials_universe: - raise ValueError( - "The configured universe domain " - f"({client_universe}) does not match the universe domain " - f"found in the credentials ({credentials_universe}). " - "If you haven't configured the universe domain explicitly, " - f"`{default_universe}` is the default." - ) - return True - def _validate_universe_domain(self): """Validates client's and credentials' universe domains are consistent. @@ -621,13 +591,9 @@ def _validate_universe_domain(self): Raises: ValueError: If the configured universe domain is not valid. """ - self._is_universe_domain_valid = ( - self._is_universe_domain_valid - or DataprocMetastoreClient._compare_universes( - self.universe_domain, self.transport._credentials - ) - ) - return self._is_universe_domain_valid + + # NOTE (b/349488459): universe validation is disabled until further notice. + return True @property def api_endpoint(self): diff --git a/packages/google-cloud-dataproc-metastore/google/cloud/metastore_v1/services/dataproc_metastore_federation/client.py b/packages/google-cloud-dataproc-metastore/google/cloud/metastore_v1/services/dataproc_metastore_federation/client.py index 117d755e2ecb..009727cac4ea 100644 --- a/packages/google-cloud-dataproc-metastore/google/cloud/metastore_v1/services/dataproc_metastore_federation/client.py +++ b/packages/google-cloud-dataproc-metastore/google/cloud/metastore_v1/services/dataproc_metastore_federation/client.py @@ -494,36 +494,6 @@ def _get_universe_domain( raise ValueError("Universe Domain cannot be an empty string.") return universe_domain - @staticmethod - def _compare_universes( - client_universe: str, credentials: ga_credentials.Credentials - ) -> bool: - """Returns True iff the universe domains used by the client and credentials match. - - Args: - client_universe (str): The universe domain configured via the client options. - credentials (ga_credentials.Credentials): The credentials being used in the client. - - Returns: - bool: True iff client_universe matches the universe in credentials. - - Raises: - ValueError: when client_universe does not match the universe in credentials. - """ - - default_universe = DataprocMetastoreFederationClient._DEFAULT_UNIVERSE - credentials_universe = getattr(credentials, "universe_domain", default_universe) - - if client_universe != credentials_universe: - raise ValueError( - "The configured universe domain " - f"({client_universe}) does not match the universe domain " - f"found in the credentials ({credentials_universe}). " - "If you haven't configured the universe domain explicitly, " - f"`{default_universe}` is the default." - ) - return True - def _validate_universe_domain(self): """Validates client's and credentials' universe domains are consistent. @@ -533,13 +503,9 @@ def _validate_universe_domain(self): Raises: ValueError: If the configured universe domain is not valid. """ - self._is_universe_domain_valid = ( - self._is_universe_domain_valid - or DataprocMetastoreFederationClient._compare_universes( - self.universe_domain, self.transport._credentials - ) - ) - return self._is_universe_domain_valid + + # NOTE (b/349488459): universe validation is disabled until further notice. + return True @property def api_endpoint(self): diff --git a/packages/google-cloud-dataproc-metastore/google/cloud/metastore_v1alpha/gapic_version.py b/packages/google-cloud-dataproc-metastore/google/cloud/metastore_v1alpha/gapic_version.py index 3e0ea3b28f0a..558c8aab67c5 100644 --- a/packages/google-cloud-dataproc-metastore/google/cloud/metastore_v1alpha/gapic_version.py +++ b/packages/google-cloud-dataproc-metastore/google/cloud/metastore_v1alpha/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.16.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-dataproc-metastore/google/cloud/metastore_v1alpha/services/dataproc_metastore/client.py b/packages/google-cloud-dataproc-metastore/google/cloud/metastore_v1alpha/services/dataproc_metastore/client.py index 1ff79928f905..3c34a1d2c38b 100644 --- a/packages/google-cloud-dataproc-metastore/google/cloud/metastore_v1alpha/services/dataproc_metastore/client.py +++ b/packages/google-cloud-dataproc-metastore/google/cloud/metastore_v1alpha/services/dataproc_metastore/client.py @@ -604,36 +604,6 @@ def _get_universe_domain( raise ValueError("Universe Domain cannot be an empty string.") return universe_domain - @staticmethod - def _compare_universes( - client_universe: str, credentials: ga_credentials.Credentials - ) -> bool: - """Returns True iff the universe domains used by the client and credentials match. - - Args: - client_universe (str): The universe domain configured via the client options. - credentials (ga_credentials.Credentials): The credentials being used in the client. - - Returns: - bool: True iff client_universe matches the universe in credentials. - - Raises: - ValueError: when client_universe does not match the universe in credentials. - """ - - default_universe = DataprocMetastoreClient._DEFAULT_UNIVERSE - credentials_universe = getattr(credentials, "universe_domain", default_universe) - - if client_universe != credentials_universe: - raise ValueError( - "The configured universe domain " - f"({client_universe}) does not match the universe domain " - f"found in the credentials ({credentials_universe}). " - "If you haven't configured the universe domain explicitly, " - f"`{default_universe}` is the default." - ) - return True - def _validate_universe_domain(self): """Validates client's and credentials' universe domains are consistent. @@ -643,13 +613,9 @@ def _validate_universe_domain(self): Raises: ValueError: If the configured universe domain is not valid. """ - self._is_universe_domain_valid = ( - self._is_universe_domain_valid - or DataprocMetastoreClient._compare_universes( - self.universe_domain, self.transport._credentials - ) - ) - return self._is_universe_domain_valid + + # NOTE (b/349488459): universe validation is disabled until further notice. + return True @property def api_endpoint(self): diff --git a/packages/google-cloud-dataproc-metastore/google/cloud/metastore_v1alpha/services/dataproc_metastore_federation/client.py b/packages/google-cloud-dataproc-metastore/google/cloud/metastore_v1alpha/services/dataproc_metastore_federation/client.py index a7f9e069e5e2..4b0074b0859e 100644 --- a/packages/google-cloud-dataproc-metastore/google/cloud/metastore_v1alpha/services/dataproc_metastore_federation/client.py +++ b/packages/google-cloud-dataproc-metastore/google/cloud/metastore_v1alpha/services/dataproc_metastore_federation/client.py @@ -494,36 +494,6 @@ def _get_universe_domain( raise ValueError("Universe Domain cannot be an empty string.") return universe_domain - @staticmethod - def _compare_universes( - client_universe: str, credentials: ga_credentials.Credentials - ) -> bool: - """Returns True iff the universe domains used by the client and credentials match. - - Args: - client_universe (str): The universe domain configured via the client options. - credentials (ga_credentials.Credentials): The credentials being used in the client. - - Returns: - bool: True iff client_universe matches the universe in credentials. - - Raises: - ValueError: when client_universe does not match the universe in credentials. - """ - - default_universe = DataprocMetastoreFederationClient._DEFAULT_UNIVERSE - credentials_universe = getattr(credentials, "universe_domain", default_universe) - - if client_universe != credentials_universe: - raise ValueError( - "The configured universe domain " - f"({client_universe}) does not match the universe domain " - f"found in the credentials ({credentials_universe}). " - "If you haven't configured the universe domain explicitly, " - f"`{default_universe}` is the default." - ) - return True - def _validate_universe_domain(self): """Validates client's and credentials' universe domains are consistent. @@ -533,13 +503,9 @@ def _validate_universe_domain(self): Raises: ValueError: If the configured universe domain is not valid. """ - self._is_universe_domain_valid = ( - self._is_universe_domain_valid - or DataprocMetastoreFederationClient._compare_universes( - self.universe_domain, self.transport._credentials - ) - ) - return self._is_universe_domain_valid + + # NOTE (b/349488459): universe validation is disabled until further notice. + return True @property def api_endpoint(self): diff --git a/packages/google-cloud-dataproc-metastore/google/cloud/metastore_v1beta/gapic_version.py b/packages/google-cloud-dataproc-metastore/google/cloud/metastore_v1beta/gapic_version.py index 3e0ea3b28f0a..558c8aab67c5 100644 --- a/packages/google-cloud-dataproc-metastore/google/cloud/metastore_v1beta/gapic_version.py +++ b/packages/google-cloud-dataproc-metastore/google/cloud/metastore_v1beta/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.16.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-dataproc-metastore/google/cloud/metastore_v1beta/services/dataproc_metastore/client.py b/packages/google-cloud-dataproc-metastore/google/cloud/metastore_v1beta/services/dataproc_metastore/client.py index a3aaca4ba2cf..22edac199a78 100644 --- a/packages/google-cloud-dataproc-metastore/google/cloud/metastore_v1beta/services/dataproc_metastore/client.py +++ b/packages/google-cloud-dataproc-metastore/google/cloud/metastore_v1beta/services/dataproc_metastore/client.py @@ -604,36 +604,6 @@ def _get_universe_domain( raise ValueError("Universe Domain cannot be an empty string.") return universe_domain - @staticmethod - def _compare_universes( - client_universe: str, credentials: ga_credentials.Credentials - ) -> bool: - """Returns True iff the universe domains used by the client and credentials match. - - Args: - client_universe (str): The universe domain configured via the client options. - credentials (ga_credentials.Credentials): The credentials being used in the client. - - Returns: - bool: True iff client_universe matches the universe in credentials. - - Raises: - ValueError: when client_universe does not match the universe in credentials. - """ - - default_universe = DataprocMetastoreClient._DEFAULT_UNIVERSE - credentials_universe = getattr(credentials, "universe_domain", default_universe) - - if client_universe != credentials_universe: - raise ValueError( - "The configured universe domain " - f"({client_universe}) does not match the universe domain " - f"found in the credentials ({credentials_universe}). " - "If you haven't configured the universe domain explicitly, " - f"`{default_universe}` is the default." - ) - return True - def _validate_universe_domain(self): """Validates client's and credentials' universe domains are consistent. @@ -643,13 +613,9 @@ def _validate_universe_domain(self): Raises: ValueError: If the configured universe domain is not valid. """ - self._is_universe_domain_valid = ( - self._is_universe_domain_valid - or DataprocMetastoreClient._compare_universes( - self.universe_domain, self.transport._credentials - ) - ) - return self._is_universe_domain_valid + + # NOTE (b/349488459): universe validation is disabled until further notice. + return True @property def api_endpoint(self): diff --git a/packages/google-cloud-dataproc-metastore/google/cloud/metastore_v1beta/services/dataproc_metastore_federation/client.py b/packages/google-cloud-dataproc-metastore/google/cloud/metastore_v1beta/services/dataproc_metastore_federation/client.py index 95af3d42f8b3..431267b0231b 100644 --- a/packages/google-cloud-dataproc-metastore/google/cloud/metastore_v1beta/services/dataproc_metastore_federation/client.py +++ b/packages/google-cloud-dataproc-metastore/google/cloud/metastore_v1beta/services/dataproc_metastore_federation/client.py @@ -494,36 +494,6 @@ def _get_universe_domain( raise ValueError("Universe Domain cannot be an empty string.") return universe_domain - @staticmethod - def _compare_universes( - client_universe: str, credentials: ga_credentials.Credentials - ) -> bool: - """Returns True iff the universe domains used by the client and credentials match. - - Args: - client_universe (str): The universe domain configured via the client options. - credentials (ga_credentials.Credentials): The credentials being used in the client. - - Returns: - bool: True iff client_universe matches the universe in credentials. - - Raises: - ValueError: when client_universe does not match the universe in credentials. - """ - - default_universe = DataprocMetastoreFederationClient._DEFAULT_UNIVERSE - credentials_universe = getattr(credentials, "universe_domain", default_universe) - - if client_universe != credentials_universe: - raise ValueError( - "The configured universe domain " - f"({client_universe}) does not match the universe domain " - f"found in the credentials ({credentials_universe}). " - "If you haven't configured the universe domain explicitly, " - f"`{default_universe}` is the default." - ) - return True - def _validate_universe_domain(self): """Validates client's and credentials' universe domains are consistent. @@ -533,13 +503,9 @@ def _validate_universe_domain(self): Raises: ValueError: If the configured universe domain is not valid. """ - self._is_universe_domain_valid = ( - self._is_universe_domain_valid - or DataprocMetastoreFederationClient._compare_universes( - self.universe_domain, self.transport._credentials - ) - ) - return self._is_universe_domain_valid + + # NOTE (b/349488459): universe validation is disabled until further notice. + return True @property def api_endpoint(self): diff --git a/packages/google-cloud-dataproc-metastore/samples/generated_samples/snippet_metadata_google.cloud.metastore.v1.json b/packages/google-cloud-dataproc-metastore/samples/generated_samples/snippet_metadata_google.cloud.metastore.v1.json index d5c26c7c4b09..61145e9be3f7 100644 --- a/packages/google-cloud-dataproc-metastore/samples/generated_samples/snippet_metadata_google.cloud.metastore.v1.json +++ b/packages/google-cloud-dataproc-metastore/samples/generated_samples/snippet_metadata_google.cloud.metastore.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-dataproc-metastore", - "version": "1.16.0" + "version": "0.1.0" }, "snippets": [ { diff --git a/packages/google-cloud-dataproc-metastore/samples/generated_samples/snippet_metadata_google.cloud.metastore.v1alpha.json b/packages/google-cloud-dataproc-metastore/samples/generated_samples/snippet_metadata_google.cloud.metastore.v1alpha.json index 03c4008d8a13..96abac734738 100644 --- a/packages/google-cloud-dataproc-metastore/samples/generated_samples/snippet_metadata_google.cloud.metastore.v1alpha.json +++ b/packages/google-cloud-dataproc-metastore/samples/generated_samples/snippet_metadata_google.cloud.metastore.v1alpha.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-dataproc-metastore", - "version": "1.16.0" + "version": "0.1.0" }, "snippets": [ { diff --git a/packages/google-cloud-dataproc-metastore/samples/generated_samples/snippet_metadata_google.cloud.metastore.v1beta.json b/packages/google-cloud-dataproc-metastore/samples/generated_samples/snippet_metadata_google.cloud.metastore.v1beta.json index 01386fe3d45d..4a03aa222378 100644 --- a/packages/google-cloud-dataproc-metastore/samples/generated_samples/snippet_metadata_google.cloud.metastore.v1beta.json +++ b/packages/google-cloud-dataproc-metastore/samples/generated_samples/snippet_metadata_google.cloud.metastore.v1beta.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-dataproc-metastore", - "version": "1.16.0" + "version": "0.1.0" }, "snippets": [ { diff --git a/packages/google-cloud-dataproc-metastore/tests/unit/gapic/metastore_v1/test_dataproc_metastore.py b/packages/google-cloud-dataproc-metastore/tests/unit/gapic/metastore_v1/test_dataproc_metastore.py index 668c83d037bb..db49e903f5d0 100644 --- a/packages/google-cloud-dataproc-metastore/tests/unit/gapic/metastore_v1/test_dataproc_metastore.py +++ b/packages/google-cloud-dataproc-metastore/tests/unit/gapic/metastore_v1/test_dataproc_metastore.py @@ -346,86 +346,6 @@ def test__get_universe_domain(): assert str(excinfo.value) == "Universe Domain cannot be an empty string." -@pytest.mark.parametrize( - "client_class,transport_class,transport_name", - [ - (DataprocMetastoreClient, transports.DataprocMetastoreGrpcTransport, "grpc"), - (DataprocMetastoreClient, transports.DataprocMetastoreRestTransport, "rest"), - ], -) -def test__validate_universe_domain(client_class, transport_class, transport_name): - client = client_class( - transport=transport_class(credentials=ga_credentials.AnonymousCredentials()) - ) - assert client._validate_universe_domain() == True - - # Test the case when universe is already validated. - assert client._validate_universe_domain() == True - - if transport_name == "grpc": - # Test the case where credentials are provided by the - # `local_channel_credentials`. The default universes in both match. - channel = grpc.secure_channel( - "http://localhost/", grpc.local_channel_credentials() - ) - client = client_class(transport=transport_class(channel=channel)) - assert client._validate_universe_domain() == True - - # Test the case where credentials do not exist: e.g. a transport is provided - # with no credentials. Validation should still succeed because there is no - # mismatch with non-existent credentials. - channel = grpc.secure_channel( - "http://localhost/", grpc.local_channel_credentials() - ) - transport = transport_class(channel=channel) - transport._credentials = None - client = client_class(transport=transport) - assert client._validate_universe_domain() == True - - # TODO: This is needed to cater for older versions of google-auth - # Make this test unconditional once the minimum supported version of - # google-auth becomes 2.23.0 or higher. - google_auth_major, google_auth_minor = [ - int(part) for part in google.auth.__version__.split(".")[0:2] - ] - if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23): - credentials = ga_credentials.AnonymousCredentials() - credentials._universe_domain = "foo.com" - # Test the case when there is a universe mismatch from the credentials. - client = client_class(transport=transport_class(credentials=credentials)) - with pytest.raises(ValueError) as excinfo: - client._validate_universe_domain() - assert ( - str(excinfo.value) - == "The configured universe domain (googleapis.com) does not match the universe domain found in the credentials (foo.com). If you haven't configured the universe domain explicitly, `googleapis.com` is the default." - ) - - # Test the case when there is a universe mismatch from the client. - # - # TODO: Make this test unconditional once the minimum supported version of - # google-api-core becomes 2.15.0 or higher. - api_core_major, api_core_minor = [ - int(part) for part in api_core_version.__version__.split(".")[0:2] - ] - if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15): - client = client_class( - client_options={"universe_domain": "bar.com"}, - transport=transport_class( - credentials=ga_credentials.AnonymousCredentials(), - ), - ) - with pytest.raises(ValueError) as excinfo: - client._validate_universe_domain() - assert ( - str(excinfo.value) - == "The configured universe domain (bar.com) does not match the universe domain found in the credentials (googleapis.com). If you haven't configured the universe domain explicitly, `googleapis.com` is the default." - ) - - # Test that ValueError is raised if universe_domain is provided via client options and credentials is None - with pytest.raises(ValueError): - client._compare_universes("foo.bar", None) - - @pytest.mark.parametrize( "client_class,transport_name", [ diff --git a/packages/google-cloud-dataproc-metastore/tests/unit/gapic/metastore_v1/test_dataproc_metastore_federation.py b/packages/google-cloud-dataproc-metastore/tests/unit/gapic/metastore_v1/test_dataproc_metastore_federation.py index 166b06e7ac62..3d90019f0578 100644 --- a/packages/google-cloud-dataproc-metastore/tests/unit/gapic/metastore_v1/test_dataproc_metastore_federation.py +++ b/packages/google-cloud-dataproc-metastore/tests/unit/gapic/metastore_v1/test_dataproc_metastore_federation.py @@ -360,94 +360,6 @@ def test__get_universe_domain(): assert str(excinfo.value) == "Universe Domain cannot be an empty string." -@pytest.mark.parametrize( - "client_class,transport_class,transport_name", - [ - ( - DataprocMetastoreFederationClient, - transports.DataprocMetastoreFederationGrpcTransport, - "grpc", - ), - ( - DataprocMetastoreFederationClient, - transports.DataprocMetastoreFederationRestTransport, - "rest", - ), - ], -) -def test__validate_universe_domain(client_class, transport_class, transport_name): - client = client_class( - transport=transport_class(credentials=ga_credentials.AnonymousCredentials()) - ) - assert client._validate_universe_domain() == True - - # Test the case when universe is already validated. - assert client._validate_universe_domain() == True - - if transport_name == "grpc": - # Test the case where credentials are provided by the - # `local_channel_credentials`. The default universes in both match. - channel = grpc.secure_channel( - "http://localhost/", grpc.local_channel_credentials() - ) - client = client_class(transport=transport_class(channel=channel)) - assert client._validate_universe_domain() == True - - # Test the case where credentials do not exist: e.g. a transport is provided - # with no credentials. Validation should still succeed because there is no - # mismatch with non-existent credentials. - channel = grpc.secure_channel( - "http://localhost/", grpc.local_channel_credentials() - ) - transport = transport_class(channel=channel) - transport._credentials = None - client = client_class(transport=transport) - assert client._validate_universe_domain() == True - - # TODO: This is needed to cater for older versions of google-auth - # Make this test unconditional once the minimum supported version of - # google-auth becomes 2.23.0 or higher. - google_auth_major, google_auth_minor = [ - int(part) for part in google.auth.__version__.split(".")[0:2] - ] - if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23): - credentials = ga_credentials.AnonymousCredentials() - credentials._universe_domain = "foo.com" - # Test the case when there is a universe mismatch from the credentials. - client = client_class(transport=transport_class(credentials=credentials)) - with pytest.raises(ValueError) as excinfo: - client._validate_universe_domain() - assert ( - str(excinfo.value) - == "The configured universe domain (googleapis.com) does not match the universe domain found in the credentials (foo.com). If you haven't configured the universe domain explicitly, `googleapis.com` is the default." - ) - - # Test the case when there is a universe mismatch from the client. - # - # TODO: Make this test unconditional once the minimum supported version of - # google-api-core becomes 2.15.0 or higher. - api_core_major, api_core_minor = [ - int(part) for part in api_core_version.__version__.split(".")[0:2] - ] - if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15): - client = client_class( - client_options={"universe_domain": "bar.com"}, - transport=transport_class( - credentials=ga_credentials.AnonymousCredentials(), - ), - ) - with pytest.raises(ValueError) as excinfo: - client._validate_universe_domain() - assert ( - str(excinfo.value) - == "The configured universe domain (bar.com) does not match the universe domain found in the credentials (googleapis.com). If you haven't configured the universe domain explicitly, `googleapis.com` is the default." - ) - - # Test that ValueError is raised if universe_domain is provided via client options and credentials is None - with pytest.raises(ValueError): - client._compare_universes("foo.bar", None) - - @pytest.mark.parametrize( "client_class,transport_name", [ diff --git a/packages/google-cloud-dataproc-metastore/tests/unit/gapic/metastore_v1alpha/test_dataproc_metastore.py b/packages/google-cloud-dataproc-metastore/tests/unit/gapic/metastore_v1alpha/test_dataproc_metastore.py index f6429bd6e71c..ba518bed0b64 100644 --- a/packages/google-cloud-dataproc-metastore/tests/unit/gapic/metastore_v1alpha/test_dataproc_metastore.py +++ b/packages/google-cloud-dataproc-metastore/tests/unit/gapic/metastore_v1alpha/test_dataproc_metastore.py @@ -346,86 +346,6 @@ def test__get_universe_domain(): assert str(excinfo.value) == "Universe Domain cannot be an empty string." -@pytest.mark.parametrize( - "client_class,transport_class,transport_name", - [ - (DataprocMetastoreClient, transports.DataprocMetastoreGrpcTransport, "grpc"), - (DataprocMetastoreClient, transports.DataprocMetastoreRestTransport, "rest"), - ], -) -def test__validate_universe_domain(client_class, transport_class, transport_name): - client = client_class( - transport=transport_class(credentials=ga_credentials.AnonymousCredentials()) - ) - assert client._validate_universe_domain() == True - - # Test the case when universe is already validated. - assert client._validate_universe_domain() == True - - if transport_name == "grpc": - # Test the case where credentials are provided by the - # `local_channel_credentials`. The default universes in both match. - channel = grpc.secure_channel( - "http://localhost/", grpc.local_channel_credentials() - ) - client = client_class(transport=transport_class(channel=channel)) - assert client._validate_universe_domain() == True - - # Test the case where credentials do not exist: e.g. a transport is provided - # with no credentials. Validation should still succeed because there is no - # mismatch with non-existent credentials. - channel = grpc.secure_channel( - "http://localhost/", grpc.local_channel_credentials() - ) - transport = transport_class(channel=channel) - transport._credentials = None - client = client_class(transport=transport) - assert client._validate_universe_domain() == True - - # TODO: This is needed to cater for older versions of google-auth - # Make this test unconditional once the minimum supported version of - # google-auth becomes 2.23.0 or higher. - google_auth_major, google_auth_minor = [ - int(part) for part in google.auth.__version__.split(".")[0:2] - ] - if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23): - credentials = ga_credentials.AnonymousCredentials() - credentials._universe_domain = "foo.com" - # Test the case when there is a universe mismatch from the credentials. - client = client_class(transport=transport_class(credentials=credentials)) - with pytest.raises(ValueError) as excinfo: - client._validate_universe_domain() - assert ( - str(excinfo.value) - == "The configured universe domain (googleapis.com) does not match the universe domain found in the credentials (foo.com). If you haven't configured the universe domain explicitly, `googleapis.com` is the default." - ) - - # Test the case when there is a universe mismatch from the client. - # - # TODO: Make this test unconditional once the minimum supported version of - # google-api-core becomes 2.15.0 or higher. - api_core_major, api_core_minor = [ - int(part) for part in api_core_version.__version__.split(".")[0:2] - ] - if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15): - client = client_class( - client_options={"universe_domain": "bar.com"}, - transport=transport_class( - credentials=ga_credentials.AnonymousCredentials(), - ), - ) - with pytest.raises(ValueError) as excinfo: - client._validate_universe_domain() - assert ( - str(excinfo.value) - == "The configured universe domain (bar.com) does not match the universe domain found in the credentials (googleapis.com). If you haven't configured the universe domain explicitly, `googleapis.com` is the default." - ) - - # Test that ValueError is raised if universe_domain is provided via client options and credentials is None - with pytest.raises(ValueError): - client._compare_universes("foo.bar", None) - - @pytest.mark.parametrize( "client_class,transport_name", [ diff --git a/packages/google-cloud-dataproc-metastore/tests/unit/gapic/metastore_v1alpha/test_dataproc_metastore_federation.py b/packages/google-cloud-dataproc-metastore/tests/unit/gapic/metastore_v1alpha/test_dataproc_metastore_federation.py index c77e5fd9ecd9..3addd60c352b 100644 --- a/packages/google-cloud-dataproc-metastore/tests/unit/gapic/metastore_v1alpha/test_dataproc_metastore_federation.py +++ b/packages/google-cloud-dataproc-metastore/tests/unit/gapic/metastore_v1alpha/test_dataproc_metastore_federation.py @@ -360,94 +360,6 @@ def test__get_universe_domain(): assert str(excinfo.value) == "Universe Domain cannot be an empty string." -@pytest.mark.parametrize( - "client_class,transport_class,transport_name", - [ - ( - DataprocMetastoreFederationClient, - transports.DataprocMetastoreFederationGrpcTransport, - "grpc", - ), - ( - DataprocMetastoreFederationClient, - transports.DataprocMetastoreFederationRestTransport, - "rest", - ), - ], -) -def test__validate_universe_domain(client_class, transport_class, transport_name): - client = client_class( - transport=transport_class(credentials=ga_credentials.AnonymousCredentials()) - ) - assert client._validate_universe_domain() == True - - # Test the case when universe is already validated. - assert client._validate_universe_domain() == True - - if transport_name == "grpc": - # Test the case where credentials are provided by the - # `local_channel_credentials`. The default universes in both match. - channel = grpc.secure_channel( - "http://localhost/", grpc.local_channel_credentials() - ) - client = client_class(transport=transport_class(channel=channel)) - assert client._validate_universe_domain() == True - - # Test the case where credentials do not exist: e.g. a transport is provided - # with no credentials. Validation should still succeed because there is no - # mismatch with non-existent credentials. - channel = grpc.secure_channel( - "http://localhost/", grpc.local_channel_credentials() - ) - transport = transport_class(channel=channel) - transport._credentials = None - client = client_class(transport=transport) - assert client._validate_universe_domain() == True - - # TODO: This is needed to cater for older versions of google-auth - # Make this test unconditional once the minimum supported version of - # google-auth becomes 2.23.0 or higher. - google_auth_major, google_auth_minor = [ - int(part) for part in google.auth.__version__.split(".")[0:2] - ] - if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23): - credentials = ga_credentials.AnonymousCredentials() - credentials._universe_domain = "foo.com" - # Test the case when there is a universe mismatch from the credentials. - client = client_class(transport=transport_class(credentials=credentials)) - with pytest.raises(ValueError) as excinfo: - client._validate_universe_domain() - assert ( - str(excinfo.value) - == "The configured universe domain (googleapis.com) does not match the universe domain found in the credentials (foo.com). If you haven't configured the universe domain explicitly, `googleapis.com` is the default." - ) - - # Test the case when there is a universe mismatch from the client. - # - # TODO: Make this test unconditional once the minimum supported version of - # google-api-core becomes 2.15.0 or higher. - api_core_major, api_core_minor = [ - int(part) for part in api_core_version.__version__.split(".")[0:2] - ] - if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15): - client = client_class( - client_options={"universe_domain": "bar.com"}, - transport=transport_class( - credentials=ga_credentials.AnonymousCredentials(), - ), - ) - with pytest.raises(ValueError) as excinfo: - client._validate_universe_domain() - assert ( - str(excinfo.value) - == "The configured universe domain (bar.com) does not match the universe domain found in the credentials (googleapis.com). If you haven't configured the universe domain explicitly, `googleapis.com` is the default." - ) - - # Test that ValueError is raised if universe_domain is provided via client options and credentials is None - with pytest.raises(ValueError): - client._compare_universes("foo.bar", None) - - @pytest.mark.parametrize( "client_class,transport_name", [ diff --git a/packages/google-cloud-dataproc-metastore/tests/unit/gapic/metastore_v1beta/test_dataproc_metastore.py b/packages/google-cloud-dataproc-metastore/tests/unit/gapic/metastore_v1beta/test_dataproc_metastore.py index ca7b1c9f773f..a27fb9c8d80e 100644 --- a/packages/google-cloud-dataproc-metastore/tests/unit/gapic/metastore_v1beta/test_dataproc_metastore.py +++ b/packages/google-cloud-dataproc-metastore/tests/unit/gapic/metastore_v1beta/test_dataproc_metastore.py @@ -346,86 +346,6 @@ def test__get_universe_domain(): assert str(excinfo.value) == "Universe Domain cannot be an empty string." -@pytest.mark.parametrize( - "client_class,transport_class,transport_name", - [ - (DataprocMetastoreClient, transports.DataprocMetastoreGrpcTransport, "grpc"), - (DataprocMetastoreClient, transports.DataprocMetastoreRestTransport, "rest"), - ], -) -def test__validate_universe_domain(client_class, transport_class, transport_name): - client = client_class( - transport=transport_class(credentials=ga_credentials.AnonymousCredentials()) - ) - assert client._validate_universe_domain() == True - - # Test the case when universe is already validated. - assert client._validate_universe_domain() == True - - if transport_name == "grpc": - # Test the case where credentials are provided by the - # `local_channel_credentials`. The default universes in both match. - channel = grpc.secure_channel( - "http://localhost/", grpc.local_channel_credentials() - ) - client = client_class(transport=transport_class(channel=channel)) - assert client._validate_universe_domain() == True - - # Test the case where credentials do not exist: e.g. a transport is provided - # with no credentials. Validation should still succeed because there is no - # mismatch with non-existent credentials. - channel = grpc.secure_channel( - "http://localhost/", grpc.local_channel_credentials() - ) - transport = transport_class(channel=channel) - transport._credentials = None - client = client_class(transport=transport) - assert client._validate_universe_domain() == True - - # TODO: This is needed to cater for older versions of google-auth - # Make this test unconditional once the minimum supported version of - # google-auth becomes 2.23.0 or higher. - google_auth_major, google_auth_minor = [ - int(part) for part in google.auth.__version__.split(".")[0:2] - ] - if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23): - credentials = ga_credentials.AnonymousCredentials() - credentials._universe_domain = "foo.com" - # Test the case when there is a universe mismatch from the credentials. - client = client_class(transport=transport_class(credentials=credentials)) - with pytest.raises(ValueError) as excinfo: - client._validate_universe_domain() - assert ( - str(excinfo.value) - == "The configured universe domain (googleapis.com) does not match the universe domain found in the credentials (foo.com). If you haven't configured the universe domain explicitly, `googleapis.com` is the default." - ) - - # Test the case when there is a universe mismatch from the client. - # - # TODO: Make this test unconditional once the minimum supported version of - # google-api-core becomes 2.15.0 or higher. - api_core_major, api_core_minor = [ - int(part) for part in api_core_version.__version__.split(".")[0:2] - ] - if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15): - client = client_class( - client_options={"universe_domain": "bar.com"}, - transport=transport_class( - credentials=ga_credentials.AnonymousCredentials(), - ), - ) - with pytest.raises(ValueError) as excinfo: - client._validate_universe_domain() - assert ( - str(excinfo.value) - == "The configured universe domain (bar.com) does not match the universe domain found in the credentials (googleapis.com). If you haven't configured the universe domain explicitly, `googleapis.com` is the default." - ) - - # Test that ValueError is raised if universe_domain is provided via client options and credentials is None - with pytest.raises(ValueError): - client._compare_universes("foo.bar", None) - - @pytest.mark.parametrize( "client_class,transport_name", [ diff --git a/packages/google-cloud-dataproc-metastore/tests/unit/gapic/metastore_v1beta/test_dataproc_metastore_federation.py b/packages/google-cloud-dataproc-metastore/tests/unit/gapic/metastore_v1beta/test_dataproc_metastore_federation.py index d06fb20f9c02..a7e8afa7c066 100644 --- a/packages/google-cloud-dataproc-metastore/tests/unit/gapic/metastore_v1beta/test_dataproc_metastore_federation.py +++ b/packages/google-cloud-dataproc-metastore/tests/unit/gapic/metastore_v1beta/test_dataproc_metastore_federation.py @@ -360,94 +360,6 @@ def test__get_universe_domain(): assert str(excinfo.value) == "Universe Domain cannot be an empty string." -@pytest.mark.parametrize( - "client_class,transport_class,transport_name", - [ - ( - DataprocMetastoreFederationClient, - transports.DataprocMetastoreFederationGrpcTransport, - "grpc", - ), - ( - DataprocMetastoreFederationClient, - transports.DataprocMetastoreFederationRestTransport, - "rest", - ), - ], -) -def test__validate_universe_domain(client_class, transport_class, transport_name): - client = client_class( - transport=transport_class(credentials=ga_credentials.AnonymousCredentials()) - ) - assert client._validate_universe_domain() == True - - # Test the case when universe is already validated. - assert client._validate_universe_domain() == True - - if transport_name == "grpc": - # Test the case where credentials are provided by the - # `local_channel_credentials`. The default universes in both match. - channel = grpc.secure_channel( - "http://localhost/", grpc.local_channel_credentials() - ) - client = client_class(transport=transport_class(channel=channel)) - assert client._validate_universe_domain() == True - - # Test the case where credentials do not exist: e.g. a transport is provided - # with no credentials. Validation should still succeed because there is no - # mismatch with non-existent credentials. - channel = grpc.secure_channel( - "http://localhost/", grpc.local_channel_credentials() - ) - transport = transport_class(channel=channel) - transport._credentials = None - client = client_class(transport=transport) - assert client._validate_universe_domain() == True - - # TODO: This is needed to cater for older versions of google-auth - # Make this test unconditional once the minimum supported version of - # google-auth becomes 2.23.0 or higher. - google_auth_major, google_auth_minor = [ - int(part) for part in google.auth.__version__.split(".")[0:2] - ] - if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23): - credentials = ga_credentials.AnonymousCredentials() - credentials._universe_domain = "foo.com" - # Test the case when there is a universe mismatch from the credentials. - client = client_class(transport=transport_class(credentials=credentials)) - with pytest.raises(ValueError) as excinfo: - client._validate_universe_domain() - assert ( - str(excinfo.value) - == "The configured universe domain (googleapis.com) does not match the universe domain found in the credentials (foo.com). If you haven't configured the universe domain explicitly, `googleapis.com` is the default." - ) - - # Test the case when there is a universe mismatch from the client. - # - # TODO: Make this test unconditional once the minimum supported version of - # google-api-core becomes 2.15.0 or higher. - api_core_major, api_core_minor = [ - int(part) for part in api_core_version.__version__.split(".")[0:2] - ] - if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15): - client = client_class( - client_options={"universe_domain": "bar.com"}, - transport=transport_class( - credentials=ga_credentials.AnonymousCredentials(), - ), - ) - with pytest.raises(ValueError) as excinfo: - client._validate_universe_domain() - assert ( - str(excinfo.value) - == "The configured universe domain (bar.com) does not match the universe domain found in the credentials (googleapis.com). If you haven't configured the universe domain explicitly, `googleapis.com` is the default." - ) - - # Test that ValueError is raised if universe_domain is provided via client options and credentials is None - with pytest.raises(ValueError): - client._compare_universes("foo.bar", None) - - @pytest.mark.parametrize( "client_class,transport_name", [ diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx/gapic_version.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx/gapic_version.py index ed461d017338..558c8aab67c5 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx/gapic_version.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.36.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/gapic_version.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/gapic_version.py index ed461d017338..558c8aab67c5 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/gapic_version.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.36.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/agents/async_client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/agents/async_client.py index aa90b2a34505..a35dc6b19fce 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/agents/async_client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/agents/async_client.py @@ -100,6 +100,8 @@ class AgentsAsyncClient: parse_flow_validation_result_path = staticmethod( AgentsClient.parse_flow_validation_result_path ) + secret_version_path = staticmethod(AgentsClient.secret_version_path) + parse_secret_version_path = staticmethod(AgentsClient.parse_secret_version_path) security_settings_path = staticmethod(AgentsClient.security_settings_path) parse_security_settings_path = staticmethod( AgentsClient.parse_security_settings_path @@ -329,7 +331,7 @@ async def sample_list_agents(): [Agents.ListAgents][google.cloud.dialogflow.cx.v3.Agents.ListAgents]. parent (:class:`str`): Required. The location to list all agents for. Format: - ``projects//locations/``. + ``projects//locations/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -449,7 +451,7 @@ async def sample_get_agent(): [Agents.GetAgent][google.cloud.dialogflow.cx.v3.Agents.GetAgent]. name (:class:`str`): Required. The name of the agent. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -579,7 +581,7 @@ async def sample_create_agent(): [Agents.CreateAgent][google.cloud.dialogflow.cx.v3.Agents.CreateAgent]. parent (:class:`str`): Required. The location to create a agent for. Format: - ``projects//locations/``. + ``projects//locations/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -841,7 +843,7 @@ async def sample_delete_agent(): [Agents.DeleteAgent][google.cloud.dialogflow.cx.v3.Agents.DeleteAgent]. name (:class:`str`): Required. The name of the agent to delete. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1259,7 +1261,7 @@ async def sample_get_agent_validation_result(): [Agents.GetAgentValidationResult][google.cloud.dialogflow.cx.v3.Agents.GetAgentValidationResult]. name (:class:`str`): Required. The agent name. Format: - ``projects//locations//agents//validationResult``. + ``projects//locations//agents//validationResult``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1368,7 +1370,7 @@ async def sample_get_generative_settings(): RPC. name (:class:`str`): Required. Format: - ``projects//locations//agents//generativeSettings``. + ``projects//locations//agents//generativeSettings``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/agents/client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/agents/client.py index f6e0eecbfe74..6929327e6b45 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/agents/client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/agents/client.py @@ -335,6 +335,28 @@ def parse_flow_validation_result_path(path: str) -> Dict[str, str]: ) return m.groupdict() if m else {} + @staticmethod + def secret_version_path( + project: str, + secret: str, + version: str, + ) -> str: + """Returns a fully-qualified secret_version string.""" + return "projects/{project}/secrets/{secret}/versions/{version}".format( + project=project, + secret=secret, + version=version, + ) + + @staticmethod + def parse_secret_version_path(path: str) -> Dict[str, str]: + """Parses a secret_version path into its component segments.""" + m = re.match( + r"^projects/(?P.+?)/secrets/(?P.+?)/versions/(?P.+?)$", + path, + ) + return m.groupdict() if m else {} + @staticmethod def security_settings_path( project: str, @@ -613,36 +635,6 @@ def _get_universe_domain( raise ValueError("Universe Domain cannot be an empty string.") return universe_domain - @staticmethod - def _compare_universes( - client_universe: str, credentials: ga_credentials.Credentials - ) -> bool: - """Returns True iff the universe domains used by the client and credentials match. - - Args: - client_universe (str): The universe domain configured via the client options. - credentials (ga_credentials.Credentials): The credentials being used in the client. - - Returns: - bool: True iff client_universe matches the universe in credentials. - - Raises: - ValueError: when client_universe does not match the universe in credentials. - """ - - default_universe = AgentsClient._DEFAULT_UNIVERSE - credentials_universe = getattr(credentials, "universe_domain", default_universe) - - if client_universe != credentials_universe: - raise ValueError( - "The configured universe domain " - f"({client_universe}) does not match the universe domain " - f"found in the credentials ({credentials_universe}). " - "If you haven't configured the universe domain explicitly, " - f"`{default_universe}` is the default." - ) - return True - def _validate_universe_domain(self): """Validates client's and credentials' universe domains are consistent. @@ -652,13 +644,9 @@ def _validate_universe_domain(self): Raises: ValueError: If the configured universe domain is not valid. """ - self._is_universe_domain_valid = ( - self._is_universe_domain_valid - or AgentsClient._compare_universes( - self.universe_domain, self.transport._credentials - ) - ) - return self._is_universe_domain_valid + + # NOTE (b/349488459): universe validation is disabled until further notice. + return True @property def api_endpoint(self): @@ -871,7 +859,7 @@ def sample_list_agents(): [Agents.ListAgents][google.cloud.dialogflow.cx.v3.Agents.ListAgents]. parent (str): Required. The location to list all agents for. Format: - ``projects//locations/``. + ``projects//locations/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -988,7 +976,7 @@ def sample_get_agent(): [Agents.GetAgent][google.cloud.dialogflow.cx.v3.Agents.GetAgent]. name (str): Required. The name of the agent. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1115,7 +1103,7 @@ def sample_create_agent(): [Agents.CreateAgent][google.cloud.dialogflow.cx.v3.Agents.CreateAgent]. parent (str): Required. The location to create a agent for. Format: - ``projects//locations/``. + ``projects//locations/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -1371,7 +1359,7 @@ def sample_delete_agent(): [Agents.DeleteAgent][google.cloud.dialogflow.cx.v3.Agents.DeleteAgent]. name (str): Required. The name of the agent to delete. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1780,7 +1768,7 @@ def sample_get_agent_validation_result(): [Agents.GetAgentValidationResult][google.cloud.dialogflow.cx.v3.Agents.GetAgentValidationResult]. name (str): Required. The agent name. Format: - ``projects//locations//agents//validationResult``. + ``projects//locations//agents//validationResult``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1888,7 +1876,7 @@ def sample_get_generative_settings(): RPC. name (str): Required. Format: - ``projects//locations//agents//generativeSettings``. + ``projects//locations//agents//generativeSettings``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/changelogs/async_client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/changelogs/async_client.py index 030aa053b051..2612e71c001d 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/changelogs/async_client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/changelogs/async_client.py @@ -298,7 +298,7 @@ async def sample_list_changelogs(): [Changelogs.ListChangelogs][google.cloud.dialogflow.cx.v3.Changelogs.ListChangelogs]. parent (:class:`str`): Required. The agent containing the changelogs. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -418,7 +418,7 @@ async def sample_get_changelog(): [Changelogs.GetChangelog][google.cloud.dialogflow.cx.v3.Changelogs.GetChangelog]. name (:class:`str`): Required. The name of the changelog to get. Format: - ``projects//locations//agents//changelogs/``. + ``projects//locations//agents//changelogs/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/changelogs/client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/changelogs/client.py index 7bbbe3e1c5c5..4d65010257ba 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/changelogs/client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/changelogs/client.py @@ -467,36 +467,6 @@ def _get_universe_domain( raise ValueError("Universe Domain cannot be an empty string.") return universe_domain - @staticmethod - def _compare_universes( - client_universe: str, credentials: ga_credentials.Credentials - ) -> bool: - """Returns True iff the universe domains used by the client and credentials match. - - Args: - client_universe (str): The universe domain configured via the client options. - credentials (ga_credentials.Credentials): The credentials being used in the client. - - Returns: - bool: True iff client_universe matches the universe in credentials. - - Raises: - ValueError: when client_universe does not match the universe in credentials. - """ - - default_universe = ChangelogsClient._DEFAULT_UNIVERSE - credentials_universe = getattr(credentials, "universe_domain", default_universe) - - if client_universe != credentials_universe: - raise ValueError( - "The configured universe domain " - f"({client_universe}) does not match the universe domain " - f"found in the credentials ({credentials_universe}). " - "If you haven't configured the universe domain explicitly, " - f"`{default_universe}` is the default." - ) - return True - def _validate_universe_domain(self): """Validates client's and credentials' universe domains are consistent. @@ -506,13 +476,9 @@ def _validate_universe_domain(self): Raises: ValueError: If the configured universe domain is not valid. """ - self._is_universe_domain_valid = ( - self._is_universe_domain_valid - or ChangelogsClient._compare_universes( - self.universe_domain, self.transport._credentials - ) - ) - return self._is_universe_domain_valid + + # NOTE (b/349488459): universe validation is disabled until further notice. + return True @property def api_endpoint(self): @@ -724,7 +690,7 @@ def sample_list_changelogs(): [Changelogs.ListChangelogs][google.cloud.dialogflow.cx.v3.Changelogs.ListChangelogs]. parent (str): Required. The agent containing the changelogs. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -841,7 +807,7 @@ def sample_get_changelog(): [Changelogs.GetChangelog][google.cloud.dialogflow.cx.v3.Changelogs.GetChangelog]. name (str): Required. The name of the changelog to get. Format: - ``projects//locations//agents//changelogs/``. + ``projects//locations//agents//changelogs/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/deployments/async_client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/deployments/async_client.py index fdf5142a5b13..8dc0705a2d33 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/deployments/async_client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/deployments/async_client.py @@ -311,7 +311,7 @@ async def sample_list_deployments(): Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to list all environments for. Format: - ``projects//locations//agents//environments/``. + ``projects//locations//agents//environments/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -434,7 +434,7 @@ async def sample_get_deployment(): Required. The name of the [Deployment][google.cloud.dialogflow.cx.v3.Deployment]. Format: - ``projects//locations//agents//environments//deployments/``. + ``projects//locations//agents//environments//deployments/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/deployments/client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/deployments/client.py index 61d1d2fc18b1..b886375f5165 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/deployments/client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/deployments/client.py @@ -547,36 +547,6 @@ def _get_universe_domain( raise ValueError("Universe Domain cannot be an empty string.") return universe_domain - @staticmethod - def _compare_universes( - client_universe: str, credentials: ga_credentials.Credentials - ) -> bool: - """Returns True iff the universe domains used by the client and credentials match. - - Args: - client_universe (str): The universe domain configured via the client options. - credentials (ga_credentials.Credentials): The credentials being used in the client. - - Returns: - bool: True iff client_universe matches the universe in credentials. - - Raises: - ValueError: when client_universe does not match the universe in credentials. - """ - - default_universe = DeploymentsClient._DEFAULT_UNIVERSE - credentials_universe = getattr(credentials, "universe_domain", default_universe) - - if client_universe != credentials_universe: - raise ValueError( - "The configured universe domain " - f"({client_universe}) does not match the universe domain " - f"found in the credentials ({credentials_universe}). " - "If you haven't configured the universe domain explicitly, " - f"`{default_universe}` is the default." - ) - return True - def _validate_universe_domain(self): """Validates client's and credentials' universe domains are consistent. @@ -586,13 +556,9 @@ def _validate_universe_domain(self): Raises: ValueError: If the configured universe domain is not valid. """ - self._is_universe_domain_valid = ( - self._is_universe_domain_valid - or DeploymentsClient._compare_universes( - self.universe_domain, self.transport._credentials - ) - ) - return self._is_universe_domain_valid + + # NOTE (b/349488459): universe validation is disabled until further notice. + return True @property def api_endpoint(self): @@ -807,7 +773,7 @@ def sample_list_deployments(): Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to list all environments for. Format: - ``projects//locations//agents//environments/``. + ``projects//locations//agents//environments/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -927,7 +893,7 @@ def sample_get_deployment(): Required. The name of the [Deployment][google.cloud.dialogflow.cx.v3.Deployment]. Format: - ``projects//locations//agents//environments//deployments/``. + ``projects//locations//agents//environments//deployments/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/entity_types/async_client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/entity_types/async_client.py index bd301dfd4b8f..9ee04580cf0d 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/entity_types/async_client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/entity_types/async_client.py @@ -302,7 +302,7 @@ async def sample_get_entity_type(): [EntityTypes.GetEntityType][google.cloud.dialogflow.cx.v3.EntityTypes.GetEntityType]. name (:class:`str`): Required. The name of the entity type. Format: - ``projects//locations//agents//entityTypes/``. + ``projects//locations//agents//entityTypes/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -450,7 +450,7 @@ async def sample_create_entity_type(): [EntityTypes.CreateEntityType][google.cloud.dialogflow.cx.v3.EntityTypes.CreateEntityType]. parent (:class:`str`): Required. The agent to create a entity type for. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -752,7 +752,7 @@ async def sample_delete_entity_type(): [EntityTypes.DeleteEntityType][google.cloud.dialogflow.cx.v3.EntityTypes.DeleteEntityType]. name (:class:`str`): Required. The name of the entity type to delete. Format: - ``projects//locations//agents//entityTypes/``. + ``projects//locations//agents//entityTypes/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -852,7 +852,7 @@ async def sample_list_entity_types(): parent (:class:`str`): Required. The agent to list all entity types for. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/entity_types/client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/entity_types/client.py index 5cc21cbc0f1d..21307be48ac0 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/entity_types/client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/entity_types/client.py @@ -470,36 +470,6 @@ def _get_universe_domain( raise ValueError("Universe Domain cannot be an empty string.") return universe_domain - @staticmethod - def _compare_universes( - client_universe: str, credentials: ga_credentials.Credentials - ) -> bool: - """Returns True iff the universe domains used by the client and credentials match. - - Args: - client_universe (str): The universe domain configured via the client options. - credentials (ga_credentials.Credentials): The credentials being used in the client. - - Returns: - bool: True iff client_universe matches the universe in credentials. - - Raises: - ValueError: when client_universe does not match the universe in credentials. - """ - - default_universe = EntityTypesClient._DEFAULT_UNIVERSE - credentials_universe = getattr(credentials, "universe_domain", default_universe) - - if client_universe != credentials_universe: - raise ValueError( - "The configured universe domain " - f"({client_universe}) does not match the universe domain " - f"found in the credentials ({credentials_universe}). " - "If you haven't configured the universe domain explicitly, " - f"`{default_universe}` is the default." - ) - return True - def _validate_universe_domain(self): """Validates client's and credentials' universe domains are consistent. @@ -509,13 +479,9 @@ def _validate_universe_domain(self): Raises: ValueError: If the configured universe domain is not valid. """ - self._is_universe_domain_valid = ( - self._is_universe_domain_valid - or EntityTypesClient._compare_universes( - self.universe_domain, self.transport._credentials - ) - ) - return self._is_universe_domain_valid + + # NOTE (b/349488459): universe validation is disabled until further notice. + return True @property def api_endpoint(self): @@ -726,7 +692,7 @@ def sample_get_entity_type(): [EntityTypes.GetEntityType][google.cloud.dialogflow.cx.v3.EntityTypes.GetEntityType]. name (str): Required. The name of the entity type. Format: - ``projects//locations//agents//entityTypes/``. + ``projects//locations//agents//entityTypes/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -871,7 +837,7 @@ def sample_create_entity_type(): [EntityTypes.CreateEntityType][google.cloud.dialogflow.cx.v3.EntityTypes.CreateEntityType]. parent (str): Required. The agent to create a entity type for. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -1167,7 +1133,7 @@ def sample_delete_entity_type(): [EntityTypes.DeleteEntityType][google.cloud.dialogflow.cx.v3.EntityTypes.DeleteEntityType]. name (str): Required. The name of the entity type to delete. Format: - ``projects//locations//agents//entityTypes/``. + ``projects//locations//agents//entityTypes/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1264,7 +1230,7 @@ def sample_list_entity_types(): parent (str): Required. The agent to list all entity types for. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/environments/async_client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/environments/async_client.py index f02de8d96ce7..325d8eb6bc35 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/environments/async_client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/environments/async_client.py @@ -326,7 +326,7 @@ async def sample_list_environments(): Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to list all environments for. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -449,7 +449,7 @@ async def sample_get_environment(): Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment]. Format: - ``projects//locations//agents//environments/``. + ``projects//locations//agents//environments/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -595,7 +595,7 @@ async def sample_create_environment(): an [Environment][google.cloud.dialogflow.cx.v3.Environment] for. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -882,7 +882,7 @@ async def sample_delete_environment(): Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment] to delete. Format: - ``projects//locations//agents//environments/``. + ``projects//locations//agents//environments/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -984,7 +984,7 @@ async def sample_lookup_environment_history(): name (:class:`str`): Required. Resource name of the environment to look up the history for. Format: - ``projects//locations//agents//environments/``. + ``projects//locations//agents//environments/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1219,7 +1219,7 @@ async def sample_list_continuous_test_results(): [Environments.ListContinuousTestResults][google.cloud.dialogflow.cx.v3.Environments.ListContinuousTestResults]. parent (:class:`str`): Required. The environment to list results for. Format: - ``projects//locations//agents// environments/``. + ``projects//locations//agents//environments/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/environments/client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/environments/client.py index 87cf02f634bb..560f86faa822 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/environments/client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/environments/client.py @@ -622,36 +622,6 @@ def _get_universe_domain( raise ValueError("Universe Domain cannot be an empty string.") return universe_domain - @staticmethod - def _compare_universes( - client_universe: str, credentials: ga_credentials.Credentials - ) -> bool: - """Returns True iff the universe domains used by the client and credentials match. - - Args: - client_universe (str): The universe domain configured via the client options. - credentials (ga_credentials.Credentials): The credentials being used in the client. - - Returns: - bool: True iff client_universe matches the universe in credentials. - - Raises: - ValueError: when client_universe does not match the universe in credentials. - """ - - default_universe = EnvironmentsClient._DEFAULT_UNIVERSE - credentials_universe = getattr(credentials, "universe_domain", default_universe) - - if client_universe != credentials_universe: - raise ValueError( - "The configured universe domain " - f"({client_universe}) does not match the universe domain " - f"found in the credentials ({credentials_universe}). " - "If you haven't configured the universe domain explicitly, " - f"`{default_universe}` is the default." - ) - return True - def _validate_universe_domain(self): """Validates client's and credentials' universe domains are consistent. @@ -661,13 +631,9 @@ def _validate_universe_domain(self): Raises: ValueError: If the configured universe domain is not valid. """ - self._is_universe_domain_valid = ( - self._is_universe_domain_valid - or EnvironmentsClient._compare_universes( - self.universe_domain, self.transport._credentials - ) - ) - return self._is_universe_domain_valid + + # NOTE (b/349488459): universe validation is disabled until further notice. + return True @property def api_endpoint(self): @@ -882,7 +848,7 @@ def sample_list_environments(): Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to list all environments for. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -1002,7 +968,7 @@ def sample_get_environment(): Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment]. Format: - ``projects//locations//agents//environments/``. + ``projects//locations//agents//environments/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1145,7 +1111,7 @@ def sample_create_environment(): an [Environment][google.cloud.dialogflow.cx.v3.Environment] for. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -1426,7 +1392,7 @@ def sample_delete_environment(): Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment] to delete. Format: - ``projects//locations//agents//environments/``. + ``projects//locations//agents//environments/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1525,7 +1491,7 @@ def sample_lookup_environment_history(): name (str): Required. Resource name of the environment to look up the history for. Format: - ``projects//locations//agents//environments/``. + ``projects//locations//agents//environments/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1757,7 +1723,7 @@ def sample_list_continuous_test_results(): [Environments.ListContinuousTestResults][google.cloud.dialogflow.cx.v3.Environments.ListContinuousTestResults]. parent (str): Required. The environment to list results for. Format: - ``projects//locations//agents// environments/``. + ``projects//locations//agents//environments/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/experiments/async_client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/experiments/async_client.py index 7a76c6b80273..b9925af68670 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/experiments/async_client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/experiments/async_client.py @@ -308,7 +308,7 @@ async def sample_list_experiments(): Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to list all environments for. Format: - ``projects//locations//agents//environments/``. + ``projects//locations//agents//environments/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -431,7 +431,7 @@ async def sample_get_experiment(): Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment]. Format: - ``projects//locations//agents//environments//experiments/``. + ``projects//locations//agents//environments//experiments/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -549,7 +549,7 @@ async def sample_create_experiment(): an [Environment][google.cloud.dialogflow.cx.v3.Environment] for. Format: - ``projects//locations//agents//environments/``. + ``projects//locations//agents//environments/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -782,7 +782,7 @@ async def sample_delete_experiment(): Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment] to delete. Format: - ``projects//locations//agents//environments//experiments/``. + ``projects//locations//agents//environments//experiments/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -882,7 +882,7 @@ async def sample_start_experiment(): name (:class:`str`): Required. Resource name of the experiment to start. Format: - ``projects//locations//agents//environments//experiments/``. + ``projects//locations//agents//environments//experiments/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -991,7 +991,7 @@ async def sample_stop_experiment(): name (:class:`str`): Required. Resource name of the experiment to stop. Format: - ``projects//locations//agents//environments//experiments/``. + ``projects//locations//agents//environments//experiments/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/experiments/client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/experiments/client.py index 5715d05dce50..d9fadc52810c 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/experiments/client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/experiments/client.py @@ -498,36 +498,6 @@ def _get_universe_domain( raise ValueError("Universe Domain cannot be an empty string.") return universe_domain - @staticmethod - def _compare_universes( - client_universe: str, credentials: ga_credentials.Credentials - ) -> bool: - """Returns True iff the universe domains used by the client and credentials match. - - Args: - client_universe (str): The universe domain configured via the client options. - credentials (ga_credentials.Credentials): The credentials being used in the client. - - Returns: - bool: True iff client_universe matches the universe in credentials. - - Raises: - ValueError: when client_universe does not match the universe in credentials. - """ - - default_universe = ExperimentsClient._DEFAULT_UNIVERSE - credentials_universe = getattr(credentials, "universe_domain", default_universe) - - if client_universe != credentials_universe: - raise ValueError( - "The configured universe domain " - f"({client_universe}) does not match the universe domain " - f"found in the credentials ({credentials_universe}). " - "If you haven't configured the universe domain explicitly, " - f"`{default_universe}` is the default." - ) - return True - def _validate_universe_domain(self): """Validates client's and credentials' universe domains are consistent. @@ -537,13 +507,9 @@ def _validate_universe_domain(self): Raises: ValueError: If the configured universe domain is not valid. """ - self._is_universe_domain_valid = ( - self._is_universe_domain_valid - or ExperimentsClient._compare_universes( - self.universe_domain, self.transport._credentials - ) - ) - return self._is_universe_domain_valid + + # NOTE (b/349488459): universe validation is disabled until further notice. + return True @property def api_endpoint(self): @@ -758,7 +724,7 @@ def sample_list_experiments(): Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to list all environments for. Format: - ``projects//locations//agents//environments/``. + ``projects//locations//agents//environments/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -878,7 +844,7 @@ def sample_get_experiment(): Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment]. Format: - ``projects//locations//agents//environments//experiments/``. + ``projects//locations//agents//environments//experiments/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -993,7 +959,7 @@ def sample_create_experiment(): an [Environment][google.cloud.dialogflow.cx.v3.Environment] for. Format: - ``projects//locations//agents//environments/``. + ``projects//locations//agents//environments/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -1220,7 +1186,7 @@ def sample_delete_experiment(): Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment] to delete. Format: - ``projects//locations//agents//environments//experiments/``. + ``projects//locations//agents//environments//experiments/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1317,7 +1283,7 @@ def sample_start_experiment(): name (str): Required. Resource name of the experiment to start. Format: - ``projects//locations//agents//environments//experiments/``. + ``projects//locations//agents//environments//experiments/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1423,7 +1389,7 @@ def sample_stop_experiment(): name (str): Required. Resource name of the experiment to stop. Format: - ``projects//locations//agents//environments//experiments/``. + ``projects//locations//agents//environments//experiments/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/flows/async_client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/flows/async_client.py index 41bac1c15431..27d4abfd63f2 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/flows/async_client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/flows/async_client.py @@ -322,7 +322,7 @@ async def sample_create_flow(): [Flows.CreateFlow][google.cloud.dialogflow.cx.v3.Flows.CreateFlow]. parent (:class:`str`): Required. The agent to create a flow for. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -453,7 +453,7 @@ async def sample_delete_flow(): [Flows.DeleteFlow][google.cloud.dialogflow.cx.v3.Flows.DeleteFlow]. name (:class:`str`): Required. The name of the flow to delete. Format: - ``projects//locations//agents//flows/``. + ``projects//locations//agents//flows/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -551,7 +551,7 @@ async def sample_list_flows(): [Flows.ListFlows][google.cloud.dialogflow.cx.v3.Flows.ListFlows]. parent (:class:`str`): Required. The agent containing the flows. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -671,7 +671,7 @@ async def sample_get_flow(): [Flows.GetFlow][google.cloud.dialogflow.cx.v3.Flows.GetFlow]. name (:class:`str`): Required. The name of the flow to get. Format: - ``projects//locations//agents//flows/``. + ``projects//locations//agents//flows/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -960,7 +960,7 @@ async def sample_train_flow(): [Flows.TrainFlow][google.cloud.dialogflow.cx.v3.Flows.TrainFlow]. name (:class:`str`): Required. The flow to train. Format: - ``projects//locations//agents//flows/``. + ``projects//locations//agents//flows/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1172,7 +1172,7 @@ async def sample_get_flow_validation_result(): [Flows.GetFlowValidationResult][google.cloud.dialogflow.cx.v3.Flows.GetFlowValidationResult]. name (:class:`str`): Required. The flow name. Format: - ``projects//locations//agents//flows//validationResult``. + ``projects//locations//agents//flows//validationResult``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/flows/client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/flows/client.py index 88cf18063bf3..2b9c5bf0eb42 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/flows/client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/flows/client.py @@ -597,36 +597,6 @@ def _get_universe_domain( raise ValueError("Universe Domain cannot be an empty string.") return universe_domain - @staticmethod - def _compare_universes( - client_universe: str, credentials: ga_credentials.Credentials - ) -> bool: - """Returns True iff the universe domains used by the client and credentials match. - - Args: - client_universe (str): The universe domain configured via the client options. - credentials (ga_credentials.Credentials): The credentials being used in the client. - - Returns: - bool: True iff client_universe matches the universe in credentials. - - Raises: - ValueError: when client_universe does not match the universe in credentials. - """ - - default_universe = FlowsClient._DEFAULT_UNIVERSE - credentials_universe = getattr(credentials, "universe_domain", default_universe) - - if client_universe != credentials_universe: - raise ValueError( - "The configured universe domain " - f"({client_universe}) does not match the universe domain " - f"found in the credentials ({credentials_universe}). " - "If you haven't configured the universe domain explicitly, " - f"`{default_universe}` is the default." - ) - return True - def _validate_universe_domain(self): """Validates client's and credentials' universe domains are consistent. @@ -636,13 +606,9 @@ def _validate_universe_domain(self): Raises: ValueError: If the configured universe domain is not valid. """ - self._is_universe_domain_valid = ( - self._is_universe_domain_valid - or FlowsClient._compare_universes( - self.universe_domain, self.transport._credentials - ) - ) - return self._is_universe_domain_valid + + # NOTE (b/349488459): universe validation is disabled until further notice. + return True @property def api_endpoint(self): @@ -862,7 +828,7 @@ def sample_create_flow(): [Flows.CreateFlow][google.cloud.dialogflow.cx.v3.Flows.CreateFlow]. parent (str): Required. The agent to create a flow for. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -990,7 +956,7 @@ def sample_delete_flow(): [Flows.DeleteFlow][google.cloud.dialogflow.cx.v3.Flows.DeleteFlow]. name (str): Required. The name of the flow to delete. Format: - ``projects//locations//agents//flows/``. + ``projects//locations//agents//flows/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1085,7 +1051,7 @@ def sample_list_flows(): [Flows.ListFlows][google.cloud.dialogflow.cx.v3.Flows.ListFlows]. parent (str): Required. The agent containing the flows. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -1202,7 +1168,7 @@ def sample_get_flow(): [Flows.GetFlow][google.cloud.dialogflow.cx.v3.Flows.GetFlow]. name (str): Required. The name of the flow to get. Format: - ``projects//locations//agents//flows/``. + ``projects//locations//agents//flows/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1487,7 +1453,7 @@ def sample_train_flow(): [Flows.TrainFlow][google.cloud.dialogflow.cx.v3.Flows.TrainFlow]. name (str): Required. The flow to train. Format: - ``projects//locations//agents//flows/``. + ``projects//locations//agents//flows/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1694,7 +1660,7 @@ def sample_get_flow_validation_result(): [Flows.GetFlowValidationResult][google.cloud.dialogflow.cx.v3.Flows.GetFlowValidationResult]. name (str): Required. The flow name. Format: - ``projects//locations//agents//flows//validationResult``. + ``projects//locations//agents//flows//validationResult``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/generators/async_client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/generators/async_client.py index bf28f8b28558..19505a87627b 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/generators/async_client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/generators/async_client.py @@ -300,7 +300,7 @@ async def sample_list_generators(): [Generators.ListGenerators][google.cloud.dialogflow.cx.v3.Generators.ListGenerators]. parent (:class:`str`): Required. The agent to list all generators for. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -420,7 +420,7 @@ async def sample_get_generator(): [Generators.GetGenerator][google.cloud.dialogflow.cx.v3.Generators.GetGenerator]. name (:class:`str`): Required. The name of the generator. Format: - ``projects//locations//agents//generators/``. + ``projects//locations//agents//generators/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -536,7 +536,7 @@ async def sample_create_generator(): [Generators.CreateGenerator][google.cloud.dialogflow.cx.v3.Generators.CreateGenerator]. parent (:class:`str`): Required. The agent to create a generator for. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -775,7 +775,7 @@ async def sample_delete_generator(): [Generators.DeleteGenerator][google.cloud.dialogflow.cx.v3.Generators.DeleteGenerator]. name (:class:`str`): Required. The name of the generator to delete. Format: - ``projects//locations//agents//generators/``. + ``projects//locations//agents//generators/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/generators/client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/generators/client.py index 802f56f74db2..33fc136f2598 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/generators/client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/generators/client.py @@ -468,36 +468,6 @@ def _get_universe_domain( raise ValueError("Universe Domain cannot be an empty string.") return universe_domain - @staticmethod - def _compare_universes( - client_universe: str, credentials: ga_credentials.Credentials - ) -> bool: - """Returns True iff the universe domains used by the client and credentials match. - - Args: - client_universe (str): The universe domain configured via the client options. - credentials (ga_credentials.Credentials): The credentials being used in the client. - - Returns: - bool: True iff client_universe matches the universe in credentials. - - Raises: - ValueError: when client_universe does not match the universe in credentials. - """ - - default_universe = GeneratorsClient._DEFAULT_UNIVERSE - credentials_universe = getattr(credentials, "universe_domain", default_universe) - - if client_universe != credentials_universe: - raise ValueError( - "The configured universe domain " - f"({client_universe}) does not match the universe domain " - f"found in the credentials ({credentials_universe}). " - "If you haven't configured the universe domain explicitly, " - f"`{default_universe}` is the default." - ) - return True - def _validate_universe_domain(self): """Validates client's and credentials' universe domains are consistent. @@ -507,13 +477,9 @@ def _validate_universe_domain(self): Raises: ValueError: If the configured universe domain is not valid. """ - self._is_universe_domain_valid = ( - self._is_universe_domain_valid - or GeneratorsClient._compare_universes( - self.universe_domain, self.transport._credentials - ) - ) - return self._is_universe_domain_valid + + # NOTE (b/349488459): universe validation is disabled until further notice. + return True @property def api_endpoint(self): @@ -726,7 +692,7 @@ def sample_list_generators(): [Generators.ListGenerators][google.cloud.dialogflow.cx.v3.Generators.ListGenerators]. parent (str): Required. The agent to list all generators for. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -843,7 +809,7 @@ def sample_get_generator(): [Generators.GetGenerator][google.cloud.dialogflow.cx.v3.Generators.GetGenerator]. name (str): Required. The name of the generator. Format: - ``projects//locations//agents//generators/``. + ``projects//locations//agents//generators/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -956,7 +922,7 @@ def sample_create_generator(): [Generators.CreateGenerator][google.cloud.dialogflow.cx.v3.Generators.CreateGenerator]. parent (str): Required. The agent to create a generator for. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -1189,7 +1155,7 @@ def sample_delete_generator(): [Generators.DeleteGenerator][google.cloud.dialogflow.cx.v3.Generators.DeleteGenerator]. name (str): Required. The name of the generator to delete. Format: - ``projects//locations//agents//generators/``. + ``projects//locations//agents//generators/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/intents/async_client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/intents/async_client.py index ec7831f84c39..776db47d1d05 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/intents/async_client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/intents/async_client.py @@ -302,7 +302,7 @@ async def sample_list_intents(): [Intents.ListIntents][google.cloud.dialogflow.cx.v3.Intents.ListIntents]. parent (:class:`str`): Required. The agent to list all intents for. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -422,7 +422,7 @@ async def sample_get_intent(): [Intents.GetIntent][google.cloud.dialogflow.cx.v3.Intents.GetIntent]. name (:class:`str`): Required. The name of the intent. Format: - ``projects//locations//agents//intents/``. + ``projects//locations//agents//intents/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -542,7 +542,7 @@ async def sample_create_intent(): [Intents.CreateIntent][google.cloud.dialogflow.cx.v3.Intents.CreateIntent]. parent (:class:`str`): Required. The agent to create an intent for. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -790,7 +790,7 @@ async def sample_delete_intent(): [Intents.DeleteIntent][google.cloud.dialogflow.cx.v3.Intents.DeleteIntent]. name (:class:`str`): Required. The name of the intent to delete. Format: - ``projects//locations//agents//intents/``. + ``projects//locations//agents//intents/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/intents/client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/intents/client.py index 0c1a624e75f3..9efea401b7a8 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/intents/client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/intents/client.py @@ -494,36 +494,6 @@ def _get_universe_domain( raise ValueError("Universe Domain cannot be an empty string.") return universe_domain - @staticmethod - def _compare_universes( - client_universe: str, credentials: ga_credentials.Credentials - ) -> bool: - """Returns True iff the universe domains used by the client and credentials match. - - Args: - client_universe (str): The universe domain configured via the client options. - credentials (ga_credentials.Credentials): The credentials being used in the client. - - Returns: - bool: True iff client_universe matches the universe in credentials. - - Raises: - ValueError: when client_universe does not match the universe in credentials. - """ - - default_universe = IntentsClient._DEFAULT_UNIVERSE - credentials_universe = getattr(credentials, "universe_domain", default_universe) - - if client_universe != credentials_universe: - raise ValueError( - "The configured universe domain " - f"({client_universe}) does not match the universe domain " - f"found in the credentials ({credentials_universe}). " - "If you haven't configured the universe domain explicitly, " - f"`{default_universe}` is the default." - ) - return True - def _validate_universe_domain(self): """Validates client's and credentials' universe domains are consistent. @@ -533,13 +503,9 @@ def _validate_universe_domain(self): Raises: ValueError: If the configured universe domain is not valid. """ - self._is_universe_domain_valid = ( - self._is_universe_domain_valid - or IntentsClient._compare_universes( - self.universe_domain, self.transport._credentials - ) - ) - return self._is_universe_domain_valid + + # NOTE (b/349488459): universe validation is disabled until further notice. + return True @property def api_endpoint(self): @@ -752,7 +718,7 @@ def sample_list_intents(): [Intents.ListIntents][google.cloud.dialogflow.cx.v3.Intents.ListIntents]. parent (str): Required. The agent to list all intents for. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -869,7 +835,7 @@ def sample_get_intent(): [Intents.GetIntent][google.cloud.dialogflow.cx.v3.Intents.GetIntent]. name (str): Required. The name of the intent. Format: - ``projects//locations//agents//intents/``. + ``projects//locations//agents//intents/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -986,7 +952,7 @@ def sample_create_intent(): [Intents.CreateIntent][google.cloud.dialogflow.cx.v3.Intents.CreateIntent]. parent (str): Required. The agent to create an intent for. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -1228,7 +1194,7 @@ def sample_delete_intent(): [Intents.DeleteIntent][google.cloud.dialogflow.cx.v3.Intents.DeleteIntent]. name (str): Required. The name of the intent to delete. Format: - ``projects//locations//agents//intents/``. + ``projects//locations//agents//intents/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/pages/async_client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/pages/async_client.py index d59bfff8fb0b..0a35ed3294f6 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/pages/async_client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/pages/async_client.py @@ -306,7 +306,7 @@ async def sample_list_pages(): [Pages.ListPages][google.cloud.dialogflow.cx.v3.Pages.ListPages]. parent (:class:`str`): Required. The flow to list all pages for. Format: - ``projects//locations//agents//flows/``. + ``projects//locations//agents//flows/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -426,7 +426,7 @@ async def sample_get_page(): [Pages.GetPage][google.cloud.dialogflow.cx.v3.Pages.GetPage]. name (:class:`str`): Required. The name of the page. Format: - ``projects//locations//agents//flows//pages/``. + ``projects//locations//agents//flows//pages/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -559,7 +559,7 @@ async def sample_create_page(): [Pages.CreatePage][google.cloud.dialogflow.cx.v3.Pages.CreatePage]. parent (:class:`str`): Required. The flow to create a page for. Format: - ``projects//locations//agents//flows/``. + ``projects//locations//agents//flows/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -837,7 +837,7 @@ async def sample_delete_page(): [Pages.DeletePage][google.cloud.dialogflow.cx.v3.Pages.DeletePage]. name (:class:`str`): Required. The name of the page to delete. Format: - ``projects//locations//agents//Flows//pages/``. + ``projects//locations//agents//Flows//pages/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/pages/client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/pages/client.py index 5226752450f4..215b7620b90b 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/pages/client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/pages/client.py @@ -591,36 +591,6 @@ def _get_universe_domain( raise ValueError("Universe Domain cannot be an empty string.") return universe_domain - @staticmethod - def _compare_universes( - client_universe: str, credentials: ga_credentials.Credentials - ) -> bool: - """Returns True iff the universe domains used by the client and credentials match. - - Args: - client_universe (str): The universe domain configured via the client options. - credentials (ga_credentials.Credentials): The credentials being used in the client. - - Returns: - bool: True iff client_universe matches the universe in credentials. - - Raises: - ValueError: when client_universe does not match the universe in credentials. - """ - - default_universe = PagesClient._DEFAULT_UNIVERSE - credentials_universe = getattr(credentials, "universe_domain", default_universe) - - if client_universe != credentials_universe: - raise ValueError( - "The configured universe domain " - f"({client_universe}) does not match the universe domain " - f"found in the credentials ({credentials_universe}). " - "If you haven't configured the universe domain explicitly, " - f"`{default_universe}` is the default." - ) - return True - def _validate_universe_domain(self): """Validates client's and credentials' universe domains are consistent. @@ -630,13 +600,9 @@ def _validate_universe_domain(self): Raises: ValueError: If the configured universe domain is not valid. """ - self._is_universe_domain_valid = ( - self._is_universe_domain_valid - or PagesClient._compare_universes( - self.universe_domain, self.transport._credentials - ) - ) - return self._is_universe_domain_valid + + # NOTE (b/349488459): universe validation is disabled until further notice. + return True @property def api_endpoint(self): @@ -848,7 +814,7 @@ def sample_list_pages(): [Pages.ListPages][google.cloud.dialogflow.cx.v3.Pages.ListPages]. parent (str): Required. The flow to list all pages for. Format: - ``projects//locations//agents//flows/``. + ``projects//locations//agents//flows/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -965,7 +931,7 @@ def sample_get_page(): [Pages.GetPage][google.cloud.dialogflow.cx.v3.Pages.GetPage]. name (str): Required. The name of the page. Format: - ``projects//locations//agents//flows//pages/``. + ``projects//locations//agents//flows//pages/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1097,7 +1063,7 @@ def sample_create_page(): [Pages.CreatePage][google.cloud.dialogflow.cx.v3.Pages.CreatePage]. parent (str): Required. The flow to create a page for. Format: - ``projects//locations//agents//flows/``. + ``projects//locations//agents//flows/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -1369,7 +1335,7 @@ def sample_delete_page(): [Pages.DeletePage][google.cloud.dialogflow.cx.v3.Pages.DeletePage]. name (str): Required. The name of the page to delete. Format: - ``projects//locations//agents//Flows//pages/``. + ``projects//locations//agents//Flows//pages/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/security_settings_service/async_client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/security_settings_service/async_client.py index 381146b6dba2..844540653400 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/security_settings_service/async_client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/security_settings_service/async_client.py @@ -340,7 +340,7 @@ async def sample_create_security_settings(): Required. The location to create an [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] for. Format: - ``projects//locations/``. + ``projects//locations/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -465,7 +465,7 @@ async def sample_get_security_settings(): [SecuritySettingsService.GetSecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettingsService.GetSecuritySettings]. name (:class:`str`): Required. Resource name of the settings. Format: - ``projects//locations//securitySettings/``. + ``projects//locations//securitySettings/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -712,7 +712,7 @@ async def sample_list_security_settings(): parent (:class:`str`): Required. The location to list all security settings for. Format: - ``projects//locations/``. + ``projects//locations/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -834,7 +834,7 @@ async def sample_delete_security_settings(): Required. The name of the [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] to delete. Format: - ``projects//locations//securitySettings/``. + ``projects//locations//securitySettings/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/security_settings_service/client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/security_settings_service/client.py index 61a8d2a728f5..a76da48e7b7b 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/security_settings_service/client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/security_settings_service/client.py @@ -514,36 +514,6 @@ def _get_universe_domain( raise ValueError("Universe Domain cannot be an empty string.") return universe_domain - @staticmethod - def _compare_universes( - client_universe: str, credentials: ga_credentials.Credentials - ) -> bool: - """Returns True iff the universe domains used by the client and credentials match. - - Args: - client_universe (str): The universe domain configured via the client options. - credentials (ga_credentials.Credentials): The credentials being used in the client. - - Returns: - bool: True iff client_universe matches the universe in credentials. - - Raises: - ValueError: when client_universe does not match the universe in credentials. - """ - - default_universe = SecuritySettingsServiceClient._DEFAULT_UNIVERSE - credentials_universe = getattr(credentials, "universe_domain", default_universe) - - if client_universe != credentials_universe: - raise ValueError( - "The configured universe domain " - f"({client_universe}) does not match the universe domain " - f"found in the credentials ({credentials_universe}). " - "If you haven't configured the universe domain explicitly, " - f"`{default_universe}` is the default." - ) - return True - def _validate_universe_domain(self): """Validates client's and credentials' universe domains are consistent. @@ -553,13 +523,9 @@ def _validate_universe_domain(self): Raises: ValueError: If the configured universe domain is not valid. """ - self._is_universe_domain_valid = ( - self._is_universe_domain_valid - or SecuritySettingsServiceClient._compare_universes( - self.universe_domain, self.transport._credentials - ) - ) - return self._is_universe_domain_valid + + # NOTE (b/349488459): universe validation is disabled until further notice. + return True @property def api_endpoint(self): @@ -790,7 +756,7 @@ def sample_create_security_settings(): Required. The location to create an [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] for. Format: - ``projects//locations/``. + ``projects//locations/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -912,7 +878,7 @@ def sample_get_security_settings(): [SecuritySettingsService.GetSecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettingsService.GetSecuritySettings]. name (str): Required. Resource name of the settings. Format: - ``projects//locations//securitySettings/``. + ``projects//locations//securitySettings/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1153,7 +1119,7 @@ def sample_list_security_settings(): parent (str): Required. The location to list all security settings for. Format: - ``projects//locations/``. + ``projects//locations/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -1272,7 +1238,7 @@ def sample_delete_security_settings(): Required. The name of the [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] to delete. Format: - ``projects//locations//securitySettings/``. + ``projects//locations//securitySettings/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/session_entity_types/async_client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/session_entity_types/async_client.py index f65ed87817da..a7f04fb18965 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/session_entity_types/async_client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/session_entity_types/async_client.py @@ -320,9 +320,9 @@ async def sample_list_session_entity_types(): parent (:class:`str`): Required. The session to list all session entity types from. Format: - ``projects//locations//agents//sessions/`` + ``projects//locations//agents//sessions/`` or - ``projects//locations//agents//environments//sessions/``. + ``projects//locations//agents//environments//sessions/``. If ``Environment ID`` is not specified, we assume default 'draft' environment. @@ -446,9 +446,9 @@ async def sample_get_session_entity_type(): [SessionEntityTypes.GetSessionEntityType][google.cloud.dialogflow.cx.v3.SessionEntityTypes.GetSessionEntityType]. name (:class:`str`): Required. The name of the session entity type. Format: - ``projects//locations//agents//sessions//entityTypes/`` + ``projects//locations//agents//sessions//entityTypes/`` or - ``projects//locations//agents//environments//sessions//entityTypes/``. + ``projects//locations//agents//environments//sessions//entityTypes/``. If ``Environment ID`` is not specified, we assume default 'draft' environment. @@ -583,9 +583,9 @@ async def sample_create_session_entity_type(): parent (:class:`str`): Required. The session to create a session entity type for. Format: - ``projects//locations//agents//sessions/`` + ``projects//locations//agents//sessions/`` or - ``projects//locations//agents//environments//sessions/``. + ``projects//locations//agents//environments//sessions/``. If ``Environment ID`` is not specified, we assume default 'draft' environment. @@ -729,9 +729,9 @@ async def sample_update_session_entity_type(): [SessionEntityTypes.UpdateSessionEntityType][google.cloud.dialogflow.cx.v3.SessionEntityTypes.UpdateSessionEntityType]. session_entity_type (:class:`google.cloud.dialogflowcx_v3.types.SessionEntityType`): Required. The session entity type to update. Format: - ``projects//locations//agents//sessions//entityTypes/`` + ``projects//locations//agents//sessions//entityTypes/`` or - ``projects//locations//agents//environments//sessions//entityTypes/``. + ``projects//locations//agents//environments//sessions//entityTypes/``. If ``Environment ID`` is not specified, we assume default 'draft' environment. @@ -866,9 +866,9 @@ async def sample_delete_session_entity_type(): name (:class:`str`): Required. The name of the session entity type to delete. Format: - ``projects//locations//agents//sessions//entityTypes/`` + ``projects//locations//agents//sessions//entityTypes/`` or - ``projects//locations//agents//environments//sessions//entityTypes/``. + ``projects//locations//agents//environments//sessions//entityTypes/``. If ``Environment ID`` is not specified, we assume default 'draft' environment. diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/session_entity_types/client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/session_entity_types/client.py index a0bc8b177ff3..442cc41cd100 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/session_entity_types/client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/session_entity_types/client.py @@ -475,36 +475,6 @@ def _get_universe_domain( raise ValueError("Universe Domain cannot be an empty string.") return universe_domain - @staticmethod - def _compare_universes( - client_universe: str, credentials: ga_credentials.Credentials - ) -> bool: - """Returns True iff the universe domains used by the client and credentials match. - - Args: - client_universe (str): The universe domain configured via the client options. - credentials (ga_credentials.Credentials): The credentials being used in the client. - - Returns: - bool: True iff client_universe matches the universe in credentials. - - Raises: - ValueError: when client_universe does not match the universe in credentials. - """ - - default_universe = SessionEntityTypesClient._DEFAULT_UNIVERSE - credentials_universe = getattr(credentials, "universe_domain", default_universe) - - if client_universe != credentials_universe: - raise ValueError( - "The configured universe domain " - f"({client_universe}) does not match the universe domain " - f"found in the credentials ({credentials_universe}). " - "If you haven't configured the universe domain explicitly, " - f"`{default_universe}` is the default." - ) - return True - def _validate_universe_domain(self): """Validates client's and credentials' universe domains are consistent. @@ -514,13 +484,9 @@ def _validate_universe_domain(self): Raises: ValueError: If the configured universe domain is not valid. """ - self._is_universe_domain_valid = ( - self._is_universe_domain_valid - or SessionEntityTypesClient._compare_universes( - self.universe_domain, self.transport._credentials - ) - ) - return self._is_universe_domain_valid + + # NOTE (b/349488459): universe validation is disabled until further notice. + return True @property def api_endpoint(self): @@ -744,9 +710,9 @@ def sample_list_session_entity_types(): parent (str): Required. The session to list all session entity types from. Format: - ``projects//locations//agents//sessions/`` + ``projects//locations//agents//sessions/`` or - ``projects//locations//agents//environments//sessions/``. + ``projects//locations//agents//environments//sessions/``. If ``Environment ID`` is not specified, we assume default 'draft' environment. @@ -869,9 +835,9 @@ def sample_get_session_entity_type(): [SessionEntityTypes.GetSessionEntityType][google.cloud.dialogflow.cx.v3.SessionEntityTypes.GetSessionEntityType]. name (str): Required. The name of the session entity type. Format: - ``projects//locations//agents//sessions//entityTypes/`` + ``projects//locations//agents//sessions//entityTypes/`` or - ``projects//locations//agents//environments//sessions//entityTypes/``. + ``projects//locations//agents//environments//sessions//entityTypes/``. If ``Environment ID`` is not specified, we assume default 'draft' environment. @@ -1003,9 +969,9 @@ def sample_create_session_entity_type(): parent (str): Required. The session to create a session entity type for. Format: - ``projects//locations//agents//sessions/`` + ``projects//locations//agents//sessions/`` or - ``projects//locations//agents//environments//sessions/``. + ``projects//locations//agents//environments//sessions/``. If ``Environment ID`` is not specified, we assume default 'draft' environment. @@ -1148,9 +1114,9 @@ def sample_update_session_entity_type(): [SessionEntityTypes.UpdateSessionEntityType][google.cloud.dialogflow.cx.v3.SessionEntityTypes.UpdateSessionEntityType]. session_entity_type (google.cloud.dialogflowcx_v3.types.SessionEntityType): Required. The session entity type to update. Format: - ``projects//locations//agents//sessions//entityTypes/`` + ``projects//locations//agents//sessions//entityTypes/`` or - ``projects//locations//agents//environments//sessions//entityTypes/``. + ``projects//locations//agents//environments//sessions//entityTypes/``. If ``Environment ID`` is not specified, we assume default 'draft' environment. @@ -1284,9 +1250,9 @@ def sample_delete_session_entity_type(): name (str): Required. The name of the session entity type to delete. Format: - ``projects//locations//agents//sessions//entityTypes/`` + ``projects//locations//agents//sessions//entityTypes/`` or - ``projects//locations//agents//environments//sessions//entityTypes/``. + ``projects//locations//agents//environments//sessions//entityTypes/``. If ``Environment ID`` is not specified, we assume default 'draft' environment. diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/sessions/client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/sessions/client.py index 8d6f63b89fa2..ffe2e5f977bc 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/sessions/client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/sessions/client.py @@ -691,36 +691,6 @@ def _get_universe_domain( raise ValueError("Universe Domain cannot be an empty string.") return universe_domain - @staticmethod - def _compare_universes( - client_universe: str, credentials: ga_credentials.Credentials - ) -> bool: - """Returns True iff the universe domains used by the client and credentials match. - - Args: - client_universe (str): The universe domain configured via the client options. - credentials (ga_credentials.Credentials): The credentials being used in the client. - - Returns: - bool: True iff client_universe matches the universe in credentials. - - Raises: - ValueError: when client_universe does not match the universe in credentials. - """ - - default_universe = SessionsClient._DEFAULT_UNIVERSE - credentials_universe = getattr(credentials, "universe_domain", default_universe) - - if client_universe != credentials_universe: - raise ValueError( - "The configured universe domain " - f"({client_universe}) does not match the universe domain " - f"found in the credentials ({credentials_universe}). " - "If you haven't configured the universe domain explicitly, " - f"`{default_universe}` is the default." - ) - return True - def _validate_universe_domain(self): """Validates client's and credentials' universe domains are consistent. @@ -730,13 +700,9 @@ def _validate_universe_domain(self): Raises: ValueError: If the configured universe domain is not valid. """ - self._is_universe_domain_valid = ( - self._is_universe_domain_valid - or SessionsClient._compare_universes( - self.universe_domain, self.transport._credentials - ) - ) - return self._is_universe_domain_valid + + # NOTE (b/349488459): universe validation is disabled until further notice. + return True @property def api_endpoint(self): diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/test_cases/async_client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/test_cases/async_client.py index 797c3826db24..af8acba825d2 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/test_cases/async_client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/test_cases/async_client.py @@ -327,7 +327,7 @@ async def sample_list_test_cases(): [TestCases.ListTestCases][google.cloud.dialogflow.cx.v3.TestCases.ListTestCases]. parent (:class:`str`): Required. The agent to list all pages for. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -445,7 +445,7 @@ async def sample_batch_delete_test_cases(): [TestCases.BatchDeleteTestCases][google.cloud.dialogflow.cx.v3.TestCases.BatchDeleteTestCases]. parent (:class:`str`): Required. The agent to delete test cases from. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -542,7 +542,7 @@ async def sample_get_test_case(): [TestCases.GetTestCase][google.cloud.dialogflow.cx.v3.TestCases.GetTestCase]. name (:class:`str`): Required. The name of the testcase. Format: - ``projects//locations//agents//testCases/``. + ``projects//locations//agents//testCases/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -651,7 +651,7 @@ async def sample_create_test_case(): [TestCases.CreateTestCase][google.cloud.dialogflow.cx.v3.TestCases.CreateTestCase]. parent (:class:`str`): Required. The agent to create the test case for. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -1411,7 +1411,7 @@ async def sample_list_test_case_results(): [TestCases.ListTestCaseResults][google.cloud.dialogflow.cx.v3.TestCases.ListTestCaseResults]. parent (:class:`str`): Required. The test case to list results for. Format: - ``projects//locations//agents// testCases/``. + ``projects//locations//agents//testCases/``. Specify a ``-`` as a wildcard for TestCase ID to list results across multiple test cases. @@ -1533,7 +1533,7 @@ async def sample_get_test_case_result(): [TestCases.GetTestCaseResult][google.cloud.dialogflow.cx.v3.TestCases.GetTestCaseResult]. name (:class:`str`): Required. The name of the testcase. Format: - ``projects//locations//agents//testCases//results/``. + ``projects//locations//agents//testCases//results/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/test_cases/client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/test_cases/client.py index 2233b06d8a3d..0b600f19c03d 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/test_cases/client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/test_cases/client.py @@ -692,36 +692,6 @@ def _get_universe_domain( raise ValueError("Universe Domain cannot be an empty string.") return universe_domain - @staticmethod - def _compare_universes( - client_universe: str, credentials: ga_credentials.Credentials - ) -> bool: - """Returns True iff the universe domains used by the client and credentials match. - - Args: - client_universe (str): The universe domain configured via the client options. - credentials (ga_credentials.Credentials): The credentials being used in the client. - - Returns: - bool: True iff client_universe matches the universe in credentials. - - Raises: - ValueError: when client_universe does not match the universe in credentials. - """ - - default_universe = TestCasesClient._DEFAULT_UNIVERSE - credentials_universe = getattr(credentials, "universe_domain", default_universe) - - if client_universe != credentials_universe: - raise ValueError( - "The configured universe domain " - f"({client_universe}) does not match the universe domain " - f"found in the credentials ({credentials_universe}). " - "If you haven't configured the universe domain explicitly, " - f"`{default_universe}` is the default." - ) - return True - def _validate_universe_domain(self): """Validates client's and credentials' universe domains are consistent. @@ -731,13 +701,9 @@ def _validate_universe_domain(self): Raises: ValueError: If the configured universe domain is not valid. """ - self._is_universe_domain_valid = ( - self._is_universe_domain_valid - or TestCasesClient._compare_universes( - self.universe_domain, self.transport._credentials - ) - ) - return self._is_universe_domain_valid + + # NOTE (b/349488459): universe validation is disabled until further notice. + return True @property def api_endpoint(self): @@ -949,7 +915,7 @@ def sample_list_test_cases(): [TestCases.ListTestCases][google.cloud.dialogflow.cx.v3.TestCases.ListTestCases]. parent (str): Required. The agent to list all pages for. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -1064,7 +1030,7 @@ def sample_batch_delete_test_cases(): [TestCases.BatchDeleteTestCases][google.cloud.dialogflow.cx.v3.TestCases.BatchDeleteTestCases]. parent (str): Required. The agent to delete test cases from. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -1158,7 +1124,7 @@ def sample_get_test_case(): [TestCases.GetTestCase][google.cloud.dialogflow.cx.v3.TestCases.GetTestCase]. name (str): Required. The name of the testcase. Format: - ``projects//locations//agents//testCases/``. + ``projects//locations//agents//testCases/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1264,7 +1230,7 @@ def sample_create_test_case(): [TestCases.CreateTestCase][google.cloud.dialogflow.cx.v3.TestCases.CreateTestCase]. parent (str): Required. The agent to create the test case for. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -2008,7 +1974,7 @@ def sample_list_test_case_results(): [TestCases.ListTestCaseResults][google.cloud.dialogflow.cx.v3.TestCases.ListTestCaseResults]. parent (str): Required. The test case to list results for. Format: - ``projects//locations//agents// testCases/``. + ``projects//locations//agents//testCases/``. Specify a ``-`` as a wildcard for TestCase ID to list results across multiple test cases. @@ -2127,7 +2093,7 @@ def sample_get_test_case_result(): [TestCases.GetTestCaseResult][google.cloud.dialogflow.cx.v3.TestCases.GetTestCaseResult]. name (str): Required. The name of the testcase. Format: - ``projects//locations//agents//testCases//results/``. + ``projects//locations//agents//testCases//results/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/transition_route_groups/async_client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/transition_route_groups/async_client.py index e671918afa1a..2e873c7ba930 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/transition_route_groups/async_client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/transition_route_groups/async_client.py @@ -330,7 +330,7 @@ async def sample_list_transition_route_groups(): parent (:class:`str`): Required. The flow to list all transition route groups for. Format: - ``projects//locations//agents//flows/`` + ``projects//locations//agents//flows/`` or \`projects//locations//agents/. This corresponds to the ``parent`` field @@ -458,9 +458,9 @@ async def sample_get_transition_route_group(): Required. The name of the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. Format: - ``projects//locations//agents//flows//transitionRouteGroups/`` + ``projects//locations//agents//flows//transitionRouteGroups/`` or - ``projects//locations//agents//transitionRouteGroups/``. + ``projects//locations//agents//transitionRouteGroups/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -587,9 +587,9 @@ async def sample_create_transition_route_group(): Required. The flow to create an [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] for. Format: - ``projects//locations//agents//flows/`` + ``projects//locations//agents//flows/`` or - ``projects//locations//agents/`` + ``projects//locations//agents/`` for agent-level groups. This corresponds to the ``parent`` field @@ -853,9 +853,9 @@ async def sample_delete_transition_route_group(): Required. The name of the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] to delete. Format: - ``projects//locations//agents//flows//transitionRouteGroups/`` + ``projects//locations//agents//flows//transitionRouteGroups/`` or - ``projects//locations//agents//transitionRouteGroups/``. + ``projects//locations//agents//transitionRouteGroups/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/transition_route_groups/client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/transition_route_groups/client.py index 2238c9cb230a..4845cc951238 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/transition_route_groups/client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/transition_route_groups/client.py @@ -575,36 +575,6 @@ def _get_universe_domain( raise ValueError("Universe Domain cannot be an empty string.") return universe_domain - @staticmethod - def _compare_universes( - client_universe: str, credentials: ga_credentials.Credentials - ) -> bool: - """Returns True iff the universe domains used by the client and credentials match. - - Args: - client_universe (str): The universe domain configured via the client options. - credentials (ga_credentials.Credentials): The credentials being used in the client. - - Returns: - bool: True iff client_universe matches the universe in credentials. - - Raises: - ValueError: when client_universe does not match the universe in credentials. - """ - - default_universe = TransitionRouteGroupsClient._DEFAULT_UNIVERSE - credentials_universe = getattr(credentials, "universe_domain", default_universe) - - if client_universe != credentials_universe: - raise ValueError( - "The configured universe domain " - f"({client_universe}) does not match the universe domain " - f"found in the credentials ({credentials_universe}). " - "If you haven't configured the universe domain explicitly, " - f"`{default_universe}` is the default." - ) - return True - def _validate_universe_domain(self): """Validates client's and credentials' universe domains are consistent. @@ -614,13 +584,9 @@ def _validate_universe_domain(self): Raises: ValueError: If the configured universe domain is not valid. """ - self._is_universe_domain_valid = ( - self._is_universe_domain_valid - or TransitionRouteGroupsClient._compare_universes( - self.universe_domain, self.transport._credentials - ) - ) - return self._is_universe_domain_valid + + # NOTE (b/349488459): universe validation is disabled until further notice. + return True @property def api_endpoint(self): @@ -844,7 +810,7 @@ def sample_list_transition_route_groups(): parent (str): Required. The flow to list all transition route groups for. Format: - ``projects//locations//agents//flows/`` + ``projects//locations//agents//flows/`` or \`projects//locations//agents/. This corresponds to the ``parent`` field @@ -971,9 +937,9 @@ def sample_get_transition_route_group(): Required. The name of the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. Format: - ``projects//locations//agents//flows//transitionRouteGroups/`` + ``projects//locations//agents//flows//transitionRouteGroups/`` or - ``projects//locations//agents//transitionRouteGroups/``. + ``projects//locations//agents//transitionRouteGroups/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1099,9 +1065,9 @@ def sample_create_transition_route_group(): Required. The flow to create an [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] for. Format: - ``projects//locations//agents//flows/`` + ``projects//locations//agents//flows/`` or - ``projects//locations//agents/`` + ``projects//locations//agents/`` for agent-level groups. This corresponds to the ``parent`` field @@ -1363,9 +1329,9 @@ def sample_delete_transition_route_group(): Required. The name of the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] to delete. Format: - ``projects//locations//agents//flows//transitionRouteGroups/`` + ``projects//locations//agents//flows//transitionRouteGroups/`` or - ``projects//locations//agents//transitionRouteGroups/``. + ``projects//locations//agents//transitionRouteGroups/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/versions/async_client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/versions/async_client.py index e511f6ec9fc7..5213ce5b4703 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/versions/async_client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/versions/async_client.py @@ -305,7 +305,7 @@ async def sample_list_versions(): parent (:class:`str`): Required. The [Flow][google.cloud.dialogflow.cx.v3.Flow] to list all versions for. Format: - ``projects//locations//agents//flows/``. + ``projects//locations//agents//flows/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -428,7 +428,7 @@ async def sample_get_version(): Required. The name of the [Version][google.cloud.dialogflow.cx.v3.Version]. Format: - ``projects//locations//agents//flows//versions/``. + ``projects//locations//agents//flows//versions/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -555,7 +555,7 @@ async def sample_create_version(): to create an [Version][google.cloud.dialogflow.cx.v3.Version] for. Format: - ``projects//locations//agents//flows/``. + ``projects//locations//agents//flows/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -798,7 +798,7 @@ async def sample_delete_version(): Required. The name of the [Version][google.cloud.dialogflow.cx.v3.Version] to delete. Format: - ``projects//locations//agents//flows//versions/``. + ``projects//locations//agents//flows//versions/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -911,7 +911,7 @@ async def sample_load_version(): Required. The [Version][google.cloud.dialogflow.cx.v3.Version] to be loaded to draft flow. Format: - ``projects//locations//agents//flows//versions/``. + ``projects//locations//agents//flows//versions/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1041,7 +1041,7 @@ async def sample_compare_versions(): draft version of the specified flow. Format: - ``projects//locations//agents/ /flows//versions/``. + ``projects//locations//agents//flows//versions/``. This corresponds to the ``base_version`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/versions/client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/versions/client.py index 81324bc63c07..65622f5a8024 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/versions/client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/versions/client.py @@ -476,36 +476,6 @@ def _get_universe_domain( raise ValueError("Universe Domain cannot be an empty string.") return universe_domain - @staticmethod - def _compare_universes( - client_universe: str, credentials: ga_credentials.Credentials - ) -> bool: - """Returns True iff the universe domains used by the client and credentials match. - - Args: - client_universe (str): The universe domain configured via the client options. - credentials (ga_credentials.Credentials): The credentials being used in the client. - - Returns: - bool: True iff client_universe matches the universe in credentials. - - Raises: - ValueError: when client_universe does not match the universe in credentials. - """ - - default_universe = VersionsClient._DEFAULT_UNIVERSE - credentials_universe = getattr(credentials, "universe_domain", default_universe) - - if client_universe != credentials_universe: - raise ValueError( - "The configured universe domain " - f"({client_universe}) does not match the universe domain " - f"found in the credentials ({credentials_universe}). " - "If you haven't configured the universe domain explicitly, " - f"`{default_universe}` is the default." - ) - return True - def _validate_universe_domain(self): """Validates client's and credentials' universe domains are consistent. @@ -515,13 +485,9 @@ def _validate_universe_domain(self): Raises: ValueError: If the configured universe domain is not valid. """ - self._is_universe_domain_valid = ( - self._is_universe_domain_valid - or VersionsClient._compare_universes( - self.universe_domain, self.transport._credentials - ) - ) - return self._is_universe_domain_valid + + # NOTE (b/349488459): universe validation is disabled until further notice. + return True @property def api_endpoint(self): @@ -735,7 +701,7 @@ def sample_list_versions(): parent (str): Required. The [Flow][google.cloud.dialogflow.cx.v3.Flow] to list all versions for. Format: - ``projects//locations//agents//flows/``. + ``projects//locations//agents//flows/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -855,7 +821,7 @@ def sample_get_version(): Required. The name of the [Version][google.cloud.dialogflow.cx.v3.Version]. Format: - ``projects//locations//agents//flows//versions/``. + ``projects//locations//agents//flows//versions/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -979,7 +945,7 @@ def sample_create_version(): to create an [Version][google.cloud.dialogflow.cx.v3.Version] for. Format: - ``projects//locations//agents//flows/``. + ``projects//locations//agents//flows/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -1216,7 +1182,7 @@ def sample_delete_version(): Required. The name of the [Version][google.cloud.dialogflow.cx.v3.Version] to delete. Format: - ``projects//locations//agents//flows//versions/``. + ``projects//locations//agents//flows//versions/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1326,7 +1292,7 @@ def sample_load_version(): Required. The [Version][google.cloud.dialogflow.cx.v3.Version] to be loaded to draft flow. Format: - ``projects//locations//agents//flows//versions/``. + ``projects//locations//agents//flows//versions/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1453,7 +1419,7 @@ def sample_compare_versions(): draft version of the specified flow. Format: - ``projects//locations//agents/ /flows//versions/``. + ``projects//locations//agents//flows//versions/``. This corresponds to the ``base_version`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/webhooks/async_client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/webhooks/async_client.py index 0be12b5d5354..60c43a1432d0 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/webhooks/async_client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/webhooks/async_client.py @@ -301,7 +301,7 @@ async def sample_list_webhooks(): [Webhooks.ListWebhooks][google.cloud.dialogflow.cx.v3.Webhooks.ListWebhooks]. parent (:class:`str`): Required. The agent to list all webhooks for. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -421,7 +421,7 @@ async def sample_get_webhook(): [Webhooks.GetWebhook][google.cloud.dialogflow.cx.v3.Webhooks.GetWebhook]. name (:class:`str`): Required. The name of the webhook. Format: - ``projects//locations//agents//webhooks/``. + ``projects//locations//agents//webhooks/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -538,7 +538,7 @@ async def sample_create_webhook(): [Webhooks.CreateWebhook][google.cloud.dialogflow.cx.v3.Webhooks.CreateWebhook]. parent (:class:`str`): Required. The agent to create a webhook for. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -779,7 +779,7 @@ async def sample_delete_webhook(): [Webhooks.DeleteWebhook][google.cloud.dialogflow.cx.v3.Webhooks.DeleteWebhook]. name (:class:`str`): Required. The name of the webhook to delete. Format: - ``projects//locations//agents//webhooks/``. + ``projects//locations//agents//webhooks/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/webhooks/client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/webhooks/client.py index 3a8393555818..6a3830f789bb 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/webhooks/client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/webhooks/client.py @@ -493,36 +493,6 @@ def _get_universe_domain( raise ValueError("Universe Domain cannot be an empty string.") return universe_domain - @staticmethod - def _compare_universes( - client_universe: str, credentials: ga_credentials.Credentials - ) -> bool: - """Returns True iff the universe domains used by the client and credentials match. - - Args: - client_universe (str): The universe domain configured via the client options. - credentials (ga_credentials.Credentials): The credentials being used in the client. - - Returns: - bool: True iff client_universe matches the universe in credentials. - - Raises: - ValueError: when client_universe does not match the universe in credentials. - """ - - default_universe = WebhooksClient._DEFAULT_UNIVERSE - credentials_universe = getattr(credentials, "universe_domain", default_universe) - - if client_universe != credentials_universe: - raise ValueError( - "The configured universe domain " - f"({client_universe}) does not match the universe domain " - f"found in the credentials ({credentials_universe}). " - "If you haven't configured the universe domain explicitly, " - f"`{default_universe}` is the default." - ) - return True - def _validate_universe_domain(self): """Validates client's and credentials' universe domains are consistent. @@ -532,13 +502,9 @@ def _validate_universe_domain(self): Raises: ValueError: If the configured universe domain is not valid. """ - self._is_universe_domain_valid = ( - self._is_universe_domain_valid - or WebhooksClient._compare_universes( - self.universe_domain, self.transport._credentials - ) - ) - return self._is_universe_domain_valid + + # NOTE (b/349488459): universe validation is disabled until further notice. + return True @property def api_endpoint(self): @@ -751,7 +717,7 @@ def sample_list_webhooks(): [Webhooks.ListWebhooks][google.cloud.dialogflow.cx.v3.Webhooks.ListWebhooks]. parent (str): Required. The agent to list all webhooks for. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -868,7 +834,7 @@ def sample_get_webhook(): [Webhooks.GetWebhook][google.cloud.dialogflow.cx.v3.Webhooks.GetWebhook]. name (str): Required. The name of the webhook. Format: - ``projects//locations//agents//webhooks/``. + ``projects//locations//agents//webhooks/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -982,7 +948,7 @@ def sample_create_webhook(): [Webhooks.CreateWebhook][google.cloud.dialogflow.cx.v3.Webhooks.CreateWebhook]. parent (str): Required. The agent to create a webhook for. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -1217,7 +1183,7 @@ def sample_delete_webhook(): [Webhooks.DeleteWebhook][google.cloud.dialogflow.cx.v3.Webhooks.DeleteWebhook]. name (str): Required. The name of the webhook to delete. Format: - ``projects//locations//agents//webhooks/``. + ``projects//locations//agents//webhooks/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/advanced_settings.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/advanced_settings.py index 83ae083d693f..6275811e66fe 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/advanced_settings.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/advanced_settings.py @@ -171,7 +171,7 @@ class LoggingSettings(proto.Message): Attributes: enable_stackdriver_logging (bool): - Enables StackDriver logging. + Enables Google Cloud Logging. enable_interaction_logging (bool): Enables DF Interaction logging. enable_consent_based_redaction (bool): diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/agent.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/agent.py index f296cbe1e9c5..377328b36af8 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/agent.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/agent.py @@ -92,7 +92,7 @@ class Agent(proto.Message): method. [Agents.CreateAgent][google.cloud.dialogflow.cx.v3.Agents.CreateAgent] populates the name automatically. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. display_name (str): Required. The human-readable name of the agent, unique within the location. @@ -127,12 +127,12 @@ class Agent(proto.Message): flow will be automatically created when the agent is created, and can only be deleted by deleting the agent. Format: - ``projects//locations//agents//flows/``. + ``projects//locations//agents//flows/``. security_settings (str): Name of the [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] reference for the agent. Format: - ``projects//locations//securitySettings/``. + ``projects//locations//securitySettings/``. enable_stackdriver_logging (bool): Indicates if stackdriver logging is enabled for the agent. Please use @@ -171,6 +171,9 @@ class Agent(proto.Message): personalization_settings (google.cloud.dialogflowcx_v3.types.Agent.PersonalizationSettings): Optional. Settings for end user personalization. + client_certificate_settings (google.cloud.dialogflowcx_v3.types.Agent.ClientCertificateSettings): + Optional. Settings for custom client + certificates. """ class GitIntegrationSettings(proto.Message): @@ -287,6 +290,39 @@ class PersonalizationSettings(proto.Message): message=struct_pb2.Struct, ) + class ClientCertificateSettings(proto.Message): + r"""Settings for custom client certificates. + + Attributes: + ssl_certificate (str): + Required. The ssl certificate encoded in PEM + format. This string must include the begin + header and end footer lines. + private_key (str): + Required. The name of the SecretManager secret version + resource storing the private key encoded in PEM format. + Format: + ``projects/{project}/secrets/{secret}/versions/{version}`` + passphrase (str): + Optional. The name of the SecretManager secret version + resource storing the passphrase. 'passphrase' should be left + unset if the private key is not encrypted. Format: + ``projects/{project}/secrets/{secret}/versions/{version}`` + """ + + ssl_certificate: str = proto.Field( + proto.STRING, + number=1, + ) + private_key: str = proto.Field( + proto.STRING, + number=2, + ) + passphrase: str = proto.Field( + proto.STRING, + number=3, + ) + name: str = proto.Field( proto.STRING, number=1, @@ -375,6 +411,11 @@ class PersonalizationSettings(proto.Message): number=42, message=PersonalizationSettings, ) + client_certificate_settings: ClientCertificateSettings = proto.Field( + proto.MESSAGE, + number=43, + message=ClientCertificateSettings, + ) class ListAgentsRequest(proto.Message): @@ -384,7 +425,7 @@ class ListAgentsRequest(proto.Message): Attributes: parent (str): Required. The location to list all agents for. Format: - ``projects//locations/``. + ``projects//locations/``. page_size (int): The maximum number of items to return in a single page. By default 100 and at most 1000. @@ -443,7 +484,7 @@ class GetAgentRequest(proto.Message): Attributes: name (str): Required. The name of the agent. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. """ name: str = proto.Field( @@ -459,7 +500,7 @@ class CreateAgentRequest(proto.Message): Attributes: parent (str): Required. The location to create a agent for. Format: - ``projects//locations/``. + ``projects//locations/``. agent (google.cloud.dialogflowcx_v3.types.Agent): Required. The agent to create. """ @@ -507,7 +548,7 @@ class DeleteAgentRequest(proto.Message): Attributes: name (str): Required. The name of the agent to delete. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. """ name: str = proto.Field( @@ -523,7 +564,7 @@ class ExportAgentRequest(proto.Message): Attributes: name (str): Required. The name of the agent to export. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. agent_uri (str): Optional. The `Google Cloud Storage `__ URI to @@ -542,7 +583,7 @@ class ExportAgentRequest(proto.Message): environment (str): Optional. Environment name. If not set, draft environment is assumed. Format: - ``projects//locations//agents//environments/``. + ``projects//locations//agents//environments/``. git_destination (google.cloud.dialogflowcx_v3.types.ExportAgentRequest.GitDestination): Optional. The Git branch to export the agent to. @@ -678,7 +719,7 @@ class RestoreAgentRequest(proto.Message): Attributes: name (str): Required. The name of the agent to restore into. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. agent_uri (str): The `Google Cloud Storage `__ URI to @@ -770,7 +811,7 @@ class ValidateAgentRequest(proto.Message): Attributes: name (str): Required. The agent to validate. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. language_code (str): If not specified, the agent's default language is used. @@ -793,7 +834,7 @@ class GetAgentValidationResultRequest(proto.Message): Attributes: name (str): Required. The agent name. Format: - ``projects//locations//agents//validationResult``. + ``projects//locations//agents//validationResult``. language_code (str): If not specified, the agent's default language is used. @@ -817,7 +858,7 @@ class AgentValidationResult(proto.Message): name (str): The unique identifier of the agent validation result. Format: - ``projects//locations//agents//validationResult``. + ``projects//locations//agents//validationResult``. flow_validation_results (MutableSequence[google.cloud.dialogflowcx_v3.types.FlowValidationResult]): Contains all flow validation results. """ @@ -843,7 +884,7 @@ class GetGenerativeSettingsRequest(proto.Message): Attributes: name (str): Required. Format: - ``projects//locations//agents//generativeSettings``. + ``projects//locations//agents//generativeSettings``. language_code (str): Required. Language code of the generative settings. diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/audio_config.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/audio_config.py index 48fc2f8fee4b..355ace1f322a 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/audio_config.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/audio_config.py @@ -87,6 +87,9 @@ class AudioEncoding(proto.Enum): 5574. In other words, each RTP header is replaced with a single byte containing the block length. Only Speex wideband is supported. ``sample_rate_hertz`` must be 16000. + AUDIO_ENCODING_ALAW (8): + 8-bit samples that compand 13-bit audio + samples using G.711 PCMU/a-law. """ AUDIO_ENCODING_UNSPECIFIED = 0 AUDIO_ENCODING_LINEAR_16 = 1 @@ -96,6 +99,7 @@ class AudioEncoding(proto.Enum): AUDIO_ENCODING_AMR_WB = 5 AUDIO_ENCODING_OGG_OPUS = 6 AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7 + AUDIO_ENCODING_ALAW = 8 class SpeechModelVariant(proto.Enum): @@ -186,6 +190,9 @@ class OutputAudioEncoding(proto.Enum): OUTPUT_AUDIO_ENCODING_MULAW (5): 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. + OUTPUT_AUDIO_ENCODING_ALAW (6): + 8-bit samples that compand 13-bit audio + samples using G.711 PCMU/a-law. """ OUTPUT_AUDIO_ENCODING_UNSPECIFIED = 0 OUTPUT_AUDIO_ENCODING_LINEAR_16 = 1 @@ -193,6 +200,7 @@ class OutputAudioEncoding(proto.Enum): OUTPUT_AUDIO_ENCODING_MP3_64_KBPS = 4 OUTPUT_AUDIO_ENCODING_OGG_OPUS = 3 OUTPUT_AUDIO_ENCODING_MULAW = 5 + OUTPUT_AUDIO_ENCODING_ALAW = 6 class SpeechWordInfo(proto.Message): diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/changelog.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/changelog.py index a858a236569e..182d0b843d58 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/changelog.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/changelog.py @@ -38,7 +38,7 @@ class ListChangelogsRequest(proto.Message): Attributes: parent (str): Required. The agent containing the changelogs. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. filter (str): The filter string. Supports filter by user_email, resource, type and create_time. Some examples: @@ -120,7 +120,7 @@ class GetChangelogRequest(proto.Message): Attributes: name (str): Required. The name of the changelog to get. Format: - ``projects//locations//agents//changelogs/``. + ``projects//locations//agents//changelogs/``. """ name: str = proto.Field( @@ -135,7 +135,7 @@ class Changelog(proto.Message): Attributes: name (str): The unique identifier of the changelog. Format: - ``projects//locations//agents//changelogs/``. + ``projects//locations//agents//changelogs/``. user_email (str): Email address of the authenticated user. display_name (str): diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/deployment.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/deployment.py index 154a24bfde39..88422ead299c 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/deployment.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/deployment.py @@ -41,15 +41,14 @@ class Deployment(proto.Message): Attributes: name (str): The name of the deployment. - Format: projects//locations//agents//environments//deployments/. + Format: + + projects//locations//agents//environments//deployments/. flow_version (str): The name of the flow version for this - deployment. Format: projects//locations//agents//flows//versions/. + deployment. Format: + + projects//locations//agents//flows//versions/. state (google.cloud.dialogflowcx_v3.types.Deployment.State): The current state of the deployment. result (google.cloud.dialogflowcx_v3.types.Deployment.Result): @@ -84,13 +83,12 @@ class Result(proto.Message): Attributes: deployment_test_results (MutableSequence[str]): Results of test cases running before the deployment. Format: - ``projects//locations//agents//testCases//results/``. + ``projects//locations//agents//testCases//results/``. experiment (str): The name of the experiment triggered by this - deployment. Format: projects//locations//agents//environments//experiments/. + deployment. Format: + + projects//locations//agents//environments//experiments/. """ deployment_test_results: MutableSequence[str] = proto.RepeatedField( @@ -141,7 +139,7 @@ class ListDeploymentsRequest(proto.Message): Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to list all environments for. Format: - ``projects//locations//agents//environments/``. + ``projects//locations//agents//environments/``. page_size (int): The maximum number of items to return in a single page. By default 20 and at most 100. @@ -204,7 +202,7 @@ class GetDeploymentRequest(proto.Message): Required. The name of the [Deployment][google.cloud.dialogflow.cx.v3.Deployment]. Format: - ``projects//locations//agents//environments//deployments/``. + ``projects//locations//agents//environments//deployments/``. """ name: str = proto.Field( diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/entity_type.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/entity_type.py index a81aa7aa8460..7403fe2cfe57 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/entity_type.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/entity_type.py @@ -80,7 +80,7 @@ class EntityType(proto.Message): The unique identifier of the entity type. Required for [EntityTypes.UpdateEntityType][google.cloud.dialogflow.cx.v3.EntityTypes.UpdateEntityType]. Format: - ``projects//locations//agents//entityTypes/``. + ``projects//locations//agents//entityTypes/``. display_name (str): Required. The human-readable name of the entity type, unique within the agent. @@ -253,10 +253,10 @@ class ExportEntityTypesRequest(proto.Message): parent (str): Required. The name of the parent agent to export entity types. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. entity_types (MutableSequence[str]): Required. The name of the entity types to export. Format: - ``projects//locations//agents//entityTypes/``. + ``projects//locations//agents//entityTypes/``. entity_types_uri (str): Optional. The `Google Cloud Storage `__ URI to @@ -401,7 +401,7 @@ class ImportEntityTypesRequest(proto.Message): Attributes: parent (str): Required. The agent to import the entity types into. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. entity_types_uri (str): The `Google Cloud Storage `__ URI to @@ -424,7 +424,7 @@ class ImportEntityTypesRequest(proto.Message): types. target_entity_type (str): Optional. The target entity type to import into. Format: - ``projects//locations//agents//entity_types/``. + ``projects//locations//agents//entity_types/``. If set, there should be only one entity type included in [entity_types][google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.entity_types], of which the type should match the type of the target entity @@ -501,7 +501,7 @@ class ImportEntityTypesResponse(proto.Message): Attributes: entity_types (MutableSequence[str]): The unique identifier of the imported entity types. Format: - ``projects//locations//agents//entity_types/``. + ``projects//locations//agents//entity_types/``. conflicting_resources (google.cloud.dialogflowcx_v3.types.ImportEntityTypesResponse.ConflictingResources): Info which resources have conflicts when [REPORT_CONFLICT][ImportEntityTypesResponse.REPORT_CONFLICT] @@ -556,7 +556,7 @@ class ListEntityTypesRequest(proto.Message): Attributes: parent (str): Required. The agent to list all entity types for. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. language_code (str): The language to list entity types for. The following fields are language dependent: @@ -632,7 +632,7 @@ class GetEntityTypeRequest(proto.Message): Attributes: name (str): Required. The name of the entity type. Format: - ``projects//locations//agents//entityTypes/``. + ``projects//locations//agents//entityTypes/``. language_code (str): The language to retrieve the entity type for. The following fields are language dependent: @@ -665,7 +665,7 @@ class CreateEntityTypeRequest(proto.Message): Attributes: parent (str): Required. The agent to create a entity type for. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. entity_type (google.cloud.dialogflowcx_v3.types.EntityType): Required. The entity type to create. language_code (str): @@ -743,7 +743,7 @@ class DeleteEntityTypeRequest(proto.Message): Attributes: name (str): Required. The name of the entity type to delete. Format: - ``projects//locations//agents//entityTypes/``. + ``projects//locations//agents//entityTypes/``. force (bool): This field has no effect for entity type not being used. For entity types that are used by intents or pages: diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/environment.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/environment.py index 95c32c081513..0f83edb01b94 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/environment.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/environment.py @@ -62,7 +62,7 @@ class Environment(proto.Message): Attributes: name (str): The name of the environment. Format: - ``projects//locations//agents//environments/``. + ``projects//locations//agents//environments/``. display_name (str): Required. The human-readable name of the environment (unique in an agent). Limit of 64 @@ -92,9 +92,13 @@ class VersionConfig(proto.Message): Attributes: version (str): - Required. Format: projects//locations//agents//flows//versions/. + Required. Both flow and playbook versions are + supported. Format for flow version: + + projects//locations//agents//flows//versions/. + Format for playbook version: + + projects//locations//agents//playbooks//versions/. """ version: str = proto.Field( @@ -109,7 +113,7 @@ class TestCasesConfig(proto.Message): test_cases (MutableSequence[str]): A list of test case names to run. They should be under the same agent. Format of each test case name: - ``projects//locations/ /agents//testCases/`` + ``projects//locations//agents//testCases/`` enable_continuous_run (bool): Whether to run test cases in [TestCasesConfig.test_cases][google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.test_cases] @@ -195,7 +199,7 @@ class ListEnvironmentsRequest(proto.Message): parent (str): Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to list all environments for. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. page_size (int): The maximum number of items to return in a single page. By default 20 and at most 100. @@ -258,7 +262,7 @@ class GetEnvironmentRequest(proto.Message): Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment]. Format: - ``projects//locations//agents//environments/``. + ``projects//locations//agents//environments/``. """ name: str = proto.Field( @@ -277,7 +281,7 @@ class CreateEnvironmentRequest(proto.Message): to create an [Environment][google.cloud.dialogflow.cx.v3.Environment] for. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. environment (google.cloud.dialogflowcx_v3.types.Environment): Required. The environment to create. """ @@ -326,7 +330,7 @@ class DeleteEnvironmentRequest(proto.Message): Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment] to delete. Format: - ``projects//locations//agents//environments/``. + ``projects//locations//agents//environments/``. """ name: str = proto.Field( @@ -343,7 +347,7 @@ class LookupEnvironmentHistoryRequest(proto.Message): name (str): Required. Resource name of the environment to look up the history for. Format: - ``projects//locations//agents//environments/``. + ``projects//locations//agents//environments/``. page_size (int): The maximum number of items to return in a single page. By default 100 and at most 1000. @@ -403,7 +407,7 @@ class ContinuousTestResult(proto.Message): Attributes: name (str): The resource name for the continuous test result. Format: - ``projects//locations//agents//environments//continuousTestResults/``. + ``projects//locations//agents//environments//continuousTestResults/``. result (google.cloud.dialogflowcx_v3.types.ContinuousTestResult.AggregatedTestResult): The result of this continuous test run, i.e. whether all the tests in this continuous test @@ -458,7 +462,7 @@ class RunContinuousTestRequest(proto.Message): Attributes: environment (str): Required. Format: - ``projects//locations//agents//environments/``. + ``projects//locations//agents//environments/``. """ environment: str = proto.Field( @@ -507,7 +511,7 @@ class ListContinuousTestResultsRequest(proto.Message): Attributes: parent (str): Required. The environment to list results for. Format: - ``projects//locations//agents// environments/``. + ``projects//locations//agents//environments/``. page_size (int): The maximum number of items to return in a single page. By default 100 and at most 1000. @@ -566,10 +570,10 @@ class DeployFlowRequest(proto.Message): Attributes: environment (str): Required. The environment to deploy the flow to. Format: - ``projects//locations//agents// environments/``. + ``projects//locations//agents//environments/``. flow_version (str): Required. The flow version to deploy. Format: - ``projects//locations//agents// flows//versions/``. + ``projects//locations//agents//flows//versions/``. """ environment: str = proto.Field( @@ -594,7 +598,7 @@ class DeployFlowResponse(proto.Message): The name of the flow version [Deployment][google.cloud.dialogflow.cx.v3.Deployment]. Format: - ``projects//locations//agents// environments//deployments/``. + ``projects//locations//agents//environments//deployments/``. """ environment: "Environment" = proto.Field( diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/experiment.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/experiment.py index 987140cbf341..4cd2e349f989 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/experiment.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/experiment.py @@ -48,10 +48,9 @@ class Experiment(proto.Message): Attributes: name (str): The name of the experiment. - Format: projects//locations//agents//environments//experiments/.. + Format: + + projects//locations//agents//environments//experiments/. display_name (str): Required. The human-readable name of the experiment (unique in an environment). Limit of @@ -313,7 +312,7 @@ class VersionMetrics(proto.Message): version (str): The name of the flow [Version][google.cloud.dialogflow.cx.v3.Version]. Format: - ``projects//locations//agents//flows//versions/``. + ``projects//locations//agents//flows//versions/``. metrics (MutableSequence[google.cloud.dialogflowcx_v3.types.Experiment.Result.Metric]): The metrics and corresponding confidence intervals in the inference result. @@ -436,7 +435,7 @@ class Variant(proto.Message): Attributes: version (str): The name of the flow version. Format: - ``projects//locations//agents//flows//versions/``. + ``projects//locations//agents//flows//versions/``. traffic_allocation (float): Percentage of the traffic which should be routed to this version of flow. Traffic @@ -598,7 +597,7 @@ class ListExperimentsRequest(proto.Message): Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to list all environments for. Format: - ``projects//locations//agents//environments/``. + ``projects//locations//agents//environments/``. page_size (int): The maximum number of items to return in a single page. By default 20 and at most 100. @@ -661,7 +660,7 @@ class GetExperimentRequest(proto.Message): Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment]. Format: - ``projects//locations//agents//environments//experiments/``. + ``projects//locations//agents//environments//experiments/``. """ name: str = proto.Field( @@ -680,7 +679,7 @@ class CreateExperimentRequest(proto.Message): to create an [Environment][google.cloud.dialogflow.cx.v3.Environment] for. Format: - ``projects//locations//agents//environments/``. + ``projects//locations//agents//environments/``. experiment (google.cloud.dialogflowcx_v3.types.Experiment): Required. The experiment to create. """ @@ -729,7 +728,7 @@ class DeleteExperimentRequest(proto.Message): Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment] to delete. Format: - ``projects//locations//agents//environments//experiments/``. + ``projects//locations//agents//environments//experiments/``. """ name: str = proto.Field( @@ -745,7 +744,7 @@ class StartExperimentRequest(proto.Message): Attributes: name (str): Required. Resource name of the experiment to start. Format: - ``projects//locations//agents//environments//experiments/``. + ``projects//locations//agents//environments//experiments/``. """ name: str = proto.Field( @@ -761,7 +760,7 @@ class StopExperimentRequest(proto.Message): Attributes: name (str): Required. Resource name of the experiment to stop. Format: - ``projects//locations//agents//environments//experiments/``. + ``projects//locations//agents//environments//experiments/``. """ name: str = proto.Field( diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/flow.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/flow.py index 6a4f64ff33b6..f51cca109145 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/flow.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/flow.py @@ -65,7 +65,9 @@ class NluSettings(proto.Message): value, then a no-match event will be triggered. The score values range from 0.0 (completely uncertain) to 1.0 (completely certain). If set - to 0.0, the default of 0.3 is used. + to 0.0, the default of 0.3 is used. You can set + a separate classification threshold for the flow + in each language enabled for the agent. model_training_mode (google.cloud.dialogflowcx_v3.types.NluSettings.ModelTrainingMode): Indicates NLU model training mode. """ @@ -142,7 +144,7 @@ class Flow(proto.Message): Attributes: name (str): The unique identifier of the flow. Format: - ``projects//locations//agents//flows/``. + ``projects//locations//agents//flows/``. display_name (str): Required. The human-readable name of the flow. @@ -195,9 +197,10 @@ class Flow(proto.Message): groups defined in the page have higher priority than those defined in the flow. - Format:\ ``projects//locations//agents//flows//transitionRouteGroups/`` + Format: + ``projects//locations//agents//flows//transitionRouteGroups/`` or - ``projects//locations//agents//transitionRouteGroups/`` + ``projects//locations//agents//transitionRouteGroups/`` for agent-level groups. nlu_settings (google.cloud.dialogflowcx_v3.types.NluSettings): NLU related settings of the flow. @@ -305,7 +308,7 @@ class CreateFlowRequest(proto.Message): Attributes: parent (str): Required. The agent to create a flow for. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. flow (google.cloud.dialogflowcx_v3.types.Flow): Required. The flow to create. language_code (str): @@ -345,7 +348,7 @@ class DeleteFlowRequest(proto.Message): Attributes: name (str): Required. The name of the flow to delete. Format: - ``projects//locations//agents//flows/``. + ``projects//locations//agents//flows/``. force (bool): This field has no effect for flows with no incoming transitions. For flows with incoming transitions: @@ -377,7 +380,7 @@ class ListFlowsRequest(proto.Message): Attributes: parent (str): Required. The agent containing the flows. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. page_size (int): The maximum number of items to return in a single page. By default 100 and at most 1000. @@ -454,7 +457,7 @@ class GetFlowRequest(proto.Message): Attributes: name (str): Required. The name of the flow to get. Format: - ``projects//locations//agents//flows/``. + ``projects//locations//agents//flows/``. language_code (str): The language to retrieve the flow for. The following fields are language dependent: @@ -530,7 +533,7 @@ class TrainFlowRequest(proto.Message): Attributes: name (str): Required. The flow to train. Format: - ``projects//locations//agents//flows/``. + ``projects//locations//agents//flows/``. """ name: str = proto.Field( @@ -546,7 +549,7 @@ class ValidateFlowRequest(proto.Message): Attributes: name (str): Required. The flow to validate. Format: - ``projects//locations//agents//flows/``. + ``projects//locations//agents//flows/``. language_code (str): If not specified, the agent's default language is used. @@ -569,7 +572,7 @@ class GetFlowValidationResultRequest(proto.Message): Attributes: name (str): Required. The flow name. Format: - ``projects//locations//agents//flows//validationResult``. + ``projects//locations//agents//flows//validationResult``. language_code (str): If not specified, the agent's default language is used. @@ -592,7 +595,7 @@ class FlowValidationResult(proto.Message): Attributes: name (str): The unique identifier of the flow validation result. Format: - ``projects//locations//agents//flows//validationResult``. + ``projects//locations//agents//flows//validationResult``. validation_messages (MutableSequence[google.cloud.dialogflowcx_v3.types.ValidationMessage]): Contains all validation messages. update_time (google.protobuf.timestamp_pb2.Timestamp): @@ -631,7 +634,7 @@ class ImportFlowRequest(proto.Message): Attributes: parent (str): Required. The agent to import the flow into. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. flow_uri (str): The `Google Cloud Storage `__ URI to @@ -730,7 +733,7 @@ class ImportFlowResponse(proto.Message): Attributes: flow (str): The unique identifier of the new flow. Format: - ``projects//locations//agents//flows/``. + ``projects//locations//agents//flows/``. """ flow: str = proto.Field( @@ -746,7 +749,7 @@ class ExportFlowRequest(proto.Message): Attributes: name (str): Required. The name of the flow to export. Format: - ``projects//locations//agents//flows/``. + ``projects//locations//agents//flows/``. flow_uri (str): Optional. The `Google Cloud Storage `__ URI to diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/fulfillment.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/fulfillment.py index 4b3d8d69a441..de8225df6484 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/fulfillment.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/fulfillment.py @@ -60,7 +60,7 @@ class Fulfillment(proto.Message): to the user. webhook (str): The webhook to call. Format: - ``projects//locations//agents//webhooks/``. + ``projects//locations//agents//webhooks/``. return_partial_responses (bool): Whether Dialogflow should return currently queued fulfillment response messages in diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/generative_settings.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/generative_settings.py index e733391bf25b..76232ba2e72c 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/generative_settings.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/generative_settings.py @@ -35,7 +35,7 @@ class GenerativeSettings(proto.Message): Attributes: name (str): Format: - ``projects//locations//agents//generativeSettings``. + ``projects//locations//agents//generativeSettings``. fallback_settings (google.cloud.dialogflowcx_v3.types.GenerativeSettings.FallbackSettings): Settings for Generative Fallback. generative_safety_settings (google.cloud.dialogflowcx_v3.types.SafetySettings): diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/generator.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/generator.py index 08e7d22045f2..d5150034692b 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/generator.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/generator.py @@ -47,7 +47,7 @@ class Generator(proto.Message): [Generators.UpdateGenerator][google.cloud.dialogflow.cx.v3.Generators.UpdateGenerator] method. [Generators.CreateGenerate][] populates the name automatically. Format: - ``projects//locations//agents//generators/``. + ``projects//locations//agents//generators/``. display_name (str): Required. The human-readable name of the generator, unique within the agent. The prompt @@ -61,6 +61,9 @@ class Generator(proto.Message): placeholders (MutableSequence[google.cloud.dialogflowcx_v3.types.Generator.Placeholder]): Optional. List of custom placeholders in the prompt text. + model_parameter (google.cloud.dialogflowcx_v3.types.Generator.ModelParameter): + Parameters passed to the LLM to configure its + behavior. """ class Placeholder(proto.Message): @@ -83,6 +86,63 @@ class Placeholder(proto.Message): number=2, ) + class ModelParameter(proto.Message): + r"""Parameters to be passed to the LLM. If not set, default + values will be used. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + temperature (float): + The temperature used for sampling. Temperature sampling + occurs after both topP and topK have been applied. Valid + range: [0.0, 1.0] Low temperature = less random. High + temperature = more random. + + This field is a member of `oneof`_ ``_temperature``. + max_decode_steps (int): + The maximum number of tokens to generate. + + This field is a member of `oneof`_ ``_max_decode_steps``. + top_p (float): + If set, only the tokens comprising the top top_p probability + mass are considered. If both top_p and top_k are set, top_p + will be used for further refining candidates selected with + top_k. Valid range: (0.0, 1.0]. Small topP = less random. + Large topP = more random. + + This field is a member of `oneof`_ ``_top_p``. + top_k (int): + If set, the sampling process in each step is limited to the + top_k tokens with highest probabilities. Valid range: [1, + 40] or 1000+. Small topK = less random. Large topK = more + random. + + This field is a member of `oneof`_ ``_top_k``. + """ + + temperature: float = proto.Field( + proto.FLOAT, + number=1, + optional=True, + ) + max_decode_steps: int = proto.Field( + proto.INT32, + number=2, + optional=True, + ) + top_p: float = proto.Field( + proto.FLOAT, + number=3, + optional=True, + ) + top_k: int = proto.Field( + proto.INT32, + number=4, + optional=True, + ) + name: str = proto.Field( proto.STRING, number=1, @@ -101,6 +161,11 @@ class Placeholder(proto.Message): number=5, message=Placeholder, ) + model_parameter: ModelParameter = proto.Field( + proto.MESSAGE, + number=8, + message=ModelParameter, + ) class Phrase(proto.Message): @@ -125,7 +190,7 @@ class ListGeneratorsRequest(proto.Message): Attributes: parent (str): Required. The agent to list all generators for. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. language_code (str): The language to list generators for. page_size (int): @@ -190,7 +255,7 @@ class GetGeneratorRequest(proto.Message): Attributes: name (str): Required. The name of the generator. Format: - ``projects//locations//agents//generators/``. + ``projects//locations//agents//generators/``. language_code (str): The language to list generators for. """ @@ -212,7 +277,7 @@ class CreateGeneratorRequest(proto.Message): Attributes: parent (str): Required. The agent to create a generator for. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. generator (google.cloud.dialogflowcx_v3.types.Generator): Required. The generator to create. language_code (str): @@ -275,7 +340,7 @@ class DeleteGeneratorRequest(proto.Message): Attributes: name (str): Required. The name of the generator to delete. Format: - ``projects//locations//agents//generators/``. + ``projects//locations//agents//generators/``. force (bool): This field has no effect for generators not being used. For generators that are used by pages/flows/transition route diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/intent.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/intent.py index 8ac632707e0d..b2e6f0b73167 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/intent.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/intent.py @@ -77,7 +77,7 @@ class Intent(proto.Message): method. [Intents.CreateIntent][google.cloud.dialogflow.cx.v3.Intents.CreateIntent] populates the name automatically. Format: - ``projects//locations//agents//intents/``. + ``projects//locations//agents//intents/``. display_name (str): Required. The human-readable name of the intent, unique within the agent. @@ -214,11 +214,11 @@ class Parameter(proto.Message): [parts][google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part]. entity_type (str): Required. The entity type of the parameter. Format: - ``projects/-/locations/-/agents/-/entityTypes/`` + ``projects/-/locations/-/agents/-/entityTypes/`` for system entity types (for example, ``projects/-/locations/-/agents/-/entityTypes/sys.date``), or - ``projects//locations//agents//entityTypes/`` + ``projects//locations//agents//entityTypes/`` for developer entity types. is_list (bool): Indicates whether the parameter represents a @@ -294,7 +294,7 @@ class ListIntentsRequest(proto.Message): Attributes: parent (str): Required. The agent to list all intents for. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. language_code (str): The language to list intents for. The following fields are language dependent: @@ -376,7 +376,7 @@ class GetIntentRequest(proto.Message): Attributes: name (str): Required. The name of the intent. Format: - ``projects//locations//agents//intents/``. + ``projects//locations//agents//intents/``. language_code (str): The language to retrieve the intent for. The following fields are language dependent: @@ -407,7 +407,7 @@ class CreateIntentRequest(proto.Message): Attributes: parent (str): Required. The agent to create an intent for. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. intent (google.cloud.dialogflowcx_v3.types.Intent): Required. The intent to create. language_code (str): @@ -483,7 +483,7 @@ class DeleteIntentRequest(proto.Message): Attributes: name (str): Required. The name of the intent to delete. Format: - ``projects//locations//agents//intents/``. + ``projects//locations//agents//intents/``. """ name: str = proto.Field( @@ -506,7 +506,7 @@ class ImportIntentsRequest(proto.Message): Attributes: parent (str): Required. The agent to import the intents into. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. intents_uri (str): The `Google Cloud Storage `__ URI to @@ -597,7 +597,7 @@ class ImportIntentsResponse(proto.Message): Attributes: intents (MutableSequence[str]): The unique identifier of the imported intents. Format: - ``projects//locations//agents//intents/``. + ``projects//locations//agents//intents/``. conflicting_resources (google.cloud.dialogflowcx_v3.types.ImportIntentsResponse.ConflictingResources): Info which resources have conflicts when [REPORT_CONFLICT][ImportIntentsResponse.REPORT_CONFLICT] @@ -659,10 +659,10 @@ class ExportIntentsRequest(proto.Message): parent (str): Required. The name of the parent agent to export intents. Format: - ``projects//locations//agents/``. + ``projects//locations//agents/``. intents (MutableSequence[str]): Required. The name of the intents to export. Format: - ``projects//locations//agents//intents/``. + ``projects//locations//agents//intents/``. intents_uri (str): Optional. The `Google Cloud Storage `__ URI to diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/page.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/page.py index 9f53353936bc..19a8e64ee66e 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/page.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/page.py @@ -72,7 +72,7 @@ class Page(proto.Message): method. [Pages.CreatePage][google.cloud.dialogflow.cx.v3.Pages.CreatePage] populates the name automatically. Format: - ``projects//locations//agents//flows//pages/``. + ``projects//locations//agents//flows//pages/``. display_name (str): Required. The human-readable name of the page, unique within the flow. @@ -103,9 +103,9 @@ class Page(proto.Message): the same intent, then the first group in the ordered list takes precedence. - Format:\ ``projects//locations//agents//flows//transitionRouteGroups/`` + Format:\ ``projects//locations//agents//flows//transitionRouteGroups/`` or - ``projects//locations//agents//transitionRouteGroups/`` + ``projects//locations//agents//transitionRouteGroups/`` for agent-level groups. transition_routes (MutableSequence[google.cloud.dialogflowcx_v3.types.TransitionRoute]): A list of transitions for the transition rules of this page. @@ -219,11 +219,11 @@ class Parameter(proto.Message): form filling concludes. entity_type (str): Required. The entity type of the parameter. Format: - ``projects/-/locations/-/agents/-/entityTypes/`` + ``projects/-/locations/-/agents/-/entityTypes/`` for system entity types (for example, ``projects/-/locations/-/agents/-/entityTypes/sys.date``), or - ``projects//locations//agents//entityTypes/`` + ``projects//locations//agents//entityTypes/`` for developer entity types. is_list (bool): Indicates whether the parameter represents a @@ -394,12 +394,12 @@ class EventHandler(proto.Message): fulfillment for a handler handling webhooks. target_page (str): The target page to transition to. Format: - ``projects//locations//agents//flows//pages/``. + ``projects//locations//agents//flows//pages/``. This field is a member of `oneof`_ ``target``. target_flow (str): The target flow to transition to. Format: - ``projects//locations//agents//flows/``. + ``projects//locations//agents//flows/``. This field is a member of `oneof`_ ``target``. """ @@ -465,7 +465,7 @@ class TransitionRoute(proto.Message): intent (str): The unique identifier of an [Intent][google.cloud.dialogflow.cx.v3.Intent]. Format: - ``projects//locations//agents//intents/``. + ``projects//locations//agents//intents/``. Indicates that the transition can only happen when the given intent is matched. At least one of ``intent`` or ``condition`` must be specified. When both ``intent`` and @@ -490,12 +490,12 @@ class TransitionRoute(proto.Message): executed first. target_page (str): The target page to transition to. Format: - ``projects//locations//agents//flows//pages/``. + ``projects//locations//agents//flows//pages/``. This field is a member of `oneof`_ ``target``. target_flow (str): The target flow to transition to. Format: - ``projects//locations//agents//flows/``. + ``projects//locations//agents//flows/``. This field is a member of `oneof`_ ``target``. """ @@ -540,7 +540,7 @@ class ListPagesRequest(proto.Message): Attributes: parent (str): Required. The flow to list all pages for. Format: - ``projects//locations//agents//flows/``. + ``projects//locations//agents//flows/``. language_code (str): The language to list pages for. The following fields are language dependent: @@ -629,7 +629,7 @@ class GetPageRequest(proto.Message): Attributes: name (str): Required. The name of the page. Format: - ``projects//locations//agents//flows//pages/``. + ``projects//locations//agents//flows//pages/``. language_code (str): The language to retrieve the page for. The following fields are language dependent: @@ -675,7 +675,7 @@ class CreatePageRequest(proto.Message): Attributes: parent (str): Required. The flow to create a page for. Format: - ``projects//locations//agents//flows/``. + ``projects//locations//agents//flows/``. page (google.cloud.dialogflowcx_v3.types.Page): Required. The page to create. language_code (str): @@ -781,7 +781,7 @@ class DeletePageRequest(proto.Message): Attributes: name (str): Required. The name of the page to delete. Format: - ``projects//locations//agents//Flows//pages/``. + ``projects//locations//agents//Flows//pages/``. force (bool): This field has no effect for pages with no incoming transitions. For pages with incoming transitions: @@ -833,12 +833,12 @@ class KnowledgeConnectorSettings(proto.Message): fulfillment. target_page (str): The target page to transition to. Format: - ``projects//locations//agents//flows//pages/``. + ``projects//locations//agents//flows//pages/``. This field is a member of `oneof`_ ``target``. target_flow (str): The target flow to transition to. Format: - ``projects//locations//agents//flows/``. + ``projects//locations//agents//flows/``. This field is a member of `oneof`_ ``target``. data_store_connections (MutableSequence[google.cloud.dialogflowcx_v3.types.DataStoreConnection]): diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/response_message.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/response_message.py index f7fad2e8e1ee..3a5203872c23 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/response_message.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/response_message.py @@ -160,7 +160,10 @@ class Text(proto.Message): Attributes: text (MutableSequence[str]): - Required. A collection of text responses. + Required. A collection of text response + variants. If multiple variants are defined, only + one text response variant is returned at + runtime. allow_playback_interruption (bool): Output only. Whether the playback of this message can be interrupted by the end user's diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/security_settings.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/security_settings.py index 087dbcb5b52b..7d1686c06b6f 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/security_settings.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/security_settings.py @@ -41,7 +41,7 @@ class GetSecuritySettingsRequest(proto.Message): Attributes: name (str): Required. Resource name of the settings. Format: - ``projects//locations//securitySettings/``. + ``projects//locations//securitySettings/``. """ name: str = proto.Field( @@ -82,7 +82,7 @@ class ListSecuritySettingsRequest(proto.Message): Attributes: parent (str): Required. The location to list all security settings for. - Format: ``projects//locations/``. + Format: ``projects//locations/``. page_size (int): The maximum number of items to return in a single page. By default 20 and at most 100. @@ -140,7 +140,7 @@ class CreateSecuritySettingsRequest(proto.Message): Required. The location to create an [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] for. Format: - ``projects//locations/``. + ``projects//locations/``. security_settings (google.cloud.dialogflowcx_v3.types.SecuritySettings): Required. The security settings to create. """ @@ -164,7 +164,7 @@ class DeleteSecuritySettingsRequest(proto.Message): Required. The name of the [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] to delete. Format: - ``projects//locations//securitySettings/``. + ``projects//locations//securitySettings/``. """ name: str = proto.Field( @@ -193,7 +193,7 @@ class SecuritySettings(proto.Message): method. [SecuritySettingsService.CreateSecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettingsService.CreateSecuritySettings] populates the name automatically. Format: - ``projects//locations//securitySettings/``. + ``projects//locations//securitySettings/``. display_name (str): Required. The human-readable name of the security settings, unique within the location. @@ -216,9 +216,9 @@ class SecuritySettings(proto.Message): If empty, we use the default DLP inspect config. The template name will have one of the following formats: - ``projects//locations//inspectTemplates/