From 8a752b0daccbff73ad0eefe9fa33d513f996dcea Mon Sep 17 00:00:00 2001 From: ohmayr Date: Thu, 15 Jan 2026 00:09:27 +0000 Subject: [PATCH 1/2] chore: discovery docs diff with generator perf --- .librarian/generate-request.json | 32 + .../cloud/discoveryengine/gapic_version.py | 2 +- .../cloud/discoveryengine_v1/gapic_version.py | 2 +- .../assistant_service/async_client.py | 8 +- .../services/assistant_service/client.py | 8 +- .../assistant_service/transports/base.py | 11 +- .../assistant_service/transports/rest.py | 6 +- .../cmek_config_service/async_client.py | 89 +- .../services/cmek_config_service/client.py | 89 +- .../cmek_config_service/transports/base.py | 11 +- .../cmek_config_service/transports/grpc.py | 8 +- .../transports/grpc_asyncio.py | 8 +- .../cmek_config_service/transports/rest.py | 9 +- .../completion_service/async_client.py | 94 +- .../services/completion_service/client.py | 94 +- .../completion_service/transports/base.py | 11 +- .../completion_service/transports/grpc.py | 12 +- .../transports/grpc_asyncio.py | 12 +- .../completion_service/transports/rest.py | 18 +- .../services/control_service/async_client.py | 102 +- .../services/control_service/client.py | 102 +- .../control_service/transports/base.py | 11 +- .../control_service/transports/grpc.py | 23 +- .../transports/grpc_asyncio.py | 23 +- .../control_service/transports/rest.py | 36 +- .../async_client.py | 139 +- .../conversational_search_service/client.py | 139 +- .../transports/base.py | 11 +- .../transports/grpc.py | 47 +- .../transports/grpc_asyncio.py | 47 +- .../transports/rest.py | 18 +- .../data_store_service/async_client.py | 201 ++- .../services/data_store_service/client.py | 201 ++- .../data_store_service/transports/base.py | 11 +- .../data_store_service/transports/grpc.py | 33 +- .../transports/grpc_asyncio.py | 33 +- .../data_store_service/transports/rest.py | 23 +- .../services/document_service/async_client.py | 274 ++-- .../services/document_service/client.py | 274 ++-- .../document_service/transports/base.py | 11 +- .../document_service/transports/grpc.py | 64 +- .../transports/grpc_asyncio.py | 64 +- .../document_service/transports/rest.py | 33 +- .../services/engine_service/async_client.py | 182 ++- .../services/engine_service/client.py | 182 ++- .../engine_service/transports/base.py | 11 +- .../engine_service/transports/grpc.py | 21 +- .../engine_service/transports/grpc_asyncio.py | 21 +- .../engine_service/transports/rest.py | 34 +- .../async_client.py | 24 +- .../grounded_generation_service/client.py | 24 +- .../transports/base.py | 11 +- .../transports/rest.py | 14 +- .../async_client.py | 133 +- .../identity_mapping_store_service/client.py | 133 +- .../transports/base.py | 11 +- .../transports/rest.py | 27 +- .../services/project_service/async_client.py | 33 +- .../services/project_service/client.py | 33 +- .../project_service/transports/base.py | 11 +- .../project_service/transports/grpc.py | 13 +- .../transports/grpc_asyncio.py | 13 +- .../project_service/transports/rest.py | 5 +- .../services/rank_service/async_client.py | 8 +- .../services/rank_service/client.py | 8 +- .../services/rank_service/transports/base.py | 11 +- .../services/rank_service/transports/rest.py | 6 +- .../recommendation_service/transports/base.py | 11 +- .../services/schema_service/async_client.py | 130 +- .../services/schema_service/client.py | 130 +- .../schema_service/transports/base.py | 11 +- .../schema_service/transports/grpc.py | 20 +- .../schema_service/transports/grpc_asyncio.py | 20 +- .../schema_service/transports/rest.py | 22 +- .../services/search_service/async_client.py | 51 +- .../services/search_service/client.py | 51 +- .../search_service/transports/base.py | 11 +- .../search_service/transports/grpc.py | 29 +- .../search_service/transports/grpc_asyncio.py | 29 +- .../search_service/transports/rest.py | 12 +- .../search_tuning_service/async_client.py | 27 +- .../services/search_tuning_service/client.py | 27 +- .../search_tuning_service/transports/base.py | 11 +- .../search_tuning_service/transports/rest.py | 9 +- .../serving_config_service/async_client.py | 18 +- .../services/serving_config_service/client.py | 18 +- .../serving_config_service/transports/base.py | 11 +- .../serving_config_service/transports/grpc.py | 6 +- .../transports/grpc_asyncio.py | 6 +- .../serving_config_service/transports/rest.py | 3 +- .../services/session_service/async_client.py | 46 +- .../services/session_service/client.py | 46 +- .../session_service/transports/base.py | 11 +- .../session_service/transports/grpc.py | 19 +- .../transports/grpc_asyncio.py | 19 +- .../async_client.py | 387 +++-- .../site_search_engine_service/client.py | 387 +++-- .../transports/base.py | 11 +- .../transports/grpc.py | 46 +- .../transports/grpc_asyncio.py | 46 +- .../transports/rest.py | 54 +- .../user_event_service/async_client.py | 135 +- .../services/user_event_service/client.py | 111 +- .../user_event_service/transports/base.py | 11 +- .../user_event_service/transports/rest.py | 62 +- .../user_license_service/async_client.py | 32 +- .../services/user_license_service/client.py | 32 +- .../user_license_service/transports/base.py | 11 +- .../user_license_service/transports/rest.py | 9 +- .../cloud/discoveryengine_v1/types/answer.py | 31 +- .../discoveryengine_v1/types/assist_answer.py | 23 +- .../discoveryengine_v1/types/assistant.py | 8 +- .../types/assistant_service.py | 136 +- .../cloud/discoveryengine_v1/types/chunk.py | 69 +- .../types/cmek_config_service.py | 62 +- .../cloud/discoveryengine_v1/types/common.py | 142 +- .../discoveryengine_v1/types/completion.py | 7 +- .../types/completion_service.py | 85 +- .../cloud/discoveryengine_v1/types/control.py | 136 +- .../types/control_service.py | 47 +- .../types/conversational_search_service.py | 594 ++++--- .../types/custom_tuning_model.py | 17 +- .../discoveryengine_v1/types/data_store.py | 161 +- .../types/data_store_service.py | 207 ++- .../discoveryengine_v1/types/document.py | 221 ++- .../types/document_processing_config.py | 70 +- .../types/document_service.py | 252 +-- .../cloud/discoveryengine_v1/types/engine.py | 330 ++-- .../types/engine_service.py | 105 +- .../types/grounded_generation_service.py | 202 ++- .../discoveryengine_v1/types/grounding.py | 8 +- .../types/identity_mapping_store.py | 44 +- .../types/identity_mapping_store_service.py | 162 +- .../discoveryengine_v1/types/import_config.py | 492 +++--- .../cloud/discoveryengine_v1/types/project.py | 36 +- .../types/project_service.py | 25 +- .../discoveryengine_v1/types/purge_config.py | 153 +- .../discoveryengine_v1/types/rank_service.py | 96 +- .../types/recommendation_service.py | 241 +-- .../cloud/discoveryengine_v1/types/schema.py | 8 +- .../types/schema_service.py | 108 +- .../types/search_service.py | 1366 ++++++++-------- .../types/search_tuning_service.py | 116 +- .../types/serving_config.py | 258 +-- .../types/serving_config_service.py | 6 +- .../cloud/discoveryengine_v1/types/session.py | 20 +- .../types/site_search_engine.py | 48 +- .../types/site_search_engine_service.py | 348 ++-- .../discoveryengine_v1/types/user_event.py | 636 ++++---- .../types/user_event_service.py | 44 +- .../discoveryengine_v1/types/user_license.py | 14 +- .../types/user_license_service.py | 81 +- .../discoveryengine_v1alpha/gapic_version.py | 2 +- .../acl_config_service/async_client.py | 21 +- .../services/acl_config_service/client.py | 21 +- .../acl_config_service/transports/base.py | 11 +- .../acl_config_service/transports/grpc.py | 4 +- .../transports/grpc_asyncio.py | 4 +- .../services/chunk_service/async_client.py | 62 +- .../services/chunk_service/client.py | 62 +- .../services/chunk_service/transports/base.py | 11 +- .../services/chunk_service/transports/grpc.py | 12 +- .../chunk_service/transports/grpc_asyncio.py | 12 +- .../services/chunk_service/transports/rest.py | 13 +- .../completion_service/async_client.py | 94 +- .../services/completion_service/client.py | 94 +- .../completion_service/transports/base.py | 11 +- .../completion_service/transports/grpc.py | 12 +- .../transports/grpc_asyncio.py | 12 +- .../completion_service/transports/rest.py | 18 +- .../services/control_service/async_client.py | 104 +- .../services/control_service/client.py | 104 +- .../control_service/transports/base.py | 11 +- .../control_service/transports/grpc.py | 25 +- .../transports/grpc_asyncio.py | 25 +- .../control_service/transports/rest.py | 36 +- .../async_client.py | 125 +- .../conversational_search_service/client.py | 125 +- .../transports/base.py | 11 +- .../transports/grpc.py | 41 +- .../transports/grpc_asyncio.py | 41 +- .../transports/rest.py | 12 +- .../data_store_service/async_client.py | 290 ++-- .../services/data_store_service/client.py | 290 ++-- .../data_store_service/transports/base.py | 11 +- .../data_store_service/transports/grpc.py | 52 +- .../transports/grpc_asyncio.py | 52 +- .../data_store_service/transports/rest.py | 54 +- .../services/document_service/async_client.py | 297 ++-- .../services/document_service/client.py | 297 ++-- .../document_service/transports/base.py | 11 +- .../document_service/transports/grpc.py | 68 +- .../transports/grpc_asyncio.py | 68 +- .../document_service/transports/rest.py | 32 +- .../services/engine_service/async_client.py | 236 +-- .../services/engine_service/client.py | 236 +-- .../engine_service/transports/base.py | 11 +- .../engine_service/transports/grpc.py | 45 +- .../engine_service/transports/grpc_asyncio.py | 45 +- .../engine_service/transports/rest.py | 46 +- .../estimate_billing_service/async_client.py | 21 +- .../estimate_billing_service/client.py | 21 +- .../transports/base.py | 11 +- .../transports/rest.py | 3 +- .../evaluation_service/async_client.py | 117 +- .../services/evaluation_service/client.py | 117 +- .../evaluation_service/transports/base.py | 11 +- .../evaluation_service/transports/grpc.py | 22 +- .../transports/grpc_asyncio.py | 22 +- .../evaluation_service/transports/rest.py | 21 +- .../async_client.py | 8 +- .../grounded_generation_service/client.py | 8 +- .../transports/base.py | 11 +- .../transports/rest.py | 6 +- .../services/project_service/async_client.py | 79 +- .../services/project_service/client.py | 79 +- .../project_service/transports/base.py | 11 +- .../project_service/transports/grpc.py | 24 +- .../transports/grpc_asyncio.py | 24 +- .../project_service/transports/rest.py | 8 +- .../services/rank_service/async_client.py | 8 +- .../services/rank_service/client.py | 8 +- .../services/rank_service/transports/base.py | 11 +- .../services/rank_service/transports/rest.py | 6 +- .../recommendation_service/transports/base.py | 11 +- .../sample_query_service/async_client.py | 194 ++- .../services/sample_query_service/client.py | 194 ++- .../sample_query_service/transports/base.py | 11 +- .../sample_query_service/transports/grpc.py | 28 +- .../transports/grpc_asyncio.py | 28 +- .../sample_query_service/transports/rest.py | 24 +- .../sample_query_set_service/async_client.py | 160 +- .../sample_query_set_service/client.py | 160 +- .../transports/base.py | 11 +- .../transports/grpc.py | 18 +- .../transports/grpc_asyncio.py | 18 +- .../transports/rest.py | 21 +- .../services/schema_service/async_client.py | 128 +- .../services/schema_service/client.py | 128 +- .../schema_service/transports/base.py | 11 +- .../schema_service/transports/grpc.py | 20 +- .../schema_service/transports/grpc_asyncio.py | 20 +- .../schema_service/transports/rest.py | 22 +- .../services/search_service/async_client.py | 13 +- .../services/search_service/client.py | 13 +- .../search_service/transports/base.py | 11 +- .../search_service/transports/rest.py | 6 +- .../search_tuning_service/async_client.py | 27 +- .../services/search_tuning_service/client.py | 27 +- .../search_tuning_service/transports/base.py | 11 +- .../search_tuning_service/transports/rest.py | 9 +- .../serving_config_service/async_client.py | 26 +- .../services/serving_config_service/client.py | 26 +- .../serving_config_service/transports/base.py | 11 +- .../serving_config_service/transports/grpc.py | 6 +- .../transports/grpc_asyncio.py | 6 +- .../serving_config_service/transports/rest.py | 3 +- .../services/session_service/async_client.py | 68 +- .../services/session_service/client.py | 68 +- .../session_service/transports/base.py | 11 +- .../session_service/transports/grpc.py | 21 +- .../transports/grpc_asyncio.py | 21 +- .../session_service/transports/rest.py | 6 +- .../async_client.py | 312 ++-- .../site_search_engine_service/client.py | 312 ++-- .../transports/base.py | 11 +- .../transports/grpc.py | 33 +- .../transports/grpc_asyncio.py | 33 +- .../transports/rest.py | 51 +- .../user_event_service/async_client.py | 135 +- .../services/user_event_service/client.py | 111 +- .../user_event_service/transports/base.py | 11 +- .../user_event_service/transports/rest.py | 62 +- .../types/acl_config.py | 9 +- .../types/acl_config_service.py | 12 +- .../discoveryengine_v1alpha/types/answer.py | 8 +- .../discoveryengine_v1alpha/types/chunk.py | 53 +- .../types/chunk_service.py | 82 +- .../discoveryengine_v1alpha/types/common.py | 127 +- .../types/completion.py | 7 +- .../types/completion_service.py | 85 +- .../discoveryengine_v1alpha/types/control.py | 53 +- .../types/control_service.py | 49 +- .../types/conversation.py | 3 +- .../types/conversational_search_service.py | 524 +++--- .../types/custom_tuning_model.py | 13 +- .../types/data_store.py | 142 +- .../types/data_store_service.py | 221 ++- .../discoveryengine_v1alpha/types/document.py | 186 ++- .../types/document_processing_config.py | 58 +- .../types/document_service.py | 249 +-- .../discoveryengine_v1alpha/types/engine.py | 299 ++-- .../types/engine_service.py | 127 +- .../types/estimate_billing_service.py | 15 +- .../types/evaluation.py | 189 ++- .../types/evaluation_service.py | 159 +- .../types/grounded_generation_service.py | 96 +- .../types/grounding.py | 8 +- .../types/import_config.py | 505 +++--- .../discoveryengine_v1alpha/types/project.py | 38 +- .../types/project_service.py | 50 +- .../types/purge_config.py | 143 +- .../types/rank_service.py | 93 +- .../types/recommendation_service.py | 241 +-- .../types/sample_query.py | 18 +- .../types/sample_query_service.py | 149 +- .../types/sample_query_set.py | 13 +- .../types/sample_query_set_service.py | 146 +- .../discoveryengine_v1alpha/types/schema.py | 357 +++-- .../types/schema_service.py | 110 +- .../types/search_service.py | 1359 ++++++++-------- .../types/search_tuning_service.py | 116 +- .../types/serving_config.py | 288 ++-- .../types/serving_config_service.py | 17 +- .../discoveryengine_v1alpha/types/session.py | 31 +- .../types/session_service.py | 85 +- .../types/site_search_engine.py | 44 +- .../types/site_search_engine_service.py | 345 ++-- .../types/user_event.py | 602 ++++--- .../types/user_event_service.py | 26 +- .../discoveryengine_v1beta/gapic_version.py | 2 +- .../completion_service/async_client.py | 105 +- .../services/completion_service/client.py | 105 +- .../completion_service/transports/base.py | 11 +- .../completion_service/transports/grpc.py | 12 +- .../transports/grpc_asyncio.py | 12 +- .../completion_service/transports/rest.py | 27 +- .../services/control_service/async_client.py | 104 +- .../services/control_service/client.py | 104 +- .../control_service/transports/base.py | 11 +- .../control_service/transports/grpc.py | 25 +- .../transports/grpc_asyncio.py | 25 +- .../control_service/transports/rest.py | 36 +- .../async_client.py | 129 +- .../conversational_search_service/client.py | 129 +- .../transports/base.py | 11 +- .../transports/grpc.py | 45 +- .../transports/grpc_asyncio.py | 45 +- .../transports/rest.py | 12 +- .../data_store_service/async_client.py | 201 ++- .../services/data_store_service/client.py | 201 ++- .../data_store_service/transports/base.py | 11 +- .../data_store_service/transports/grpc.py | 33 +- .../transports/grpc_asyncio.py | 33 +- .../data_store_service/transports/rest.py | 20 +- .../services/document_service/async_client.py | 266 ++-- .../services/document_service/client.py | 266 ++-- .../document_service/transports/base.py | 11 +- .../document_service/transports/grpc.py | 60 +- .../transports/grpc_asyncio.py | 60 +- .../document_service/transports/rest.py | 31 +- .../services/engine_service/async_client.py | 238 +-- .../services/engine_service/client.py | 238 +-- .../engine_service/transports/base.py | 11 +- .../engine_service/transports/grpc.py | 47 +- .../engine_service/transports/grpc_asyncio.py | 47 +- .../engine_service/transports/rest.py | 46 +- .../evaluation_service/async_client.py | 117 +- .../services/evaluation_service/client.py | 117 +- .../evaluation_service/transports/base.py | 11 +- .../evaluation_service/transports/grpc.py | 22 +- .../transports/grpc_asyncio.py | 22 +- .../evaluation_service/transports/rest.py | 21 +- .../async_client.py | 24 +- .../grounded_generation_service/client.py | 24 +- .../transports/base.py | 11 +- .../transports/rest.py | 14 +- .../services/project_service/async_client.py | 33 +- .../services/project_service/client.py | 33 +- .../project_service/transports/base.py | 11 +- .../project_service/transports/grpc.py | 13 +- .../transports/grpc_asyncio.py | 13 +- .../project_service/transports/rest.py | 5 +- .../services/rank_service/async_client.py | 8 +- .../services/rank_service/client.py | 8 +- .../services/rank_service/transports/base.py | 11 +- .../services/rank_service/transports/rest.py | 6 +- .../recommendation_service/transports/base.py | 11 +- .../sample_query_service/async_client.py | 196 ++- .../services/sample_query_service/client.py | 196 ++- .../sample_query_service/transports/base.py | 11 +- .../sample_query_service/transports/grpc.py | 30 +- .../transports/grpc_asyncio.py | 30 +- .../sample_query_service/transports/rest.py | 24 +- .../sample_query_set_service/async_client.py | 163 +- .../sample_query_set_service/client.py | 163 +- .../transports/base.py | 11 +- .../transports/grpc.py | 18 +- .../transports/grpc_asyncio.py | 18 +- .../transports/rest.py | 21 +- .../services/schema_service/async_client.py | 128 +- .../services/schema_service/client.py | 128 +- .../schema_service/transports/base.py | 11 +- .../schema_service/transports/grpc.py | 20 +- .../schema_service/transports/grpc_asyncio.py | 20 +- .../schema_service/transports/rest.py | 22 +- .../services/search_service/async_client.py | 51 +- .../services/search_service/client.py | 51 +- .../search_service/transports/base.py | 11 +- .../search_service/transports/grpc.py | 29 +- .../search_service/transports/grpc_asyncio.py | 29 +- .../search_service/transports/rest.py | 12 +- .../search_tuning_service/async_client.py | 27 +- .../services/search_tuning_service/client.py | 27 +- .../search_tuning_service/transports/base.py | 11 +- .../search_tuning_service/transports/rest.py | 9 +- .../serving_config_service/async_client.py | 26 +- .../services/serving_config_service/client.py | 26 +- .../serving_config_service/transports/base.py | 11 +- .../serving_config_service/transports/grpc.py | 6 +- .../transports/grpc_asyncio.py | 6 +- .../serving_config_service/transports/rest.py | 3 +- .../services/session_service/async_client.py | 48 +- .../services/session_service/client.py | 48 +- .../session_service/transports/base.py | 11 +- .../session_service/transports/grpc.py | 21 +- .../transports/grpc_asyncio.py | 21 +- .../async_client.py | 380 +++-- .../site_search_engine_service/client.py | 380 +++-- .../transports/base.py | 11 +- .../transports/grpc.py | 49 +- .../transports/grpc_asyncio.py | 49 +- .../transports/rest.py | 54 +- .../user_event_service/async_client.py | 135 +- .../services/user_event_service/client.py | 111 +- .../user_event_service/transports/base.py | 11 +- .../user_event_service/transports/rest.py | 62 +- .../discoveryengine_v1beta/types/answer.py | 8 +- .../discoveryengine_v1beta/types/chunk.py | 53 +- .../discoveryengine_v1beta/types/common.py | 96 +- .../types/completion.py | 7 +- .../types/completion_service.py | 243 +-- .../discoveryengine_v1beta/types/control.py | 71 +- .../types/control_service.py | 49 +- .../types/conversation.py | 3 +- .../types/conversational_search_service.py | 578 ++++--- .../types/custom_tuning_model.py | 17 +- .../types/data_store.py | 125 +- .../types/data_store_service.py | 189 ++- .../discoveryengine_v1beta/types/document.py | 119 +- .../types/document_processing_config.py | 66 +- .../types/document_service.py | 246 +-- .../discoveryengine_v1beta/types/engine.py | 183 ++- .../types/engine_service.py | 127 +- .../types/evaluation.py | 189 ++- .../types/evaluation_service.py | 159 +- .../types/grounded_generation_service.py | 203 ++- .../discoveryengine_v1beta/types/grounding.py | 11 +- .../types/import_config.py | 504 +++--- .../discoveryengine_v1beta/types/project.py | 36 +- .../types/project_service.py | 25 +- .../types/purge_config.py | 143 +- .../types/rank_service.py | 93 +- .../types/recommendation_service.py | 241 +-- .../types/sample_query.py | 18 +- .../types/sample_query_service.py | 149 +- .../types/sample_query_set.py | 13 +- .../types/sample_query_set_service.py | 148 +- .../discoveryengine_v1beta/types/schema.py | 8 +- .../types/schema_service.py | 111 +- .../types/search_service.py | 1418 +++++++++-------- .../types/search_tuning_service.py | 116 +- .../types/serving_config.py | 291 ++-- .../types/serving_config_service.py | 17 +- .../discoveryengine_v1beta/types/session.py | 10 +- .../types/site_search_engine.py | 48 +- .../types/site_search_engine_service.py | 351 ++-- .../types/user_event.py | 602 ++++--- .../types/user_event_service.py | 26 +- .../google-cloud-discoveryengine/mypy.ini | 2 +- ...adata_google.cloud.discoveryengine.v1.json | 2 +- ..._google.cloud.discoveryengine.v1alpha.json | 2 +- ...a_google.cloud.discoveryengine.v1beta.json | 2 +- 473 files changed, 23561 insertions(+), 16716 deletions(-) create mode 100644 .librarian/generate-request.json diff --git a/.librarian/generate-request.json b/.librarian/generate-request.json new file mode 100644 index 000000000000..205c69a29519 --- /dev/null +++ b/.librarian/generate-request.json @@ -0,0 +1,32 @@ +{ + "id": "google-cloud-discoveryengine", + "version": "0.4.0", + "apis": [ + { + "path": "google/cloud/discoveryengine/v1", + "service_config": "discoveryengine_v1.yaml" + }, + { + "path": "google/cloud/discoveryengine/v1beta", + "service_config": "discoveryengine_v1beta.yaml" + }, + { + "path": "google/cloud/discoveryengine/v1alpha", + "service_config": "discoveryengine_v1alpha.yaml" + } + ], + "source_roots": [ + "packages/google-cloud-discoveryengine" + ], + "preserve_regex": [ + "packages/google-cloud-discoveryengine/CHANGELOG.md", + "docs/CHANGELOG.md", + "samples/README.txt", + "samples/snippets/README.rst", + "tests/system" + ], + "remove_regex": [ + "packages/google-cloud-discoveryengine/" + ], + "tag_format": "{id}-v{version}" +} \ No newline at end of file diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine/gapic_version.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine/gapic_version.py index be6c08cee3cf..fd79d4e761b7 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine/gapic_version.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.16.0" # {x-release-please-version} +__version__ = "0.4.0" # {x-release-please-version} diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/gapic_version.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/gapic_version.py index be6c08cee3cf..fd79d4e761b7 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/gapic_version.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.16.0" # {x-release-please-version} +__version__ = "0.4.0" # {x-release-please-version} diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/assistant_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/assistant_service/async_client.py index 53976232bc61..ae7425821392 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/assistant_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/assistant_service/async_client.py @@ -345,7 +345,8 @@ async def sample_stream_assist(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.StreamAssistRequest, dict]]): The request object. Request for the - [AssistantService.StreamAssist][google.cloud.discoveryengine.v1.AssistantService.StreamAssist] + `AssistantService.StreamAssist + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -358,8 +359,9 @@ async def sample_stream_assist(): Returns: AsyncIterable[google.cloud.discoveryengine_v1.types.StreamAssistResponse]: Response for the - [AssistantService.StreamAssist][google.cloud.discoveryengine.v1.AssistantService.StreamAssist] - method. + `AssistantService.StreamAssist + `__ + method. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/assistant_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/assistant_service/client.py index 630d3a11bff2..d2be55daa688 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/assistant_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/assistant_service/client.py @@ -880,7 +880,8 @@ def sample_stream_assist(): Args: request (Union[google.cloud.discoveryengine_v1.types.StreamAssistRequest, dict]): The request object. Request for the - [AssistantService.StreamAssist][google.cloud.discoveryengine.v1.AssistantService.StreamAssist] + `AssistantService.StreamAssist + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -893,8 +894,9 @@ def sample_stream_assist(): Returns: Iterable[google.cloud.discoveryengine_v1.types.StreamAssistResponse]: Response for the - [AssistantService.StreamAssist][google.cloud.discoveryengine.v1.AssistantService.StreamAssist] - method. + `AssistantService.StreamAssist + `__ + method. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/assistant_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/assistant_service/transports/base.py index 31a7cf2f8929..cdfff30d1a48 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/assistant_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/assistant_service/transports/base.py @@ -84,8 +84,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -100,11 +98,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/assistant_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/assistant_service/transports/rest.py index 49ba60e14f26..01b2ba3a50fc 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/assistant_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/assistant_service/transports/rest.py @@ -343,7 +343,8 @@ def __call__( Args: request (~.assistant_service.StreamAssistRequest): The request object. Request for the - [AssistantService.StreamAssist][google.cloud.discoveryengine.v1.AssistantService.StreamAssist] + `AssistantService.StreamAssist + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -356,7 +357,8 @@ def __call__( Returns: ~.assistant_service.StreamAssistResponse: Response for the - [AssistantService.StreamAssist][google.cloud.discoveryengine.v1.AssistantService.StreamAssist] + `AssistantService.StreamAssist + `__ method. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/cmek_config_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/cmek_config_service/async_client.py index a5e23bae15a0..d0d328de4c99 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/cmek_config_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/cmek_config_service/async_client.py @@ -379,12 +379,13 @@ async def sample_update_cmek_config(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be + An object representing a long-running + operation. + The result type for the operation will + be :class:`google.cloud.discoveryengine_v1.types.CmekConfig` - Configurations used to enable CMEK data encryption with - Cloud KMS keys. + Configurations used to enable CMEK data + encryption with Cloud KMS keys. """ # Create or coerce a protobuf request object. @@ -455,8 +456,8 @@ async def get_cmek_config( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> cmek_config_service.CmekConfig: - r"""Gets the - [CmekConfig][google.cloud.discoveryengine.v1.CmekConfig]. + r"""Gets the `CmekConfig + `__. .. code-block:: python @@ -490,14 +491,17 @@ async def sample_get_cmek_config(): GetCmekConfigRequest method. name (:class:`str`): Required. Resource name of - [CmekConfig][google.cloud.discoveryengine.v1.CmekConfig], - such as ``projects/*/locations/*/cmekConfig`` or + `CmekConfig + `__, + such as + ``projects/*/locations/*/cmekConfig`` or ``projects/*/locations/*/cmekConfigs/*``. - If the caller does not have permission to access the - [CmekConfig][google.cloud.discoveryengine.v1.CmekConfig], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to access the `CmekConfig + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -576,8 +580,8 @@ async def list_cmek_configs( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> cmek_config_service.ListCmekConfigsResponse: - r"""Lists all the - [CmekConfig][google.cloud.discoveryengine.v1.CmekConfig]s with + r"""Lists all the `CmekConfig + `__s with the project. .. code-block:: python @@ -609,17 +613,20 @@ async def sample_list_cmek_configs(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.ListCmekConfigsRequest, dict]]): The request object. Request message for - [CmekConfigService.ListCmekConfigs][google.cloud.discoveryengine.v1.CmekConfigService.ListCmekConfigs] + `CmekConfigService.ListCmekConfigs + `__ method. parent (:class:`str`): - Required. The parent location resource name, such as + Required. The parent location resource + name, such as ``projects/{project}/locations/{location}``. - If the caller does not have permission to list - [CmekConfig][google.cloud.discoveryengine.v1.CmekConfig]s - under this location, regardless of whether or not a - CmekConfig exists, a PERMISSION_DENIED error is - returned. + If the caller does not have permission + to list `CmekConfig + `__s + under this location, regardless of + whether or not a CmekConfig exists, a + PERMISSION_DENIED error is returned. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -635,8 +642,9 @@ async def sample_list_cmek_configs(): Returns: google.cloud.discoveryengine_v1.types.ListCmekConfigsResponse: Response message for - [CmekConfigService.ListCmekConfigs][google.cloud.discoveryengine.v1.CmekConfigService.ListCmekConfigs] - method. + `CmekConfigService.ListCmekConfigs + `__ + method. """ # Create or coerce a protobuf request object. @@ -734,11 +742,13 @@ async def sample_delete_cmek_config(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.DeleteCmekConfigRequest, dict]]): The request object. Request message for - [CmekConfigService.DeleteCmekConfig][google.cloud.discoveryengine.v1.CmekConfigService.DeleteCmekConfig] + `CmekConfigService.DeleteCmekConfig + `__ method. name (:class:`str`): Required. The resource name of the - [CmekConfig][google.cloud.discoveryengine.v1.CmekConfig] + `CmekConfig + `__ to delete, such as ``projects/{project}/locations/{location}/cmekConfigs/{cmek_config}``. @@ -755,18 +765,21 @@ async def sample_delete_cmek_config(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.protobuf.empty_pb2.Empty` A generic empty message that you can re-use to avoid defining duplicated - empty messages in your APIs. A typical example is to - use it as the request or the response type of an API - method. For instance: - - service Foo { - rpc Bar(google.protobuf.Empty) returns - (google.protobuf.Empty); - - } + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.protobuf.empty_pb2.Empty` + A generic empty message that you can + re-use to avoid defining duplicated + empty messages in your APIs. A typical + example is to use it as the request or + the response type of an API method. For + instance: + + service Foo { + rpc Bar(google.protobuf.Empty) + returns (google.protobuf.Empty); } """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/cmek_config_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/cmek_config_service/client.py index 1b5797c9c413..bda0ec783131 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/cmek_config_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/cmek_config_service/client.py @@ -871,12 +871,13 @@ def sample_update_cmek_config(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be + An object representing a long-running + operation. + The result type for the operation will + be :class:`google.cloud.discoveryengine_v1.types.CmekConfig` - Configurations used to enable CMEK data encryption with - Cloud KMS keys. + Configurations used to enable CMEK data + encryption with Cloud KMS keys. """ # Create or coerce a protobuf request object. @@ -944,8 +945,8 @@ def get_cmek_config( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> cmek_config_service.CmekConfig: - r"""Gets the - [CmekConfig][google.cloud.discoveryengine.v1.CmekConfig]. + r"""Gets the `CmekConfig + `__. .. code-block:: python @@ -979,14 +980,17 @@ def sample_get_cmek_config(): GetCmekConfigRequest method. name (str): Required. Resource name of - [CmekConfig][google.cloud.discoveryengine.v1.CmekConfig], - such as ``projects/*/locations/*/cmekConfig`` or + `CmekConfig + `__, + such as + ``projects/*/locations/*/cmekConfig`` or ``projects/*/locations/*/cmekConfigs/*``. - If the caller does not have permission to access the - [CmekConfig][google.cloud.discoveryengine.v1.CmekConfig], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to access the `CmekConfig + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1062,8 +1066,8 @@ def list_cmek_configs( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> cmek_config_service.ListCmekConfigsResponse: - r"""Lists all the - [CmekConfig][google.cloud.discoveryengine.v1.CmekConfig]s with + r"""Lists all the `CmekConfig + `__s with the project. .. code-block:: python @@ -1095,17 +1099,20 @@ def sample_list_cmek_configs(): Args: request (Union[google.cloud.discoveryengine_v1.types.ListCmekConfigsRequest, dict]): The request object. Request message for - [CmekConfigService.ListCmekConfigs][google.cloud.discoveryengine.v1.CmekConfigService.ListCmekConfigs] + `CmekConfigService.ListCmekConfigs + `__ method. parent (str): - Required. The parent location resource name, such as + Required. The parent location resource + name, such as ``projects/{project}/locations/{location}``. - If the caller does not have permission to list - [CmekConfig][google.cloud.discoveryengine.v1.CmekConfig]s - under this location, regardless of whether or not a - CmekConfig exists, a PERMISSION_DENIED error is - returned. + If the caller does not have permission + to list `CmekConfig + `__s + under this location, regardless of + whether or not a CmekConfig exists, a + PERMISSION_DENIED error is returned. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -1121,8 +1128,9 @@ def sample_list_cmek_configs(): Returns: google.cloud.discoveryengine_v1.types.ListCmekConfigsResponse: Response message for - [CmekConfigService.ListCmekConfigs][google.cloud.discoveryengine.v1.CmekConfigService.ListCmekConfigs] - method. + `CmekConfigService.ListCmekConfigs + `__ + method. """ # Create or coerce a protobuf request object. @@ -1217,11 +1225,13 @@ def sample_delete_cmek_config(): Args: request (Union[google.cloud.discoveryengine_v1.types.DeleteCmekConfigRequest, dict]): The request object. Request message for - [CmekConfigService.DeleteCmekConfig][google.cloud.discoveryengine.v1.CmekConfigService.DeleteCmekConfig] + `CmekConfigService.DeleteCmekConfig + `__ method. name (str): Required. The resource name of the - [CmekConfig][google.cloud.discoveryengine.v1.CmekConfig] + `CmekConfig + `__ to delete, such as ``projects/{project}/locations/{location}/cmekConfigs/{cmek_config}``. @@ -1238,18 +1248,21 @@ def sample_delete_cmek_config(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.protobuf.empty_pb2.Empty` A generic empty message that you can re-use to avoid defining duplicated - empty messages in your APIs. A typical example is to - use it as the request or the response type of an API - method. For instance: - - service Foo { - rpc Bar(google.protobuf.Empty) returns - (google.protobuf.Empty); - - } + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.protobuf.empty_pb2.Empty` + A generic empty message that you can + re-use to avoid defining duplicated + empty messages in your APIs. A typical + example is to use it as the request or + the response type of an API method. For + instance: + + service Foo { + rpc Bar(google.protobuf.Empty) + returns (google.protobuf.Empty); } """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/cmek_config_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/cmek_config_service/transports/base.py index bf56c1dc0d97..150ff4702bab 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/cmek_config_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/cmek_config_service/transports/base.py @@ -84,8 +84,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -100,11 +98,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/cmek_config_service/transports/grpc.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/cmek_config_service/transports/grpc.py index a51541d73d1b..796f502f8326 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/cmek_config_service/transports/grpc.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/cmek_config_service/transports/grpc.py @@ -380,8 +380,8 @@ def get_cmek_config( ]: r"""Return a callable for the get cmek config method over gRPC. - Gets the - [CmekConfig][google.cloud.discoveryengine.v1.CmekConfig]. + Gets the `CmekConfig + `__. Returns: Callable[[~.GetCmekConfigRequest], @@ -410,8 +410,8 @@ def list_cmek_configs( ]: r"""Return a callable for the list cmek configs method over gRPC. - Lists all the - [CmekConfig][google.cloud.discoveryengine.v1.CmekConfig]s with + Lists all the `CmekConfig + `__s with the project. Returns: diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/cmek_config_service/transports/grpc_asyncio.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/cmek_config_service/transports/grpc_asyncio.py index 2e31add97da0..527945772f74 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/cmek_config_service/transports/grpc_asyncio.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/cmek_config_service/transports/grpc_asyncio.py @@ -390,8 +390,8 @@ def get_cmek_config( ]: r"""Return a callable for the get cmek config method over gRPC. - Gets the - [CmekConfig][google.cloud.discoveryengine.v1.CmekConfig]. + Gets the `CmekConfig + `__. Returns: Callable[[~.GetCmekConfigRequest], @@ -420,8 +420,8 @@ def list_cmek_configs( ]: r"""Return a callable for the list cmek configs method over gRPC. - Lists all the - [CmekConfig][google.cloud.discoveryengine.v1.CmekConfig]s with + Lists all the `CmekConfig + `__s with the project. Returns: diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/cmek_config_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/cmek_config_service/transports/rest.py index 43ffa1c6f925..77d2d997b008 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/cmek_config_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/cmek_config_service/transports/rest.py @@ -697,7 +697,8 @@ def __call__( Args: request (~.cmek_config_service.DeleteCmekConfigRequest): The request object. Request message for - [CmekConfigService.DeleteCmekConfig][google.cloud.discoveryengine.v1.CmekConfigService.DeleteCmekConfig] + `CmekConfigService.DeleteCmekConfig + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -995,7 +996,8 @@ def __call__( Args: request (~.cmek_config_service.ListCmekConfigsRequest): The request object. Request message for - [CmekConfigService.ListCmekConfigs][google.cloud.discoveryengine.v1.CmekConfigService.ListCmekConfigs] + `CmekConfigService.ListCmekConfigs + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1008,7 +1010,8 @@ def __call__( Returns: ~.cmek_config_service.ListCmekConfigsResponse: Response message for - [CmekConfigService.ListCmekConfigs][google.cloud.discoveryengine.v1.CmekConfigService.ListCmekConfigs] + `CmekConfigService.ListCmekConfigs + `__ method. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/completion_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/completion_service/async_client.py index 31704e8c8267..1285779b167a 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/completion_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/completion_service/async_client.py @@ -340,7 +340,8 @@ async def sample_complete_query(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.CompleteQueryRequest, dict]]): The request object. Request message for - [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1.CompletionService.CompleteQuery] + `CompletionService.CompleteQuery + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -353,8 +354,9 @@ async def sample_complete_query(): Returns: google.cloud.discoveryengine_v1.types.CompleteQueryResponse: Response message for - [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1.CompletionService.CompleteQuery] - method. + `CompletionService.CompleteQuery + `__ + method. """ # Create or coerce a protobuf request object. @@ -402,7 +404,8 @@ async def import_suggestion_deny_list_entries( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: r"""Imports all - [SuggestionDenyListEntry][google.cloud.discoveryengine.v1.SuggestionDenyListEntry] + `SuggestionDenyListEntry + `__ for a DataStore. .. code-block:: python @@ -443,7 +446,8 @@ async def sample_import_suggestion_deny_list_entries(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.ImportSuggestionDenyListEntriesRequest, dict]]): The request object. Request message for - [CompletionService.ImportSuggestionDenyListEntries][google.cloud.discoveryengine.v1.CompletionService.ImportSuggestionDenyListEntries] + `CompletionService.ImportSuggestionDenyListEntries + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -455,11 +459,15 @@ async def sample_import_suggestion_deny_list_entries(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1.types.ImportSuggestionDenyListEntriesResponse` Response message for - [CompletionService.ImportSuggestionDenyListEntries][google.cloud.discoveryengine.v1.CompletionService.ImportSuggestionDenyListEntries] - method. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1.types.ImportSuggestionDenyListEntriesResponse` + Response message for + `CompletionService.ImportSuggestionDenyListEntries + `__ + method. """ # Create or coerce a protobuf request object. @@ -515,7 +523,8 @@ async def purge_suggestion_deny_list_entries( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: r"""Permanently deletes all - [SuggestionDenyListEntry][google.cloud.discoveryengine.v1.SuggestionDenyListEntry] + `SuggestionDenyListEntry + `__ for a DataStore. .. code-block:: python @@ -551,7 +560,8 @@ async def sample_purge_suggestion_deny_list_entries(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.PurgeSuggestionDenyListEntriesRequest, dict]]): The request object. Request message for - [CompletionService.PurgeSuggestionDenyListEntries][google.cloud.discoveryengine.v1.CompletionService.PurgeSuggestionDenyListEntries] + `CompletionService.PurgeSuggestionDenyListEntries + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -563,11 +573,15 @@ async def sample_purge_suggestion_deny_list_entries(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1.types.PurgeSuggestionDenyListEntriesResponse` Response message for - [CompletionService.PurgeSuggestionDenyListEntries][google.cloud.discoveryengine.v1.CompletionService.PurgeSuggestionDenyListEntries] - method. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1.types.PurgeSuggestionDenyListEntriesResponse` + Response message for + `CompletionService.PurgeSuggestionDenyListEntries + `__ + method. """ # Create or coerce a protobuf request object. @@ -621,7 +635,8 @@ async def import_completion_suggestions( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: r"""Imports - [CompletionSuggestion][google.cloud.discoveryengine.v1.CompletionSuggestion]s + `CompletionSuggestion + `__s for a DataStore. .. code-block:: python @@ -662,7 +677,8 @@ async def sample_import_completion_suggestions(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.ImportCompletionSuggestionsRequest, dict]]): The request object. Request message for - [CompletionService.ImportCompletionSuggestions][google.cloud.discoveryengine.v1.CompletionService.ImportCompletionSuggestions] + `CompletionService.ImportCompletionSuggestions + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -674,14 +690,18 @@ async def sample_import_completion_suggestions(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1.types.ImportCompletionSuggestionsResponse` Response of the - [CompletionService.ImportCompletionSuggestions][google.cloud.discoveryengine.v1.CompletionService.ImportCompletionSuggestions] - method. If the long running operation is done, this - message is returned by the - google.longrunning.Operations.response field if the - operation is successful. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1.types.ImportCompletionSuggestionsResponse` + Response of the + `CompletionService.ImportCompletionSuggestions + `__ + method. If the long running operation is + done, this message is returned by the + google.longrunning.Operations.response + field if the operation is successful. """ # Create or coerce a protobuf request object. @@ -735,7 +755,8 @@ async def purge_completion_suggestions( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: r"""Permanently deletes all - [CompletionSuggestion][google.cloud.discoveryengine.v1.CompletionSuggestion]s + `CompletionSuggestion + `__s for a DataStore. .. code-block:: python @@ -771,7 +792,8 @@ async def sample_purge_completion_suggestions(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.PurgeCompletionSuggestionsRequest, dict]]): The request object. Request message for - [CompletionService.PurgeCompletionSuggestions][google.cloud.discoveryengine.v1.CompletionService.PurgeCompletionSuggestions] + `CompletionService.PurgeCompletionSuggestions + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -783,11 +805,15 @@ async def sample_purge_completion_suggestions(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1.types.PurgeCompletionSuggestionsResponse` Response message for - [CompletionService.PurgeCompletionSuggestions][google.cloud.discoveryengine.v1.CompletionService.PurgeCompletionSuggestions] - method. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1.types.PurgeCompletionSuggestionsResponse` + Response message for + `CompletionService.PurgeCompletionSuggestions + `__ + method. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/completion_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/completion_service/client.py index 4ac1c92ed1fe..29cc65924076 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/completion_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/completion_service/client.py @@ -782,7 +782,8 @@ def sample_complete_query(): Args: request (Union[google.cloud.discoveryengine_v1.types.CompleteQueryRequest, dict]): The request object. Request message for - [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1.CompletionService.CompleteQuery] + `CompletionService.CompleteQuery + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -795,8 +796,9 @@ def sample_complete_query(): Returns: google.cloud.discoveryengine_v1.types.CompleteQueryResponse: Response message for - [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1.CompletionService.CompleteQuery] - method. + `CompletionService.CompleteQuery + `__ + method. """ # Create or coerce a protobuf request object. @@ -842,7 +844,8 @@ def import_suggestion_deny_list_entries( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: r"""Imports all - [SuggestionDenyListEntry][google.cloud.discoveryengine.v1.SuggestionDenyListEntry] + `SuggestionDenyListEntry + `__ for a DataStore. .. code-block:: python @@ -883,7 +886,8 @@ def sample_import_suggestion_deny_list_entries(): Args: request (Union[google.cloud.discoveryengine_v1.types.ImportSuggestionDenyListEntriesRequest, dict]): The request object. Request message for - [CompletionService.ImportSuggestionDenyListEntries][google.cloud.discoveryengine.v1.CompletionService.ImportSuggestionDenyListEntries] + `CompletionService.ImportSuggestionDenyListEntries + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -895,11 +899,15 @@ def sample_import_suggestion_deny_list_entries(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1.types.ImportSuggestionDenyListEntriesResponse` Response message for - [CompletionService.ImportSuggestionDenyListEntries][google.cloud.discoveryengine.v1.CompletionService.ImportSuggestionDenyListEntries] - method. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1.types.ImportSuggestionDenyListEntriesResponse` + Response message for + `CompletionService.ImportSuggestionDenyListEntries + `__ + method. """ # Create or coerce a protobuf request object. @@ -955,7 +963,8 @@ def purge_suggestion_deny_list_entries( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: r"""Permanently deletes all - [SuggestionDenyListEntry][google.cloud.discoveryengine.v1.SuggestionDenyListEntry] + `SuggestionDenyListEntry + `__ for a DataStore. .. code-block:: python @@ -991,7 +1000,8 @@ def sample_purge_suggestion_deny_list_entries(): Args: request (Union[google.cloud.discoveryengine_v1.types.PurgeSuggestionDenyListEntriesRequest, dict]): The request object. Request message for - [CompletionService.PurgeSuggestionDenyListEntries][google.cloud.discoveryengine.v1.CompletionService.PurgeSuggestionDenyListEntries] + `CompletionService.PurgeSuggestionDenyListEntries + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1003,11 +1013,15 @@ def sample_purge_suggestion_deny_list_entries(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1.types.PurgeSuggestionDenyListEntriesResponse` Response message for - [CompletionService.PurgeSuggestionDenyListEntries][google.cloud.discoveryengine.v1.CompletionService.PurgeSuggestionDenyListEntries] - method. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1.types.PurgeSuggestionDenyListEntriesResponse` + Response message for + `CompletionService.PurgeSuggestionDenyListEntries + `__ + method. """ # Create or coerce a protobuf request object. @@ -1061,7 +1075,8 @@ def import_completion_suggestions( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: r"""Imports - [CompletionSuggestion][google.cloud.discoveryengine.v1.CompletionSuggestion]s + `CompletionSuggestion + `__s for a DataStore. .. code-block:: python @@ -1102,7 +1117,8 @@ def sample_import_completion_suggestions(): Args: request (Union[google.cloud.discoveryengine_v1.types.ImportCompletionSuggestionsRequest, dict]): The request object. Request message for - [CompletionService.ImportCompletionSuggestions][google.cloud.discoveryengine.v1.CompletionService.ImportCompletionSuggestions] + `CompletionService.ImportCompletionSuggestions + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1114,14 +1130,18 @@ def sample_import_completion_suggestions(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1.types.ImportCompletionSuggestionsResponse` Response of the - [CompletionService.ImportCompletionSuggestions][google.cloud.discoveryengine.v1.CompletionService.ImportCompletionSuggestions] - method. If the long running operation is done, this - message is returned by the - google.longrunning.Operations.response field if the - operation is successful. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1.types.ImportCompletionSuggestionsResponse` + Response of the + `CompletionService.ImportCompletionSuggestions + `__ + method. If the long running operation is + done, this message is returned by the + google.longrunning.Operations.response + field if the operation is successful. """ # Create or coerce a protobuf request object. @@ -1175,7 +1195,8 @@ def purge_completion_suggestions( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: r"""Permanently deletes all - [CompletionSuggestion][google.cloud.discoveryengine.v1.CompletionSuggestion]s + `CompletionSuggestion + `__s for a DataStore. .. code-block:: python @@ -1211,7 +1232,8 @@ def sample_purge_completion_suggestions(): Args: request (Union[google.cloud.discoveryengine_v1.types.PurgeCompletionSuggestionsRequest, dict]): The request object. Request message for - [CompletionService.PurgeCompletionSuggestions][google.cloud.discoveryengine.v1.CompletionService.PurgeCompletionSuggestions] + `CompletionService.PurgeCompletionSuggestions + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1223,11 +1245,15 @@ def sample_purge_completion_suggestions(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1.types.PurgeCompletionSuggestionsResponse` Response message for - [CompletionService.PurgeCompletionSuggestions][google.cloud.discoveryengine.v1.CompletionService.PurgeCompletionSuggestions] - method. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1.types.PurgeCompletionSuggestionsResponse` + Response message for + `CompletionService.PurgeCompletionSuggestions + `__ + method. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/completion_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/completion_service/transports/base.py index 6f8d8a682797..1bebe5ff3d97 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/completion_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/completion_service/transports/base.py @@ -88,8 +88,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -104,11 +102,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/completion_service/transports/grpc.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/completion_service/transports/grpc.py index 0901a44674cb..39b9231db48b 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/completion_service/transports/grpc.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/completion_service/transports/grpc.py @@ -384,7 +384,8 @@ def import_suggestion_deny_list_entries( entries method over gRPC. Imports all - [SuggestionDenyListEntry][google.cloud.discoveryengine.v1.SuggestionDenyListEntry] + `SuggestionDenyListEntry + `__ for a DataStore. Returns: @@ -417,7 +418,8 @@ def purge_suggestion_deny_list_entries( entries method over gRPC. Permanently deletes all - [SuggestionDenyListEntry][google.cloud.discoveryengine.v1.SuggestionDenyListEntry] + `SuggestionDenyListEntry + `__ for a DataStore. Returns: @@ -449,7 +451,8 @@ def import_completion_suggestions( r"""Return a callable for the import completion suggestions method over gRPC. Imports - [CompletionSuggestion][google.cloud.discoveryengine.v1.CompletionSuggestion]s + `CompletionSuggestion + `__s for a DataStore. Returns: @@ -481,7 +484,8 @@ def purge_completion_suggestions( r"""Return a callable for the purge completion suggestions method over gRPC. Permanently deletes all - [CompletionSuggestion][google.cloud.discoveryengine.v1.CompletionSuggestion]s + `CompletionSuggestion + `__s for a DataStore. Returns: diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/completion_service/transports/grpc_asyncio.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/completion_service/transports/grpc_asyncio.py index 7ac71da82875..870647b0e814 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/completion_service/transports/grpc_asyncio.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/completion_service/transports/grpc_asyncio.py @@ -393,7 +393,8 @@ def import_suggestion_deny_list_entries( entries method over gRPC. Imports all - [SuggestionDenyListEntry][google.cloud.discoveryengine.v1.SuggestionDenyListEntry] + `SuggestionDenyListEntry + `__ for a DataStore. Returns: @@ -427,7 +428,8 @@ def purge_suggestion_deny_list_entries( entries method over gRPC. Permanently deletes all - [SuggestionDenyListEntry][google.cloud.discoveryengine.v1.SuggestionDenyListEntry] + `SuggestionDenyListEntry + `__ for a DataStore. Returns: @@ -460,7 +462,8 @@ def import_completion_suggestions( r"""Return a callable for the import completion suggestions method over gRPC. Imports - [CompletionSuggestion][google.cloud.discoveryengine.v1.CompletionSuggestion]s + `CompletionSuggestion + `__s for a DataStore. Returns: @@ -493,7 +496,8 @@ def purge_completion_suggestions( r"""Return a callable for the purge completion suggestions method over gRPC. Permanently deletes all - [CompletionSuggestion][google.cloud.discoveryengine.v1.CompletionSuggestion]s + `CompletionSuggestion + `__s for a DataStore. Returns: diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/completion_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/completion_service/transports/rest.py index 828892b07ea0..224128c443bb 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/completion_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/completion_service/transports/rest.py @@ -757,7 +757,8 @@ def __call__( Args: request (~.completion_service.CompleteQueryRequest): The request object. Request message for - [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1.CompletionService.CompleteQuery] + `CompletionService.CompleteQuery + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -770,7 +771,8 @@ def __call__( Returns: ~.completion_service.CompleteQueryResponse: Response message for - [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1.CompletionService.CompleteQuery] + `CompletionService.CompleteQuery + `__ method. """ @@ -911,7 +913,8 @@ def __call__( Args: request (~.import_config.ImportCompletionSuggestionsRequest): The request object. Request message for - [CompletionService.ImportCompletionSuggestions][google.cloud.discoveryengine.v1.CompletionService.ImportCompletionSuggestions] + `CompletionService.ImportCompletionSuggestions + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1073,7 +1076,8 @@ def __call__( Args: request (~.import_config.ImportSuggestionDenyListEntriesRequest): The request object. Request message for - [CompletionService.ImportSuggestionDenyListEntries][google.cloud.discoveryengine.v1.CompletionService.ImportSuggestionDenyListEntries] + `CompletionService.ImportSuggestionDenyListEntries + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1236,7 +1240,8 @@ def __call__( Args: request (~.purge_config.PurgeCompletionSuggestionsRequest): The request object. Request message for - [CompletionService.PurgeCompletionSuggestions][google.cloud.discoveryengine.v1.CompletionService.PurgeCompletionSuggestions] + `CompletionService.PurgeCompletionSuggestions + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1393,7 +1398,8 @@ def __call__( Args: request (~.purge_config.PurgeSuggestionDenyListEntriesRequest): The request object. Request message for - [CompletionService.PurgeSuggestionDenyListEntries][google.cloud.discoveryengine.v1.CompletionService.PurgeSuggestionDenyListEntries] + `CompletionService.PurgeSuggestionDenyListEntries + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/control_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/control_service/async_client.py index 6d551e10468e..f4bdb1ec81dc 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/control_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/control_service/async_client.py @@ -315,10 +315,11 @@ async def create_control( ) -> gcd_control.Control: r"""Creates a Control. - By default 1000 controls are allowed for a data store. A request - can be submitted to adjust this limit. If the - [Control][google.cloud.discoveryengine.v1.Control] to create - already exists, an ALREADY_EXISTS error is returned. + By default 1000 controls are allowed for a data store. A + request can be submitted to adjust this limit. If the + `Control `__ to + create already exists, an ALREADY_EXISTS error is + returned. .. code-block:: python @@ -359,8 +360,8 @@ async def sample_create_control(): request (Optional[Union[google.cloud.discoveryengine_v1.types.CreateControlRequest, dict]]): The request object. Request for CreateControl method. parent (:class:`str`): - Required. Full resource name of parent data store. - Format: + Required. Full resource name of parent + data store. Format: ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`` or ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}``. @@ -374,12 +375,13 @@ async def sample_create_control(): on the ``request`` instance; if ``request`` is provided, this should not be set. control_id (:class:`str`): - Required. The ID to use for the Control, which will - become the final component of the Control's resource - name. + Required. The ID to use for the Control, + which will become the final component of + the Control's resource name. - This value must be within 1-63 characters. Valid - characters are /[a-z][0-9]-\_/. + This value must be within 1-63 + characters. Valid characters are /`a-z + <0-9>`__-_/. This corresponds to the ``control_id`` field on the ``request`` instance; if ``request`` is provided, this @@ -394,11 +396,13 @@ async def sample_create_control(): Returns: google.cloud.discoveryengine_v1.types.Control: - Defines a conditioned behavior to employ during serving. - Must be attached to a - [ServingConfig][google.cloud.discoveryengine.v1.ServingConfig] - to be considered at serving time. Permitted actions - dependent on SolutionType. + Defines a conditioned behavior to employ + during serving. Must be attached to a + `ServingConfig + `__ + to be considered at serving time. + Permitted actions dependent on + ``SolutionType``. """ # Create or coerce a protobuf request object. @@ -465,8 +469,9 @@ async def delete_control( ) -> None: r"""Deletes a Control. - If the [Control][google.cloud.discoveryengine.v1.Control] to - delete does not exist, a NOT_FOUND error is returned. + If the `Control + `__ to delete + does not exist, a NOT_FOUND error is returned. .. code-block:: python @@ -495,8 +500,8 @@ async def sample_delete_control(): request (Optional[Union[google.cloud.discoveryengine_v1.types.DeleteControlRequest, dict]]): The request object. Request for DeleteControl method. name (:class:`str`): - Required. The resource name of the Control to delete. - Format: + Required. The resource name of the + Control to delete. Format: ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`` This corresponds to the ``name`` field @@ -568,9 +573,9 @@ async def update_control( ) -> gcd_control.Control: r"""Updates a Control. - [Control][google.cloud.discoveryengine.v1.Control] action type - cannot be changed. If the - [Control][google.cloud.discoveryengine.v1.Control] to update + `Control `__ + action type cannot be changed. If the `Control + `__ to update does not exist, a NOT_FOUND error is returned. .. code-block:: python @@ -615,14 +620,19 @@ async def sample_update_control(): on the ``request`` instance; if ``request`` is provided, this should not be set. update_mask (:class:`google.protobuf.field_mask_pb2.FieldMask`): - Optional. Indicates which fields in the provided - [Control][google.cloud.discoveryengine.v1.Control] to - update. The following are NOT supported: + Optional. Indicates which fields in the + provided `Control + `__ + to update. The following are NOT + supported: - - [Control.name][google.cloud.discoveryengine.v1.Control.name] - - [Control.solution_type][google.cloud.discoveryengine.v1.Control.solution_type] + * `Control.name + `__ + * `Control.solution_type + `__ - If not set or empty, all supported fields are updated. + If not set or empty, all supported + fields are updated. This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this @@ -637,11 +647,13 @@ async def sample_update_control(): Returns: google.cloud.discoveryengine_v1.types.Control: - Defines a conditioned behavior to employ during serving. - Must be attached to a - [ServingConfig][google.cloud.discoveryengine.v1.ServingConfig] - to be considered at serving time. Permitted actions - dependent on SolutionType. + Defines a conditioned behavior to employ + during serving. Must be attached to a + `ServingConfig + `__ + to be considered at serving time. + Permitted actions dependent on + ``SolutionType``. """ # Create or coerce a protobuf request object. @@ -738,8 +750,8 @@ async def sample_get_control(): request (Optional[Union[google.cloud.discoveryengine_v1.types.GetControlRequest, dict]]): The request object. Request for GetControl method. name (:class:`str`): - Required. The resource name of the Control to get. - Format: + Required. The resource name of the + Control to get. Format: ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`` This corresponds to the ``name`` field @@ -755,11 +767,13 @@ async def sample_get_control(): Returns: google.cloud.discoveryengine_v1.types.Control: - Defines a conditioned behavior to employ during serving. - Must be attached to a - [ServingConfig][google.cloud.discoveryengine.v1.ServingConfig] - to be considered at serving time. Permitted actions - dependent on SolutionType. + Defines a conditioned behavior to employ + during serving. Must be attached to a + `ServingConfig + `__ + to be considered at serving time. + Permitted actions dependent on + ``SolutionType``. """ # Create or coerce a protobuf request object. @@ -821,7 +835,8 @@ async def list_controls( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListControlsAsyncPager: r"""Lists all Controls by their parent - [DataStore][google.cloud.discoveryengine.v1.DataStore]. + `DataStore + `__. .. code-block:: python @@ -854,7 +869,8 @@ async def sample_list_controls(): request (Optional[Union[google.cloud.discoveryengine_v1.types.ListControlsRequest, dict]]): The request object. Request for ListControls method. parent (:class:`str`): - Required. The data store resource name. Format: + Required. The data store resource name. + Format: ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`` or ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}``. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/control_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/control_service/client.py index 80b06872c664..fabe92691e74 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/control_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/control_service/client.py @@ -802,10 +802,11 @@ def create_control( ) -> gcd_control.Control: r"""Creates a Control. - By default 1000 controls are allowed for a data store. A request - can be submitted to adjust this limit. If the - [Control][google.cloud.discoveryengine.v1.Control] to create - already exists, an ALREADY_EXISTS error is returned. + By default 1000 controls are allowed for a data store. A + request can be submitted to adjust this limit. If the + `Control `__ to + create already exists, an ALREADY_EXISTS error is + returned. .. code-block:: python @@ -846,8 +847,8 @@ def sample_create_control(): request (Union[google.cloud.discoveryengine_v1.types.CreateControlRequest, dict]): The request object. Request for CreateControl method. parent (str): - Required. Full resource name of parent data store. - Format: + Required. Full resource name of parent + data store. Format: ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`` or ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}``. @@ -861,12 +862,13 @@ def sample_create_control(): on the ``request`` instance; if ``request`` is provided, this should not be set. control_id (str): - Required. The ID to use for the Control, which will - become the final component of the Control's resource - name. + Required. The ID to use for the Control, + which will become the final component of + the Control's resource name. - This value must be within 1-63 characters. Valid - characters are /[a-z][0-9]-\_/. + This value must be within 1-63 + characters. Valid characters are /`a-z + <0-9>`__-_/. This corresponds to the ``control_id`` field on the ``request`` instance; if ``request`` is provided, this @@ -881,11 +883,13 @@ def sample_create_control(): Returns: google.cloud.discoveryengine_v1.types.Control: - Defines a conditioned behavior to employ during serving. - Must be attached to a - [ServingConfig][google.cloud.discoveryengine.v1.ServingConfig] - to be considered at serving time. Permitted actions - dependent on SolutionType. + Defines a conditioned behavior to employ + during serving. Must be attached to a + `ServingConfig + `__ + to be considered at serving time. + Permitted actions dependent on + ``SolutionType``. """ # Create or coerce a protobuf request object. @@ -949,8 +953,9 @@ def delete_control( ) -> None: r"""Deletes a Control. - If the [Control][google.cloud.discoveryengine.v1.Control] to - delete does not exist, a NOT_FOUND error is returned. + If the `Control + `__ to delete + does not exist, a NOT_FOUND error is returned. .. code-block:: python @@ -979,8 +984,8 @@ def sample_delete_control(): request (Union[google.cloud.discoveryengine_v1.types.DeleteControlRequest, dict]): The request object. Request for DeleteControl method. name (str): - Required. The resource name of the Control to delete. - Format: + Required. The resource name of the + Control to delete. Format: ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`` This corresponds to the ``name`` field @@ -1049,9 +1054,9 @@ def update_control( ) -> gcd_control.Control: r"""Updates a Control. - [Control][google.cloud.discoveryengine.v1.Control] action type - cannot be changed. If the - [Control][google.cloud.discoveryengine.v1.Control] to update + `Control `__ + action type cannot be changed. If the `Control + `__ to update does not exist, a NOT_FOUND error is returned. .. code-block:: python @@ -1096,14 +1101,19 @@ def sample_update_control(): on the ``request`` instance; if ``request`` is provided, this should not be set. update_mask (google.protobuf.field_mask_pb2.FieldMask): - Optional. Indicates which fields in the provided - [Control][google.cloud.discoveryengine.v1.Control] to - update. The following are NOT supported: + Optional. Indicates which fields in the + provided `Control + `__ + to update. The following are NOT + supported: - - [Control.name][google.cloud.discoveryengine.v1.Control.name] - - [Control.solution_type][google.cloud.discoveryengine.v1.Control.solution_type] + * `Control.name + `__ + * `Control.solution_type + `__ - If not set or empty, all supported fields are updated. + If not set or empty, all supported + fields are updated. This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this @@ -1118,11 +1128,13 @@ def sample_update_control(): Returns: google.cloud.discoveryengine_v1.types.Control: - Defines a conditioned behavior to employ during serving. - Must be attached to a - [ServingConfig][google.cloud.discoveryengine.v1.ServingConfig] - to be considered at serving time. Permitted actions - dependent on SolutionType. + Defines a conditioned behavior to employ + during serving. Must be attached to a + `ServingConfig + `__ + to be considered at serving time. + Permitted actions dependent on + ``SolutionType``. """ # Create or coerce a protobuf request object. @@ -1216,8 +1228,8 @@ def sample_get_control(): request (Union[google.cloud.discoveryengine_v1.types.GetControlRequest, dict]): The request object. Request for GetControl method. name (str): - Required. The resource name of the Control to get. - Format: + Required. The resource name of the + Control to get. Format: ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`` This corresponds to the ``name`` field @@ -1233,11 +1245,13 @@ def sample_get_control(): Returns: google.cloud.discoveryengine_v1.types.Control: - Defines a conditioned behavior to employ during serving. - Must be attached to a - [ServingConfig][google.cloud.discoveryengine.v1.ServingConfig] - to be considered at serving time. Permitted actions - dependent on SolutionType. + Defines a conditioned behavior to employ + during serving. Must be attached to a + `ServingConfig + `__ + to be considered at serving time. + Permitted actions dependent on + ``SolutionType``. """ # Create or coerce a protobuf request object. @@ -1296,7 +1310,8 @@ def list_controls( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListControlsPager: r"""Lists all Controls by their parent - [DataStore][google.cloud.discoveryengine.v1.DataStore]. + `DataStore + `__. .. code-block:: python @@ -1329,7 +1344,8 @@ def sample_list_controls(): request (Union[google.cloud.discoveryengine_v1.types.ListControlsRequest, dict]): The request object. Request for ListControls method. parent (str): - Required. The data store resource name. Format: + Required. The data store resource name. + Format: ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`` or ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}``. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/control_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/control_service/transports/base.py index ab04ccdaa6be..d9fab0fa79f7 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/control_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/control_service/transports/base.py @@ -87,8 +87,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -103,11 +101,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/control_service/transports/grpc.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/control_service/transports/grpc.py index feee03b815e0..6f3e9becb078 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/control_service/transports/grpc.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/control_service/transports/grpc.py @@ -337,10 +337,11 @@ def create_control( Creates a Control. - By default 1000 controls are allowed for a data store. A request - can be submitted to adjust this limit. If the - [Control][google.cloud.discoveryengine.v1.Control] to create - already exists, an ALREADY_EXISTS error is returned. + By default 1000 controls are allowed for a data store. A + request can be submitted to adjust this limit. If the + `Control `__ to + create already exists, an ALREADY_EXISTS error is + returned. Returns: Callable[[~.CreateControlRequest], @@ -368,8 +369,9 @@ def delete_control( Deletes a Control. - If the [Control][google.cloud.discoveryengine.v1.Control] to - delete does not exist, a NOT_FOUND error is returned. + If the `Control + `__ to delete + does not exist, a NOT_FOUND error is returned. Returns: Callable[[~.DeleteControlRequest], @@ -397,9 +399,9 @@ def update_control( Updates a Control. - [Control][google.cloud.discoveryengine.v1.Control] action type - cannot be changed. If the - [Control][google.cloud.discoveryengine.v1.Control] to update + `Control `__ + action type cannot be changed. If the `Control + `__ to update does not exist, a NOT_FOUND error is returned. Returns: @@ -455,7 +457,8 @@ def list_controls( r"""Return a callable for the list controls method over gRPC. Lists all Controls by their parent - [DataStore][google.cloud.discoveryengine.v1.DataStore]. + `DataStore + `__. Returns: Callable[[~.ListControlsRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/control_service/transports/grpc_asyncio.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/control_service/transports/grpc_asyncio.py index d1cd6f7eca62..1525918d8801 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/control_service/transports/grpc_asyncio.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/control_service/transports/grpc_asyncio.py @@ -347,10 +347,11 @@ def create_control( Creates a Control. - By default 1000 controls are allowed for a data store. A request - can be submitted to adjust this limit. If the - [Control][google.cloud.discoveryengine.v1.Control] to create - already exists, an ALREADY_EXISTS error is returned. + By default 1000 controls are allowed for a data store. A + request can be submitted to adjust this limit. If the + `Control `__ to + create already exists, an ALREADY_EXISTS error is + returned. Returns: Callable[[~.CreateControlRequest], @@ -378,8 +379,9 @@ def delete_control( Deletes a Control. - If the [Control][google.cloud.discoveryengine.v1.Control] to - delete does not exist, a NOT_FOUND error is returned. + If the `Control + `__ to delete + does not exist, a NOT_FOUND error is returned. Returns: Callable[[~.DeleteControlRequest], @@ -409,9 +411,9 @@ def update_control( Updates a Control. - [Control][google.cloud.discoveryengine.v1.Control] action type - cannot be changed. If the - [Control][google.cloud.discoveryengine.v1.Control] to update + `Control `__ + action type cannot be changed. If the `Control + `__ to update does not exist, a NOT_FOUND error is returned. Returns: @@ -468,7 +470,8 @@ def list_controls( r"""Return a callable for the list controls method over gRPC. Lists all Controls by their parent - [DataStore][google.cloud.discoveryengine.v1.DataStore]. + `DataStore + `__. Returns: Callable[[~.ListControlsRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/control_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/control_service/transports/rest.py index a25262b30968..f477824902a8 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/control_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/control_service/transports/rest.py @@ -537,11 +537,13 @@ def __call__( Returns: ~.gcd_control.Control: - Defines a conditioned behavior to employ during serving. - Must be attached to a - [ServingConfig][google.cloud.discoveryengine.v1.ServingConfig] - to be considered at serving time. Permitted actions - dependent on ``SolutionType``. + Defines a conditioned behavior to employ + during serving. Must be attached to a + `ServingConfig + `__ + to be considered at serving time. + Permitted actions dependent on + ``SolutionType``. """ @@ -797,11 +799,13 @@ def __call__( Returns: ~.control.Control: - Defines a conditioned behavior to employ during serving. - Must be attached to a - [ServingConfig][google.cloud.discoveryengine.v1.ServingConfig] - to be considered at serving time. Permitted actions - dependent on ``SolutionType``. + Defines a conditioned behavior to employ + during serving. Must be attached to a + `ServingConfig + `__ + to be considered at serving time. + Permitted actions dependent on + ``SolutionType``. """ @@ -1095,11 +1099,13 @@ def __call__( Returns: ~.gcd_control.Control: - Defines a conditioned behavior to employ during serving. - Must be attached to a - [ServingConfig][google.cloud.discoveryengine.v1.ServingConfig] - to be considered at serving time. Permitted actions - dependent on ``SolutionType``. + Defines a conditioned behavior to employ + during serving. Must be attached to a + `ServingConfig + `__ + to be considered at serving time. + Permitted actions dependent on + ``SolutionType``. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/conversational_search_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/conversational_search_service/async_client.py index f52112df7f9f..f6dae9d429e4 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/conversational_search_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/conversational_search_service/async_client.py @@ -394,17 +394,18 @@ async def sample_converse_conversation(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.ConverseConversationRequest, dict]]): The request object. Request message for - [ConversationalSearchService.ConverseConversation][google.cloud.discoveryengine.v1.ConversationalSearchService.ConverseConversation] + `ConversationalSearchService.ConverseConversation + `__ method. name (:class:`str`): - Required. The resource name of the Conversation to get. - Format: + Required. The resource name of the + Conversation to get. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}``. Use ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/-`` - to activate auto session mode, which automatically - creates a new conversation inside a ConverseConversation - session. + to activate auto session mode, which + automatically creates a new conversation + inside a ConverseConversation session. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -425,8 +426,9 @@ async def sample_converse_conversation(): Returns: google.cloud.discoveryengine_v1.types.ConverseConversationResponse: Response message for - [ConversationalSearchService.ConverseConversation][google.cloud.discoveryengine.v1.ConversationalSearchService.ConverseConversation] - method. + `ConversationalSearchService.ConverseConversation + `__ + method. """ # Create or coerce a protobuf request object. @@ -496,9 +498,10 @@ async def create_conversation( ) -> gcd_conversation.Conversation: r"""Creates a Conversation. - If the - [Conversation][google.cloud.discoveryengine.v1.Conversation] to - create already exists, an ALREADY_EXISTS error is returned. + If the `Conversation + `__ to + create already exists, an ALREADY_EXISTS error is + returned. .. code-block:: python @@ -531,8 +534,8 @@ async def sample_create_conversation(): The request object. Request for CreateConversation method. parent (:class:`str`): - Required. Full resource name of parent data store. - Format: + Required. Full resource name of parent + data store. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`` This corresponds to the ``parent`` field @@ -623,8 +626,8 @@ async def delete_conversation( ) -> None: r"""Deletes a Conversation. - If the - [Conversation][google.cloud.discoveryengine.v1.Conversation] to + If the `Conversation + `__ to delete does not exist, a NOT_FOUND error is returned. .. code-block:: python @@ -655,8 +658,8 @@ async def sample_delete_conversation(): The request object. Request for DeleteConversation method. name (:class:`str`): - Required. The resource name of the Conversation to - delete. Format: + Required. The resource name of the + Conversation to delete. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`` This corresponds to the ``name`` field @@ -732,9 +735,11 @@ async def update_conversation( ) -> gcd_conversation.Conversation: r"""Updates a Conversation. - [Conversation][google.cloud.discoveryengine.v1.Conversation] - action type cannot be changed. If the - [Conversation][google.cloud.discoveryengine.v1.Conversation] to + `Conversation + `__ action + type cannot be changed. If the + `Conversation + `__ to update does not exist, a NOT_FOUND error is returned. .. code-block:: python @@ -773,12 +778,16 @@ async def sample_update_conversation(): should not be set. update_mask (:class:`google.protobuf.field_mask_pb2.FieldMask`): Indicates which fields in the provided - [Conversation][google.cloud.discoveryengine.v1.Conversation] - to update. The following are NOT supported: + `Conversation + `__ + to update. The following are NOT + supported: - - [Conversation.name][google.cloud.discoveryengine.v1.Conversation.name] + * `Conversation.name + `__ - If not set or empty, all supported fields are updated. + If not set or empty, all supported + fields are updated. This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this @@ -895,8 +904,8 @@ async def sample_get_conversation(): request (Optional[Union[google.cloud.discoveryengine_v1.types.GetConversationRequest, dict]]): The request object. Request for GetConversation method. name (:class:`str`): - Required. The resource name of the Conversation to get. - Format: + Required. The resource name of the + Conversation to get. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`` This corresponds to the ``name`` field @@ -979,7 +988,8 @@ async def list_conversations( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListConversationsAsyncPager: r"""Lists all Conversations by their parent - [DataStore][google.cloud.discoveryengine.v1.DataStore]. + `DataStore + `__. .. code-block:: python @@ -1012,7 +1022,8 @@ async def sample_list_conversations(): request (Optional[Union[google.cloud.discoveryengine_v1.types.ListConversationsRequest, dict]]): The request object. Request for ListConversations method. parent (:class:`str`): - Required. The data store resource name. Format: + Required. The data store resource name. + Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`` This corresponds to the ``parent`` field @@ -1142,7 +1153,8 @@ async def sample_answer_query(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.AnswerQueryRequest, dict]]): The request object. Request message for - [ConversationalSearchService.AnswerQuery][google.cloud.discoveryengine.v1.ConversationalSearchService.AnswerQuery] + `ConversationalSearchService.AnswerQuery + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -1155,8 +1167,9 @@ async def sample_answer_query(): Returns: google.cloud.discoveryengine_v1.types.AnswerQueryResponse: Response message for - [ConversationalSearchService.AnswerQuery][google.cloud.discoveryengine.v1.ConversationalSearchService.AnswerQuery] - method. + `ConversationalSearchService.AnswerQuery + `__ + method. """ # Create or coerce a protobuf request object. @@ -1206,9 +1219,11 @@ def stream_answer_query( r"""Answer query method (streaming). It takes one - [AnswerQueryRequest][google.cloud.discoveryengine.v1.AnswerQueryRequest] + `AnswerQueryRequest + `__ and returns multiple - [AnswerQueryResponse][google.cloud.discoveryengine.v1.AnswerQueryResponse] + `AnswerQueryResponse + `__ messages in a stream. .. code-block:: python @@ -1245,7 +1260,8 @@ async def sample_stream_answer_query(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.AnswerQueryRequest, dict]]): The request object. Request message for - [ConversationalSearchService.AnswerQuery][google.cloud.discoveryengine.v1.ConversationalSearchService.AnswerQuery] + `ConversationalSearchService.AnswerQuery + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -1258,8 +1274,9 @@ async def sample_stream_answer_query(): Returns: AsyncIterable[google.cloud.discoveryengine_v1.types.AnswerQueryResponse]: Response message for - [ConversationalSearchService.AnswerQuery][google.cloud.discoveryengine.v1.ConversationalSearchService.AnswerQuery] - method. + `ConversationalSearchService.AnswerQuery + `__ + method. """ # Create or coerce a protobuf request object. @@ -1339,8 +1356,8 @@ async def sample_get_answer(): request (Optional[Union[google.cloud.discoveryengine_v1.types.GetAnswerRequest, dict]]): The request object. Request for GetAnswer method. name (:class:`str`): - Required. The resource name of the Answer to get. - Format: + Required. The resource name of the + Answer to get. Format: ``projects/{project}/locations/{location}/collections/{collection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`` This corresponds to the ``name`` field @@ -1421,8 +1438,9 @@ async def create_session( ) -> gcd_session.Session: r"""Creates a Session. - If the [Session][google.cloud.discoveryengine.v1.Session] to - create already exists, an ALREADY_EXISTS error is returned. + If the `Session + `__ to create + already exists, an ALREADY_EXISTS error is returned. .. code-block:: python @@ -1454,8 +1472,8 @@ async def sample_create_session(): request (Optional[Union[google.cloud.discoveryengine_v1.types.CreateSessionRequest, dict]]): The request object. Request for CreateSession method. parent (:class:`str`): - Required. Full resource name of parent data store. - Format: + Required. Full resource name of parent + data store. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`` This corresponds to the ``parent`` field @@ -1542,8 +1560,9 @@ async def delete_session( ) -> None: r"""Deletes a Session. - If the [Session][google.cloud.discoveryengine.v1.Session] to - delete does not exist, a NOT_FOUND error is returned. + If the `Session + `__ to delete + does not exist, a NOT_FOUND error is returned. .. code-block:: python @@ -1572,8 +1591,8 @@ async def sample_delete_session(): request (Optional[Union[google.cloud.discoveryengine_v1.types.DeleteSessionRequest, dict]]): The request object. Request for DeleteSession method. name (:class:`str`): - Required. The resource name of the Session to delete. - Format: + Required. The resource name of the + Session to delete. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`` This corresponds to the ``name`` field @@ -1647,9 +1666,9 @@ async def update_session( ) -> gcd_session.Session: r"""Updates a Session. - [Session][google.cloud.discoveryengine.v1.Session] action type - cannot be changed. If the - [Session][google.cloud.discoveryengine.v1.Session] to update + `Session `__ + action type cannot be changed. If the `Session + `__ to update does not exist, a NOT_FOUND error is returned. .. code-block:: python @@ -1687,12 +1706,16 @@ async def sample_update_session(): should not be set. update_mask (:class:`google.protobuf.field_mask_pb2.FieldMask`): Indicates which fields in the provided - [Session][google.cloud.discoveryengine.v1.Session] to - update. The following are NOT supported: + `Session + `__ + to update. The following are NOT + supported: - - [Session.name][google.cloud.discoveryengine.v1.Session.name] + * `Session.name + `__ - If not set or empty, all supported fields are updated. + If not set or empty, all supported + fields are updated. This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this @@ -1805,8 +1828,8 @@ async def sample_get_session(): request (Optional[Union[google.cloud.discoveryengine_v1.types.GetSessionRequest, dict]]): The request object. Request for GetSession method. name (:class:`str`): - Required. The resource name of the Session to get. - Format: + Required. The resource name of the + Session to get. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`` This corresponds to the ``name`` field @@ -1885,7 +1908,8 @@ async def list_sessions( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListSessionsAsyncPager: r"""Lists all Sessions by their parent - [DataStore][google.cloud.discoveryengine.v1.DataStore]. + `DataStore + `__. .. code-block:: python @@ -1918,7 +1942,8 @@ async def sample_list_sessions(): request (Optional[Union[google.cloud.discoveryengine_v1.types.ListSessionsRequest, dict]]): The request object. Request for ListSessions method. parent (:class:`str`): - Required. The data store resource name. Format: + Required. The data store resource name. + Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`` This corresponds to the ``parent`` field diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/conversational_search_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/conversational_search_service/client.py index 5290127feefe..4e78fd3e8f51 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/conversational_search_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/conversational_search_service/client.py @@ -983,17 +983,18 @@ def sample_converse_conversation(): Args: request (Union[google.cloud.discoveryengine_v1.types.ConverseConversationRequest, dict]): The request object. Request message for - [ConversationalSearchService.ConverseConversation][google.cloud.discoveryengine.v1.ConversationalSearchService.ConverseConversation] + `ConversationalSearchService.ConverseConversation + `__ method. name (str): - Required. The resource name of the Conversation to get. - Format: + Required. The resource name of the + Conversation to get. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}``. Use ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/-`` - to activate auto session mode, which automatically - creates a new conversation inside a ConverseConversation - session. + to activate auto session mode, which + automatically creates a new conversation + inside a ConverseConversation session. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1014,8 +1015,9 @@ def sample_converse_conversation(): Returns: google.cloud.discoveryengine_v1.types.ConverseConversationResponse: Response message for - [ConversationalSearchService.ConverseConversation][google.cloud.discoveryengine.v1.ConversationalSearchService.ConverseConversation] - method. + `ConversationalSearchService.ConverseConversation + `__ + method. """ # Create or coerce a protobuf request object. @@ -1082,9 +1084,10 @@ def create_conversation( ) -> gcd_conversation.Conversation: r"""Creates a Conversation. - If the - [Conversation][google.cloud.discoveryengine.v1.Conversation] to - create already exists, an ALREADY_EXISTS error is returned. + If the `Conversation + `__ to + create already exists, an ALREADY_EXISTS error is + returned. .. code-block:: python @@ -1117,8 +1120,8 @@ def sample_create_conversation(): The request object. Request for CreateConversation method. parent (str): - Required. Full resource name of parent data store. - Format: + Required. Full resource name of parent + data store. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`` This corresponds to the ``parent`` field @@ -1206,8 +1209,8 @@ def delete_conversation( ) -> None: r"""Deletes a Conversation. - If the - [Conversation][google.cloud.discoveryengine.v1.Conversation] to + If the `Conversation + `__ to delete does not exist, a NOT_FOUND error is returned. .. code-block:: python @@ -1238,8 +1241,8 @@ def sample_delete_conversation(): The request object. Request for DeleteConversation method. name (str): - Required. The resource name of the Conversation to - delete. Format: + Required. The resource name of the + Conversation to delete. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`` This corresponds to the ``name`` field @@ -1312,9 +1315,11 @@ def update_conversation( ) -> gcd_conversation.Conversation: r"""Updates a Conversation. - [Conversation][google.cloud.discoveryengine.v1.Conversation] - action type cannot be changed. If the - [Conversation][google.cloud.discoveryengine.v1.Conversation] to + `Conversation + `__ action + type cannot be changed. If the + `Conversation + `__ to update does not exist, a NOT_FOUND error is returned. .. code-block:: python @@ -1353,12 +1358,16 @@ def sample_update_conversation(): should not be set. update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided - [Conversation][google.cloud.discoveryengine.v1.Conversation] - to update. The following are NOT supported: + `Conversation + `__ + to update. The following are NOT + supported: - - [Conversation.name][google.cloud.discoveryengine.v1.Conversation.name] + * `Conversation.name + `__ - If not set or empty, all supported fields are updated. + If not set or empty, all supported + fields are updated. This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this @@ -1472,8 +1481,8 @@ def sample_get_conversation(): request (Union[google.cloud.discoveryengine_v1.types.GetConversationRequest, dict]): The request object. Request for GetConversation method. name (str): - Required. The resource name of the Conversation to get. - Format: + Required. The resource name of the + Conversation to get. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`` This corresponds to the ``name`` field @@ -1553,7 +1562,8 @@ def list_conversations( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListConversationsPager: r"""Lists all Conversations by their parent - [DataStore][google.cloud.discoveryengine.v1.DataStore]. + `DataStore + `__. .. code-block:: python @@ -1586,7 +1596,8 @@ def sample_list_conversations(): request (Union[google.cloud.discoveryengine_v1.types.ListConversationsRequest, dict]): The request object. Request for ListConversations method. parent (str): - Required. The data store resource name. Format: + Required. The data store resource name. + Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`` This corresponds to the ``parent`` field @@ -1713,7 +1724,8 @@ def sample_answer_query(): Args: request (Union[google.cloud.discoveryengine_v1.types.AnswerQueryRequest, dict]): The request object. Request message for - [ConversationalSearchService.AnswerQuery][google.cloud.discoveryengine.v1.ConversationalSearchService.AnswerQuery] + `ConversationalSearchService.AnswerQuery + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1726,8 +1738,9 @@ def sample_answer_query(): Returns: google.cloud.discoveryengine_v1.types.AnswerQueryResponse: Response message for - [ConversationalSearchService.AnswerQuery][google.cloud.discoveryengine.v1.ConversationalSearchService.AnswerQuery] - method. + `ConversationalSearchService.AnswerQuery + `__ + method. """ # Create or coerce a protobuf request object. @@ -1775,9 +1788,11 @@ def stream_answer_query( r"""Answer query method (streaming). It takes one - [AnswerQueryRequest][google.cloud.discoveryengine.v1.AnswerQueryRequest] + `AnswerQueryRequest + `__ and returns multiple - [AnswerQueryResponse][google.cloud.discoveryengine.v1.AnswerQueryResponse] + `AnswerQueryResponse + `__ messages in a stream. .. code-block:: python @@ -1814,7 +1829,8 @@ def sample_stream_answer_query(): Args: request (Union[google.cloud.discoveryengine_v1.types.AnswerQueryRequest, dict]): The request object. Request message for - [ConversationalSearchService.AnswerQuery][google.cloud.discoveryengine.v1.ConversationalSearchService.AnswerQuery] + `ConversationalSearchService.AnswerQuery + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1827,8 +1843,9 @@ def sample_stream_answer_query(): Returns: Iterable[google.cloud.discoveryengine_v1.types.AnswerQueryResponse]: Response message for - [ConversationalSearchService.AnswerQuery][google.cloud.discoveryengine.v1.ConversationalSearchService.AnswerQuery] - method. + `ConversationalSearchService.AnswerQuery + `__ + method. """ # Create or coerce a protobuf request object. @@ -1906,8 +1923,8 @@ def sample_get_answer(): request (Union[google.cloud.discoveryengine_v1.types.GetAnswerRequest, dict]): The request object. Request for GetAnswer method. name (str): - Required. The resource name of the Answer to get. - Format: + Required. The resource name of the + Answer to get. Format: ``projects/{project}/locations/{location}/collections/{collection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`` This corresponds to the ``name`` field @@ -1985,8 +2002,9 @@ def create_session( ) -> gcd_session.Session: r"""Creates a Session. - If the [Session][google.cloud.discoveryengine.v1.Session] to - create already exists, an ALREADY_EXISTS error is returned. + If the `Session + `__ to create + already exists, an ALREADY_EXISTS error is returned. .. code-block:: python @@ -2018,8 +2036,8 @@ def sample_create_session(): request (Union[google.cloud.discoveryengine_v1.types.CreateSessionRequest, dict]): The request object. Request for CreateSession method. parent (str): - Required. Full resource name of parent data store. - Format: + Required. Full resource name of parent + data store. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`` This corresponds to the ``parent`` field @@ -2103,8 +2121,9 @@ def delete_session( ) -> None: r"""Deletes a Session. - If the [Session][google.cloud.discoveryengine.v1.Session] to - delete does not exist, a NOT_FOUND error is returned. + If the `Session + `__ to delete + does not exist, a NOT_FOUND error is returned. .. code-block:: python @@ -2133,8 +2152,8 @@ def sample_delete_session(): request (Union[google.cloud.discoveryengine_v1.types.DeleteSessionRequest, dict]): The request object. Request for DeleteSession method. name (str): - Required. The resource name of the Session to delete. - Format: + Required. The resource name of the + Session to delete. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`` This corresponds to the ``name`` field @@ -2205,9 +2224,9 @@ def update_session( ) -> gcd_session.Session: r"""Updates a Session. - [Session][google.cloud.discoveryengine.v1.Session] action type - cannot be changed. If the - [Session][google.cloud.discoveryengine.v1.Session] to update + `Session `__ + action type cannot be changed. If the `Session + `__ to update does not exist, a NOT_FOUND error is returned. .. code-block:: python @@ -2245,12 +2264,16 @@ def sample_update_session(): should not be set. update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided - [Session][google.cloud.discoveryengine.v1.Session] to - update. The following are NOT supported: + `Session + `__ + to update. The following are NOT + supported: - - [Session.name][google.cloud.discoveryengine.v1.Session.name] + * `Session.name + `__ - If not set or empty, all supported fields are updated. + If not set or empty, all supported + fields are updated. This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this @@ -2360,8 +2383,8 @@ def sample_get_session(): request (Union[google.cloud.discoveryengine_v1.types.GetSessionRequest, dict]): The request object. Request for GetSession method. name (str): - Required. The resource name of the Session to get. - Format: + Required. The resource name of the + Session to get. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`` This corresponds to the ``name`` field @@ -2437,7 +2460,8 @@ def list_sessions( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListSessionsPager: r"""Lists all Sessions by their parent - [DataStore][google.cloud.discoveryengine.v1.DataStore]. + `DataStore + `__. .. code-block:: python @@ -2470,7 +2494,8 @@ def sample_list_sessions(): request (Union[google.cloud.discoveryengine_v1.types.ListSessionsRequest, dict]): The request object. Request for ListSessions method. parent (str): - Required. The data store resource name. Format: + Required. The data store resource name. + Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`` This corresponds to the ``parent`` field diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/conversational_search_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/conversational_search_service/transports/base.py index 3bdef53e836d..49831647acdc 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/conversational_search_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/conversational_search_service/transports/base.py @@ -90,8 +90,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -106,11 +104,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/conversational_search_service/transports/grpc.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/conversational_search_service/transports/grpc.py index 87669a1bde2d..9a3a2710e547 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/conversational_search_service/transports/grpc.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/conversational_search_service/transports/grpc.py @@ -369,9 +369,10 @@ def create_conversation( Creates a Conversation. - If the - [Conversation][google.cloud.discoveryengine.v1.Conversation] to - create already exists, an ALREADY_EXISTS error is returned. + If the `Conversation + `__ to + create already exists, an ALREADY_EXISTS error is + returned. Returns: Callable[[~.CreateConversationRequest], @@ -401,8 +402,8 @@ def delete_conversation( Deletes a Conversation. - If the - [Conversation][google.cloud.discoveryengine.v1.Conversation] to + If the `Conversation + `__ to delete does not exist, a NOT_FOUND error is returned. Returns: @@ -434,9 +435,11 @@ def update_conversation( Updates a Conversation. - [Conversation][google.cloud.discoveryengine.v1.Conversation] - action type cannot be changed. If the - [Conversation][google.cloud.discoveryengine.v1.Conversation] to + `Conversation + `__ action + type cannot be changed. If the + `Conversation + `__ to update does not exist, a NOT_FOUND error is returned. Returns: @@ -496,7 +499,8 @@ def list_conversations( r"""Return a callable for the list conversations method over gRPC. Lists all Conversations by their parent - [DataStore][google.cloud.discoveryengine.v1.DataStore]. + `DataStore + `__. Returns: Callable[[~.ListConversationsRequest], @@ -557,9 +561,11 @@ def stream_answer_query( Answer query method (streaming). It takes one - [AnswerQueryRequest][google.cloud.discoveryengine.v1.AnswerQueryRequest] + `AnswerQueryRequest + `__ and returns multiple - [AnswerQueryResponse][google.cloud.discoveryengine.v1.AnswerQueryResponse] + `AnswerQueryResponse + `__ messages in a stream. Returns: @@ -616,8 +622,9 @@ def create_session( Creates a Session. - If the [Session][google.cloud.discoveryengine.v1.Session] to - create already exists, an ALREADY_EXISTS error is returned. + If the `Session + `__ to create + already exists, an ALREADY_EXISTS error is returned. Returns: Callable[[~.CreateSessionRequest], @@ -647,8 +654,9 @@ def delete_session( Deletes a Session. - If the [Session][google.cloud.discoveryengine.v1.Session] to - delete does not exist, a NOT_FOUND error is returned. + If the `Session + `__ to delete + does not exist, a NOT_FOUND error is returned. Returns: Callable[[~.DeleteSessionRequest], @@ -678,9 +686,9 @@ def update_session( Updates a Session. - [Session][google.cloud.discoveryengine.v1.Session] action type - cannot be changed. If the - [Session][google.cloud.discoveryengine.v1.Session] to update + `Session `__ + action type cannot be changed. If the `Session + `__ to update does not exist, a NOT_FOUND error is returned. Returns: @@ -737,7 +745,8 @@ def list_sessions( r"""Return a callable for the list sessions method over gRPC. Lists all Sessions by their parent - [DataStore][google.cloud.discoveryengine.v1.DataStore]. + `DataStore + `__. Returns: Callable[[~.ListSessionsRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/conversational_search_service/transports/grpc_asyncio.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/conversational_search_service/transports/grpc_asyncio.py index 5b47516e8e9e..647c8c8bdf0c 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/conversational_search_service/transports/grpc_asyncio.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/conversational_search_service/transports/grpc_asyncio.py @@ -379,9 +379,10 @@ def create_conversation( Creates a Conversation. - If the - [Conversation][google.cloud.discoveryengine.v1.Conversation] to - create already exists, an ALREADY_EXISTS error is returned. + If the `Conversation + `__ to + create already exists, an ALREADY_EXISTS error is + returned. Returns: Callable[[~.CreateConversationRequest], @@ -412,8 +413,8 @@ def delete_conversation( Deletes a Conversation. - If the - [Conversation][google.cloud.discoveryengine.v1.Conversation] to + If the `Conversation + `__ to delete does not exist, a NOT_FOUND error is returned. Returns: @@ -445,9 +446,11 @@ def update_conversation( Updates a Conversation. - [Conversation][google.cloud.discoveryengine.v1.Conversation] - action type cannot be changed. If the - [Conversation][google.cloud.discoveryengine.v1.Conversation] to + `Conversation + `__ action + type cannot be changed. If the + `Conversation + `__ to update does not exist, a NOT_FOUND error is returned. Returns: @@ -507,7 +510,8 @@ def list_conversations( r"""Return a callable for the list conversations method over gRPC. Lists all Conversations by their parent - [DataStore][google.cloud.discoveryengine.v1.DataStore]. + `DataStore + `__. Returns: Callable[[~.ListConversationsRequest], @@ -568,9 +572,11 @@ def stream_answer_query( Answer query method (streaming). It takes one - [AnswerQueryRequest][google.cloud.discoveryengine.v1.AnswerQueryRequest] + `AnswerQueryRequest + `__ and returns multiple - [AnswerQueryResponse][google.cloud.discoveryengine.v1.AnswerQueryResponse] + `AnswerQueryResponse + `__ messages in a stream. Returns: @@ -630,8 +636,9 @@ def create_session( Creates a Session. - If the [Session][google.cloud.discoveryengine.v1.Session] to - create already exists, an ALREADY_EXISTS error is returned. + If the `Session + `__ to create + already exists, an ALREADY_EXISTS error is returned. Returns: Callable[[~.CreateSessionRequest], @@ -661,8 +668,9 @@ def delete_session( Deletes a Session. - If the [Session][google.cloud.discoveryengine.v1.Session] to - delete does not exist, a NOT_FOUND error is returned. + If the `Session + `__ to delete + does not exist, a NOT_FOUND error is returned. Returns: Callable[[~.DeleteSessionRequest], @@ -693,9 +701,9 @@ def update_session( Updates a Session. - [Session][google.cloud.discoveryengine.v1.Session] action type - cannot be changed. If the - [Session][google.cloud.discoveryengine.v1.Session] to update + `Session `__ + action type cannot be changed. If the `Session + `__ to update does not exist, a NOT_FOUND error is returned. Returns: @@ -754,7 +762,8 @@ def list_sessions( r"""Return a callable for the list sessions method over gRPC. Lists all Sessions by their parent - [DataStore][google.cloud.discoveryengine.v1.DataStore]. + `DataStore + `__. Returns: Callable[[~.ListSessionsRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/conversational_search_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/conversational_search_service/transports/rest.py index ea6e8130b173..218e1c86dbc7 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/conversational_search_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/conversational_search_service/transports/rest.py @@ -1018,7 +1018,8 @@ def __call__( Args: request (~.conversational_search_service.AnswerQueryRequest): The request object. Request message for - [ConversationalSearchService.AnswerQuery][google.cloud.discoveryengine.v1.ConversationalSearchService.AnswerQuery] + `ConversationalSearchService.AnswerQuery + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1031,7 +1032,8 @@ def __call__( Returns: ~.conversational_search_service.AnswerQueryResponse: Response message for - [ConversationalSearchService.AnswerQuery][google.cloud.discoveryengine.v1.ConversationalSearchService.AnswerQuery] + `ConversationalSearchService.AnswerQuery + `__ method. """ @@ -1180,7 +1182,8 @@ def __call__( Args: request (~.conversational_search_service.ConverseConversationRequest): The request object. Request message for - [ConversationalSearchService.ConverseConversation][google.cloud.discoveryengine.v1.ConversationalSearchService.ConverseConversation] + `ConversationalSearchService.ConverseConversation + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1193,7 +1196,8 @@ def __call__( Returns: ~.conversational_search_service.ConverseConversationResponse: Response message for - [ConversationalSearchService.ConverseConversation][google.cloud.discoveryengine.v1.ConversationalSearchService.ConverseConversation] + `ConversationalSearchService.ConverseConversation + `__ method. """ @@ -2620,7 +2624,8 @@ def __call__( Args: request (~.conversational_search_service.AnswerQueryRequest): The request object. Request message for - [ConversationalSearchService.AnswerQuery][google.cloud.discoveryengine.v1.ConversationalSearchService.AnswerQuery] + `ConversationalSearchService.AnswerQuery + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -2633,7 +2638,8 @@ def __call__( Returns: ~.conversational_search_service.AnswerQueryResponse: Response message for - [ConversationalSearchService.AnswerQuery][google.cloud.discoveryengine.v1.ConversationalSearchService.AnswerQuery] + `ConversationalSearchService.AnswerQuery + `__ method. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/data_store_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/data_store_service/async_client.py index 3dc9595013f9..b837a6200cdb 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/data_store_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/data_store_service/async_client.py @@ -77,9 +77,8 @@ class DataStoreServiceAsyncClient: - """Service for managing - [DataStore][google.cloud.discoveryengine.v1.DataStore] - configuration. + """Service for managing `DataStore + `__ configuration. """ _client: DataStoreServiceClient @@ -346,14 +345,14 @@ async def create_data_store( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: - r"""Creates a - [DataStore][google.cloud.discoveryengine.v1.DataStore]. - + r"""Creates a `DataStore + `__. DataStore is for storing - [Documents][google.cloud.discoveryengine.v1.Document]. To serve - these documents for Search, or Recommendation use case, an - [Engine][google.cloud.discoveryengine.v1.Engine] needs to be - created separately. + `Documents + `__. To serve + these documents for Search, or Recommendation use case, + an `Engine `__ + needs to be created separately. .. code-block:: python @@ -394,18 +393,20 @@ async def sample_create_data_store(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.CreateDataStoreRequest, dict]]): The request object. Request for - [DataStoreService.CreateDataStore][google.cloud.discoveryengine.v1.DataStoreService.CreateDataStore] + `DataStoreService.CreateDataStore + `__ method. parent (:class:`str`): - Required. The parent resource name, such as + Required. The parent resource name, such + as ``projects/{project}/locations/{location}/collections/{collection}``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. data_store (:class:`google.cloud.discoveryengine_v1.types.DataStore`): - Required. The - [DataStore][google.cloud.discoveryengine.v1.DataStore] + Required. The `DataStore + `__ to create. This corresponds to the ``data_store`` field @@ -413,15 +414,19 @@ async def sample_create_data_store(): should not be set. data_store_id (:class:`str`): Required. The ID to use for the - [DataStore][google.cloud.discoveryengine.v1.DataStore], - which will become the final component of the - [DataStore][google.cloud.discoveryengine.v1.DataStore]'s + `DataStore + `__, + which will become the final component of + the + `DataStore + `__'s resource name. - This field must conform to - `RFC-1034 `__ - standard with a length limit of 63 characters. - Otherwise, an INVALID_ARGUMENT error is returned. + This field must conform to `RFC-1034 + `__ + standard with a length limit of 63 + characters. Otherwise, an + INVALID_ARGUMENT error is returned. This corresponds to the ``data_store_id`` field on the ``request`` instance; if ``request`` is provided, this @@ -436,12 +441,13 @@ async def sample_create_data_store(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be + An object representing a long-running + operation. + The result type for the operation will + be :class:`google.cloud.discoveryengine_v1.types.DataStore` - DataStore captures global settings and configs at the - DataStore level. + DataStore captures global settings and + configs at the DataStore level. """ # Create or coerce a protobuf request object. @@ -514,7 +520,8 @@ async def get_data_store( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> data_store.DataStore: - r"""Gets a [DataStore][google.cloud.discoveryengine.v1.DataStore]. + r"""Gets a `DataStore + `__. .. code-block:: python @@ -545,22 +552,26 @@ async def sample_get_data_store(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.GetDataStoreRequest, dict]]): The request object. Request message for - [DataStoreService.GetDataStore][google.cloud.discoveryengine.v1.DataStoreService.GetDataStore] + `DataStoreService.GetDataStore + `__ method. name (:class:`str`): Required. Full resource name of - [DataStore][google.cloud.discoveryengine.v1.DataStore], + `DataStore + `__, such as ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}``. - If the caller does not have permission to access the - [DataStore][google.cloud.discoveryengine.v1.DataStore], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to access the `DataStore + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. - If the requested - [DataStore][google.cloud.discoveryengine.v1.DataStore] - does not exist, a NOT_FOUND error is returned. + If the requested `DataStore + `__ + does not exist, a NOT_FOUND error is + returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -637,8 +648,8 @@ async def list_data_stores( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListDataStoresAsyncPager: - r"""Lists all the - [DataStore][google.cloud.discoveryengine.v1.DataStore]s + r"""Lists all the `DataStore + `__s associated with the project. .. code-block:: python @@ -671,17 +682,20 @@ async def sample_list_data_stores(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.ListDataStoresRequest, dict]]): The request object. Request message for - [DataStoreService.ListDataStores][google.cloud.discoveryengine.v1.DataStoreService.ListDataStores] + `DataStoreService.ListDataStores + `__ method. parent (:class:`str`): - Required. The parent branch resource name, such as + Required. The parent branch resource + name, such as ``projects/{project}/locations/{location}/collections/{collection_id}``. - If the caller does not have permission to list - [DataStore][google.cloud.discoveryengine.v1.DataStore]s - under this location, regardless of whether or not this - data store exists, a PERMISSION_DENIED error is - returned. + If the caller does not have permission + to list `DataStore + `__s + under this location, regardless of + whether or not this data store exists, a + PERMISSION_DENIED error is returned. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -697,11 +711,13 @@ async def sample_list_data_stores(): Returns: google.cloud.discoveryengine_v1.services.data_store_service.pagers.ListDataStoresAsyncPager: Response message for - [DataStoreService.ListDataStores][google.cloud.discoveryengine.v1.DataStoreService.ListDataStores] - method. + `DataStoreService.ListDataStores + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -775,8 +791,8 @@ async def delete_data_store( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: - r"""Deletes a - [DataStore][google.cloud.discoveryengine.v1.DataStore]. + r"""Deletes a `DataStore + `__. .. code-block:: python @@ -811,22 +827,26 @@ async def sample_delete_data_store(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.DeleteDataStoreRequest, dict]]): The request object. Request message for - [DataStoreService.DeleteDataStore][google.cloud.discoveryengine.v1.DataStoreService.DeleteDataStore] + `DataStoreService.DeleteDataStore + `__ method. name (:class:`str`): Required. Full resource name of - [DataStore][google.cloud.discoveryengine.v1.DataStore], + `DataStore + `__, such as ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}``. - If the caller does not have permission to delete the - [DataStore][google.cloud.discoveryengine.v1.DataStore], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to delete the `DataStore + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. - If the - [DataStore][google.cloud.discoveryengine.v1.DataStore] - to delete does not exist, a NOT_FOUND error is returned. + If the `DataStore + `__ + to delete does not exist, a NOT_FOUND + error is returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -841,18 +861,21 @@ async def sample_delete_data_store(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.protobuf.empty_pb2.Empty` A generic empty message that you can re-use to avoid defining duplicated - empty messages in your APIs. A typical example is to - use it as the request or the response type of an API - method. For instance: - - service Foo { - rpc Bar(google.protobuf.Empty) returns - (google.protobuf.Empty); - - } + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.protobuf.empty_pb2.Empty` + A generic empty message that you can + re-use to avoid defining duplicated + empty messages in your APIs. A typical + example is to use it as the request or + the response type of an API method. For + instance: + + service Foo { + rpc Bar(google.protobuf.Empty) + returns (google.protobuf.Empty); } """ # Create or coerce a protobuf request object. @@ -924,7 +947,8 @@ async def update_data_store( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> gcd_data_store.DataStore: - r"""Updates a [DataStore][google.cloud.discoveryengine.v1.DataStore] + r"""Updates a `DataStore + `__ .. code-block:: python @@ -958,32 +982,37 @@ async def sample_update_data_store(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.UpdateDataStoreRequest, dict]]): The request object. Request message for - [DataStoreService.UpdateDataStore][google.cloud.discoveryengine.v1.DataStoreService.UpdateDataStore] + `DataStoreService.UpdateDataStore + `__ method. data_store (:class:`google.cloud.discoveryengine_v1.types.DataStore`): - Required. The - [DataStore][google.cloud.discoveryengine.v1.DataStore] + Required. The `DataStore + `__ to update. - If the caller does not have permission to update the - [DataStore][google.cloud.discoveryengine.v1.DataStore], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to update the `DataStore + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. - If the - [DataStore][google.cloud.discoveryengine.v1.DataStore] - to update does not exist, a NOT_FOUND error is returned. + If the `DataStore + `__ + to update does not exist, a NOT_FOUND + error is returned. This corresponds to the ``data_store`` field on the ``request`` instance; if ``request`` is provided, this should not be set. update_mask (:class:`google.protobuf.field_mask_pb2.FieldMask`): Indicates which fields in the provided - [DataStore][google.cloud.discoveryengine.v1.DataStore] + `DataStore + `__ to update. - If an unsupported or unknown field is provided, an - INVALID_ARGUMENT error is returned. + If an unsupported or unknown field is + provided, an INVALID_ARGUMENT error is + returned. This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/data_store_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/data_store_service/client.py index 512090727f85..8130bbe0e5e5 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/data_store_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/data_store_service/client.py @@ -123,9 +123,8 @@ def get_transport_class( class DataStoreServiceClient(metaclass=DataStoreServiceClientMeta): - """Service for managing - [DataStore][google.cloud.discoveryengine.v1.DataStore] - configuration. + """Service for managing `DataStore + `__ configuration. """ @staticmethod @@ -923,14 +922,14 @@ def create_data_store( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: - r"""Creates a - [DataStore][google.cloud.discoveryengine.v1.DataStore]. - + r"""Creates a `DataStore + `__. DataStore is for storing - [Documents][google.cloud.discoveryengine.v1.Document]. To serve - these documents for Search, or Recommendation use case, an - [Engine][google.cloud.discoveryengine.v1.Engine] needs to be - created separately. + `Documents + `__. To serve + these documents for Search, or Recommendation use case, + an `Engine `__ + needs to be created separately. .. code-block:: python @@ -971,18 +970,20 @@ def sample_create_data_store(): Args: request (Union[google.cloud.discoveryengine_v1.types.CreateDataStoreRequest, dict]): The request object. Request for - [DataStoreService.CreateDataStore][google.cloud.discoveryengine.v1.DataStoreService.CreateDataStore] + `DataStoreService.CreateDataStore + `__ method. parent (str): - Required. The parent resource name, such as + Required. The parent resource name, such + as ``projects/{project}/locations/{location}/collections/{collection}``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. data_store (google.cloud.discoveryengine_v1.types.DataStore): - Required. The - [DataStore][google.cloud.discoveryengine.v1.DataStore] + Required. The `DataStore + `__ to create. This corresponds to the ``data_store`` field @@ -990,15 +991,19 @@ def sample_create_data_store(): should not be set. data_store_id (str): Required. The ID to use for the - [DataStore][google.cloud.discoveryengine.v1.DataStore], - which will become the final component of the - [DataStore][google.cloud.discoveryengine.v1.DataStore]'s + `DataStore + `__, + which will become the final component of + the + `DataStore + `__'s resource name. - This field must conform to - `RFC-1034 `__ - standard with a length limit of 63 characters. - Otherwise, an INVALID_ARGUMENT error is returned. + This field must conform to `RFC-1034 + `__ + standard with a length limit of 63 + characters. Otherwise, an + INVALID_ARGUMENT error is returned. This corresponds to the ``data_store_id`` field on the ``request`` instance; if ``request`` is provided, this @@ -1013,12 +1018,13 @@ def sample_create_data_store(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be + An object representing a long-running + operation. + The result type for the operation will + be :class:`google.cloud.discoveryengine_v1.types.DataStore` - DataStore captures global settings and configs at the - DataStore level. + DataStore captures global settings and + configs at the DataStore level. """ # Create or coerce a protobuf request object. @@ -1088,7 +1094,8 @@ def get_data_store( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> data_store.DataStore: - r"""Gets a [DataStore][google.cloud.discoveryengine.v1.DataStore]. + r"""Gets a `DataStore + `__. .. code-block:: python @@ -1119,22 +1126,26 @@ def sample_get_data_store(): Args: request (Union[google.cloud.discoveryengine_v1.types.GetDataStoreRequest, dict]): The request object. Request message for - [DataStoreService.GetDataStore][google.cloud.discoveryengine.v1.DataStoreService.GetDataStore] + `DataStoreService.GetDataStore + `__ method. name (str): Required. Full resource name of - [DataStore][google.cloud.discoveryengine.v1.DataStore], + `DataStore + `__, such as ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}``. - If the caller does not have permission to access the - [DataStore][google.cloud.discoveryengine.v1.DataStore], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to access the `DataStore + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. - If the requested - [DataStore][google.cloud.discoveryengine.v1.DataStore] - does not exist, a NOT_FOUND error is returned. + If the requested `DataStore + `__ + does not exist, a NOT_FOUND error is + returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1208,8 +1219,8 @@ def list_data_stores( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListDataStoresPager: - r"""Lists all the - [DataStore][google.cloud.discoveryengine.v1.DataStore]s + r"""Lists all the `DataStore + `__s associated with the project. .. code-block:: python @@ -1242,17 +1253,20 @@ def sample_list_data_stores(): Args: request (Union[google.cloud.discoveryengine_v1.types.ListDataStoresRequest, dict]): The request object. Request message for - [DataStoreService.ListDataStores][google.cloud.discoveryengine.v1.DataStoreService.ListDataStores] + `DataStoreService.ListDataStores + `__ method. parent (str): - Required. The parent branch resource name, such as + Required. The parent branch resource + name, such as ``projects/{project}/locations/{location}/collections/{collection_id}``. - If the caller does not have permission to list - [DataStore][google.cloud.discoveryengine.v1.DataStore]s - under this location, regardless of whether or not this - data store exists, a PERMISSION_DENIED error is - returned. + If the caller does not have permission + to list `DataStore + `__s + under this location, regardless of + whether or not this data store exists, a + PERMISSION_DENIED error is returned. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -1268,11 +1282,13 @@ def sample_list_data_stores(): Returns: google.cloud.discoveryengine_v1.services.data_store_service.pagers.ListDataStoresPager: Response message for - [DataStoreService.ListDataStores][google.cloud.discoveryengine.v1.DataStoreService.ListDataStores] - method. + `DataStoreService.ListDataStores + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -1343,8 +1359,8 @@ def delete_data_store( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: - r"""Deletes a - [DataStore][google.cloud.discoveryengine.v1.DataStore]. + r"""Deletes a `DataStore + `__. .. code-block:: python @@ -1379,22 +1395,26 @@ def sample_delete_data_store(): Args: request (Union[google.cloud.discoveryengine_v1.types.DeleteDataStoreRequest, dict]): The request object. Request message for - [DataStoreService.DeleteDataStore][google.cloud.discoveryengine.v1.DataStoreService.DeleteDataStore] + `DataStoreService.DeleteDataStore + `__ method. name (str): Required. Full resource name of - [DataStore][google.cloud.discoveryengine.v1.DataStore], + `DataStore + `__, such as ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}``. - If the caller does not have permission to delete the - [DataStore][google.cloud.discoveryengine.v1.DataStore], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to delete the `DataStore + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. - If the - [DataStore][google.cloud.discoveryengine.v1.DataStore] - to delete does not exist, a NOT_FOUND error is returned. + If the `DataStore + `__ + to delete does not exist, a NOT_FOUND + error is returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1409,18 +1429,21 @@ def sample_delete_data_store(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.protobuf.empty_pb2.Empty` A generic empty message that you can re-use to avoid defining duplicated - empty messages in your APIs. A typical example is to - use it as the request or the response type of an API - method. For instance: - - service Foo { - rpc Bar(google.protobuf.Empty) returns - (google.protobuf.Empty); - - } + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.protobuf.empty_pb2.Empty` + A generic empty message that you can + re-use to avoid defining duplicated + empty messages in your APIs. A typical + example is to use it as the request or + the response type of an API method. For + instance: + + service Foo { + rpc Bar(google.protobuf.Empty) + returns (google.protobuf.Empty); } """ # Create or coerce a protobuf request object. @@ -1489,7 +1512,8 @@ def update_data_store( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> gcd_data_store.DataStore: - r"""Updates a [DataStore][google.cloud.discoveryengine.v1.DataStore] + r"""Updates a `DataStore + `__ .. code-block:: python @@ -1523,32 +1547,37 @@ def sample_update_data_store(): Args: request (Union[google.cloud.discoveryengine_v1.types.UpdateDataStoreRequest, dict]): The request object. Request message for - [DataStoreService.UpdateDataStore][google.cloud.discoveryengine.v1.DataStoreService.UpdateDataStore] + `DataStoreService.UpdateDataStore + `__ method. data_store (google.cloud.discoveryengine_v1.types.DataStore): - Required. The - [DataStore][google.cloud.discoveryengine.v1.DataStore] + Required. The `DataStore + `__ to update. - If the caller does not have permission to update the - [DataStore][google.cloud.discoveryengine.v1.DataStore], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to update the `DataStore + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. - If the - [DataStore][google.cloud.discoveryengine.v1.DataStore] - to update does not exist, a NOT_FOUND error is returned. + If the `DataStore + `__ + to update does not exist, a NOT_FOUND + error is returned. This corresponds to the ``data_store`` field on the ``request`` instance; if ``request`` is provided, this should not be set. update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided - [DataStore][google.cloud.discoveryengine.v1.DataStore] + `DataStore + `__ to update. - If an unsupported or unknown field is provided, an - INVALID_ARGUMENT error is returned. + If an unsupported or unknown field is + provided, an INVALID_ARGUMENT error is + returned. This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/data_store_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/data_store_service/transports/base.py index 0704969371b3..8ac5db254017 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/data_store_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/data_store_service/transports/base.py @@ -86,8 +86,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -102,11 +100,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/data_store_service/transports/grpc.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/data_store_service/transports/grpc.py index 1912e521bbea..db9ba149f511 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/data_store_service/transports/grpc.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/data_store_service/transports/grpc.py @@ -114,9 +114,8 @@ def intercept_unary_unary(self, continuation, client_call_details, request): class DataStoreServiceGrpcTransport(DataStoreServiceTransport): """gRPC backend transport for DataStoreService. - Service for managing - [DataStore][google.cloud.discoveryengine.v1.DataStore] - configuration. + Service for managing `DataStore + `__ configuration. This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -352,14 +351,14 @@ def create_data_store( ]: r"""Return a callable for the create data store method over gRPC. - Creates a - [DataStore][google.cloud.discoveryengine.v1.DataStore]. - + Creates a `DataStore + `__. DataStore is for storing - [Documents][google.cloud.discoveryengine.v1.Document]. To serve - these documents for Search, or Recommendation use case, an - [Engine][google.cloud.discoveryengine.v1.Engine] needs to be - created separately. + `Documents + `__. To serve + these documents for Search, or Recommendation use case, + an `Engine `__ + needs to be created separately. Returns: Callable[[~.CreateDataStoreRequest], @@ -385,7 +384,8 @@ def get_data_store( ) -> Callable[[data_store_service.GetDataStoreRequest], data_store.DataStore]: r"""Return a callable for the get data store method over gRPC. - Gets a [DataStore][google.cloud.discoveryengine.v1.DataStore]. + Gets a `DataStore + `__. Returns: Callable[[~.GetDataStoreRequest], @@ -414,8 +414,8 @@ def list_data_stores( ]: r"""Return a callable for the list data stores method over gRPC. - Lists all the - [DataStore][google.cloud.discoveryengine.v1.DataStore]s + Lists all the `DataStore + `__s associated with the project. Returns: @@ -444,8 +444,8 @@ def delete_data_store( ]: r"""Return a callable for the delete data store method over gRPC. - Deletes a - [DataStore][google.cloud.discoveryengine.v1.DataStore]. + Deletes a `DataStore + `__. Returns: Callable[[~.DeleteDataStoreRequest], @@ -473,7 +473,8 @@ def update_data_store( ]: r"""Return a callable for the update data store method over gRPC. - Updates a [DataStore][google.cloud.discoveryengine.v1.DataStore] + Updates a `DataStore + `__ Returns: Callable[[~.UpdateDataStoreRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/data_store_service/transports/grpc_asyncio.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/data_store_service/transports/grpc_asyncio.py index 28891d658dc4..4eb086368dda 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/data_store_service/transports/grpc_asyncio.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/data_store_service/transports/grpc_asyncio.py @@ -120,9 +120,8 @@ async def intercept_unary_unary(self, continuation, client_call_details, request class DataStoreServiceGrpcAsyncIOTransport(DataStoreServiceTransport): """gRPC AsyncIO backend transport for DataStoreService. - Service for managing - [DataStore][google.cloud.discoveryengine.v1.DataStore] - configuration. + Service for managing `DataStore + `__ configuration. This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -360,14 +359,14 @@ def create_data_store( ]: r"""Return a callable for the create data store method over gRPC. - Creates a - [DataStore][google.cloud.discoveryengine.v1.DataStore]. - + Creates a `DataStore + `__. DataStore is for storing - [Documents][google.cloud.discoveryengine.v1.Document]. To serve - these documents for Search, or Recommendation use case, an - [Engine][google.cloud.discoveryengine.v1.Engine] needs to be - created separately. + `Documents + `__. To serve + these documents for Search, or Recommendation use case, + an `Engine `__ + needs to be created separately. Returns: Callable[[~.CreateDataStoreRequest], @@ -395,7 +394,8 @@ def get_data_store( ]: r"""Return a callable for the get data store method over gRPC. - Gets a [DataStore][google.cloud.discoveryengine.v1.DataStore]. + Gets a `DataStore + `__. Returns: Callable[[~.GetDataStoreRequest], @@ -424,8 +424,8 @@ def list_data_stores( ]: r"""Return a callable for the list data stores method over gRPC. - Lists all the - [DataStore][google.cloud.discoveryengine.v1.DataStore]s + Lists all the `DataStore + `__s associated with the project. Returns: @@ -454,8 +454,8 @@ def delete_data_store( ]: r"""Return a callable for the delete data store method over gRPC. - Deletes a - [DataStore][google.cloud.discoveryengine.v1.DataStore]. + Deletes a `DataStore + `__. Returns: Callable[[~.DeleteDataStoreRequest], @@ -483,7 +483,8 @@ def update_data_store( ]: r"""Return a callable for the update data store method over gRPC. - Updates a [DataStore][google.cloud.discoveryengine.v1.DataStore] + Updates a `DataStore + `__ Returns: Callable[[~.UpdateDataStoreRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/data_store_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/data_store_service/transports/rest.py index 39d47ff88a08..3e9f058dc26c 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/data_store_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/data_store_service/transports/rest.py @@ -453,9 +453,8 @@ class DataStoreServiceRestStub: class DataStoreServiceRestTransport(_BaseDataStoreServiceRestTransport): """REST backend synchronous transport for DataStoreService. - Service for managing - [DataStore][google.cloud.discoveryengine.v1.DataStore] - configuration. + Service for managing `DataStore + `__ configuration. This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -758,7 +757,8 @@ def __call__( Args: request (~.data_store_service.CreateDataStoreRequest): The request object. Request for - [DataStoreService.CreateDataStore][google.cloud.discoveryengine.v1.DataStoreService.CreateDataStore] + `DataStoreService.CreateDataStore + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -913,7 +913,8 @@ def __call__( Args: request (~.data_store_service.DeleteDataStoreRequest): The request object. Request message for - [DataStoreService.DeleteDataStore][google.cloud.discoveryengine.v1.DataStoreService.DeleteDataStore] + `DataStoreService.DeleteDataStore + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1062,7 +1063,8 @@ def __call__( Args: request (~.data_store_service.GetDataStoreRequest): The request object. Request message for - [DataStoreService.GetDataStore][google.cloud.discoveryengine.v1.DataStoreService.GetDataStore] + `DataStoreService.GetDataStore + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1210,7 +1212,8 @@ def __call__( Args: request (~.data_store_service.ListDataStoresRequest): The request object. Request message for - [DataStoreService.ListDataStores][google.cloud.discoveryengine.v1.DataStoreService.ListDataStores] + `DataStoreService.ListDataStores + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1223,7 +1226,8 @@ def __call__( Returns: ~.data_store_service.ListDataStoresResponse: Response message for - [DataStoreService.ListDataStores][google.cloud.discoveryengine.v1.DataStoreService.ListDataStores] + `DataStoreService.ListDataStores + `__ method. """ @@ -1365,7 +1369,8 @@ def __call__( Args: request (~.data_store_service.UpdateDataStoreRequest): The request object. Request message for - [DataStoreService.UpdateDataStore][google.cloud.discoveryengine.v1.DataStoreService.UpdateDataStore] + `DataStoreService.UpdateDataStore + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/document_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/document_service/async_client.py index 71054e73c44d..224d01a15be2 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/document_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/document_service/async_client.py @@ -76,9 +76,9 @@ class DocumentServiceAsyncClient: - """Service for ingesting - [Document][google.cloud.discoveryengine.v1.Document] information of - the customer's website. + """Service for ingesting `Document + `__ information of the + customer's website. """ _client: DocumentServiceClient @@ -323,7 +323,8 @@ async def get_document( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> document.Document: - r"""Gets a [Document][google.cloud.discoveryengine.v1.Document]. + r"""Gets a `Document + `__. .. code-block:: python @@ -354,22 +355,27 @@ async def sample_get_document(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.GetDocumentRequest, dict]]): The request object. Request message for - [DocumentService.GetDocument][google.cloud.discoveryengine.v1.DocumentService.GetDocument] + `DocumentService.GetDocument + `__ method. name (:class:`str`): Required. Full resource name of - [Document][google.cloud.discoveryengine.v1.Document], + `Document + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}``. - If the caller does not have permission to access the - [Document][google.cloud.discoveryengine.v1.Document], - regardless of whether or not it exists, a - ``PERMISSION_DENIED`` error is returned. + If the caller does not have permission + to access the `Document + `__, + regardless of whether or not it exists, + a ``PERMISSION_DENIED`` error is + returned. - If the requested - [Document][google.cloud.discoveryengine.v1.Document] - does not exist, a ``NOT_FOUND`` error is returned. + If the requested `Document + `__ + does not exist, a ``NOT_FOUND`` error is + returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -447,8 +453,8 @@ async def list_documents( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListDocumentsAsyncPager: - r"""Gets a list of - [Document][google.cloud.discoveryengine.v1.Document]s. + r"""Gets a list of `Document + `__s. .. code-block:: python @@ -480,19 +486,23 @@ async def sample_list_documents(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.ListDocumentsRequest, dict]]): The request object. Request message for - [DocumentService.ListDocuments][google.cloud.discoveryengine.v1.DocumentService.ListDocuments] + `DocumentService.ListDocuments + `__ method. parent (:class:`str`): - Required. The parent branch resource name, such as + Required. The parent branch resource + name, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}``. - Use ``default_branch`` as the branch ID, to list - documents under the default branch. - - If the caller does not have permission to list - [Document][google.cloud.discoveryengine.v1.Document]s - under this branch, regardless of whether or not this - branch exists, a ``PERMISSION_DENIED`` error is - returned. + Use ``default_branch`` as the branch ID, + to list documents under the default + branch. + + If the caller does not have permission + to list `Document + `__s + under this branch, regardless of whether + or not this branch exists, a + ``PERMISSION_DENIED`` error is returned. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -508,11 +518,13 @@ async def sample_list_documents(): Returns: google.cloud.discoveryengine_v1.services.document_service.pagers.ListDocumentsAsyncPager: Response message for - [DocumentService.ListDocuments][google.cloud.discoveryengine.v1.DocumentService.ListDocuments] - method. + `DocumentService.ListDocuments + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -586,7 +598,8 @@ async def create_document( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> gcd_document.Document: - r"""Creates a [Document][google.cloud.discoveryengine.v1.Document]. + r"""Creates a `Document + `__. .. code-block:: python @@ -618,44 +631,53 @@ async def sample_create_document(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.CreateDocumentRequest, dict]]): The request object. Request message for - [DocumentService.CreateDocument][google.cloud.discoveryengine.v1.DocumentService.CreateDocument] + `DocumentService.CreateDocument + `__ method. parent (:class:`str`): - Required. The parent resource name, such as + Required. The parent resource name, such + as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. document (:class:`google.cloud.discoveryengine_v1.types.Document`): - Required. The - [Document][google.cloud.discoveryengine.v1.Document] to - create. + Required. The `Document + `__ + to create. This corresponds to the ``document`` field on the ``request`` instance; if ``request`` is provided, this should not be set. document_id (:class:`str`): Required. The ID to use for the - [Document][google.cloud.discoveryengine.v1.Document], + `Document + `__, which becomes the final component of the - [Document.name][google.cloud.discoveryengine.v1.Document.name]. - - If the caller does not have permission to create the - [Document][google.cloud.discoveryengine.v1.Document], - regardless of whether or not it exists, a - ``PERMISSION_DENIED`` error is returned. + `Document.name + `__. + + If the caller does not have permission + to create the `Document + `__, + regardless of whether or not it exists, + a ``PERMISSION_DENIED`` error is + returned. This field must be unique among all - [Document][google.cloud.discoveryengine.v1.Document]s - with the same - [parent][google.cloud.discoveryengine.v1.CreateDocumentRequest.parent]. - Otherwise, an ``ALREADY_EXISTS`` error is returned. - - This field must conform to - `RFC-1034 `__ - standard with a length limit of 128 characters. - Otherwise, an ``INVALID_ARGUMENT`` error is returned. + `Document + `__s + with the same `parent + `__. + Otherwise, an ``ALREADY_EXISTS`` error + is returned. + + This field must conform to `RFC-1034 + `__ + standard with a length limit of 128 + characters. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. This corresponds to the ``document_id`` field on the ``request`` instance; if ``request`` is provided, this @@ -738,7 +760,8 @@ async def update_document( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> gcd_document.Document: - r"""Updates a [Document][google.cloud.discoveryengine.v1.Document]. + r"""Updates a `Document + `__. .. code-block:: python @@ -768,21 +791,26 @@ async def sample_update_document(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.UpdateDocumentRequest, dict]]): The request object. Request message for - [DocumentService.UpdateDocument][google.cloud.discoveryengine.v1.DocumentService.UpdateDocument] + `DocumentService.UpdateDocument + `__ method. document (:class:`google.cloud.discoveryengine_v1.types.Document`): Required. The document to update/create. - If the caller does not have permission to update the - [Document][google.cloud.discoveryengine.v1.Document], - regardless of whether or not it exists, a - ``PERMISSION_DENIED`` error is returned. + If the caller does not have permission + to update the `Document + `__, + regardless of whether or not it exists, + a ``PERMISSION_DENIED`` error is + returned. - If the - [Document][google.cloud.discoveryengine.v1.Document] to - update does not exist and - [allow_missing][google.cloud.discoveryengine.v1.UpdateDocumentRequest.allow_missing] - is not set, a ``NOT_FOUND`` error is returned. + If the `Document + `__ + to update does not exist and + `allow_missing + `__ + is not set, a ``NOT_FOUND`` error is + returned. This corresponds to the ``document`` field on the ``request`` instance; if ``request`` is provided, this @@ -873,7 +901,8 @@ async def delete_document( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> None: - r"""Deletes a [Document][google.cloud.discoveryengine.v1.Document]. + r"""Deletes a `Document + `__. .. code-block:: python @@ -901,24 +930,28 @@ async def sample_delete_document(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.DeleteDocumentRequest, dict]]): The request object. Request message for - [DocumentService.DeleteDocument][google.cloud.discoveryengine.v1.DocumentService.DeleteDocument] + `DocumentService.DeleteDocument + `__ method. name (:class:`str`): Required. Full resource name of - [Document][google.cloud.discoveryengine.v1.Document], + `Document + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}``. - If the caller does not have permission to delete the - [Document][google.cloud.discoveryengine.v1.Document], - regardless of whether or not it exists, a - ``PERMISSION_DENIED`` error is returned. - - If the - [Document][google.cloud.discoveryengine.v1.Document] to - delete does not exist, a ``NOT_FOUND`` error is + If the caller does not have permission + to delete the `Document + `__, + regardless of whether or not it exists, + a ``PERMISSION_DENIED`` error is returned. + If the `Document + `__ + to delete does not exist, a + ``NOT_FOUND`` error is returned. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -985,12 +1018,14 @@ async def import_documents( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: r"""Bulk import of multiple - [Document][google.cloud.discoveryengine.v1.Document]s. Request - processing may be synchronous. Non-existing items are created. + `Document + `__s. Request + processing may be synchronous. Non-existing items are + created. Note: It is possible for a subset of the - [Document][google.cloud.discoveryengine.v1.Document]s to be - successfully updated. + `Document `__s + to be successfully updated. .. code-block:: python @@ -1035,14 +1070,17 @@ async def sample_import_documents(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1.types.ImportDocumentsResponse` Response of the - [ImportDocumentsRequest][google.cloud.discoveryengine.v1.ImportDocumentsRequest]. - If the long running operation is done, then this - message is returned by the - google.longrunning.Operations.response field if the - operation was successful. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1.types.ImportDocumentsResponse` + Response of the `ImportDocumentsRequest + `__. + If the long running operation is done, + then this message is returned by the + google.longrunning.Operations.response + field if the operation was successful. """ # Create or coerce a protobuf request object. @@ -1094,23 +1132,26 @@ async def purge_documents( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: r"""Permanently deletes all selected - [Document][google.cloud.discoveryengine.v1.Document]s in a - branch. + `Document `__s + in a branch. This process is asynchronous. Depending on the number of - [Document][google.cloud.discoveryengine.v1.Document]s to be - deleted, this operation can take hours to complete. Before the - delete operation completes, some - [Document][google.cloud.discoveryengine.v1.Document]s might - still be returned by - [DocumentService.GetDocument][google.cloud.discoveryengine.v1.DocumentService.GetDocument] + `Document `__s + to be deleted, this operation can take hours to + complete. Before the delete operation completes, some + `Document `__s + might still be returned by + `DocumentService.GetDocument + `__ or - [DocumentService.ListDocuments][google.cloud.discoveryengine.v1.DocumentService.ListDocuments]. + `DocumentService.ListDocuments + `__. - To get a list of the - [Document][google.cloud.discoveryengine.v1.Document]s to be + To get a list of the `Document + `__s to be deleted, set - [PurgeDocumentsRequest.force][google.cloud.discoveryengine.v1.PurgeDocumentsRequest.force] + `PurgeDocumentsRequest.force + `__ to false. .. code-block:: python @@ -1151,7 +1192,8 @@ async def sample_purge_documents(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.PurgeDocumentsRequest, dict]]): The request object. Request message for - [DocumentService.PurgeDocuments][google.cloud.discoveryengine.v1.DocumentService.PurgeDocuments] + `DocumentService.PurgeDocuments + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -1163,13 +1205,19 @@ async def sample_purge_documents(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1.types.PurgeDocumentsResponse` Response message for - [DocumentService.PurgeDocuments][google.cloud.discoveryengine.v1.DocumentService.PurgeDocuments] - method. If the long running operation is successfully - done, then this message is returned by the - google.longrunning.Operations.response field. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1.types.PurgeDocumentsResponse` + Response message for + `DocumentService.PurgeDocuments + `__ + method. If the long running operation is + successfully done, then this message is + returned by the + google.longrunning.Operations.response + field. """ # Create or coerce a protobuf request object. @@ -1224,8 +1272,9 @@ async def batch_get_documents_metadata( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> document_service.BatchGetDocumentsMetadataResponse: r"""Gets index freshness metadata for - [Document][google.cloud.discoveryengine.v1.Document]s. Supported - for website search only. + `Document + `__s. + Supported for website search only. .. code-block:: python @@ -1256,10 +1305,12 @@ async def sample_batch_get_documents_metadata(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.BatchGetDocumentsMetadataRequest, dict]]): The request object. Request message for - [DocumentService.BatchGetDocumentsMetadata][google.cloud.discoveryengine.v1.DocumentService.BatchGetDocumentsMetadata] + `DocumentService.BatchGetDocumentsMetadata + `__ method. parent (:class:`str`): - Required. The parent branch resource name, such as + Required. The parent branch resource + name, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}``. This corresponds to the ``parent`` field @@ -1276,8 +1327,9 @@ async def sample_batch_get_documents_metadata(): Returns: google.cloud.discoveryengine_v1.types.BatchGetDocumentsMetadataResponse: Response message for - [DocumentService.BatchGetDocumentsMetadata][google.cloud.discoveryengine.v1.DocumentService.BatchGetDocumentsMetadata] - method. + `DocumentService.BatchGetDocumentsMetadata + `__ + method. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/document_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/document_service/client.py index 4c1e6ce2f583..8239d9ad7066 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/document_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/document_service/client.py @@ -122,9 +122,9 @@ def get_transport_class( class DocumentServiceClient(metaclass=DocumentServiceClientMeta): - """Service for ingesting - [Document][google.cloud.discoveryengine.v1.Document] information of - the customer's website. + """Service for ingesting `Document + `__ information of the + customer's website. """ @staticmethod @@ -836,7 +836,8 @@ def get_document( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> document.Document: - r"""Gets a [Document][google.cloud.discoveryengine.v1.Document]. + r"""Gets a `Document + `__. .. code-block:: python @@ -867,22 +868,27 @@ def sample_get_document(): Args: request (Union[google.cloud.discoveryengine_v1.types.GetDocumentRequest, dict]): The request object. Request message for - [DocumentService.GetDocument][google.cloud.discoveryengine.v1.DocumentService.GetDocument] + `DocumentService.GetDocument + `__ method. name (str): Required. Full resource name of - [Document][google.cloud.discoveryengine.v1.Document], + `Document + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}``. - If the caller does not have permission to access the - [Document][google.cloud.discoveryengine.v1.Document], - regardless of whether or not it exists, a - ``PERMISSION_DENIED`` error is returned. + If the caller does not have permission + to access the `Document + `__, + regardless of whether or not it exists, + a ``PERMISSION_DENIED`` error is + returned. - If the requested - [Document][google.cloud.discoveryengine.v1.Document] - does not exist, a ``NOT_FOUND`` error is returned. + If the requested `Document + `__ + does not exist, a ``NOT_FOUND`` error is + returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -957,8 +963,8 @@ def list_documents( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListDocumentsPager: - r"""Gets a list of - [Document][google.cloud.discoveryengine.v1.Document]s. + r"""Gets a list of `Document + `__s. .. code-block:: python @@ -990,19 +996,23 @@ def sample_list_documents(): Args: request (Union[google.cloud.discoveryengine_v1.types.ListDocumentsRequest, dict]): The request object. Request message for - [DocumentService.ListDocuments][google.cloud.discoveryengine.v1.DocumentService.ListDocuments] + `DocumentService.ListDocuments + `__ method. parent (str): - Required. The parent branch resource name, such as + Required. The parent branch resource + name, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}``. - Use ``default_branch`` as the branch ID, to list - documents under the default branch. - - If the caller does not have permission to list - [Document][google.cloud.discoveryengine.v1.Document]s - under this branch, regardless of whether or not this - branch exists, a ``PERMISSION_DENIED`` error is - returned. + Use ``default_branch`` as the branch ID, + to list documents under the default + branch. + + If the caller does not have permission + to list `Document + `__s + under this branch, regardless of whether + or not this branch exists, a + ``PERMISSION_DENIED`` error is returned. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -1018,11 +1028,13 @@ def sample_list_documents(): Returns: google.cloud.discoveryengine_v1.services.document_service.pagers.ListDocumentsPager: Response message for - [DocumentService.ListDocuments][google.cloud.discoveryengine.v1.DocumentService.ListDocuments] - method. + `DocumentService.ListDocuments + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -1093,7 +1105,8 @@ def create_document( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> gcd_document.Document: - r"""Creates a [Document][google.cloud.discoveryengine.v1.Document]. + r"""Creates a `Document + `__. .. code-block:: python @@ -1125,44 +1138,53 @@ def sample_create_document(): Args: request (Union[google.cloud.discoveryengine_v1.types.CreateDocumentRequest, dict]): The request object. Request message for - [DocumentService.CreateDocument][google.cloud.discoveryengine.v1.DocumentService.CreateDocument] + `DocumentService.CreateDocument + `__ method. parent (str): - Required. The parent resource name, such as + Required. The parent resource name, such + as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. document (google.cloud.discoveryengine_v1.types.Document): - Required. The - [Document][google.cloud.discoveryengine.v1.Document] to - create. + Required. The `Document + `__ + to create. This corresponds to the ``document`` field on the ``request`` instance; if ``request`` is provided, this should not be set. document_id (str): Required. The ID to use for the - [Document][google.cloud.discoveryengine.v1.Document], + `Document + `__, which becomes the final component of the - [Document.name][google.cloud.discoveryengine.v1.Document.name]. - - If the caller does not have permission to create the - [Document][google.cloud.discoveryengine.v1.Document], - regardless of whether or not it exists, a - ``PERMISSION_DENIED`` error is returned. + `Document.name + `__. + + If the caller does not have permission + to create the `Document + `__, + regardless of whether or not it exists, + a ``PERMISSION_DENIED`` error is + returned. This field must be unique among all - [Document][google.cloud.discoveryengine.v1.Document]s - with the same - [parent][google.cloud.discoveryengine.v1.CreateDocumentRequest.parent]. - Otherwise, an ``ALREADY_EXISTS`` error is returned. - - This field must conform to - `RFC-1034 `__ - standard with a length limit of 128 characters. - Otherwise, an ``INVALID_ARGUMENT`` error is returned. + `Document + `__s + with the same `parent + `__. + Otherwise, an ``ALREADY_EXISTS`` error + is returned. + + This field must conform to `RFC-1034 + `__ + standard with a length limit of 128 + characters. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. This corresponds to the ``document_id`` field on the ``request`` instance; if ``request`` is provided, this @@ -1242,7 +1264,8 @@ def update_document( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> gcd_document.Document: - r"""Updates a [Document][google.cloud.discoveryengine.v1.Document]. + r"""Updates a `Document + `__. .. code-block:: python @@ -1272,21 +1295,26 @@ def sample_update_document(): Args: request (Union[google.cloud.discoveryengine_v1.types.UpdateDocumentRequest, dict]): The request object. Request message for - [DocumentService.UpdateDocument][google.cloud.discoveryengine.v1.DocumentService.UpdateDocument] + `DocumentService.UpdateDocument + `__ method. document (google.cloud.discoveryengine_v1.types.Document): Required. The document to update/create. - If the caller does not have permission to update the - [Document][google.cloud.discoveryengine.v1.Document], - regardless of whether or not it exists, a - ``PERMISSION_DENIED`` error is returned. + If the caller does not have permission + to update the `Document + `__, + regardless of whether or not it exists, + a ``PERMISSION_DENIED`` error is + returned. - If the - [Document][google.cloud.discoveryengine.v1.Document] to - update does not exist and - [allow_missing][google.cloud.discoveryengine.v1.UpdateDocumentRequest.allow_missing] - is not set, a ``NOT_FOUND`` error is returned. + If the `Document + `__ + to update does not exist and + `allow_missing + `__ + is not set, a ``NOT_FOUND`` error is + returned. This corresponds to the ``document`` field on the ``request`` instance; if ``request`` is provided, this @@ -1374,7 +1402,8 @@ def delete_document( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> None: - r"""Deletes a [Document][google.cloud.discoveryengine.v1.Document]. + r"""Deletes a `Document + `__. .. code-block:: python @@ -1402,24 +1431,28 @@ def sample_delete_document(): Args: request (Union[google.cloud.discoveryengine_v1.types.DeleteDocumentRequest, dict]): The request object. Request message for - [DocumentService.DeleteDocument][google.cloud.discoveryengine.v1.DocumentService.DeleteDocument] + `DocumentService.DeleteDocument + `__ method. name (str): Required. Full resource name of - [Document][google.cloud.discoveryengine.v1.Document], + `Document + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}``. - If the caller does not have permission to delete the - [Document][google.cloud.discoveryengine.v1.Document], - regardless of whether or not it exists, a - ``PERMISSION_DENIED`` error is returned. - - If the - [Document][google.cloud.discoveryengine.v1.Document] to - delete does not exist, a ``NOT_FOUND`` error is + If the caller does not have permission + to delete the `Document + `__, + regardless of whether or not it exists, + a ``PERMISSION_DENIED`` error is returned. + If the `Document + `__ + to delete does not exist, a + ``NOT_FOUND`` error is returned. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1483,12 +1516,14 @@ def import_documents( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: r"""Bulk import of multiple - [Document][google.cloud.discoveryengine.v1.Document]s. Request - processing may be synchronous. Non-existing items are created. + `Document + `__s. Request + processing may be synchronous. Non-existing items are + created. Note: It is possible for a subset of the - [Document][google.cloud.discoveryengine.v1.Document]s to be - successfully updated. + `Document `__s + to be successfully updated. .. code-block:: python @@ -1533,14 +1568,17 @@ def sample_import_documents(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1.types.ImportDocumentsResponse` Response of the - [ImportDocumentsRequest][google.cloud.discoveryengine.v1.ImportDocumentsRequest]. - If the long running operation is done, then this - message is returned by the - google.longrunning.Operations.response field if the - operation was successful. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1.types.ImportDocumentsResponse` + Response of the `ImportDocumentsRequest + `__. + If the long running operation is done, + then this message is returned by the + google.longrunning.Operations.response + field if the operation was successful. """ # Create or coerce a protobuf request object. @@ -1590,23 +1628,26 @@ def purge_documents( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: r"""Permanently deletes all selected - [Document][google.cloud.discoveryengine.v1.Document]s in a - branch. + `Document `__s + in a branch. This process is asynchronous. Depending on the number of - [Document][google.cloud.discoveryengine.v1.Document]s to be - deleted, this operation can take hours to complete. Before the - delete operation completes, some - [Document][google.cloud.discoveryengine.v1.Document]s might - still be returned by - [DocumentService.GetDocument][google.cloud.discoveryengine.v1.DocumentService.GetDocument] + `Document `__s + to be deleted, this operation can take hours to + complete. Before the delete operation completes, some + `Document `__s + might still be returned by + `DocumentService.GetDocument + `__ or - [DocumentService.ListDocuments][google.cloud.discoveryengine.v1.DocumentService.ListDocuments]. + `DocumentService.ListDocuments + `__. - To get a list of the - [Document][google.cloud.discoveryengine.v1.Document]s to be + To get a list of the `Document + `__s to be deleted, set - [PurgeDocumentsRequest.force][google.cloud.discoveryengine.v1.PurgeDocumentsRequest.force] + `PurgeDocumentsRequest.force + `__ to false. .. code-block:: python @@ -1647,7 +1688,8 @@ def sample_purge_documents(): Args: request (Union[google.cloud.discoveryengine_v1.types.PurgeDocumentsRequest, dict]): The request object. Request message for - [DocumentService.PurgeDocuments][google.cloud.discoveryengine.v1.DocumentService.PurgeDocuments] + `DocumentService.PurgeDocuments + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1659,13 +1701,19 @@ def sample_purge_documents(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1.types.PurgeDocumentsResponse` Response message for - [DocumentService.PurgeDocuments][google.cloud.discoveryengine.v1.DocumentService.PurgeDocuments] - method. If the long running operation is successfully - done, then this message is returned by the - google.longrunning.Operations.response field. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1.types.PurgeDocumentsResponse` + Response message for + `DocumentService.PurgeDocuments + `__ + method. If the long running operation is + successfully done, then this message is + returned by the + google.longrunning.Operations.response + field. """ # Create or coerce a protobuf request object. @@ -1718,8 +1766,9 @@ def batch_get_documents_metadata( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> document_service.BatchGetDocumentsMetadataResponse: r"""Gets index freshness metadata for - [Document][google.cloud.discoveryengine.v1.Document]s. Supported - for website search only. + `Document + `__s. + Supported for website search only. .. code-block:: python @@ -1750,10 +1799,12 @@ def sample_batch_get_documents_metadata(): Args: request (Union[google.cloud.discoveryengine_v1.types.BatchGetDocumentsMetadataRequest, dict]): The request object. Request message for - [DocumentService.BatchGetDocumentsMetadata][google.cloud.discoveryengine.v1.DocumentService.BatchGetDocumentsMetadata] + `DocumentService.BatchGetDocumentsMetadata + `__ method. parent (str): - Required. The parent branch resource name, such as + Required. The parent branch resource + name, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}``. This corresponds to the ``parent`` field @@ -1770,8 +1821,9 @@ def sample_batch_get_documents_metadata(): Returns: google.cloud.discoveryengine_v1.types.BatchGetDocumentsMetadataResponse: Response message for - [DocumentService.BatchGetDocumentsMetadata][google.cloud.discoveryengine.v1.DocumentService.BatchGetDocumentsMetadata] - method. + `DocumentService.BatchGetDocumentsMetadata + `__ + method. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/document_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/document_service/transports/base.py index 82c50be788d0..3013138e9ab9 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/document_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/document_service/transports/base.py @@ -91,8 +91,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -107,11 +105,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/document_service/transports/grpc.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/document_service/transports/grpc.py index 05e0a2d3f1d3..fc132a105b3a 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/document_service/transports/grpc.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/document_service/transports/grpc.py @@ -119,9 +119,9 @@ def intercept_unary_unary(self, continuation, client_call_details, request): class DocumentServiceGrpcTransport(DocumentServiceTransport): """gRPC backend transport for DocumentService. - Service for ingesting - [Document][google.cloud.discoveryengine.v1.Document] information of - the customer's website. + Service for ingesting `Document + `__ information of the + customer's website. This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -355,7 +355,8 @@ def get_document( ) -> Callable[[document_service.GetDocumentRequest], document.Document]: r"""Return a callable for the get document method over gRPC. - Gets a [Document][google.cloud.discoveryengine.v1.Document]. + Gets a `Document + `__. Returns: Callable[[~.GetDocumentRequest], @@ -383,8 +384,8 @@ def list_documents( ]: r"""Return a callable for the list documents method over gRPC. - Gets a list of - [Document][google.cloud.discoveryengine.v1.Document]s. + Gets a list of `Document + `__s. Returns: Callable[[~.ListDocumentsRequest], @@ -410,7 +411,8 @@ def create_document( ) -> Callable[[document_service.CreateDocumentRequest], gcd_document.Document]: r"""Return a callable for the create document method over gRPC. - Creates a [Document][google.cloud.discoveryengine.v1.Document]. + Creates a `Document + `__. Returns: Callable[[~.CreateDocumentRequest], @@ -436,7 +438,8 @@ def update_document( ) -> Callable[[document_service.UpdateDocumentRequest], gcd_document.Document]: r"""Return a callable for the update document method over gRPC. - Updates a [Document][google.cloud.discoveryengine.v1.Document]. + Updates a `Document + `__. Returns: Callable[[~.UpdateDocumentRequest], @@ -462,7 +465,8 @@ def delete_document( ) -> Callable[[document_service.DeleteDocumentRequest], empty_pb2.Empty]: r"""Return a callable for the delete document method over gRPC. - Deletes a [Document][google.cloud.discoveryengine.v1.Document]. + Deletes a `Document + `__. Returns: Callable[[~.DeleteDocumentRequest], @@ -489,12 +493,14 @@ def import_documents( r"""Return a callable for the import documents method over gRPC. Bulk import of multiple - [Document][google.cloud.discoveryengine.v1.Document]s. Request - processing may be synchronous. Non-existing items are created. + `Document + `__s. Request + processing may be synchronous. Non-existing items are + created. Note: It is possible for a subset of the - [Document][google.cloud.discoveryengine.v1.Document]s to be - successfully updated. + `Document `__s + to be successfully updated. Returns: Callable[[~.ImportDocumentsRequest], @@ -521,23 +527,26 @@ def purge_documents( r"""Return a callable for the purge documents method over gRPC. Permanently deletes all selected - [Document][google.cloud.discoveryengine.v1.Document]s in a - branch. + `Document `__s + in a branch. This process is asynchronous. Depending on the number of - [Document][google.cloud.discoveryengine.v1.Document]s to be - deleted, this operation can take hours to complete. Before the - delete operation completes, some - [Document][google.cloud.discoveryengine.v1.Document]s might - still be returned by - [DocumentService.GetDocument][google.cloud.discoveryengine.v1.DocumentService.GetDocument] + `Document `__s + to be deleted, this operation can take hours to + complete. Before the delete operation completes, some + `Document `__s + might still be returned by + `DocumentService.GetDocument + `__ or - [DocumentService.ListDocuments][google.cloud.discoveryengine.v1.DocumentService.ListDocuments]. + `DocumentService.ListDocuments + `__. - To get a list of the - [Document][google.cloud.discoveryengine.v1.Document]s to be + To get a list of the `Document + `__s to be deleted, set - [PurgeDocumentsRequest.force][google.cloud.discoveryengine.v1.PurgeDocumentsRequest.force] + `PurgeDocumentsRequest.force + `__ to false. Returns: @@ -568,8 +577,9 @@ def batch_get_documents_metadata( r"""Return a callable for the batch get documents metadata method over gRPC. Gets index freshness metadata for - [Document][google.cloud.discoveryengine.v1.Document]s. Supported - for website search only. + `Document + `__s. + Supported for website search only. Returns: Callable[[~.BatchGetDocumentsMetadataRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/document_service/transports/grpc_asyncio.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/document_service/transports/grpc_asyncio.py index 77f762d0e1d3..d9af31ec0683 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/document_service/transports/grpc_asyncio.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/document_service/transports/grpc_asyncio.py @@ -125,9 +125,9 @@ async def intercept_unary_unary(self, continuation, client_call_details, request class DocumentServiceGrpcAsyncIOTransport(DocumentServiceTransport): """gRPC AsyncIO backend transport for DocumentService. - Service for ingesting - [Document][google.cloud.discoveryengine.v1.Document] information of - the customer's website. + Service for ingesting `Document + `__ information of the + customer's website. This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -363,7 +363,8 @@ def get_document( ) -> Callable[[document_service.GetDocumentRequest], Awaitable[document.Document]]: r"""Return a callable for the get document method over gRPC. - Gets a [Document][google.cloud.discoveryengine.v1.Document]. + Gets a `Document + `__. Returns: Callable[[~.GetDocumentRequest], @@ -392,8 +393,8 @@ def list_documents( ]: r"""Return a callable for the list documents method over gRPC. - Gets a list of - [Document][google.cloud.discoveryengine.v1.Document]s. + Gets a list of `Document + `__s. Returns: Callable[[~.ListDocumentsRequest], @@ -421,7 +422,8 @@ def create_document( ]: r"""Return a callable for the create document method over gRPC. - Creates a [Document][google.cloud.discoveryengine.v1.Document]. + Creates a `Document + `__. Returns: Callable[[~.CreateDocumentRequest], @@ -449,7 +451,8 @@ def update_document( ]: r"""Return a callable for the update document method over gRPC. - Updates a [Document][google.cloud.discoveryengine.v1.Document]. + Updates a `Document + `__. Returns: Callable[[~.UpdateDocumentRequest], @@ -475,7 +478,8 @@ def delete_document( ) -> Callable[[document_service.DeleteDocumentRequest], Awaitable[empty_pb2.Empty]]: r"""Return a callable for the delete document method over gRPC. - Deletes a [Document][google.cloud.discoveryengine.v1.Document]. + Deletes a `Document + `__. Returns: Callable[[~.DeleteDocumentRequest], @@ -504,12 +508,14 @@ def import_documents( r"""Return a callable for the import documents method over gRPC. Bulk import of multiple - [Document][google.cloud.discoveryengine.v1.Document]s. Request - processing may be synchronous. Non-existing items are created. + `Document + `__s. Request + processing may be synchronous. Non-existing items are + created. Note: It is possible for a subset of the - [Document][google.cloud.discoveryengine.v1.Document]s to be - successfully updated. + `Document `__s + to be successfully updated. Returns: Callable[[~.ImportDocumentsRequest], @@ -538,23 +544,26 @@ def purge_documents( r"""Return a callable for the purge documents method over gRPC. Permanently deletes all selected - [Document][google.cloud.discoveryengine.v1.Document]s in a - branch. + `Document `__s + in a branch. This process is asynchronous. Depending on the number of - [Document][google.cloud.discoveryengine.v1.Document]s to be - deleted, this operation can take hours to complete. Before the - delete operation completes, some - [Document][google.cloud.discoveryengine.v1.Document]s might - still be returned by - [DocumentService.GetDocument][google.cloud.discoveryengine.v1.DocumentService.GetDocument] + `Document `__s + to be deleted, this operation can take hours to + complete. Before the delete operation completes, some + `Document `__s + might still be returned by + `DocumentService.GetDocument + `__ or - [DocumentService.ListDocuments][google.cloud.discoveryengine.v1.DocumentService.ListDocuments]. + `DocumentService.ListDocuments + `__. - To get a list of the - [Document][google.cloud.discoveryengine.v1.Document]s to be + To get a list of the `Document + `__s to be deleted, set - [PurgeDocumentsRequest.force][google.cloud.discoveryengine.v1.PurgeDocumentsRequest.force] + `PurgeDocumentsRequest.force + `__ to false. Returns: @@ -585,8 +594,9 @@ def batch_get_documents_metadata( r"""Return a callable for the batch get documents metadata method over gRPC. Gets index freshness metadata for - [Document][google.cloud.discoveryengine.v1.Document]s. Supported - for website search only. + `Document + `__s. + Supported for website search only. Returns: Callable[[~.BatchGetDocumentsMetadataRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/document_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/document_service/transports/rest.py index 50a4d46dde6f..15487b320251 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/document_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/document_service/transports/rest.py @@ -585,9 +585,9 @@ class DocumentServiceRestStub: class DocumentServiceRestTransport(_BaseDocumentServiceRestTransport): """REST backend synchronous transport for DocumentService. - Service for ingesting - [Document][google.cloud.discoveryengine.v1.Document] information of - the customer's website. + Service for ingesting `Document + `__ information of the + customer's website. This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -890,7 +890,8 @@ def __call__( Args: request (~.document_service.BatchGetDocumentsMetadataRequest): The request object. Request message for - [DocumentService.BatchGetDocumentsMetadata][google.cloud.discoveryengine.v1.DocumentService.BatchGetDocumentsMetadata] + `DocumentService.BatchGetDocumentsMetadata + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -903,7 +904,8 @@ def __call__( Returns: ~.document_service.BatchGetDocumentsMetadataResponse: Response message for - [DocumentService.BatchGetDocumentsMetadata][google.cloud.discoveryengine.v1.DocumentService.BatchGetDocumentsMetadata] + `DocumentService.BatchGetDocumentsMetadata + `__ method. """ @@ -1048,7 +1050,8 @@ def __call__( Args: request (~.document_service.CreateDocumentRequest): The request object. Request message for - [DocumentService.CreateDocument][google.cloud.discoveryengine.v1.DocumentService.CreateDocument] + `DocumentService.CreateDocument + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1202,7 +1205,8 @@ def __call__( Args: request (~.document_service.DeleteDocumentRequest): The request object. Request message for - [DocumentService.DeleteDocument][google.cloud.discoveryengine.v1.DocumentService.DeleteDocument] + `DocumentService.DeleteDocument + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1310,7 +1314,8 @@ def __call__( Args: request (~.document_service.GetDocumentRequest): The request object. Request message for - [DocumentService.GetDocument][google.cloud.discoveryengine.v1.DocumentService.GetDocument] + `DocumentService.GetDocument + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1612,7 +1617,8 @@ def __call__( Args: request (~.document_service.ListDocumentsRequest): The request object. Request message for - [DocumentService.ListDocuments][google.cloud.discoveryengine.v1.DocumentService.ListDocuments] + `DocumentService.ListDocuments + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1625,7 +1631,8 @@ def __call__( Returns: ~.document_service.ListDocumentsResponse: Response message for - [DocumentService.ListDocuments][google.cloud.discoveryengine.v1.DocumentService.ListDocuments] + `DocumentService.ListDocuments + `__ method. """ @@ -1764,7 +1771,8 @@ def __call__( Args: request (~.purge_config.PurgeDocumentsRequest): The request object. Request message for - [DocumentService.PurgeDocuments][google.cloud.discoveryengine.v1.DocumentService.PurgeDocuments] + `DocumentService.PurgeDocuments + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1917,7 +1925,8 @@ def __call__( Args: request (~.document_service.UpdateDocumentRequest): The request object. Request message for - [DocumentService.UpdateDocument][google.cloud.discoveryengine.v1.DocumentService.UpdateDocument] + `DocumentService.UpdateDocument + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/engine_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/engine_service/async_client.py index 925b30d7dfeb..a65436064ad6 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/engine_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/engine_service/async_client.py @@ -73,8 +73,8 @@ class EngineServiceAsyncClient: - """Service for managing - [Engine][google.cloud.discoveryengine.v1.Engine] configuration. + """Service for managing `Engine + `__ configuration. """ _client: EngineServiceClient @@ -313,7 +313,8 @@ async def create_engine( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: - r"""Creates a [Engine][google.cloud.discoveryengine.v1.Engine]. + r"""Creates a `Engine + `__. .. code-block:: python @@ -354,34 +355,39 @@ async def sample_create_engine(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.CreateEngineRequest, dict]]): The request object. Request for - [EngineService.CreateEngine][google.cloud.discoveryengine.v1.EngineService.CreateEngine] + `EngineService.CreateEngine + `__ method. parent (:class:`str`): - Required. The parent resource name, such as + Required. The parent resource name, such + as ``projects/{project}/locations/{location}/collections/{collection}``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. engine (:class:`google.cloud.discoveryengine_v1.types.Engine`): - Required. The - [Engine][google.cloud.discoveryengine.v1.Engine] to - create. + Required. The `Engine + `__ + to create. This corresponds to the ``engine`` field on the ``request`` instance; if ``request`` is provided, this should not be set. engine_id (:class:`str`): Required. The ID to use for the - [Engine][google.cloud.discoveryengine.v1.Engine], which - will become the final component of the - [Engine][google.cloud.discoveryengine.v1.Engine]'s + `Engine + `__, + which will become the final component of + the `Engine + `__'s resource name. - This field must conform to - `RFC-1034 `__ - standard with a length limit of 63 characters. - Otherwise, an INVALID_ARGUMENT error is returned. + This field must conform to `RFC-1034 + `__ + standard with a length limit of 63 + characters. Otherwise, an + INVALID_ARGUMENT error is returned. This corresponds to the ``engine_id`` field on the ``request`` instance; if ``request`` is provided, this @@ -396,10 +402,14 @@ async def sample_create_engine(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1.types.Engine` Metadata that describes the training and serving parameters of an - [Engine][google.cloud.discoveryengine.v1.Engine]. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1.types.Engine` + Metadata that describes the training and + serving parameters of an `Engine + `__. """ # Create or coerce a protobuf request object. @@ -472,7 +482,8 @@ async def delete_engine( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: - r"""Deletes a [Engine][google.cloud.discoveryengine.v1.Engine]. + r"""Deletes a `Engine + `__. .. code-block:: python @@ -507,21 +518,26 @@ async def sample_delete_engine(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.DeleteEngineRequest, dict]]): The request object. Request message for - [EngineService.DeleteEngine][google.cloud.discoveryengine.v1.EngineService.DeleteEngine] + `EngineService.DeleteEngine + `__ method. name (:class:`str`): Required. Full resource name of - [Engine][google.cloud.discoveryengine.v1.Engine], such - as + `Engine + `__, + such as ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}``. - If the caller does not have permission to delete the - [Engine][google.cloud.discoveryengine.v1.Engine], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to delete the `Engine + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. - If the [Engine][google.cloud.discoveryengine.v1.Engine] - to delete does not exist, a NOT_FOUND error is returned. + If the `Engine + `__ + to delete does not exist, a NOT_FOUND + error is returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -536,18 +552,21 @@ async def sample_delete_engine(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.protobuf.empty_pb2.Empty` A generic empty message that you can re-use to avoid defining duplicated - empty messages in your APIs. A typical example is to - use it as the request or the response type of an API - method. For instance: - - service Foo { - rpc Bar(google.protobuf.Empty) returns - (google.protobuf.Empty); - - } + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.protobuf.empty_pb2.Empty` + A generic empty message that you can + re-use to avoid defining duplicated + empty messages in your APIs. A typical + example is to use it as the request or + the response type of an API method. For + instance: + + service Foo { + rpc Bar(google.protobuf.Empty) + returns (google.protobuf.Empty); } """ # Create or coerce a protobuf request object. @@ -617,7 +636,8 @@ async def update_engine( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> gcd_engine.Engine: - r"""Updates an [Engine][google.cloud.discoveryengine.v1.Engine] + r"""Updates an `Engine + `__ .. code-block:: python @@ -652,31 +672,35 @@ async def sample_update_engine(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.UpdateEngineRequest, dict]]): The request object. Request message for - [EngineService.UpdateEngine][google.cloud.discoveryengine.v1.EngineService.UpdateEngine] + `EngineService.UpdateEngine + `__ method. engine (:class:`google.cloud.discoveryengine_v1.types.Engine`): - Required. The - [Engine][google.cloud.discoveryengine.v1.Engine] to - update. - - If the caller does not have permission to update the - [Engine][google.cloud.discoveryengine.v1.Engine], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. - - If the [Engine][google.cloud.discoveryengine.v1.Engine] - to update does not exist, a NOT_FOUND error is returned. + Required. The `Engine + `__ + to update. If the caller does not have + permission to update the `Engine + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. + + If the `Engine + `__ + to update does not exist, a NOT_FOUND + error is returned. This corresponds to the ``engine`` field on the ``request`` instance; if ``request`` is provided, this should not be set. update_mask (:class:`google.protobuf.field_mask_pb2.FieldMask`): Indicates which fields in the provided - [Engine][google.cloud.discoveryengine.v1.Engine] to - update. + `Engine + `__ + to update. - If an unsupported or unknown field is provided, an - INVALID_ARGUMENT error is returned. + If an unsupported or unknown field is + provided, an INVALID_ARGUMENT error is + returned. This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this @@ -691,8 +715,9 @@ async def sample_update_engine(): Returns: google.cloud.discoveryengine_v1.types.Engine: - Metadata that describes the training and serving parameters of an - [Engine][google.cloud.discoveryengine.v1.Engine]. + Metadata that describes the training and + serving parameters of an `Engine + `__. """ # Create or coerce a protobuf request object. @@ -757,7 +782,8 @@ async def get_engine( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> engine.Engine: - r"""Gets a [Engine][google.cloud.discoveryengine.v1.Engine]. + r"""Gets a `Engine + `__. .. code-block:: python @@ -788,12 +814,14 @@ async def sample_get_engine(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.GetEngineRequest, dict]]): The request object. Request message for - [EngineService.GetEngine][google.cloud.discoveryengine.v1.EngineService.GetEngine] + `EngineService.GetEngine + `__ method. name (:class:`str`): Required. Full resource name of - [Engine][google.cloud.discoveryengine.v1.Engine], such - as + `Engine + `__, + such as ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}``. This corresponds to the ``name`` field @@ -809,8 +837,9 @@ async def sample_get_engine(): Returns: google.cloud.discoveryengine_v1.types.Engine: - Metadata that describes the training and serving parameters of an - [Engine][google.cloud.discoveryengine.v1.Engine]. + Metadata that describes the training and + serving parameters of an `Engine + `__. """ # Create or coerce a protobuf request object. @@ -871,8 +900,9 @@ async def list_engines( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListEnginesAsyncPager: - r"""Lists all the [Engine][google.cloud.discoveryengine.v1.Engine]s - associated with the project. + r"""Lists all the `Engine + `__s associated + with the project. .. code-block:: python @@ -904,10 +934,12 @@ async def sample_list_engines(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.ListEnginesRequest, dict]]): The request object. Request message for - [EngineService.ListEngines][google.cloud.discoveryengine.v1.EngineService.ListEngines] + `EngineService.ListEngines + `__ method. parent (:class:`str`): - Required. The parent resource name, such as + Required. The parent resource name, such + as ``projects/{project}/locations/{location}/collections/{collection_id}``. This corresponds to the ``parent`` field @@ -924,11 +956,13 @@ async def sample_list_engines(): Returns: google.cloud.discoveryengine_v1.services.engine_service.pagers.ListEnginesAsyncPager: Response message for - [EngineService.ListEngines][google.cloud.discoveryengine.v1.EngineService.ListEngines] - method. + `EngineService.ListEngines + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/engine_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/engine_service/client.py index 52262f45fb30..28a49b5152bd 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/engine_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/engine_service/client.py @@ -117,8 +117,8 @@ def get_transport_class( class EngineServiceClient(metaclass=EngineServiceClientMeta): - """Service for managing - [Engine][google.cloud.discoveryengine.v1.Engine] configuration. + """Service for managing `Engine + `__ configuration. """ @staticmethod @@ -776,7 +776,8 @@ def create_engine( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: - r"""Creates a [Engine][google.cloud.discoveryengine.v1.Engine]. + r"""Creates a `Engine + `__. .. code-block:: python @@ -817,34 +818,39 @@ def sample_create_engine(): Args: request (Union[google.cloud.discoveryengine_v1.types.CreateEngineRequest, dict]): The request object. Request for - [EngineService.CreateEngine][google.cloud.discoveryengine.v1.EngineService.CreateEngine] + `EngineService.CreateEngine + `__ method. parent (str): - Required. The parent resource name, such as + Required. The parent resource name, such + as ``projects/{project}/locations/{location}/collections/{collection}``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. engine (google.cloud.discoveryengine_v1.types.Engine): - Required. The - [Engine][google.cloud.discoveryengine.v1.Engine] to - create. + Required. The `Engine + `__ + to create. This corresponds to the ``engine`` field on the ``request`` instance; if ``request`` is provided, this should not be set. engine_id (str): Required. The ID to use for the - [Engine][google.cloud.discoveryengine.v1.Engine], which - will become the final component of the - [Engine][google.cloud.discoveryengine.v1.Engine]'s + `Engine + `__, + which will become the final component of + the `Engine + `__'s resource name. - This field must conform to - `RFC-1034 `__ - standard with a length limit of 63 characters. - Otherwise, an INVALID_ARGUMENT error is returned. + This field must conform to `RFC-1034 + `__ + standard with a length limit of 63 + characters. Otherwise, an + INVALID_ARGUMENT error is returned. This corresponds to the ``engine_id`` field on the ``request`` instance; if ``request`` is provided, this @@ -859,10 +865,14 @@ def sample_create_engine(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1.types.Engine` Metadata that describes the training and serving parameters of an - [Engine][google.cloud.discoveryengine.v1.Engine]. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1.types.Engine` + Metadata that describes the training and + serving parameters of an `Engine + `__. """ # Create or coerce a protobuf request object. @@ -932,7 +942,8 @@ def delete_engine( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: - r"""Deletes a [Engine][google.cloud.discoveryengine.v1.Engine]. + r"""Deletes a `Engine + `__. .. code-block:: python @@ -967,21 +978,26 @@ def sample_delete_engine(): Args: request (Union[google.cloud.discoveryengine_v1.types.DeleteEngineRequest, dict]): The request object. Request message for - [EngineService.DeleteEngine][google.cloud.discoveryengine.v1.EngineService.DeleteEngine] + `EngineService.DeleteEngine + `__ method. name (str): Required. Full resource name of - [Engine][google.cloud.discoveryengine.v1.Engine], such - as + `Engine + `__, + such as ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}``. - If the caller does not have permission to delete the - [Engine][google.cloud.discoveryengine.v1.Engine], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to delete the `Engine + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. - If the [Engine][google.cloud.discoveryengine.v1.Engine] - to delete does not exist, a NOT_FOUND error is returned. + If the `Engine + `__ + to delete does not exist, a NOT_FOUND + error is returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -996,18 +1012,21 @@ def sample_delete_engine(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.protobuf.empty_pb2.Empty` A generic empty message that you can re-use to avoid defining duplicated - empty messages in your APIs. A typical example is to - use it as the request or the response type of an API - method. For instance: - - service Foo { - rpc Bar(google.protobuf.Empty) returns - (google.protobuf.Empty); - - } + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.protobuf.empty_pb2.Empty` + A generic empty message that you can + re-use to avoid defining duplicated + empty messages in your APIs. A typical + example is to use it as the request or + the response type of an API method. For + instance: + + service Foo { + rpc Bar(google.protobuf.Empty) + returns (google.protobuf.Empty); } """ # Create or coerce a protobuf request object. @@ -1074,7 +1093,8 @@ def update_engine( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> gcd_engine.Engine: - r"""Updates an [Engine][google.cloud.discoveryengine.v1.Engine] + r"""Updates an `Engine + `__ .. code-block:: python @@ -1109,31 +1129,35 @@ def sample_update_engine(): Args: request (Union[google.cloud.discoveryengine_v1.types.UpdateEngineRequest, dict]): The request object. Request message for - [EngineService.UpdateEngine][google.cloud.discoveryengine.v1.EngineService.UpdateEngine] + `EngineService.UpdateEngine + `__ method. engine (google.cloud.discoveryengine_v1.types.Engine): - Required. The - [Engine][google.cloud.discoveryengine.v1.Engine] to - update. - - If the caller does not have permission to update the - [Engine][google.cloud.discoveryengine.v1.Engine], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. - - If the [Engine][google.cloud.discoveryengine.v1.Engine] - to update does not exist, a NOT_FOUND error is returned. + Required. The `Engine + `__ + to update. If the caller does not have + permission to update the `Engine + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. + + If the `Engine + `__ + to update does not exist, a NOT_FOUND + error is returned. This corresponds to the ``engine`` field on the ``request`` instance; if ``request`` is provided, this should not be set. update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided - [Engine][google.cloud.discoveryengine.v1.Engine] to - update. + `Engine + `__ + to update. - If an unsupported or unknown field is provided, an - INVALID_ARGUMENT error is returned. + If an unsupported or unknown field is + provided, an INVALID_ARGUMENT error is + returned. This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this @@ -1148,8 +1172,9 @@ def sample_update_engine(): Returns: google.cloud.discoveryengine_v1.types.Engine: - Metadata that describes the training and serving parameters of an - [Engine][google.cloud.discoveryengine.v1.Engine]. + Metadata that describes the training and + serving parameters of an `Engine + `__. """ # Create or coerce a protobuf request object. @@ -1211,7 +1236,8 @@ def get_engine( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> engine.Engine: - r"""Gets a [Engine][google.cloud.discoveryengine.v1.Engine]. + r"""Gets a `Engine + `__. .. code-block:: python @@ -1242,12 +1268,14 @@ def sample_get_engine(): Args: request (Union[google.cloud.discoveryengine_v1.types.GetEngineRequest, dict]): The request object. Request message for - [EngineService.GetEngine][google.cloud.discoveryengine.v1.EngineService.GetEngine] + `EngineService.GetEngine + `__ method. name (str): Required. Full resource name of - [Engine][google.cloud.discoveryengine.v1.Engine], such - as + `Engine + `__, + such as ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}``. This corresponds to the ``name`` field @@ -1263,8 +1291,9 @@ def sample_get_engine(): Returns: google.cloud.discoveryengine_v1.types.Engine: - Metadata that describes the training and serving parameters of an - [Engine][google.cloud.discoveryengine.v1.Engine]. + Metadata that describes the training and + serving parameters of an `Engine + `__. """ # Create or coerce a protobuf request object. @@ -1322,8 +1351,9 @@ def list_engines( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListEnginesPager: - r"""Lists all the [Engine][google.cloud.discoveryengine.v1.Engine]s - associated with the project. + r"""Lists all the `Engine + `__s associated + with the project. .. code-block:: python @@ -1355,10 +1385,12 @@ def sample_list_engines(): Args: request (Union[google.cloud.discoveryengine_v1.types.ListEnginesRequest, dict]): The request object. Request message for - [EngineService.ListEngines][google.cloud.discoveryengine.v1.EngineService.ListEngines] + `EngineService.ListEngines + `__ method. parent (str): - Required. The parent resource name, such as + Required. The parent resource name, such + as ``projects/{project}/locations/{location}/collections/{collection_id}``. This corresponds to the ``parent`` field @@ -1375,11 +1407,13 @@ def sample_list_engines(): Returns: google.cloud.discoveryengine_v1.services.engine_service.pagers.ListEnginesPager: Response message for - [EngineService.ListEngines][google.cloud.discoveryengine.v1.EngineService.ListEngines] - method. + `EngineService.ListEngines + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/engine_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/engine_service/transports/base.py index 057af87e23ae..13e85acfd20d 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/engine_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/engine_service/transports/base.py @@ -86,8 +86,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -102,11 +100,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/engine_service/transports/grpc.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/engine_service/transports/grpc.py index c3cfe00e1a7c..702256588298 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/engine_service/transports/grpc.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/engine_service/transports/grpc.py @@ -114,8 +114,8 @@ def intercept_unary_unary(self, continuation, client_call_details, request): class EngineServiceGrpcTransport(EngineServiceTransport): """gRPC backend transport for EngineService. - Service for managing - [Engine][google.cloud.discoveryengine.v1.Engine] configuration. + Service for managing `Engine + `__ configuration. This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -349,7 +349,8 @@ def create_engine( ) -> Callable[[engine_service.CreateEngineRequest], operations_pb2.Operation]: r"""Return a callable for the create engine method over gRPC. - Creates a [Engine][google.cloud.discoveryengine.v1.Engine]. + Creates a `Engine + `__. Returns: Callable[[~.CreateEngineRequest], @@ -375,7 +376,8 @@ def delete_engine( ) -> Callable[[engine_service.DeleteEngineRequest], operations_pb2.Operation]: r"""Return a callable for the delete engine method over gRPC. - Deletes a [Engine][google.cloud.discoveryengine.v1.Engine]. + Deletes a `Engine + `__. Returns: Callable[[~.DeleteEngineRequest], @@ -401,7 +403,8 @@ def update_engine( ) -> Callable[[engine_service.UpdateEngineRequest], gcd_engine.Engine]: r"""Return a callable for the update engine method over gRPC. - Updates an [Engine][google.cloud.discoveryengine.v1.Engine] + Updates an `Engine + `__ Returns: Callable[[~.UpdateEngineRequest], @@ -425,7 +428,8 @@ def update_engine( def get_engine(self) -> Callable[[engine_service.GetEngineRequest], engine.Engine]: r"""Return a callable for the get engine method over gRPC. - Gets a [Engine][google.cloud.discoveryengine.v1.Engine]. + Gets a `Engine + `__. Returns: Callable[[~.GetEngineRequest], @@ -453,8 +457,9 @@ def list_engines( ]: r"""Return a callable for the list engines method over gRPC. - Lists all the [Engine][google.cloud.discoveryengine.v1.Engine]s - associated with the project. + Lists all the `Engine + `__s associated + with the project. Returns: Callable[[~.ListEnginesRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/engine_service/transports/grpc_asyncio.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/engine_service/transports/grpc_asyncio.py index af710f3f1ef7..da8765164075 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/engine_service/transports/grpc_asyncio.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/engine_service/transports/grpc_asyncio.py @@ -120,8 +120,8 @@ async def intercept_unary_unary(self, continuation, client_call_details, request class EngineServiceGrpcAsyncIOTransport(EngineServiceTransport): """gRPC AsyncIO backend transport for EngineService. - Service for managing - [Engine][google.cloud.discoveryengine.v1.Engine] configuration. + Service for managing `Engine + `__ configuration. This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -359,7 +359,8 @@ def create_engine( ]: r"""Return a callable for the create engine method over gRPC. - Creates a [Engine][google.cloud.discoveryengine.v1.Engine]. + Creates a `Engine + `__. Returns: Callable[[~.CreateEngineRequest], @@ -387,7 +388,8 @@ def delete_engine( ]: r"""Return a callable for the delete engine method over gRPC. - Deletes a [Engine][google.cloud.discoveryengine.v1.Engine]. + Deletes a `Engine + `__. Returns: Callable[[~.DeleteEngineRequest], @@ -413,7 +415,8 @@ def update_engine( ) -> Callable[[engine_service.UpdateEngineRequest], Awaitable[gcd_engine.Engine]]: r"""Return a callable for the update engine method over gRPC. - Updates an [Engine][google.cloud.discoveryengine.v1.Engine] + Updates an `Engine + `__ Returns: Callable[[~.UpdateEngineRequest], @@ -439,7 +442,8 @@ def get_engine( ) -> Callable[[engine_service.GetEngineRequest], Awaitable[engine.Engine]]: r"""Return a callable for the get engine method over gRPC. - Gets a [Engine][google.cloud.discoveryengine.v1.Engine]. + Gets a `Engine + `__. Returns: Callable[[~.GetEngineRequest], @@ -468,8 +472,9 @@ def list_engines( ]: r"""Return a callable for the list engines method over gRPC. - Lists all the [Engine][google.cloud.discoveryengine.v1.Engine]s - associated with the project. + Lists all the `Engine + `__s associated + with the project. Returns: Callable[[~.ListEnginesRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/engine_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/engine_service/transports/rest.py index 5db6c2f5a8fe..12669f290f4b 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/engine_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/engine_service/transports/rest.py @@ -442,8 +442,8 @@ class EngineServiceRestStub: class EngineServiceRestTransport(_BaseEngineServiceRestTransport): """REST backend synchronous transport for EngineService. - Service for managing - [Engine][google.cloud.discoveryengine.v1.Engine] configuration. + Service for managing `Engine + `__ configuration. This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -745,7 +745,8 @@ def __call__( Args: request (~.engine_service.CreateEngineRequest): The request object. Request for - [EngineService.CreateEngine][google.cloud.discoveryengine.v1.EngineService.CreateEngine] + `EngineService.CreateEngine + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -897,7 +898,8 @@ def __call__( Args: request (~.engine_service.DeleteEngineRequest): The request object. Request message for - [EngineService.DeleteEngine][google.cloud.discoveryengine.v1.EngineService.DeleteEngine] + `EngineService.DeleteEngine + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1044,7 +1046,8 @@ def __call__( Args: request (~.engine_service.GetEngineRequest): The request object. Request message for - [EngineService.GetEngine][google.cloud.discoveryengine.v1.EngineService.GetEngine] + `EngineService.GetEngine + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1056,9 +1059,9 @@ def __call__( Returns: ~.engine.Engine: - Metadata that describes the training and serving - parameters of an - [Engine][google.cloud.discoveryengine.v1.Engine]. + Metadata that describes the training and + serving parameters of an `Engine + `__. """ @@ -1197,7 +1200,8 @@ def __call__( Args: request (~.engine_service.ListEnginesRequest): The request object. Request message for - [EngineService.ListEngines][google.cloud.discoveryengine.v1.EngineService.ListEngines] + `EngineService.ListEngines + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1210,7 +1214,8 @@ def __call__( Returns: ~.engine_service.ListEnginesResponse: Response message for - [EngineService.ListEngines][google.cloud.discoveryengine.v1.EngineService.ListEngines] + `EngineService.ListEngines + `__ method. """ @@ -1351,7 +1356,8 @@ def __call__( Args: request (~.engine_service.UpdateEngineRequest): The request object. Request message for - [EngineService.UpdateEngine][google.cloud.discoveryengine.v1.EngineService.UpdateEngine] + `EngineService.UpdateEngine + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1363,9 +1369,9 @@ def __call__( Returns: ~.gcd_engine.Engine: - Metadata that describes the training and serving - parameters of an - [Engine][google.cloud.discoveryengine.v1.Engine]. + Metadata that describes the training and + serving parameters of an `Engine + `__. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/grounded_generation_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/grounded_generation_service/async_client.py index f6720459006b..962a1a9cd7de 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/grounded_generation_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/grounded_generation_service/async_client.py @@ -371,8 +371,8 @@ def request_generator(): Args: requests (AsyncIterator[`google.cloud.discoveryengine_v1.types.GenerateGroundedContentRequest`]): - The request object AsyncIterator. Top-level message sent by the client for the - ``GenerateGroundedContent`` method. + The request object AsyncIterator. Top-level message sent by the client for + the ``GenerateGroundedContent`` method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -383,7 +383,9 @@ def request_generator(): Returns: AsyncIterable[google.cloud.discoveryengine_v1.types.GenerateGroundedContentResponse]: - Response for the GenerateGroundedContent method. + Response for the + ``GenerateGroundedContent`` method. + """ # Wrap the RPC method; this adds retry and timeout information, @@ -450,8 +452,8 @@ async def sample_generate_grounded_content(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.GenerateGroundedContentRequest, dict]]): - The request object. Top-level message sent by the client for the - ``GenerateGroundedContent`` method. + The request object. Top-level message sent by the client for + the ``GenerateGroundedContent`` method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -462,7 +464,9 @@ async def sample_generate_grounded_content(): Returns: google.cloud.discoveryengine_v1.types.GenerateGroundedContentResponse: - Response for the GenerateGroundedContent method. + Response for the + ``GenerateGroundedContent`` method. + """ # Create or coerce a protobuf request object. # - Use the request object if provided (there's no risk of modifying the input as @@ -541,7 +545,8 @@ async def sample_check_grounding(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.CheckGroundingRequest, dict]]): The request object. Request message for - [GroundedGenerationService.CheckGrounding][google.cloud.discoveryengine.v1.GroundedGenerationService.CheckGrounding] + `GroundedGenerationService.CheckGrounding + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -554,8 +559,9 @@ async def sample_check_grounding(): Returns: google.cloud.discoveryengine_v1.types.CheckGroundingResponse: Response message for the - [GroundedGenerationService.CheckGrounding][google.cloud.discoveryengine.v1.GroundedGenerationService.CheckGrounding] - method. + `GroundedGenerationService.CheckGrounding + `__ + method. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/grounded_generation_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/grounded_generation_service/client.py index 27d0861824bb..b59a491f4b8b 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/grounded_generation_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/grounded_generation_service/client.py @@ -833,8 +833,8 @@ def request_generator(): Args: requests (Iterator[google.cloud.discoveryengine_v1.types.GenerateGroundedContentRequest]): - The request object iterator. Top-level message sent by the client for the - ``GenerateGroundedContent`` method. + The request object iterator. Top-level message sent by the client for + the ``GenerateGroundedContent`` method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -845,7 +845,9 @@ def request_generator(): Returns: Iterable[google.cloud.discoveryengine_v1.types.GenerateGroundedContentResponse]: - Response for the GenerateGroundedContent method. + Response for the + ``GenerateGroundedContent`` method. + """ # Wrap the RPC method; this adds retry and timeout information, @@ -912,8 +914,8 @@ def sample_generate_grounded_content(): Args: request (Union[google.cloud.discoveryengine_v1.types.GenerateGroundedContentRequest, dict]): - The request object. Top-level message sent by the client for the - ``GenerateGroundedContent`` method. + The request object. Top-level message sent by the client for + the ``GenerateGroundedContent`` method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -924,7 +926,9 @@ def sample_generate_grounded_content(): Returns: google.cloud.discoveryengine_v1.types.GenerateGroundedContentResponse: - Response for the GenerateGroundedContent method. + Response for the + ``GenerateGroundedContent`` method. + """ # Create or coerce a protobuf request object. # - Use the request object if provided (there's no risk of modifying the input as @@ -1003,7 +1007,8 @@ def sample_check_grounding(): Args: request (Union[google.cloud.discoveryengine_v1.types.CheckGroundingRequest, dict]): The request object. Request message for - [GroundedGenerationService.CheckGrounding][google.cloud.discoveryengine.v1.GroundedGenerationService.CheckGrounding] + `GroundedGenerationService.CheckGrounding + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1016,8 +1021,9 @@ def sample_check_grounding(): Returns: google.cloud.discoveryengine_v1.types.CheckGroundingResponse: Response message for the - [GroundedGenerationService.CheckGrounding][google.cloud.discoveryengine.v1.GroundedGenerationService.CheckGrounding] - method. + `GroundedGenerationService.CheckGrounding + `__ + method. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/grounded_generation_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/grounded_generation_service/transports/base.py index c62de3288072..9f147516dd14 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/grounded_generation_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/grounded_generation_service/transports/base.py @@ -84,8 +84,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -100,11 +98,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/grounded_generation_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/grounded_generation_service/transports/rest.py index 85d027c4ce30..a22409469578 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/grounded_generation_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/grounded_generation_service/transports/rest.py @@ -406,7 +406,8 @@ def __call__( Args: request (~.grounded_generation_service.CheckGroundingRequest): The request object. Request message for - [GroundedGenerationService.CheckGrounding][google.cloud.discoveryengine.v1.GroundedGenerationService.CheckGrounding] + `GroundedGenerationService.CheckGrounding + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -419,7 +420,8 @@ def __call__( Returns: ~.grounded_generation_service.CheckGroundingResponse: Response message for the - [GroundedGenerationService.CheckGrounding][google.cloud.discoveryengine.v1.GroundedGenerationService.CheckGrounding] + `GroundedGenerationService.CheckGrounding + `__ method. """ @@ -569,8 +571,8 @@ def __call__( Args: request (~.grounded_generation_service.GenerateGroundedContentRequest): - The request object. Top-level message sent by the client for the - ``GenerateGroundedContent`` method. + The request object. Top-level message sent by the client for + the ``GenerateGroundedContent`` method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -581,7 +583,9 @@ def __call__( Returns: ~.grounded_generation_service.GenerateGroundedContentResponse: - Response for the ``GenerateGroundedContent`` method. + Response for the + ``GenerateGroundedContent`` method. + """ http_options = ( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/identity_mapping_store_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/identity_mapping_store_service/async_client.py index 68b258cafda5..8c1b2865d314 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/identity_mapping_store_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/identity_mapping_store_service/async_client.py @@ -384,9 +384,11 @@ async def sample_create_identity_mapping_store(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.CreateIdentityMappingStoreRequest, dict]]): The request object. Request message for - [IdentityMappingStoreService.CreateIdentityMappingStore][google.cloud.discoveryengine.v1.IdentityMappingStoreService.CreateIdentityMappingStore] + `IdentityMappingStoreService.CreateIdentityMappingStore + `__ parent (:class:`str`): - Required. The parent collection resource name, such as + Required. The parent collection resource + name, such as ``projects/{project}/locations/{location}``. This corresponds to the ``parent`` field @@ -400,12 +402,12 @@ async def sample_create_identity_mapping_store(): on the ``request`` instance; if ``request`` is provided, this should not be set. identity_mapping_store_id (:class:`str`): - Required. The ID of the Identity Mapping Store to - create. - - The ID must contain only letters (a-z, A-Z), numbers - (0-9), underscores (\_), and hyphens (-). The maximum - length is 63 characters. + Required. The ID of the Identity Mapping + Store to create. + The ID must contain only letters (a-z, + A-Z), numbers (0-9), underscores (_), + and hyphens (-). The maximum length is + 63 characters. This corresponds to the ``identity_mapping_store_id`` field on the ``request`` instance; if ``request`` is provided, this @@ -523,10 +525,12 @@ async def sample_get_identity_mapping_store(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.GetIdentityMappingStoreRequest, dict]]): The request object. Request message for - [IdentityMappingStoreService.GetIdentityMappingStore][google.cloud.discoveryengine.v1.IdentityMappingStoreService.GetIdentityMappingStore] + `IdentityMappingStoreService.GetIdentityMappingStore + `__ name (:class:`str`): - Required. The name of the Identity Mapping Store to get. - Format: + Required. The name of the Identity + Mapping Store to get. Format: + ``projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`` This corresponds to the ``name`` field @@ -647,10 +651,12 @@ async def sample_delete_identity_mapping_store(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.DeleteIdentityMappingStoreRequest, dict]]): The request object. Request message for - [IdentityMappingStoreService.DeleteIdentityMappingStore][google.cloud.discoveryengine.v1.IdentityMappingStoreService.DeleteIdentityMappingStore] + `IdentityMappingStoreService.DeleteIdentityMappingStore + `__ name (:class:`str`): - Required. The name of the Identity Mapping Store to - delete. Format: + Required. The name of the Identity + Mapping Store to delete. Format: + ``projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`` This corresponds to the ``name`` field @@ -666,18 +672,21 @@ async def sample_delete_identity_mapping_store(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.protobuf.empty_pb2.Empty` A generic empty message that you can re-use to avoid defining duplicated - empty messages in your APIs. A typical example is to - use it as the request or the response type of an API - method. For instance: - - service Foo { - rpc Bar(google.protobuf.Empty) returns - (google.protobuf.Empty); - - } + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.protobuf.empty_pb2.Empty` + A generic empty message that you can + re-use to avoid defining duplicated + empty messages in your APIs. A typical + example is to use it as the request or + the response type of an API method. For + instance: + + service Foo { + rpc Bar(google.protobuf.Empty) + returns (google.protobuf.Empty); } """ # Create or coerce a protobuf request object. @@ -787,7 +796,8 @@ async def sample_import_identity_mappings(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.ImportIdentityMappingsRequest, dict]]): The request object. Request message for - [IdentityMappingStoreService.ImportIdentityMappings][google.cloud.discoveryengine.v1.IdentityMappingStoreService.ImportIdentityMappings] + `IdentityMappingStoreService.ImportIdentityMappings + `__ retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -798,10 +808,14 @@ async def sample_import_identity_mappings(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1.types.ImportIdentityMappingsResponse` Response message for - [IdentityMappingStoreService.ImportIdentityMappings][google.cloud.discoveryengine.v1.IdentityMappingStoreService.ImportIdentityMappings] + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1.types.ImportIdentityMappingsResponse` + Response message for + `IdentityMappingStoreService.ImportIdentityMappings + `__ """ # Create or coerce a protobuf request object. @@ -896,7 +910,8 @@ async def sample_purge_identity_mappings(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.PurgeIdentityMappingsRequest, dict]]): The request object. Request message for - [IdentityMappingStoreService.PurgeIdentityMappings][google.cloud.discoveryengine.v1.IdentityMappingStoreService.PurgeIdentityMappings] + `IdentityMappingStoreService.PurgeIdentityMappings + `__ retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -907,18 +922,21 @@ async def sample_purge_identity_mappings(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.protobuf.empty_pb2.Empty` A generic empty message that you can re-use to avoid defining duplicated - empty messages in your APIs. A typical example is to - use it as the request or the response type of an API - method. For instance: - - service Foo { - rpc Bar(google.protobuf.Empty) returns - (google.protobuf.Empty); - - } + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.protobuf.empty_pb2.Empty` + A generic empty message that you can + re-use to avoid defining duplicated + empty messages in your APIs. A typical + example is to use it as the request or + the response type of an API method. For + instance: + + service Foo { + rpc Bar(google.protobuf.Empty) + returns (google.protobuf.Empty); } """ # Create or coerce a protobuf request object. @@ -1009,7 +1027,8 @@ async def sample_list_identity_mappings(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.ListIdentityMappingsRequest, dict]]): The request object. Request message for - [IdentityMappingStoreService.ListIdentityMappings][google.cloud.discoveryengine.v1.IdentityMappingStoreService.ListIdentityMappings] + `IdentityMappingStoreService.ListIdentityMappings + `__ retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1021,10 +1040,12 @@ async def sample_list_identity_mappings(): Returns: google.cloud.discoveryengine_v1.services.identity_mapping_store_service.pagers.ListIdentityMappingsAsyncPager: Response message for - [IdentityMappingStoreService.ListIdentityMappings][google.cloud.discoveryengine.v1.IdentityMappingStoreService.ListIdentityMappings] + `IdentityMappingStoreService.ListIdentityMappings + `__ - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -1119,10 +1140,12 @@ async def sample_list_identity_mapping_stores(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.ListIdentityMappingStoresRequest, dict]]): The request object. Request message for - [IdentityMappingStoreService.ListIdentityMappingStores][google.cloud.discoveryengine.v1.IdentityMappingStoreService.ListIdentityMappingStores] + `IdentityMappingStoreService.ListIdentityMappingStores + `__ parent (:class:`str`): - Required. The parent of the Identity Mapping Stores to - list. Format: + Required. The parent of the Identity + Mapping Stores to list. Format: + ``projects/{project}/locations/{location}``. This corresponds to the ``parent`` field @@ -1139,10 +1162,12 @@ async def sample_list_identity_mapping_stores(): Returns: google.cloud.discoveryengine_v1.services.identity_mapping_store_service.pagers.ListIdentityMappingStoresAsyncPager: Response message for - [IdentityMappingStoreService.ListIdentityMappingStores][google.cloud.discoveryengine.v1.IdentityMappingStoreService.ListIdentityMappingStores] + `IdentityMappingStoreService.ListIdentityMappingStores + `__ - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/identity_mapping_store_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/identity_mapping_store_service/client.py index 5f9d221a11df..a3074bb181a1 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/identity_mapping_store_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/identity_mapping_store_service/client.py @@ -892,9 +892,11 @@ def sample_create_identity_mapping_store(): Args: request (Union[google.cloud.discoveryengine_v1.types.CreateIdentityMappingStoreRequest, dict]): The request object. Request message for - [IdentityMappingStoreService.CreateIdentityMappingStore][google.cloud.discoveryengine.v1.IdentityMappingStoreService.CreateIdentityMappingStore] + `IdentityMappingStoreService.CreateIdentityMappingStore + `__ parent (str): - Required. The parent collection resource name, such as + Required. The parent collection resource + name, such as ``projects/{project}/locations/{location}``. This corresponds to the ``parent`` field @@ -908,12 +910,12 @@ def sample_create_identity_mapping_store(): on the ``request`` instance; if ``request`` is provided, this should not be set. identity_mapping_store_id (str): - Required. The ID of the Identity Mapping Store to - create. - - The ID must contain only letters (a-z, A-Z), numbers - (0-9), underscores (\_), and hyphens (-). The maximum - length is 63 characters. + Required. The ID of the Identity Mapping + Store to create. + The ID must contain only letters (a-z, + A-Z), numbers (0-9), underscores (_), + and hyphens (-). The maximum length is + 63 characters. This corresponds to the ``identity_mapping_store_id`` field on the ``request`` instance; if ``request`` is provided, this @@ -1030,10 +1032,12 @@ def sample_get_identity_mapping_store(): Args: request (Union[google.cloud.discoveryengine_v1.types.GetIdentityMappingStoreRequest, dict]): The request object. Request message for - [IdentityMappingStoreService.GetIdentityMappingStore][google.cloud.discoveryengine.v1.IdentityMappingStoreService.GetIdentityMappingStore] + `IdentityMappingStoreService.GetIdentityMappingStore + `__ name (str): - Required. The name of the Identity Mapping Store to get. - Format: + Required. The name of the Identity + Mapping Store to get. Format: + ``projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`` This corresponds to the ``name`` field @@ -1153,10 +1157,12 @@ def sample_delete_identity_mapping_store(): Args: request (Union[google.cloud.discoveryengine_v1.types.DeleteIdentityMappingStoreRequest, dict]): The request object. Request message for - [IdentityMappingStoreService.DeleteIdentityMappingStore][google.cloud.discoveryengine.v1.IdentityMappingStoreService.DeleteIdentityMappingStore] + `IdentityMappingStoreService.DeleteIdentityMappingStore + `__ name (str): - Required. The name of the Identity Mapping Store to - delete. Format: + Required. The name of the Identity + Mapping Store to delete. Format: + ``projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`` This corresponds to the ``name`` field @@ -1172,18 +1178,21 @@ def sample_delete_identity_mapping_store(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.protobuf.empty_pb2.Empty` A generic empty message that you can re-use to avoid defining duplicated - empty messages in your APIs. A typical example is to - use it as the request or the response type of an API - method. For instance: - - service Foo { - rpc Bar(google.protobuf.Empty) returns - (google.protobuf.Empty); - - } + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.protobuf.empty_pb2.Empty` + A generic empty message that you can + re-use to avoid defining duplicated + empty messages in your APIs. A typical + example is to use it as the request or + the response type of an API method. For + instance: + + service Foo { + rpc Bar(google.protobuf.Empty) + returns (google.protobuf.Empty); } """ # Create or coerce a protobuf request object. @@ -1292,7 +1301,8 @@ def sample_import_identity_mappings(): Args: request (Union[google.cloud.discoveryengine_v1.types.ImportIdentityMappingsRequest, dict]): The request object. Request message for - [IdentityMappingStoreService.ImportIdentityMappings][google.cloud.discoveryengine.v1.IdentityMappingStoreService.ImportIdentityMappings] + `IdentityMappingStoreService.ImportIdentityMappings + `__ retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1303,10 +1313,14 @@ def sample_import_identity_mappings(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1.types.ImportIdentityMappingsResponse` Response message for - [IdentityMappingStoreService.ImportIdentityMappings][google.cloud.discoveryengine.v1.IdentityMappingStoreService.ImportIdentityMappings] + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1.types.ImportIdentityMappingsResponse` + Response message for + `IdentityMappingStoreService.ImportIdentityMappings + `__ """ # Create or coerce a protobuf request object. @@ -1399,7 +1413,8 @@ def sample_purge_identity_mappings(): Args: request (Union[google.cloud.discoveryengine_v1.types.PurgeIdentityMappingsRequest, dict]): The request object. Request message for - [IdentityMappingStoreService.PurgeIdentityMappings][google.cloud.discoveryengine.v1.IdentityMappingStoreService.PurgeIdentityMappings] + `IdentityMappingStoreService.PurgeIdentityMappings + `__ retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1410,18 +1425,21 @@ def sample_purge_identity_mappings(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.protobuf.empty_pb2.Empty` A generic empty message that you can re-use to avoid defining duplicated - empty messages in your APIs. A typical example is to - use it as the request or the response type of an API - method. For instance: - - service Foo { - rpc Bar(google.protobuf.Empty) returns - (google.protobuf.Empty); - - } + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.protobuf.empty_pb2.Empty` + A generic empty message that you can + re-use to avoid defining duplicated + empty messages in your APIs. A typical + example is to use it as the request or + the response type of an API method. For + instance: + + service Foo { + rpc Bar(google.protobuf.Empty) + returns (google.protobuf.Empty); } """ # Create or coerce a protobuf request object. @@ -1510,7 +1528,8 @@ def sample_list_identity_mappings(): Args: request (Union[google.cloud.discoveryengine_v1.types.ListIdentityMappingsRequest, dict]): The request object. Request message for - [IdentityMappingStoreService.ListIdentityMappings][google.cloud.discoveryengine.v1.IdentityMappingStoreService.ListIdentityMappings] + `IdentityMappingStoreService.ListIdentityMappings + `__ retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1522,10 +1541,12 @@ def sample_list_identity_mappings(): Returns: google.cloud.discoveryengine_v1.services.identity_mapping_store_service.pagers.ListIdentityMappingsPager: Response message for - [IdentityMappingStoreService.ListIdentityMappings][google.cloud.discoveryengine.v1.IdentityMappingStoreService.ListIdentityMappings] + `IdentityMappingStoreService.ListIdentityMappings + `__ - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -1618,10 +1639,12 @@ def sample_list_identity_mapping_stores(): Args: request (Union[google.cloud.discoveryengine_v1.types.ListIdentityMappingStoresRequest, dict]): The request object. Request message for - [IdentityMappingStoreService.ListIdentityMappingStores][google.cloud.discoveryengine.v1.IdentityMappingStoreService.ListIdentityMappingStores] + `IdentityMappingStoreService.ListIdentityMappingStores + `__ parent (str): - Required. The parent of the Identity Mapping Stores to - list. Format: + Required. The parent of the Identity + Mapping Stores to list. Format: + ``projects/{project}/locations/{location}``. This corresponds to the ``parent`` field @@ -1638,10 +1661,12 @@ def sample_list_identity_mapping_stores(): Returns: google.cloud.discoveryengine_v1.services.identity_mapping_store_service.pagers.ListIdentityMappingStoresPager: Response message for - [IdentityMappingStoreService.ListIdentityMappingStores][google.cloud.discoveryengine.v1.IdentityMappingStoreService.ListIdentityMappingStores] + `IdentityMappingStoreService.ListIdentityMappingStores + `__ - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/identity_mapping_store_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/identity_mapping_store_service/transports/base.py index 6fc518202560..9bafeb80b12e 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/identity_mapping_store_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/identity_mapping_store_service/transports/base.py @@ -88,8 +88,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -104,11 +102,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/identity_mapping_store_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/identity_mapping_store_service/transports/rest.py index 96444f77f638..76f237570330 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/identity_mapping_store_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/identity_mapping_store_service/transports/rest.py @@ -887,7 +887,8 @@ def __call__( Args: request (~.identity_mapping_store_service.CreateIdentityMappingStoreRequest): The request object. Request message for - [IdentityMappingStoreService.CreateIdentityMappingStore][google.cloud.discoveryengine.v1.IdentityMappingStoreService.CreateIdentityMappingStore] + `IdentityMappingStoreService.CreateIdentityMappingStore + `__ retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1052,7 +1053,8 @@ def __call__( Args: request (~.identity_mapping_store_service.DeleteIdentityMappingStoreRequest): The request object. Request message for - [IdentityMappingStoreService.DeleteIdentityMappingStore][google.cloud.discoveryengine.v1.IdentityMappingStoreService.DeleteIdentityMappingStore] + `IdentityMappingStoreService.DeleteIdentityMappingStore + `__ retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1207,7 +1209,8 @@ def __call__( Args: request (~.identity_mapping_store_service.GetIdentityMappingStoreRequest): The request object. Request message for - [IdentityMappingStoreService.GetIdentityMappingStore][google.cloud.discoveryengine.v1.IdentityMappingStoreService.GetIdentityMappingStore] + `IdentityMappingStoreService.GetIdentityMappingStore + `__ retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1362,7 +1365,8 @@ def __call__( Args: request (~.identity_mapping_store_service.ImportIdentityMappingsRequest): The request object. Request message for - [IdentityMappingStoreService.ImportIdentityMappings][google.cloud.discoveryengine.v1.IdentityMappingStoreService.ImportIdentityMappings] + `IdentityMappingStoreService.ImportIdentityMappings + `__ retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1516,7 +1520,8 @@ def __call__( Args: request (~.identity_mapping_store_service.ListIdentityMappingsRequest): The request object. Request message for - [IdentityMappingStoreService.ListIdentityMappings][google.cloud.discoveryengine.v1.IdentityMappingStoreService.ListIdentityMappings] + `IdentityMappingStoreService.ListIdentityMappings + `__ retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1528,7 +1533,8 @@ def __call__( Returns: ~.identity_mapping_store_service.ListIdentityMappingsResponse: Response message for - [IdentityMappingStoreService.ListIdentityMappings][google.cloud.discoveryengine.v1.IdentityMappingStoreService.ListIdentityMappings] + `IdentityMappingStoreService.ListIdentityMappings + `__ """ @@ -1673,7 +1679,8 @@ def __call__( Args: request (~.identity_mapping_store_service.ListIdentityMappingStoresRequest): The request object. Request message for - [IdentityMappingStoreService.ListIdentityMappingStores][google.cloud.discoveryengine.v1.IdentityMappingStoreService.ListIdentityMappingStores] + `IdentityMappingStoreService.ListIdentityMappingStores + `__ retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1685,7 +1692,8 @@ def __call__( Returns: ~.identity_mapping_store_service.ListIdentityMappingStoresResponse: Response message for - [IdentityMappingStoreService.ListIdentityMappingStores][google.cloud.discoveryengine.v1.IdentityMappingStoreService.ListIdentityMappingStores] + `IdentityMappingStoreService.ListIdentityMappingStores + `__ """ @@ -1832,7 +1840,8 @@ def __call__( Args: request (~.identity_mapping_store_service.PurgeIdentityMappingsRequest): The request object. Request message for - [IdentityMappingStoreService.PurgeIdentityMappings][google.cloud.discoveryengine.v1.IdentityMappingStoreService.PurgeIdentityMappings] + `IdentityMappingStoreService.PurgeIdentityMappings + `__ retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/project_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/project_service/async_client.py index 70d0d80a8504..338d88c56940 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/project_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/project_service/async_client.py @@ -67,7 +67,7 @@ class ProjectServiceAsyncClient: """Service for operations on the - [Project][google.cloud.discoveryengine.v1.Project]. + `Project `__. """ _client: ProjectServiceClient @@ -302,13 +302,14 @@ async def provision_project( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: - r"""Provisions the project resource. During the process, related - systems will get prepared and initialized. + r"""Provisions the project resource. During the + process, related systems will get prepared and + initialized. Caller must read the `Terms for data - use `__, and - optionally specify in request to provide consent to that service - terms. + use `__, + and optionally specify in request to provide consent to + that service terms. .. code-block:: python @@ -345,12 +346,15 @@ async def sample_provision_project(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.ProvisionProjectRequest, dict]]): The request object. Request for - [ProjectService.ProvisionProject][google.cloud.discoveryengine.v1.ProjectService.ProvisionProject] + `ProjectService.ProvisionProject + `__ method. name (:class:`str`): Required. Full resource name of a - [Project][google.cloud.discoveryengine.v1.Project], such - as ``projects/{project_id_or_number}``. + `Project + `__, + such as + ``projects/{project_id_or_number}``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -365,12 +369,13 @@ async def sample_provision_project(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be + An object representing a long-running + operation. + The result type for the operation will + be :class:`google.cloud.discoveryengine_v1.types.Project` - Metadata and configurations for a Google Cloud project - in the service. + Metadata and configurations for a Google + Cloud project in the service. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/project_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/project_service/client.py index 95452db1b7e2..52be39a13326 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/project_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/project_service/client.py @@ -113,7 +113,7 @@ def get_transport_class( class ProjectServiceClient(metaclass=ProjectServiceClientMeta): """Service for operations on the - [Project][google.cloud.discoveryengine.v1.Project]. + `Project `__. """ @staticmethod @@ -736,13 +736,14 @@ def provision_project( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: - r"""Provisions the project resource. During the process, related - systems will get prepared and initialized. + r"""Provisions the project resource. During the + process, related systems will get prepared and + initialized. Caller must read the `Terms for data - use `__, and - optionally specify in request to provide consent to that service - terms. + use `__, + and optionally specify in request to provide consent to + that service terms. .. code-block:: python @@ -779,12 +780,15 @@ def sample_provision_project(): Args: request (Union[google.cloud.discoveryengine_v1.types.ProvisionProjectRequest, dict]): The request object. Request for - [ProjectService.ProvisionProject][google.cloud.discoveryengine.v1.ProjectService.ProvisionProject] + `ProjectService.ProvisionProject + `__ method. name (str): Required. Full resource name of a - [Project][google.cloud.discoveryengine.v1.Project], such - as ``projects/{project_id_or_number}``. + `Project + `__, + such as + ``projects/{project_id_or_number}``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -799,12 +803,13 @@ def sample_provision_project(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be + An object representing a long-running + operation. + The result type for the operation will + be :class:`google.cloud.discoveryengine_v1.types.Project` - Metadata and configurations for a Google Cloud project - in the service. + Metadata and configurations for a Google + Cloud project in the service. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/project_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/project_service/transports/base.py index 77e609a32684..ae7560ff42db 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/project_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/project_service/transports/base.py @@ -84,8 +84,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -100,11 +98,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/project_service/transports/grpc.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/project_service/transports/grpc.py index f34176357d51..58ab8161151f 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/project_service/transports/grpc.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/project_service/transports/grpc.py @@ -113,7 +113,7 @@ class ProjectServiceGrpcTransport(ProjectServiceTransport): """gRPC backend transport for ProjectService. Service for operations on the - [Project][google.cloud.discoveryengine.v1.Project]. + `Project `__. This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -347,13 +347,14 @@ def provision_project( ) -> Callable[[project_service.ProvisionProjectRequest], operations_pb2.Operation]: r"""Return a callable for the provision project method over gRPC. - Provisions the project resource. During the process, related - systems will get prepared and initialized. + Provisions the project resource. During the + process, related systems will get prepared and + initialized. Caller must read the `Terms for data - use `__, and - optionally specify in request to provide consent to that service - terms. + use `__, + and optionally specify in request to provide consent to + that service terms. Returns: Callable[[~.ProvisionProjectRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/project_service/transports/grpc_asyncio.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/project_service/transports/grpc_asyncio.py index 4b559d1624d2..949101e682a6 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/project_service/transports/grpc_asyncio.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/project_service/transports/grpc_asyncio.py @@ -119,7 +119,7 @@ class ProjectServiceGrpcAsyncIOTransport(ProjectServiceTransport): """gRPC AsyncIO backend transport for ProjectService. Service for operations on the - [Project][google.cloud.discoveryengine.v1.Project]. + `Project `__. This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -357,13 +357,14 @@ def provision_project( ]: r"""Return a callable for the provision project method over gRPC. - Provisions the project resource. During the process, related - systems will get prepared and initialized. + Provisions the project resource. During the + process, related systems will get prepared and + initialized. Caller must read the `Terms for data - use `__, and - optionally specify in request to provide consent to that service - terms. + use `__, + and optionally specify in request to provide consent to + that service terms. Returns: Callable[[~.ProvisionProjectRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/project_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/project_service/transports/rest.py index 0a0653653735..cc8fdcf7602a 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/project_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/project_service/transports/rest.py @@ -221,7 +221,7 @@ class ProjectServiceRestTransport(_BaseProjectServiceRestTransport): """REST backend synchronous transport for ProjectService. Service for operations on the - [Project][google.cloud.discoveryengine.v1.Project]. + `Project `__. This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -523,7 +523,8 @@ def __call__( Args: request (~.project_service.ProvisionProjectRequest): The request object. Request for - [ProjectService.ProvisionProject][google.cloud.discoveryengine.v1.ProjectService.ProvisionProject] + `ProjectService.ProvisionProject + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/rank_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/rank_service/async_client.py index bc75f18dbbf6..012707eee7f0 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/rank_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/rank_service/async_client.py @@ -327,7 +327,8 @@ async def sample_rank(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.RankRequest, dict]]): The request object. Request message for - [RankService.Rank][google.cloud.discoveryengine.v1.RankService.Rank] + `RankService.Rank + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -340,8 +341,9 @@ async def sample_rank(): Returns: google.cloud.discoveryengine_v1.types.RankResponse: Response message for - [RankService.Rank][google.cloud.discoveryengine.v1.RankService.Rank] - method. + `RankService.Rank + `__ + method. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/rank_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/rank_service/client.py index 4fcd57f9801d..d94514e06ec3 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/rank_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/rank_service/client.py @@ -765,7 +765,8 @@ def sample_rank(): Args: request (Union[google.cloud.discoveryengine_v1.types.RankRequest, dict]): The request object. Request message for - [RankService.Rank][google.cloud.discoveryengine.v1.RankService.Rank] + `RankService.Rank + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -778,8 +779,9 @@ def sample_rank(): Returns: google.cloud.discoveryengine_v1.types.RankResponse: Response message for - [RankService.Rank][google.cloud.discoveryengine.v1.RankService.Rank] - method. + `RankService.Rank + `__ + method. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/rank_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/rank_service/transports/base.py index 4ef2e84081b8..be797ff6eaa2 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/rank_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/rank_service/transports/base.py @@ -84,8 +84,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -100,11 +98,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/rank_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/rank_service/transports/rest.py index ec034858eae5..7be08e2673ff 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/rank_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/rank_service/transports/rest.py @@ -335,7 +335,8 @@ def __call__( Args: request (~.rank_service.RankRequest): The request object. Request message for - [RankService.Rank][google.cloud.discoveryengine.v1.RankService.Rank] + `RankService.Rank + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -348,7 +349,8 @@ def __call__( Returns: ~.rank_service.RankResponse: Response message for - [RankService.Rank][google.cloud.discoveryengine.v1.RankService.Rank] + `RankService.Rank + `__ method. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/recommendation_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/recommendation_service/transports/base.py index 4c86cefda588..9e05afb6a448 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/recommendation_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/recommendation_service/transports/base.py @@ -84,8 +84,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -100,11 +98,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/schema_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/schema_service/async_client.py index cae8913850a8..944931e59f84 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/schema_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/schema_service/async_client.py @@ -71,8 +71,8 @@ class SchemaServiceAsyncClient: - """Service for managing - [Schema][google.cloud.discoveryengine.v1.Schema]s. + """Service for managing `Schema + `__s. """ _client: SchemaServiceClient @@ -309,7 +309,8 @@ async def get_schema( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> schema.Schema: - r"""Gets a [Schema][google.cloud.discoveryengine.v1.Schema]. + r"""Gets a `Schema + `__. .. code-block:: python @@ -340,11 +341,12 @@ async def sample_get_schema(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.GetSchemaRequest, dict]]): The request object. Request message for - [SchemaService.GetSchema][google.cloud.discoveryengine.v1.SchemaService.GetSchema] + `SchemaService.GetSchema + `__ method. name (:class:`str`): - Required. The full resource name of the schema, in the - format of + Required. The full resource name of the + schema, in the format of ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}``. This corresponds to the ``name`` field @@ -422,8 +424,8 @@ async def list_schemas( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListSchemasAsyncPager: - r"""Gets a list of - [Schema][google.cloud.discoveryengine.v1.Schema]s. + r"""Gets a list of `Schema + `__s. .. code-block:: python @@ -455,11 +457,12 @@ async def sample_list_schemas(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.ListSchemasRequest, dict]]): The request object. Request message for - [SchemaService.ListSchemas][google.cloud.discoveryengine.v1.SchemaService.ListSchemas] + `SchemaService.ListSchemas + `__ method. parent (:class:`str`): - Required. The parent data store resource name, in the - format of + Required. The parent data store resource + name, in the format of ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}``. This corresponds to the ``parent`` field @@ -476,11 +479,13 @@ async def sample_list_schemas(): Returns: google.cloud.discoveryengine_v1.services.schema_service.pagers.ListSchemasAsyncPager: Response message for - [SchemaService.ListSchemas][google.cloud.discoveryengine.v1.SchemaService.ListSchemas] - method. + `SchemaService.ListSchemas + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -554,7 +559,8 @@ async def create_schema( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: - r"""Creates a [Schema][google.cloud.discoveryengine.v1.Schema]. + r"""Creates a `Schema + `__. .. code-block:: python @@ -590,33 +596,38 @@ async def sample_create_schema(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.CreateSchemaRequest, dict]]): The request object. Request message for - [SchemaService.CreateSchema][google.cloud.discoveryengine.v1.SchemaService.CreateSchema] + `SchemaService.CreateSchema + `__ method. parent (:class:`str`): - Required. The parent data store resource name, in the - format of + Required. The parent data store resource + name, in the format of ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. schema (:class:`google.cloud.discoveryengine_v1.types.Schema`): - Required. The - [Schema][google.cloud.discoveryengine.v1.Schema] to - create. + Required. The `Schema + `__ + to create. This corresponds to the ``schema`` field on the ``request`` instance; if ``request`` is provided, this should not be set. schema_id (:class:`str`): Required. The ID to use for the - [Schema][google.cloud.discoveryengine.v1.Schema], which - becomes the final component of the - [Schema.name][google.cloud.discoveryengine.v1.Schema.name]. + `Schema + `__, + which becomes the final component of the + `Schema.name + `__. This field should conform to - `RFC-1034 `__ - standard with a length limit of 63 characters. + `RFC-1034 + `__ + standard with a length limit of 63 + characters. This corresponds to the ``schema_id`` field on the ``request`` instance; if ``request`` is provided, this @@ -631,12 +642,13 @@ async def sample_create_schema(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be + An object representing a long-running + operation. + The result type for the operation will + be :class:`google.cloud.discoveryengine_v1.types.Schema` - Defines the structure and layout of a type of document - data. + Defines the structure and layout of a + type of document data. """ # Create or coerce a protobuf request object. @@ -708,7 +720,8 @@ async def update_schema( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: - r"""Updates a [Schema][google.cloud.discoveryengine.v1.Schema]. + r"""Updates a `Schema + `__. .. code-block:: python @@ -742,7 +755,8 @@ async def sample_update_schema(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.UpdateSchemaRequest, dict]]): The request object. Request message for - [SchemaService.UpdateSchema][google.cloud.discoveryengine.v1.SchemaService.UpdateSchema] + `SchemaService.UpdateSchema + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -754,12 +768,13 @@ async def sample_update_schema(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be + An object representing a long-running + operation. + The result type for the operation will + be :class:`google.cloud.discoveryengine_v1.types.Schema` - Defines the structure and layout of a type of document - data. + Defines the structure and layout of a + type of document data. """ # Create or coerce a protobuf request object. @@ -813,7 +828,8 @@ async def delete_schema( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: - r"""Deletes a [Schema][google.cloud.discoveryengine.v1.Schema]. + r"""Deletes a `Schema + `__. .. code-block:: python @@ -848,11 +864,12 @@ async def sample_delete_schema(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.DeleteSchemaRequest, dict]]): The request object. Request message for - [SchemaService.DeleteSchema][google.cloud.discoveryengine.v1.SchemaService.DeleteSchema] + `SchemaService.DeleteSchema + `__ method. name (:class:`str`): - Required. The full resource name of the schema, in the - format of + Required. The full resource name of the + schema, in the format of ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}``. This corresponds to the ``name`` field @@ -868,18 +885,21 @@ async def sample_delete_schema(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.protobuf.empty_pb2.Empty` A generic empty message that you can re-use to avoid defining duplicated - empty messages in your APIs. A typical example is to - use it as the request or the response type of an API - method. For instance: - - service Foo { - rpc Bar(google.protobuf.Empty) returns - (google.protobuf.Empty); - - } + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.protobuf.empty_pb2.Empty` + A generic empty message that you can + re-use to avoid defining duplicated + empty messages in your APIs. A typical + example is to use it as the request or + the response type of an API method. For + instance: + + service Foo { + rpc Bar(google.protobuf.Empty) + returns (google.protobuf.Empty); } """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/schema_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/schema_service/client.py index a4d97d81772a..b3d52ecb2e51 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/schema_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/schema_service/client.py @@ -115,8 +115,8 @@ def get_transport_class( class SchemaServiceClient(metaclass=SchemaServiceClientMeta): - """Service for managing - [Schema][google.cloud.discoveryengine.v1.Schema]s. + """Service for managing `Schema + `__s. """ @staticmethod @@ -770,7 +770,8 @@ def get_schema( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> schema.Schema: - r"""Gets a [Schema][google.cloud.discoveryengine.v1.Schema]. + r"""Gets a `Schema + `__. .. code-block:: python @@ -801,11 +802,12 @@ def sample_get_schema(): Args: request (Union[google.cloud.discoveryengine_v1.types.GetSchemaRequest, dict]): The request object. Request message for - [SchemaService.GetSchema][google.cloud.discoveryengine.v1.SchemaService.GetSchema] + `SchemaService.GetSchema + `__ method. name (str): - Required. The full resource name of the schema, in the - format of + Required. The full resource name of the + schema, in the format of ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}``. This corresponds to the ``name`` field @@ -880,8 +882,8 @@ def list_schemas( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListSchemasPager: - r"""Gets a list of - [Schema][google.cloud.discoveryengine.v1.Schema]s. + r"""Gets a list of `Schema + `__s. .. code-block:: python @@ -913,11 +915,12 @@ def sample_list_schemas(): Args: request (Union[google.cloud.discoveryengine_v1.types.ListSchemasRequest, dict]): The request object. Request message for - [SchemaService.ListSchemas][google.cloud.discoveryengine.v1.SchemaService.ListSchemas] + `SchemaService.ListSchemas + `__ method. parent (str): - Required. The parent data store resource name, in the - format of + Required. The parent data store resource + name, in the format of ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}``. This corresponds to the ``parent`` field @@ -934,11 +937,13 @@ def sample_list_schemas(): Returns: google.cloud.discoveryengine_v1.services.schema_service.pagers.ListSchemasPager: Response message for - [SchemaService.ListSchemas][google.cloud.discoveryengine.v1.SchemaService.ListSchemas] - method. + `SchemaService.ListSchemas + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -1009,7 +1014,8 @@ def create_schema( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: - r"""Creates a [Schema][google.cloud.discoveryengine.v1.Schema]. + r"""Creates a `Schema + `__. .. code-block:: python @@ -1045,33 +1051,38 @@ def sample_create_schema(): Args: request (Union[google.cloud.discoveryengine_v1.types.CreateSchemaRequest, dict]): The request object. Request message for - [SchemaService.CreateSchema][google.cloud.discoveryengine.v1.SchemaService.CreateSchema] + `SchemaService.CreateSchema + `__ method. parent (str): - Required. The parent data store resource name, in the - format of + Required. The parent data store resource + name, in the format of ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. schema (google.cloud.discoveryengine_v1.types.Schema): - Required. The - [Schema][google.cloud.discoveryengine.v1.Schema] to - create. + Required. The `Schema + `__ + to create. This corresponds to the ``schema`` field on the ``request`` instance; if ``request`` is provided, this should not be set. schema_id (str): Required. The ID to use for the - [Schema][google.cloud.discoveryengine.v1.Schema], which - becomes the final component of the - [Schema.name][google.cloud.discoveryengine.v1.Schema.name]. + `Schema + `__, + which becomes the final component of the + `Schema.name + `__. This field should conform to - `RFC-1034 `__ - standard with a length limit of 63 characters. + `RFC-1034 + `__ + standard with a length limit of 63 + characters. This corresponds to the ``schema_id`` field on the ``request`` instance; if ``request`` is provided, this @@ -1086,12 +1097,13 @@ def sample_create_schema(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be + An object representing a long-running + operation. + The result type for the operation will + be :class:`google.cloud.discoveryengine_v1.types.Schema` - Defines the structure and layout of a type of document - data. + Defines the structure and layout of a + type of document data. """ # Create or coerce a protobuf request object. @@ -1160,7 +1172,8 @@ def update_schema( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: - r"""Updates a [Schema][google.cloud.discoveryengine.v1.Schema]. + r"""Updates a `Schema + `__. .. code-block:: python @@ -1194,7 +1207,8 @@ def sample_update_schema(): Args: request (Union[google.cloud.discoveryengine_v1.types.UpdateSchemaRequest, dict]): The request object. Request message for - [SchemaService.UpdateSchema][google.cloud.discoveryengine.v1.SchemaService.UpdateSchema] + `SchemaService.UpdateSchema + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1206,12 +1220,13 @@ def sample_update_schema(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be + An object representing a long-running + operation. + The result type for the operation will + be :class:`google.cloud.discoveryengine_v1.types.Schema` - Defines the structure and layout of a type of document - data. + Defines the structure and layout of a + type of document data. """ # Create or coerce a protobuf request object. @@ -1263,7 +1278,8 @@ def delete_schema( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: - r"""Deletes a [Schema][google.cloud.discoveryengine.v1.Schema]. + r"""Deletes a `Schema + `__. .. code-block:: python @@ -1298,11 +1314,12 @@ def sample_delete_schema(): Args: request (Union[google.cloud.discoveryengine_v1.types.DeleteSchemaRequest, dict]): The request object. Request message for - [SchemaService.DeleteSchema][google.cloud.discoveryengine.v1.SchemaService.DeleteSchema] + `SchemaService.DeleteSchema + `__ method. name (str): - Required. The full resource name of the schema, in the - format of + Required. The full resource name of the + schema, in the format of ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}``. This corresponds to the ``name`` field @@ -1318,18 +1335,21 @@ def sample_delete_schema(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.protobuf.empty_pb2.Empty` A generic empty message that you can re-use to avoid defining duplicated - empty messages in your APIs. A typical example is to - use it as the request or the response type of an API - method. For instance: - - service Foo { - rpc Bar(google.protobuf.Empty) returns - (google.protobuf.Empty); - - } + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.protobuf.empty_pb2.Empty` + A generic empty message that you can + re-use to avoid defining duplicated + empty messages in your APIs. A typical + example is to use it as the request or + the response type of an API method. For + instance: + + service Foo { + rpc Bar(google.protobuf.Empty) + returns (google.protobuf.Empty); } """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/schema_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/schema_service/transports/base.py index 0ad1ceb12bf5..ee24a9b4b2ea 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/schema_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/schema_service/transports/base.py @@ -84,8 +84,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -100,11 +98,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/schema_service/transports/grpc.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/schema_service/transports/grpc.py index ff6e12c5ed53..b6eadaf0e17c 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/schema_service/transports/grpc.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/schema_service/transports/grpc.py @@ -112,8 +112,8 @@ def intercept_unary_unary(self, continuation, client_call_details, request): class SchemaServiceGrpcTransport(SchemaServiceTransport): """gRPC backend transport for SchemaService. - Service for managing - [Schema][google.cloud.discoveryengine.v1.Schema]s. + Service for managing `Schema + `__s. This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -345,7 +345,8 @@ def operations_client(self) -> operations_v1.OperationsClient: def get_schema(self) -> Callable[[schema_service.GetSchemaRequest], schema.Schema]: r"""Return a callable for the get schema method over gRPC. - Gets a [Schema][google.cloud.discoveryengine.v1.Schema]. + Gets a `Schema + `__. Returns: Callable[[~.GetSchemaRequest], @@ -373,8 +374,8 @@ def list_schemas( ]: r"""Return a callable for the list schemas method over gRPC. - Gets a list of - [Schema][google.cloud.discoveryengine.v1.Schema]s. + Gets a list of `Schema + `__s. Returns: Callable[[~.ListSchemasRequest], @@ -400,7 +401,8 @@ def create_schema( ) -> Callable[[schema_service.CreateSchemaRequest], operations_pb2.Operation]: r"""Return a callable for the create schema method over gRPC. - Creates a [Schema][google.cloud.discoveryengine.v1.Schema]. + Creates a `Schema + `__. Returns: Callable[[~.CreateSchemaRequest], @@ -426,7 +428,8 @@ def update_schema( ) -> Callable[[schema_service.UpdateSchemaRequest], operations_pb2.Operation]: r"""Return a callable for the update schema method over gRPC. - Updates a [Schema][google.cloud.discoveryengine.v1.Schema]. + Updates a `Schema + `__. Returns: Callable[[~.UpdateSchemaRequest], @@ -452,7 +455,8 @@ def delete_schema( ) -> Callable[[schema_service.DeleteSchemaRequest], operations_pb2.Operation]: r"""Return a callable for the delete schema method over gRPC. - Deletes a [Schema][google.cloud.discoveryengine.v1.Schema]. + Deletes a `Schema + `__. Returns: Callable[[~.DeleteSchemaRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/schema_service/transports/grpc_asyncio.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/schema_service/transports/grpc_asyncio.py index 86e834072ee1..422c522fad2b 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/schema_service/transports/grpc_asyncio.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/schema_service/transports/grpc_asyncio.py @@ -118,8 +118,8 @@ async def intercept_unary_unary(self, continuation, client_call_details, request class SchemaServiceGrpcAsyncIOTransport(SchemaServiceTransport): """gRPC AsyncIO backend transport for SchemaService. - Service for managing - [Schema][google.cloud.discoveryengine.v1.Schema]s. + Service for managing `Schema + `__s. This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -355,7 +355,8 @@ def get_schema( ) -> Callable[[schema_service.GetSchemaRequest], Awaitable[schema.Schema]]: r"""Return a callable for the get schema method over gRPC. - Gets a [Schema][google.cloud.discoveryengine.v1.Schema]. + Gets a `Schema + `__. Returns: Callable[[~.GetSchemaRequest], @@ -384,8 +385,8 @@ def list_schemas( ]: r"""Return a callable for the list schemas method over gRPC. - Gets a list of - [Schema][google.cloud.discoveryengine.v1.Schema]s. + Gets a list of `Schema + `__s. Returns: Callable[[~.ListSchemasRequest], @@ -413,7 +414,8 @@ def create_schema( ]: r"""Return a callable for the create schema method over gRPC. - Creates a [Schema][google.cloud.discoveryengine.v1.Schema]. + Creates a `Schema + `__. Returns: Callable[[~.CreateSchemaRequest], @@ -441,7 +443,8 @@ def update_schema( ]: r"""Return a callable for the update schema method over gRPC. - Updates a [Schema][google.cloud.discoveryengine.v1.Schema]. + Updates a `Schema + `__. Returns: Callable[[~.UpdateSchemaRequest], @@ -469,7 +472,8 @@ def delete_schema( ]: r"""Return a callable for the delete schema method over gRPC. - Deletes a [Schema][google.cloud.discoveryengine.v1.Schema]. + Deletes a `Schema + `__. Returns: Callable[[~.DeleteSchemaRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/schema_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/schema_service/transports/rest.py index 55873e594a9c..4b0a63e60152 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/schema_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/schema_service/transports/rest.py @@ -442,8 +442,8 @@ class SchemaServiceRestStub: class SchemaServiceRestTransport(_BaseSchemaServiceRestTransport): """REST backend synchronous transport for SchemaService. - Service for managing - [Schema][google.cloud.discoveryengine.v1.Schema]s. + Service for managing `Schema + `__s. This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -745,7 +745,8 @@ def __call__( Args: request (~.schema_service.CreateSchemaRequest): The request object. Request message for - [SchemaService.CreateSchema][google.cloud.discoveryengine.v1.SchemaService.CreateSchema] + `SchemaService.CreateSchema + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -897,7 +898,8 @@ def __call__( Args: request (~.schema_service.DeleteSchemaRequest): The request object. Request message for - [SchemaService.DeleteSchema][google.cloud.discoveryengine.v1.SchemaService.DeleteSchema] + `SchemaService.DeleteSchema + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1044,7 +1046,8 @@ def __call__( Args: request (~.schema_service.GetSchemaRequest): The request object. Request message for - [SchemaService.GetSchema][google.cloud.discoveryengine.v1.SchemaService.GetSchema] + `SchemaService.GetSchema + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1196,7 +1199,8 @@ def __call__( Args: request (~.schema_service.ListSchemasRequest): The request object. Request message for - [SchemaService.ListSchemas][google.cloud.discoveryengine.v1.SchemaService.ListSchemas] + `SchemaService.ListSchemas + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1209,7 +1213,8 @@ def __call__( Returns: ~.schema_service.ListSchemasResponse: Response message for - [SchemaService.ListSchemas][google.cloud.discoveryengine.v1.SchemaService.ListSchemas] + `SchemaService.ListSchemas + `__ method. """ @@ -1350,7 +1355,8 @@ def __call__( Args: request (~.schema_service.UpdateSchemaRequest): The request object. Request message for - [SchemaService.UpdateSchema][google.cloud.discoveryengine.v1.SchemaService.UpdateSchema] + `SchemaService.UpdateSchema + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/search_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/search_service/async_client.py index 29a56caccd71..6ddb2179bd8e 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/search_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/search_service/async_client.py @@ -342,7 +342,8 @@ async def sample_search(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.SearchRequest, dict]]): The request object. Request message for - [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] + `SearchService.Search + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -355,11 +356,13 @@ async def sample_search(): Returns: google.cloud.discoveryengine_v1.services.search_service.pagers.SearchAsyncPager: Response message for - [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] - method. + `SearchService.Search + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -414,20 +417,23 @@ async def search_lite( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.SearchLiteAsyncPager: r"""Performs a search. Similar to the - [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] + `SearchService.Search + `__ method, but a lite version that allows API key for - authentication, where OAuth and IAM checks are not required. + authentication, where OAuth and IAM checks are not + required. - Only public website search is supported by this method. If data - stores and engines not associated with public website search are - specified, a ``FAILED_PRECONDITION`` error is returned. + Only public website search is supported by this method. + If data stores and engines not associated with public + website search are specified, a ``FAILED_PRECONDITION`` + error is returned. - This method can be used for easy onboarding without having to - implement an authentication backend. However, it is strongly - recommended to use - [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] - instead with required OAuth and IAM checks to provide better - data security. + This method can be used for easy onboarding without + having to implement an authentication backend. However, + it is strongly recommended to use `SearchService.Search + `__ + instead with required OAuth and IAM checks to provide + better data security. .. code-block:: python @@ -459,7 +465,8 @@ async def sample_search_lite(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.SearchRequest, dict]]): The request object. Request message for - [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] + `SearchService.Search + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -472,11 +479,13 @@ async def sample_search_lite(): Returns: google.cloud.discoveryengine_v1.services.search_service.pagers.SearchLiteAsyncPager: Response message for - [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] - method. + `SearchService.Search + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/search_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/search_service/client.py index 47b4aab95c27..e9977102f3ca 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/search_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/search_service/client.py @@ -895,7 +895,8 @@ def sample_search(): Args: request (Union[google.cloud.discoveryengine_v1.types.SearchRequest, dict]): The request object. Request message for - [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] + `SearchService.Search + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -908,11 +909,13 @@ def sample_search(): Returns: google.cloud.discoveryengine_v1.services.search_service.pagers.SearchPager: Response message for - [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] - method. + `SearchService.Search + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -967,20 +970,23 @@ def search_lite( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.SearchLitePager: r"""Performs a search. Similar to the - [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] + `SearchService.Search + `__ method, but a lite version that allows API key for - authentication, where OAuth and IAM checks are not required. + authentication, where OAuth and IAM checks are not + required. - Only public website search is supported by this method. If data - stores and engines not associated with public website search are - specified, a ``FAILED_PRECONDITION`` error is returned. + Only public website search is supported by this method. + If data stores and engines not associated with public + website search are specified, a ``FAILED_PRECONDITION`` + error is returned. - This method can be used for easy onboarding without having to - implement an authentication backend. However, it is strongly - recommended to use - [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] - instead with required OAuth and IAM checks to provide better - data security. + This method can be used for easy onboarding without + having to implement an authentication backend. However, + it is strongly recommended to use `SearchService.Search + `__ + instead with required OAuth and IAM checks to provide + better data security. .. code-block:: python @@ -1012,7 +1018,8 @@ def sample_search_lite(): Args: request (Union[google.cloud.discoveryengine_v1.types.SearchRequest, dict]): The request object. Request message for - [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] + `SearchService.Search + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1025,11 +1032,13 @@ def sample_search_lite(): Returns: google.cloud.discoveryengine_v1.services.search_service.pagers.SearchLitePager: Response message for - [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] - method. + `SearchService.Search + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/search_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/search_service/transports/base.py index 031b664b5ad4..0e02ac12238f 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/search_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/search_service/transports/base.py @@ -84,8 +84,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -100,11 +98,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/search_service/transports/grpc.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/search_service/transports/grpc.py index 75d3d2e6b966..2a4e6b18e27b 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/search_service/transports/grpc.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/search_service/transports/grpc.py @@ -356,20 +356,23 @@ def search_lite( r"""Return a callable for the search lite method over gRPC. Performs a search. Similar to the - [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] + `SearchService.Search + `__ method, but a lite version that allows API key for - authentication, where OAuth and IAM checks are not required. - - Only public website search is supported by this method. If data - stores and engines not associated with public website search are - specified, a ``FAILED_PRECONDITION`` error is returned. - - This method can be used for easy onboarding without having to - implement an authentication backend. However, it is strongly - recommended to use - [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] - instead with required OAuth and IAM checks to provide better - data security. + authentication, where OAuth and IAM checks are not + required. + + Only public website search is supported by this method. + If data stores and engines not associated with public + website search are specified, a ``FAILED_PRECONDITION`` + error is returned. + + This method can be used for easy onboarding without + having to implement an authentication backend. However, + it is strongly recommended to use `SearchService.Search + `__ + instead with required OAuth and IAM checks to provide + better data security. Returns: Callable[[~.SearchRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/search_service/transports/grpc_asyncio.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/search_service/transports/grpc_asyncio.py index ce258458a3c8..f7a213afea4c 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/search_service/transports/grpc_asyncio.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/search_service/transports/grpc_asyncio.py @@ -368,20 +368,23 @@ def search_lite( r"""Return a callable for the search lite method over gRPC. Performs a search. Similar to the - [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] + `SearchService.Search + `__ method, but a lite version that allows API key for - authentication, where OAuth and IAM checks are not required. - - Only public website search is supported by this method. If data - stores and engines not associated with public website search are - specified, a ``FAILED_PRECONDITION`` error is returned. - - This method can be used for easy onboarding without having to - implement an authentication backend. However, it is strongly - recommended to use - [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] - instead with required OAuth and IAM checks to provide better - data security. + authentication, where OAuth and IAM checks are not + required. + + Only public website search is supported by this method. + If data stores and engines not associated with public + website search are specified, a ``FAILED_PRECONDITION`` + error is returned. + + This method can be used for easy onboarding without + having to implement an authentication backend. However, + it is strongly recommended to use `SearchService.Search + `__ + instead with required OAuth and IAM checks to provide + better data security. Returns: Callable[[~.SearchRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/search_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/search_service/transports/rest.py index 202f27b30213..f88926cdf91d 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/search_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/search_service/transports/rest.py @@ -389,7 +389,8 @@ def __call__( Args: request (~.search_service.SearchRequest): The request object. Request message for - [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] + `SearchService.Search + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -402,7 +403,8 @@ def __call__( Returns: ~.search_service.SearchResponse: Response message for - [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] + `SearchService.Search + `__ method. """ @@ -548,7 +550,8 @@ def __call__( Args: request (~.search_service.SearchRequest): The request object. Request message for - [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] + `SearchService.Search + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -561,7 +564,8 @@ def __call__( Returns: ~.search_service.SearchResponse: Response message for - [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] + `SearchService.Search + `__ method. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/search_tuning_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/search_tuning_service/async_client.py index b1641981be86..7184bdcd477b 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/search_tuning_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/search_tuning_service/async_client.py @@ -351,7 +351,8 @@ async def sample_train_custom_model(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.TrainCustomModelRequest, dict]]): The request object. Request message for - [SearchTuningService.TrainCustomModel][google.cloud.discoveryengine.v1.SearchTuningService.TrainCustomModel] + `SearchTuningService.TrainCustomModel + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -363,12 +364,16 @@ async def sample_train_custom_model(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1.types.TrainCustomModelResponse` Response of the - [TrainCustomModelRequest][google.cloud.discoveryengine.v1.TrainCustomModelRequest]. - This message is returned by the - google.longrunning.Operations.response field. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1.types.TrainCustomModelResponse` + Response of the `TrainCustomModelRequest + `__. + This message is returned by the + google.longrunning.Operations.response + field. """ # Create or coerce a protobuf request object. @@ -454,7 +459,8 @@ async def sample_list_custom_models(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.ListCustomModelsRequest, dict]]): The request object. Request message for - [SearchTuningService.ListCustomModels][google.cloud.discoveryengine.v1.SearchTuningService.ListCustomModels] + `SearchTuningService.ListCustomModels + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -467,8 +473,9 @@ async def sample_list_custom_models(): Returns: google.cloud.discoveryengine_v1.types.ListCustomModelsResponse: Response message for - [SearchTuningService.ListCustomModels][google.cloud.discoveryengine.v1.SearchTuningService.ListCustomModels] - method. + `SearchTuningService.ListCustomModels + `__ + method. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/search_tuning_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/search_tuning_service/client.py index 6a54cf2ee1c4..21db5563f094 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/search_tuning_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/search_tuning_service/client.py @@ -809,7 +809,8 @@ def sample_train_custom_model(): Args: request (Union[google.cloud.discoveryengine_v1.types.TrainCustomModelRequest, dict]): The request object. Request message for - [SearchTuningService.TrainCustomModel][google.cloud.discoveryengine.v1.SearchTuningService.TrainCustomModel] + `SearchTuningService.TrainCustomModel + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -821,12 +822,16 @@ def sample_train_custom_model(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1.types.TrainCustomModelResponse` Response of the - [TrainCustomModelRequest][google.cloud.discoveryengine.v1.TrainCustomModelRequest]. - This message is returned by the - google.longrunning.Operations.response field. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1.types.TrainCustomModelResponse` + Response of the `TrainCustomModelRequest + `__. + This message is returned by the + google.longrunning.Operations.response + field. """ # Create or coerce a protobuf request object. @@ -910,7 +915,8 @@ def sample_list_custom_models(): Args: request (Union[google.cloud.discoveryengine_v1.types.ListCustomModelsRequest, dict]): The request object. Request message for - [SearchTuningService.ListCustomModels][google.cloud.discoveryengine.v1.SearchTuningService.ListCustomModels] + `SearchTuningService.ListCustomModels + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -923,8 +929,9 @@ def sample_list_custom_models(): Returns: google.cloud.discoveryengine_v1.types.ListCustomModelsResponse: Response message for - [SearchTuningService.ListCustomModels][google.cloud.discoveryengine.v1.SearchTuningService.ListCustomModels] - method. + `SearchTuningService.ListCustomModels + `__ + method. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/search_tuning_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/search_tuning_service/transports/base.py index ca2f767e56cc..99533ff5857d 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/search_tuning_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/search_tuning_service/transports/base.py @@ -84,8 +84,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -100,11 +98,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/search_tuning_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/search_tuning_service/transports/rest.py index 381276207316..aecbfd05de01 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/search_tuning_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/search_tuning_service/transports/rest.py @@ -583,7 +583,8 @@ def __call__( Args: request (~.search_tuning_service.ListCustomModelsRequest): The request object. Request message for - [SearchTuningService.ListCustomModels][google.cloud.discoveryengine.v1.SearchTuningService.ListCustomModels] + `SearchTuningService.ListCustomModels + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -596,7 +597,8 @@ def __call__( Returns: ~.search_tuning_service.ListCustomModelsResponse: Response message for - [SearchTuningService.ListCustomModels][google.cloud.discoveryengine.v1.SearchTuningService.ListCustomModels] + `SearchTuningService.ListCustomModels + `__ method. """ @@ -738,7 +740,8 @@ def __call__( Args: request (~.search_tuning_service.TrainCustomModelRequest): The request object. Request message for - [SearchTuningService.TrainCustomModel][google.cloud.discoveryengine.v1.SearchTuningService.TrainCustomModel] + `SearchTuningService.TrainCustomModel + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/serving_config_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/serving_config_service/async_client.py index 3ae0776e9c27..275b669d1d25 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/serving_config_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/serving_config_service/async_client.py @@ -69,7 +69,8 @@ class ServingConfigServiceAsyncClient: """Service for operations related to - [ServingConfig][google.cloud.discoveryengine.v1.ServingConfig]. + `ServingConfig + `__. """ _client: ServingConfigServiceClient @@ -315,7 +316,8 @@ async def update_serving_config( ) -> gcd_serving_config.ServingConfig: r"""Updates a ServingConfig. - Returns a NOT_FOUND error if the ServingConfig does not exist. + Returns a NOT_FOUND error if the ServingConfig does not + exist. .. code-block:: python @@ -361,12 +363,16 @@ async def sample_update_serving_config(): should not be set. update_mask (:class:`google.protobuf.field_mask_pb2.FieldMask`): Indicates which fields in the provided - [ServingConfig][google.cloud.discoveryengine.v1.ServingConfig] - to update. The following are NOT supported: + `ServingConfig + `__ + to update. The following are NOT + supported: - - [ServingConfig.name][google.cloud.discoveryengine.v1.ServingConfig.name] + * `ServingConfig.name + `__ - If not set, all supported fields are updated. + If not set, all supported fields are + updated. This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/serving_config_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/serving_config_service/client.py index 06732595403d..2b79382c3ec4 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/serving_config_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/serving_config_service/client.py @@ -115,7 +115,8 @@ def get_transport_class( class ServingConfigServiceClient(metaclass=ServingConfigServiceClientMeta): """Service for operations related to - [ServingConfig][google.cloud.discoveryengine.v1.ServingConfig]. + `ServingConfig + `__. """ @staticmethod @@ -757,7 +758,8 @@ def update_serving_config( ) -> gcd_serving_config.ServingConfig: r"""Updates a ServingConfig. - Returns a NOT_FOUND error if the ServingConfig does not exist. + Returns a NOT_FOUND error if the ServingConfig does not + exist. .. code-block:: python @@ -803,12 +805,16 @@ def sample_update_serving_config(): should not be set. update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided - [ServingConfig][google.cloud.discoveryengine.v1.ServingConfig] - to update. The following are NOT supported: + `ServingConfig + `__ + to update. The following are NOT + supported: - - [ServingConfig.name][google.cloud.discoveryengine.v1.ServingConfig.name] + * `ServingConfig.name + `__ - If not set, all supported fields are updated. + If not set, all supported fields are + updated. This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/serving_config_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/serving_config_service/transports/base.py index 16cb9121569f..2ce88a05aa15 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/serving_config_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/serving_config_service/transports/base.py @@ -85,8 +85,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -101,11 +99,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/serving_config_service/transports/grpc.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/serving_config_service/transports/grpc.py index d1c6a2fa0b24..9a5af472b255 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/serving_config_service/transports/grpc.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/serving_config_service/transports/grpc.py @@ -114,7 +114,8 @@ class ServingConfigServiceGrpcTransport(ServingConfigServiceTransport): """gRPC backend transport for ServingConfigService. Service for operations related to - [ServingConfig][google.cloud.discoveryengine.v1.ServingConfig]. + `ServingConfig + `__. This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -336,7 +337,8 @@ def update_serving_config( Updates a ServingConfig. - Returns a NOT_FOUND error if the ServingConfig does not exist. + Returns a NOT_FOUND error if the ServingConfig does not + exist. Returns: Callable[[~.UpdateServingConfigRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/serving_config_service/transports/grpc_asyncio.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/serving_config_service/transports/grpc_asyncio.py index a4f8d822aa90..894d6c5845c2 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/serving_config_service/transports/grpc_asyncio.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/serving_config_service/transports/grpc_asyncio.py @@ -120,7 +120,8 @@ class ServingConfigServiceGrpcAsyncIOTransport(ServingConfigServiceTransport): """gRPC AsyncIO backend transport for ServingConfigService. Service for operations related to - [ServingConfig][google.cloud.discoveryengine.v1.ServingConfig]. + `ServingConfig + `__. This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -344,7 +345,8 @@ def update_serving_config( Updates a ServingConfig. - Returns a NOT_FOUND error if the ServingConfig does not exist. + Returns a NOT_FOUND error if the ServingConfig does not + exist. Returns: Callable[[~.UpdateServingConfigRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/serving_config_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/serving_config_service/transports/rest.py index 308ca01f41d5..afc549887f06 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/serving_config_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/serving_config_service/transports/rest.py @@ -225,7 +225,8 @@ class ServingConfigServiceRestTransport(_BaseServingConfigServiceRestTransport): """REST backend synchronous transport for ServingConfigService. Service for operations related to - [ServingConfig][google.cloud.discoveryengine.v1.ServingConfig]. + `ServingConfig + `__. This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/session_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/session_service/async_client.py index b347e794ea27..b83418a35fe8 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/session_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/session_service/async_client.py @@ -320,8 +320,9 @@ async def create_session( ) -> gcd_session.Session: r"""Creates a Session. - If the [Session][google.cloud.discoveryengine.v1.Session] to - create already exists, an ALREADY_EXISTS error is returned. + If the `Session + `__ to create + already exists, an ALREADY_EXISTS error is returned. .. code-block:: python @@ -353,8 +354,8 @@ async def sample_create_session(): request (Optional[Union[google.cloud.discoveryengine_v1.types.CreateSessionRequest, dict]]): The request object. Request for CreateSession method. parent (:class:`str`): - Required. Full resource name of parent data store. - Format: + Required. Full resource name of parent + data store. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`` This corresponds to the ``parent`` field @@ -441,8 +442,9 @@ async def delete_session( ) -> None: r"""Deletes a Session. - If the [Session][google.cloud.discoveryengine.v1.Session] to - delete does not exist, a NOT_FOUND error is returned. + If the `Session + `__ to delete + does not exist, a NOT_FOUND error is returned. .. code-block:: python @@ -471,8 +473,8 @@ async def sample_delete_session(): request (Optional[Union[google.cloud.discoveryengine_v1.types.DeleteSessionRequest, dict]]): The request object. Request for DeleteSession method. name (:class:`str`): - Required. The resource name of the Session to delete. - Format: + Required. The resource name of the + Session to delete. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`` This corresponds to the ``name`` field @@ -546,9 +548,9 @@ async def update_session( ) -> gcd_session.Session: r"""Updates a Session. - [Session][google.cloud.discoveryengine.v1.Session] action type - cannot be changed. If the - [Session][google.cloud.discoveryengine.v1.Session] to update + `Session `__ + action type cannot be changed. If the `Session + `__ to update does not exist, a NOT_FOUND error is returned. .. code-block:: python @@ -586,12 +588,16 @@ async def sample_update_session(): should not be set. update_mask (:class:`google.protobuf.field_mask_pb2.FieldMask`): Indicates which fields in the provided - [Session][google.cloud.discoveryengine.v1.Session] to - update. The following are NOT supported: + `Session + `__ + to update. The following are NOT + supported: - - [Session.name][google.cloud.discoveryengine.v1.Session.name] + * `Session.name + `__ - If not set or empty, all supported fields are updated. + If not set or empty, all supported + fields are updated. This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this @@ -704,8 +710,8 @@ async def sample_get_session(): request (Optional[Union[google.cloud.discoveryengine_v1.types.GetSessionRequest, dict]]): The request object. Request for GetSession method. name (:class:`str`): - Required. The resource name of the Session to get. - Format: + Required. The resource name of the + Session to get. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`` This corresponds to the ``name`` field @@ -784,7 +790,8 @@ async def list_sessions( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListSessionsAsyncPager: r"""Lists all Sessions by their parent - [DataStore][google.cloud.discoveryengine.v1.DataStore]. + `DataStore + `__. .. code-block:: python @@ -817,7 +824,8 @@ async def sample_list_sessions(): request (Optional[Union[google.cloud.discoveryengine_v1.types.ListSessionsRequest, dict]]): The request object. Request for ListSessions method. parent (:class:`str`): - Required. The data store resource name. Format: + Required. The data store resource name. + Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`` This corresponds to the ``parent`` field diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/session_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/session_service/client.py index 2d3c187dcf52..2956fd8dd203 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/session_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/session_service/client.py @@ -881,8 +881,9 @@ def create_session( ) -> gcd_session.Session: r"""Creates a Session. - If the [Session][google.cloud.discoveryengine.v1.Session] to - create already exists, an ALREADY_EXISTS error is returned. + If the `Session + `__ to create + already exists, an ALREADY_EXISTS error is returned. .. code-block:: python @@ -914,8 +915,8 @@ def sample_create_session(): request (Union[google.cloud.discoveryengine_v1.types.CreateSessionRequest, dict]): The request object. Request for CreateSession method. parent (str): - Required. Full resource name of parent data store. - Format: + Required. Full resource name of parent + data store. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`` This corresponds to the ``parent`` field @@ -999,8 +1000,9 @@ def delete_session( ) -> None: r"""Deletes a Session. - If the [Session][google.cloud.discoveryengine.v1.Session] to - delete does not exist, a NOT_FOUND error is returned. + If the `Session + `__ to delete + does not exist, a NOT_FOUND error is returned. .. code-block:: python @@ -1029,8 +1031,8 @@ def sample_delete_session(): request (Union[google.cloud.discoveryengine_v1.types.DeleteSessionRequest, dict]): The request object. Request for DeleteSession method. name (str): - Required. The resource name of the Session to delete. - Format: + Required. The resource name of the + Session to delete. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`` This corresponds to the ``name`` field @@ -1101,9 +1103,9 @@ def update_session( ) -> gcd_session.Session: r"""Updates a Session. - [Session][google.cloud.discoveryengine.v1.Session] action type - cannot be changed. If the - [Session][google.cloud.discoveryengine.v1.Session] to update + `Session `__ + action type cannot be changed. If the `Session + `__ to update does not exist, a NOT_FOUND error is returned. .. code-block:: python @@ -1141,12 +1143,16 @@ def sample_update_session(): should not be set. update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided - [Session][google.cloud.discoveryengine.v1.Session] to - update. The following are NOT supported: + `Session + `__ + to update. The following are NOT + supported: - - [Session.name][google.cloud.discoveryengine.v1.Session.name] + * `Session.name + `__ - If not set or empty, all supported fields are updated. + If not set or empty, all supported + fields are updated. This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this @@ -1256,8 +1262,8 @@ def sample_get_session(): request (Union[google.cloud.discoveryengine_v1.types.GetSessionRequest, dict]): The request object. Request for GetSession method. name (str): - Required. The resource name of the Session to get. - Format: + Required. The resource name of the + Session to get. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`` This corresponds to the ``name`` field @@ -1333,7 +1339,8 @@ def list_sessions( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListSessionsPager: r"""Lists all Sessions by their parent - [DataStore][google.cloud.discoveryengine.v1.DataStore]. + `DataStore + `__. .. code-block:: python @@ -1366,7 +1373,8 @@ def sample_list_sessions(): request (Union[google.cloud.discoveryengine_v1.types.ListSessionsRequest, dict]): The request object. Request for ListSessions method. parent (str): - Required. The data store resource name. Format: + Required. The data store resource name. + Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`` This corresponds to the ``parent`` field diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/session_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/session_service/transports/base.py index 12576764ebe4..a2812b396028 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/session_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/session_service/transports/base.py @@ -87,8 +87,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -103,11 +101,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/session_service/transports/grpc.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/session_service/transports/grpc.py index 8b0fc2b575ea..442fc6f9bf18 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/session_service/transports/grpc.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/session_service/transports/grpc.py @@ -336,8 +336,9 @@ def create_session( Creates a Session. - If the [Session][google.cloud.discoveryengine.v1.Session] to - create already exists, an ALREADY_EXISTS error is returned. + If the `Session + `__ to create + already exists, an ALREADY_EXISTS error is returned. Returns: Callable[[~.CreateSessionRequest], @@ -367,8 +368,9 @@ def delete_session( Deletes a Session. - If the [Session][google.cloud.discoveryengine.v1.Session] to - delete does not exist, a NOT_FOUND error is returned. + If the `Session + `__ to delete + does not exist, a NOT_FOUND error is returned. Returns: Callable[[~.DeleteSessionRequest], @@ -398,9 +400,9 @@ def update_session( Updates a Session. - [Session][google.cloud.discoveryengine.v1.Session] action type - cannot be changed. If the - [Session][google.cloud.discoveryengine.v1.Session] to update + `Session `__ + action type cannot be changed. If the `Session + `__ to update does not exist, a NOT_FOUND error is returned. Returns: @@ -457,7 +459,8 @@ def list_sessions( r"""Return a callable for the list sessions method over gRPC. Lists all Sessions by their parent - [DataStore][google.cloud.discoveryengine.v1.DataStore]. + `DataStore + `__. Returns: Callable[[~.ListSessionsRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/session_service/transports/grpc_asyncio.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/session_service/transports/grpc_asyncio.py index b25a483d8ec6..805573400289 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/session_service/transports/grpc_asyncio.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/session_service/transports/grpc_asyncio.py @@ -345,8 +345,9 @@ def create_session( Creates a Session. - If the [Session][google.cloud.discoveryengine.v1.Session] to - create already exists, an ALREADY_EXISTS error is returned. + If the `Session + `__ to create + already exists, an ALREADY_EXISTS error is returned. Returns: Callable[[~.CreateSessionRequest], @@ -376,8 +377,9 @@ def delete_session( Deletes a Session. - If the [Session][google.cloud.discoveryengine.v1.Session] to - delete does not exist, a NOT_FOUND error is returned. + If the `Session + `__ to delete + does not exist, a NOT_FOUND error is returned. Returns: Callable[[~.DeleteSessionRequest], @@ -408,9 +410,9 @@ def update_session( Updates a Session. - [Session][google.cloud.discoveryengine.v1.Session] action type - cannot be changed. If the - [Session][google.cloud.discoveryengine.v1.Session] to update + `Session `__ + action type cannot be changed. If the `Session + `__ to update does not exist, a NOT_FOUND error is returned. Returns: @@ -469,7 +471,8 @@ def list_sessions( r"""Return a callable for the list sessions method over gRPC. Lists all Sessions by their parent - [DataStore][google.cloud.discoveryengine.v1.DataStore]. + `DataStore + `__. Returns: Callable[[~.ListSessionsRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/site_search_engine_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/site_search_engine_service/async_client.py index 1dd928221c4d..de51e00ff7c2 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/site_search_engine_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/site_search_engine_service/async_client.py @@ -329,7 +329,8 @@ async def get_site_search_engine( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> site_search_engine.SiteSearchEngine: r"""Gets the - [SiteSearchEngine][google.cloud.discoveryengine.v1.SiteSearchEngine]. + `SiteSearchEngine + `__. .. code-block:: python @@ -360,17 +361,20 @@ async def sample_get_site_search_engine(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.GetSiteSearchEngineRequest, dict]]): The request object. Request message for - [SiteSearchEngineService.GetSiteSearchEngine][google.cloud.discoveryengine.v1.SiteSearchEngineService.GetSiteSearchEngine] + `SiteSearchEngineService.GetSiteSearchEngine + `__ method. name (:class:`str`): Required. Resource name of - [SiteSearchEngine][google.cloud.discoveryengine.v1.SiteSearchEngine], + `SiteSearchEngine + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine``. - If the caller does not have permission to access the - [SiteSearchEngine], regardless of whether or not it - exists, a PERMISSION_DENIED error is returned. + If the caller does not have permission + to access the [SiteSearchEngine], + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -454,8 +458,8 @@ async def create_target_site( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: - r"""Creates a - [TargetSite][google.cloud.discoveryengine.v1.TargetSite]. + r"""Creates a `TargetSite + `__. .. code-block:: python @@ -494,11 +498,13 @@ async def sample_create_target_site(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.CreateTargetSiteRequest, dict]]): The request object. Request message for - [SiteSearchEngineService.CreateTargetSite][google.cloud.discoveryengine.v1.SiteSearchEngineService.CreateTargetSite] + `SiteSearchEngineService.CreateTargetSite + `__ method. parent (:class:`str`): Required. Parent resource name of - [TargetSite][google.cloud.discoveryengine.v1.TargetSite], + `TargetSite + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine``. @@ -506,8 +512,8 @@ async def sample_create_target_site(): on the ``request`` instance; if ``request`` is provided, this should not be set. target_site (:class:`google.cloud.discoveryengine_v1.types.TargetSite`): - Required. The - [TargetSite][google.cloud.discoveryengine.v1.TargetSite] + Required. The `TargetSite + `__ to create. This corresponds to the ``target_site`` field @@ -523,9 +529,10 @@ async def sample_create_target_site(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be + An object representing a long-running + operation. + The result type for the operation will + be :class:`google.cloud.discoveryengine_v1.types.TargetSite` A target site for the SiteSearchEngine. @@ -599,8 +606,9 @@ async def batch_create_target_sites( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: - r"""Creates [TargetSite][google.cloud.discoveryengine.v1.TargetSite] - in a batch. + r"""Creates `TargetSite + `__ in a + batch. .. code-block:: python @@ -640,7 +648,8 @@ async def sample_batch_create_target_sites(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.BatchCreateTargetSitesRequest, dict]]): The request object. Request message for - [SiteSearchEngineService.BatchCreateTargetSites][google.cloud.discoveryengine.v1.SiteSearchEngineService.BatchCreateTargetSites] + `SiteSearchEngineService.BatchCreateTargetSites + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -652,11 +661,15 @@ async def sample_batch_create_target_sites(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1.types.BatchCreateTargetSitesResponse` Response message for - [SiteSearchEngineService.BatchCreateTargetSites][google.cloud.discoveryengine.v1.SiteSearchEngineService.BatchCreateTargetSites] - method. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1.types.BatchCreateTargetSitesResponse` + Response message for + `SiteSearchEngineService.BatchCreateTargetSites + `__ + method. """ # Create or coerce a protobuf request object. @@ -712,7 +725,8 @@ async def get_target_site( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> site_search_engine.TargetSite: - r"""Gets a [TargetSite][google.cloud.discoveryengine.v1.TargetSite]. + r"""Gets a `TargetSite + `__. .. code-block:: python @@ -743,22 +757,26 @@ async def sample_get_target_site(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.GetTargetSiteRequest, dict]]): The request object. Request message for - [SiteSearchEngineService.GetTargetSite][google.cloud.discoveryengine.v1.SiteSearchEngineService.GetTargetSite] + `SiteSearchEngineService.GetTargetSite + `__ method. name (:class:`str`): Required. Full resource name of - [TargetSite][google.cloud.discoveryengine.v1.TargetSite], + `TargetSite + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}``. - If the caller does not have permission to access the - [TargetSite][google.cloud.discoveryengine.v1.TargetSite], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to access the `TargetSite + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. - If the requested - [TargetSite][google.cloud.discoveryengine.v1.TargetSite] - does not exist, a NOT_FOUND error is returned. + If the requested `TargetSite + `__ + does not exist, a NOT_FOUND error is + returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -837,8 +855,8 @@ async def update_target_site( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: - r"""Updates a - [TargetSite][google.cloud.discoveryengine.v1.TargetSite]. + r"""Updates a `TargetSite + `__. .. code-block:: python @@ -876,18 +894,21 @@ async def sample_update_target_site(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.UpdateTargetSiteRequest, dict]]): The request object. Request message for - [SiteSearchEngineService.UpdateTargetSite][google.cloud.discoveryengine.v1.SiteSearchEngineService.UpdateTargetSite] + `SiteSearchEngineService.UpdateTargetSite + `__ method. target_site (:class:`google.cloud.discoveryengine_v1.types.TargetSite`): - Required. The target site to update. If the caller does - not have permission to update the - [TargetSite][google.cloud.discoveryengine.v1.TargetSite], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. - - If the - [TargetSite][google.cloud.discoveryengine.v1.TargetSite] - to update does not exist, a NOT_FOUND error is returned. + Required. The target site to update. + If the caller does not have permission + to update the `TargetSite + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. + + If the `TargetSite + `__ + to update does not exist, a NOT_FOUND + error is returned. This corresponds to the ``target_site`` field on the ``request`` instance; if ``request`` is provided, this @@ -902,9 +923,10 @@ async def sample_update_target_site(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be + An object representing a long-running + operation. + The result type for the operation will + be :class:`google.cloud.discoveryengine_v1.types.TargetSite` A target site for the SiteSearchEngine. @@ -979,8 +1001,8 @@ async def delete_target_site( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: - r"""Deletes a - [TargetSite][google.cloud.discoveryengine.v1.TargetSite]. + r"""Deletes a `TargetSite + `__. .. code-block:: python @@ -1015,22 +1037,26 @@ async def sample_delete_target_site(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.DeleteTargetSiteRequest, dict]]): The request object. Request message for - [SiteSearchEngineService.DeleteTargetSite][google.cloud.discoveryengine.v1.SiteSearchEngineService.DeleteTargetSite] + `SiteSearchEngineService.DeleteTargetSite + `__ method. name (:class:`str`): Required. Full resource name of - [TargetSite][google.cloud.discoveryengine.v1.TargetSite], + `TargetSite + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}``. - If the caller does not have permission to access the - [TargetSite][google.cloud.discoveryengine.v1.TargetSite], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to access the `TargetSite + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. - If the requested - [TargetSite][google.cloud.discoveryengine.v1.TargetSite] - does not exist, a NOT_FOUND error is returned. + If the requested `TargetSite + `__ + does not exist, a NOT_FOUND error is + returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1045,18 +1071,21 @@ async def sample_delete_target_site(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.protobuf.empty_pb2.Empty` A generic empty message that you can re-use to avoid defining duplicated - empty messages in your APIs. A typical example is to - use it as the request or the response type of an API - method. For instance: - - service Foo { - rpc Bar(google.protobuf.Empty) returns - (google.protobuf.Empty); - - } + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.protobuf.empty_pb2.Empty` + A generic empty message that you can + re-use to avoid defining duplicated + empty messages in your APIs. A typical + example is to use it as the request or + the response type of an API method. For + instance: + + service Foo { + rpc Bar(google.protobuf.Empty) + returns (google.protobuf.Empty); } """ # Create or coerce a protobuf request object. @@ -1127,8 +1156,8 @@ async def list_target_sites( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListTargetSitesAsyncPager: - r"""Gets a list of - [TargetSite][google.cloud.discoveryengine.v1.TargetSite]s. + r"""Gets a list of `TargetSite + `__s. .. code-block:: python @@ -1160,17 +1189,20 @@ async def sample_list_target_sites(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.ListTargetSitesRequest, dict]]): The request object. Request message for - [SiteSearchEngineService.ListTargetSites][google.cloud.discoveryengine.v1.SiteSearchEngineService.ListTargetSites] + `SiteSearchEngineService.ListTargetSites + `__ method. parent (:class:`str`): - Required. The parent site search engine resource name, - such as + Required. The parent site search engine + resource name, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine``. - If the caller does not have permission to list - [TargetSite][google.cloud.discoveryengine.v1.TargetSite]s - under this site search engine, regardless of whether or - not this branch exists, a PERMISSION_DENIED error is + If the caller does not have permission + to list `TargetSite + `__s + under this site search engine, + regardless of whether or not this branch + exists, a PERMISSION_DENIED error is returned. This corresponds to the ``parent`` field @@ -1187,11 +1219,13 @@ async def sample_list_target_sites(): Returns: google.cloud.discoveryengine_v1.services.site_search_engine_service.pagers.ListTargetSitesAsyncPager: Response message for - [SiteSearchEngineService.ListTargetSites][google.cloud.discoveryengine.v1.SiteSearchEngineService.ListTargetSites] - method. + `SiteSearchEngineService.ListTargetSites + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -1266,7 +1300,8 @@ async def create_sitemap( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: - r"""Creates a [Sitemap][google.cloud.discoveryengine.v1.Sitemap]. + r"""Creates a `Sitemap + `__. .. code-block:: python @@ -1305,11 +1340,13 @@ async def sample_create_sitemap(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.CreateSitemapRequest, dict]]): The request object. Request message for - [SiteSearchEngineService.CreateSitemap][google.cloud.discoveryengine.v1.SiteSearchEngineService.CreateSitemap] + `SiteSearchEngineService.CreateSitemap + `__ method. parent (:class:`str`): Required. Parent resource name of the - [SiteSearchEngine][google.cloud.discoveryengine.v1.SiteSearchEngine], + `SiteSearchEngine + `__, such as ``projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine``. @@ -1317,9 +1354,9 @@ async def sample_create_sitemap(): on the ``request`` instance; if ``request`` is provided, this should not be set. sitemap (:class:`google.cloud.discoveryengine_v1.types.Sitemap`): - Required. The - [Sitemap][google.cloud.discoveryengine.v1.Sitemap] to - create. + Required. The `Sitemap + `__ + to create. This corresponds to the ``sitemap`` field on the ``request`` instance; if ``request`` is provided, this @@ -1334,11 +1371,12 @@ async def sample_create_sitemap(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be - :class:`google.cloud.discoveryengine_v1.types.Sitemap` A - sitemap for the SiteSearchEngine. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1.types.Sitemap` + A sitemap for the SiteSearchEngine. """ # Create or coerce a protobuf request object. @@ -1411,7 +1449,8 @@ async def delete_sitemap( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: - r"""Deletes a [Sitemap][google.cloud.discoveryengine.v1.Sitemap]. + r"""Deletes a `Sitemap + `__. .. code-block:: python @@ -1446,22 +1485,26 @@ async def sample_delete_sitemap(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.DeleteSitemapRequest, dict]]): The request object. Request message for - [SiteSearchEngineService.DeleteSitemap][google.cloud.discoveryengine.v1.SiteSearchEngineService.DeleteSitemap] + `SiteSearchEngineService.DeleteSitemap + `__ method. name (:class:`str`): Required. Full resource name of - [Sitemap][google.cloud.discoveryengine.v1.Sitemap], such - as + `Sitemap + `__, + such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/sitemaps/{sitemap}``. - If the caller does not have permission to access the - [Sitemap][google.cloud.discoveryengine.v1.Sitemap], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to access the `Sitemap + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. - If the requested - [Sitemap][google.cloud.discoveryengine.v1.Sitemap] does - not exist, a NOT_FOUND error is returned. + If the requested `Sitemap + `__ + does not exist, a NOT_FOUND error is + returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1476,18 +1519,21 @@ async def sample_delete_sitemap(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.protobuf.empty_pb2.Empty` A generic empty message that you can re-use to avoid defining duplicated - empty messages in your APIs. A typical example is to - use it as the request or the response type of an API - method. For instance: - - service Foo { - rpc Bar(google.protobuf.Empty) returns - (google.protobuf.Empty); - - } + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.protobuf.empty_pb2.Empty` + A generic empty message that you can + re-use to avoid defining duplicated + empty messages in your APIs. A typical + example is to use it as the request or + the response type of an API method. For + instance: + + service Foo { + rpc Bar(google.protobuf.Empty) + returns (google.protobuf.Empty); } """ # Create or coerce a protobuf request object. @@ -1558,8 +1604,10 @@ async def fetch_sitemaps( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> site_search_engine_service.FetchSitemapsResponse: - r"""Fetch [Sitemap][google.cloud.discoveryengine.v1.Sitemap]s in a - [DataStore][google.cloud.discoveryengine.v1.DataStore]. + r"""Fetch `Sitemap + `__s in a + `DataStore + `__. .. code-block:: python @@ -1590,11 +1638,13 @@ async def sample_fetch_sitemaps(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.FetchSitemapsRequest, dict]]): The request object. Request message for - [SiteSearchEngineService.FetchSitemaps][google.cloud.discoveryengine.v1.SiteSearchEngineService.FetchSitemaps] + `SiteSearchEngineService.FetchSitemaps + `__ method. parent (:class:`str`): Required. Parent resource name of the - [SiteSearchEngine][google.cloud.discoveryengine.v1.SiteSearchEngine], + `SiteSearchEngine + `__, such as ``projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine``. @@ -1612,8 +1662,9 @@ async def sample_fetch_sitemaps(): Returns: google.cloud.discoveryengine_v1.types.FetchSitemapsResponse: Response message for - [SiteSearchEngineService.FetchSitemaps][google.cloud.discoveryengine.v1.SiteSearchEngineService.FetchSitemaps] - method. + `SiteSearchEngineService.FetchSitemaps + `__ + method. """ # Create or coerce a protobuf request object. @@ -1711,7 +1762,8 @@ async def sample_enable_advanced_site_search(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.EnableAdvancedSiteSearchRequest, dict]]): The request object. Request message for - [SiteSearchEngineService.EnableAdvancedSiteSearch][google.cloud.discoveryengine.v1.SiteSearchEngineService.EnableAdvancedSiteSearch] + `SiteSearchEngineService.EnableAdvancedSiteSearch + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -1723,11 +1775,15 @@ async def sample_enable_advanced_site_search(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1.types.EnableAdvancedSiteSearchResponse` Response message for - [SiteSearchEngineService.EnableAdvancedSiteSearch][google.cloud.discoveryengine.v1.SiteSearchEngineService.EnableAdvancedSiteSearch] - method. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1.types.EnableAdvancedSiteSearchResponse` + Response message for + `SiteSearchEngineService.EnableAdvancedSiteSearch + `__ + method. """ # Create or coerce a protobuf request object. @@ -1822,7 +1878,8 @@ async def sample_disable_advanced_site_search(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.DisableAdvancedSiteSearchRequest, dict]]): The request object. Request message for - [SiteSearchEngineService.DisableAdvancedSiteSearch][google.cloud.discoveryengine.v1.SiteSearchEngineService.DisableAdvancedSiteSearch] + `SiteSearchEngineService.DisableAdvancedSiteSearch + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -1834,11 +1891,15 @@ async def sample_disable_advanced_site_search(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1.types.DisableAdvancedSiteSearchResponse` Response message for - [SiteSearchEngineService.DisableAdvancedSiteSearch][google.cloud.discoveryengine.v1.SiteSearchEngineService.DisableAdvancedSiteSearch] - method. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1.types.DisableAdvancedSiteSearchResponse` + Response message for + `SiteSearchEngineService.DisableAdvancedSiteSearch + `__ + method. """ # Create or coerce a protobuf request object. @@ -1933,7 +1994,8 @@ async def sample_recrawl_uris(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.RecrawlUrisRequest, dict]]): The request object. Request message for - [SiteSearchEngineService.RecrawlUris][google.cloud.discoveryengine.v1.SiteSearchEngineService.RecrawlUris] + `SiteSearchEngineService.RecrawlUris + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -1945,11 +2007,15 @@ async def sample_recrawl_uris(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1.types.RecrawlUrisResponse` Response message for - [SiteSearchEngineService.RecrawlUris][google.cloud.discoveryengine.v1.SiteSearchEngineService.RecrawlUris] - method. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1.types.RecrawlUrisResponse` + Response message for + `SiteSearchEngineService.RecrawlUris + `__ + method. """ # Create or coerce a protobuf request object. @@ -2041,7 +2107,8 @@ async def sample_batch_verify_target_sites(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.BatchVerifyTargetSitesRequest, dict]]): The request object. Request message for - [SiteSearchEngineService.BatchVerifyTargetSites][google.cloud.discoveryengine.v1.SiteSearchEngineService.BatchVerifyTargetSites] + `SiteSearchEngineService.BatchVerifyTargetSites + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -2053,11 +2120,15 @@ async def sample_batch_verify_target_sites(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1.types.BatchVerifyTargetSitesResponse` Response message for - [SiteSearchEngineService.BatchVerifyTargetSites][google.cloud.discoveryengine.v1.SiteSearchEngineService.BatchVerifyTargetSites] - method. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1.types.BatchVerifyTargetSitesResponse` + Response message for + `SiteSearchEngineService.BatchVerifyTargetSites + `__ + method. """ # Create or coerce a protobuf request object. @@ -2112,9 +2183,10 @@ async def fetch_domain_verification_status( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.FetchDomainVerificationStatusAsyncPager: - r"""Returns list of target sites with its domain verification - status. This method can only be called under data store with - BASIC_SITE_SEARCH state at the moment. + r"""Returns list of target sites with its domain + verification status. This method can only be called + under data store with BASIC_SITE_SEARCH state at the + moment. .. code-block:: python @@ -2146,7 +2218,8 @@ async def sample_fetch_domain_verification_status(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.FetchDomainVerificationStatusRequest, dict]]): The request object. Request message for - [SiteSearchEngineService.FetchDomainVerificationStatus][google.cloud.discoveryengine.v1.SiteSearchEngineService.FetchDomainVerificationStatus] + `SiteSearchEngineService.FetchDomainVerificationStatus + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -2159,11 +2232,13 @@ async def sample_fetch_domain_verification_status(): Returns: google.cloud.discoveryengine_v1.services.site_search_engine_service.pagers.FetchDomainVerificationStatusAsyncPager: Response message for - [SiteSearchEngineService.FetchDomainVerificationStatus][google.cloud.discoveryengine.v1.SiteSearchEngineService.FetchDomainVerificationStatus] - method. + `SiteSearchEngineService.FetchDomainVerificationStatus + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/site_search_engine_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/site_search_engine_service/client.py index ab6b9c986991..0c9eccc04843 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/site_search_engine_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/site_search_engine_service/client.py @@ -807,7 +807,8 @@ def get_site_search_engine( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> site_search_engine.SiteSearchEngine: r"""Gets the - [SiteSearchEngine][google.cloud.discoveryengine.v1.SiteSearchEngine]. + `SiteSearchEngine + `__. .. code-block:: python @@ -838,17 +839,20 @@ def sample_get_site_search_engine(): Args: request (Union[google.cloud.discoveryengine_v1.types.GetSiteSearchEngineRequest, dict]): The request object. Request message for - [SiteSearchEngineService.GetSiteSearchEngine][google.cloud.discoveryengine.v1.SiteSearchEngineService.GetSiteSearchEngine] + `SiteSearchEngineService.GetSiteSearchEngine + `__ method. name (str): Required. Resource name of - [SiteSearchEngine][google.cloud.discoveryengine.v1.SiteSearchEngine], + `SiteSearchEngine + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine``. - If the caller does not have permission to access the - [SiteSearchEngine], regardless of whether or not it - exists, a PERMISSION_DENIED error is returned. + If the caller does not have permission + to access the [SiteSearchEngine], + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -929,8 +933,8 @@ def create_target_site( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: - r"""Creates a - [TargetSite][google.cloud.discoveryengine.v1.TargetSite]. + r"""Creates a `TargetSite + `__. .. code-block:: python @@ -969,11 +973,13 @@ def sample_create_target_site(): Args: request (Union[google.cloud.discoveryengine_v1.types.CreateTargetSiteRequest, dict]): The request object. Request message for - [SiteSearchEngineService.CreateTargetSite][google.cloud.discoveryengine.v1.SiteSearchEngineService.CreateTargetSite] + `SiteSearchEngineService.CreateTargetSite + `__ method. parent (str): Required. Parent resource name of - [TargetSite][google.cloud.discoveryengine.v1.TargetSite], + `TargetSite + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine``. @@ -981,8 +987,8 @@ def sample_create_target_site(): on the ``request`` instance; if ``request`` is provided, this should not be set. target_site (google.cloud.discoveryengine_v1.types.TargetSite): - Required. The - [TargetSite][google.cloud.discoveryengine.v1.TargetSite] + Required. The `TargetSite + `__ to create. This corresponds to the ``target_site`` field @@ -998,9 +1004,10 @@ def sample_create_target_site(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be + An object representing a long-running + operation. + The result type for the operation will + be :class:`google.cloud.discoveryengine_v1.types.TargetSite` A target site for the SiteSearchEngine. @@ -1071,8 +1078,9 @@ def batch_create_target_sites( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: - r"""Creates [TargetSite][google.cloud.discoveryengine.v1.TargetSite] - in a batch. + r"""Creates `TargetSite + `__ in a + batch. .. code-block:: python @@ -1112,7 +1120,8 @@ def sample_batch_create_target_sites(): Args: request (Union[google.cloud.discoveryengine_v1.types.BatchCreateTargetSitesRequest, dict]): The request object. Request message for - [SiteSearchEngineService.BatchCreateTargetSites][google.cloud.discoveryengine.v1.SiteSearchEngineService.BatchCreateTargetSites] + `SiteSearchEngineService.BatchCreateTargetSites + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1124,11 +1133,15 @@ def sample_batch_create_target_sites(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1.types.BatchCreateTargetSitesResponse` Response message for - [SiteSearchEngineService.BatchCreateTargetSites][google.cloud.discoveryengine.v1.SiteSearchEngineService.BatchCreateTargetSites] - method. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1.types.BatchCreateTargetSitesResponse` + Response message for + `SiteSearchEngineService.BatchCreateTargetSites + `__ + method. """ # Create or coerce a protobuf request object. @@ -1184,7 +1197,8 @@ def get_target_site( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> site_search_engine.TargetSite: - r"""Gets a [TargetSite][google.cloud.discoveryengine.v1.TargetSite]. + r"""Gets a `TargetSite + `__. .. code-block:: python @@ -1215,22 +1229,26 @@ def sample_get_target_site(): Args: request (Union[google.cloud.discoveryengine_v1.types.GetTargetSiteRequest, dict]): The request object. Request message for - [SiteSearchEngineService.GetTargetSite][google.cloud.discoveryengine.v1.SiteSearchEngineService.GetTargetSite] + `SiteSearchEngineService.GetTargetSite + `__ method. name (str): Required. Full resource name of - [TargetSite][google.cloud.discoveryengine.v1.TargetSite], + `TargetSite + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}``. - If the caller does not have permission to access the - [TargetSite][google.cloud.discoveryengine.v1.TargetSite], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to access the `TargetSite + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. - If the requested - [TargetSite][google.cloud.discoveryengine.v1.TargetSite] - does not exist, a NOT_FOUND error is returned. + If the requested `TargetSite + `__ + does not exist, a NOT_FOUND error is + returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1306,8 +1324,8 @@ def update_target_site( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: - r"""Updates a - [TargetSite][google.cloud.discoveryengine.v1.TargetSite]. + r"""Updates a `TargetSite + `__. .. code-block:: python @@ -1345,18 +1363,21 @@ def sample_update_target_site(): Args: request (Union[google.cloud.discoveryengine_v1.types.UpdateTargetSiteRequest, dict]): The request object. Request message for - [SiteSearchEngineService.UpdateTargetSite][google.cloud.discoveryengine.v1.SiteSearchEngineService.UpdateTargetSite] + `SiteSearchEngineService.UpdateTargetSite + `__ method. target_site (google.cloud.discoveryengine_v1.types.TargetSite): - Required. The target site to update. If the caller does - not have permission to update the - [TargetSite][google.cloud.discoveryengine.v1.TargetSite], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. - - If the - [TargetSite][google.cloud.discoveryengine.v1.TargetSite] - to update does not exist, a NOT_FOUND error is returned. + Required. The target site to update. + If the caller does not have permission + to update the `TargetSite + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. + + If the `TargetSite + `__ + to update does not exist, a NOT_FOUND + error is returned. This corresponds to the ``target_site`` field on the ``request`` instance; if ``request`` is provided, this @@ -1371,9 +1392,10 @@ def sample_update_target_site(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be + An object representing a long-running + operation. + The result type for the operation will + be :class:`google.cloud.discoveryengine_v1.types.TargetSite` A target site for the SiteSearchEngine. @@ -1445,8 +1467,8 @@ def delete_target_site( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: - r"""Deletes a - [TargetSite][google.cloud.discoveryengine.v1.TargetSite]. + r"""Deletes a `TargetSite + `__. .. code-block:: python @@ -1481,22 +1503,26 @@ def sample_delete_target_site(): Args: request (Union[google.cloud.discoveryengine_v1.types.DeleteTargetSiteRequest, dict]): The request object. Request message for - [SiteSearchEngineService.DeleteTargetSite][google.cloud.discoveryengine.v1.SiteSearchEngineService.DeleteTargetSite] + `SiteSearchEngineService.DeleteTargetSite + `__ method. name (str): Required. Full resource name of - [TargetSite][google.cloud.discoveryengine.v1.TargetSite], + `TargetSite + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}``. - If the caller does not have permission to access the - [TargetSite][google.cloud.discoveryengine.v1.TargetSite], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to access the `TargetSite + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. - If the requested - [TargetSite][google.cloud.discoveryengine.v1.TargetSite] - does not exist, a NOT_FOUND error is returned. + If the requested `TargetSite + `__ + does not exist, a NOT_FOUND error is + returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1511,18 +1537,21 @@ def sample_delete_target_site(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.protobuf.empty_pb2.Empty` A generic empty message that you can re-use to avoid defining duplicated - empty messages in your APIs. A typical example is to - use it as the request or the response type of an API - method. For instance: - - service Foo { - rpc Bar(google.protobuf.Empty) returns - (google.protobuf.Empty); - - } + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.protobuf.empty_pb2.Empty` + A generic empty message that you can + re-use to avoid defining duplicated + empty messages in your APIs. A typical + example is to use it as the request or + the response type of an API method. For + instance: + + service Foo { + rpc Bar(google.protobuf.Empty) + returns (google.protobuf.Empty); } """ # Create or coerce a protobuf request object. @@ -1590,8 +1619,8 @@ def list_target_sites( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListTargetSitesPager: - r"""Gets a list of - [TargetSite][google.cloud.discoveryengine.v1.TargetSite]s. + r"""Gets a list of `TargetSite + `__s. .. code-block:: python @@ -1623,17 +1652,20 @@ def sample_list_target_sites(): Args: request (Union[google.cloud.discoveryengine_v1.types.ListTargetSitesRequest, dict]): The request object. Request message for - [SiteSearchEngineService.ListTargetSites][google.cloud.discoveryengine.v1.SiteSearchEngineService.ListTargetSites] + `SiteSearchEngineService.ListTargetSites + `__ method. parent (str): - Required. The parent site search engine resource name, - such as + Required. The parent site search engine + resource name, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine``. - If the caller does not have permission to list - [TargetSite][google.cloud.discoveryengine.v1.TargetSite]s - under this site search engine, regardless of whether or - not this branch exists, a PERMISSION_DENIED error is + If the caller does not have permission + to list `TargetSite + `__s + under this site search engine, + regardless of whether or not this branch + exists, a PERMISSION_DENIED error is returned. This corresponds to the ``parent`` field @@ -1650,11 +1682,13 @@ def sample_list_target_sites(): Returns: google.cloud.discoveryengine_v1.services.site_search_engine_service.pagers.ListTargetSitesPager: Response message for - [SiteSearchEngineService.ListTargetSites][google.cloud.discoveryengine.v1.SiteSearchEngineService.ListTargetSites] - method. + `SiteSearchEngineService.ListTargetSites + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -1726,7 +1760,8 @@ def create_sitemap( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: - r"""Creates a [Sitemap][google.cloud.discoveryengine.v1.Sitemap]. + r"""Creates a `Sitemap + `__. .. code-block:: python @@ -1765,11 +1800,13 @@ def sample_create_sitemap(): Args: request (Union[google.cloud.discoveryengine_v1.types.CreateSitemapRequest, dict]): The request object. Request message for - [SiteSearchEngineService.CreateSitemap][google.cloud.discoveryengine.v1.SiteSearchEngineService.CreateSitemap] + `SiteSearchEngineService.CreateSitemap + `__ method. parent (str): Required. Parent resource name of the - [SiteSearchEngine][google.cloud.discoveryengine.v1.SiteSearchEngine], + `SiteSearchEngine + `__, such as ``projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine``. @@ -1777,9 +1814,9 @@ def sample_create_sitemap(): on the ``request`` instance; if ``request`` is provided, this should not be set. sitemap (google.cloud.discoveryengine_v1.types.Sitemap): - Required. The - [Sitemap][google.cloud.discoveryengine.v1.Sitemap] to - create. + Required. The `Sitemap + `__ + to create. This corresponds to the ``sitemap`` field on the ``request`` instance; if ``request`` is provided, this @@ -1794,11 +1831,12 @@ def sample_create_sitemap(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be - :class:`google.cloud.discoveryengine_v1.types.Sitemap` A - sitemap for the SiteSearchEngine. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1.types.Sitemap` + A sitemap for the SiteSearchEngine. """ # Create or coerce a protobuf request object. @@ -1868,7 +1906,8 @@ def delete_sitemap( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: - r"""Deletes a [Sitemap][google.cloud.discoveryengine.v1.Sitemap]. + r"""Deletes a `Sitemap + `__. .. code-block:: python @@ -1903,22 +1942,26 @@ def sample_delete_sitemap(): Args: request (Union[google.cloud.discoveryengine_v1.types.DeleteSitemapRequest, dict]): The request object. Request message for - [SiteSearchEngineService.DeleteSitemap][google.cloud.discoveryengine.v1.SiteSearchEngineService.DeleteSitemap] + `SiteSearchEngineService.DeleteSitemap + `__ method. name (str): Required. Full resource name of - [Sitemap][google.cloud.discoveryengine.v1.Sitemap], such - as + `Sitemap + `__, + such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/sitemaps/{sitemap}``. - If the caller does not have permission to access the - [Sitemap][google.cloud.discoveryengine.v1.Sitemap], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to access the `Sitemap + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. - If the requested - [Sitemap][google.cloud.discoveryengine.v1.Sitemap] does - not exist, a NOT_FOUND error is returned. + If the requested `Sitemap + `__ + does not exist, a NOT_FOUND error is + returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1933,18 +1976,21 @@ def sample_delete_sitemap(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.protobuf.empty_pb2.Empty` A generic empty message that you can re-use to avoid defining duplicated - empty messages in your APIs. A typical example is to - use it as the request or the response type of an API - method. For instance: - - service Foo { - rpc Bar(google.protobuf.Empty) returns - (google.protobuf.Empty); - - } + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.protobuf.empty_pb2.Empty` + A generic empty message that you can + re-use to avoid defining duplicated + empty messages in your APIs. A typical + example is to use it as the request or + the response type of an API method. For + instance: + + service Foo { + rpc Bar(google.protobuf.Empty) + returns (google.protobuf.Empty); } """ # Create or coerce a protobuf request object. @@ -2012,8 +2058,10 @@ def fetch_sitemaps( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> site_search_engine_service.FetchSitemapsResponse: - r"""Fetch [Sitemap][google.cloud.discoveryengine.v1.Sitemap]s in a - [DataStore][google.cloud.discoveryengine.v1.DataStore]. + r"""Fetch `Sitemap + `__s in a + `DataStore + `__. .. code-block:: python @@ -2044,11 +2092,13 @@ def sample_fetch_sitemaps(): Args: request (Union[google.cloud.discoveryengine_v1.types.FetchSitemapsRequest, dict]): The request object. Request message for - [SiteSearchEngineService.FetchSitemaps][google.cloud.discoveryengine.v1.SiteSearchEngineService.FetchSitemaps] + `SiteSearchEngineService.FetchSitemaps + `__ method. parent (str): Required. Parent resource name of the - [SiteSearchEngine][google.cloud.discoveryengine.v1.SiteSearchEngine], + `SiteSearchEngine + `__, such as ``projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine``. @@ -2066,8 +2116,9 @@ def sample_fetch_sitemaps(): Returns: google.cloud.discoveryengine_v1.types.FetchSitemapsResponse: Response message for - [SiteSearchEngineService.FetchSitemaps][google.cloud.discoveryengine.v1.SiteSearchEngineService.FetchSitemaps] - method. + `SiteSearchEngineService.FetchSitemaps + `__ + method. """ # Create or coerce a protobuf request object. @@ -2162,7 +2213,8 @@ def sample_enable_advanced_site_search(): Args: request (Union[google.cloud.discoveryengine_v1.types.EnableAdvancedSiteSearchRequest, dict]): The request object. Request message for - [SiteSearchEngineService.EnableAdvancedSiteSearch][google.cloud.discoveryengine.v1.SiteSearchEngineService.EnableAdvancedSiteSearch] + `SiteSearchEngineService.EnableAdvancedSiteSearch + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -2174,11 +2226,15 @@ def sample_enable_advanced_site_search(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1.types.EnableAdvancedSiteSearchResponse` Response message for - [SiteSearchEngineService.EnableAdvancedSiteSearch][google.cloud.discoveryengine.v1.SiteSearchEngineService.EnableAdvancedSiteSearch] - method. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1.types.EnableAdvancedSiteSearchResponse` + Response message for + `SiteSearchEngineService.EnableAdvancedSiteSearch + `__ + method. """ # Create or coerce a protobuf request object. @@ -2273,7 +2329,8 @@ def sample_disable_advanced_site_search(): Args: request (Union[google.cloud.discoveryengine_v1.types.DisableAdvancedSiteSearchRequest, dict]): The request object. Request message for - [SiteSearchEngineService.DisableAdvancedSiteSearch][google.cloud.discoveryengine.v1.SiteSearchEngineService.DisableAdvancedSiteSearch] + `SiteSearchEngineService.DisableAdvancedSiteSearch + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -2285,11 +2342,15 @@ def sample_disable_advanced_site_search(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1.types.DisableAdvancedSiteSearchResponse` Response message for - [SiteSearchEngineService.DisableAdvancedSiteSearch][google.cloud.discoveryengine.v1.SiteSearchEngineService.DisableAdvancedSiteSearch] - method. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1.types.DisableAdvancedSiteSearchResponse` + Response message for + `SiteSearchEngineService.DisableAdvancedSiteSearch + `__ + method. """ # Create or coerce a protobuf request object. @@ -2384,7 +2445,8 @@ def sample_recrawl_uris(): Args: request (Union[google.cloud.discoveryengine_v1.types.RecrawlUrisRequest, dict]): The request object. Request message for - [SiteSearchEngineService.RecrawlUris][google.cloud.discoveryengine.v1.SiteSearchEngineService.RecrawlUris] + `SiteSearchEngineService.RecrawlUris + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -2396,11 +2458,15 @@ def sample_recrawl_uris(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1.types.RecrawlUrisResponse` Response message for - [SiteSearchEngineService.RecrawlUris][google.cloud.discoveryengine.v1.SiteSearchEngineService.RecrawlUris] - method. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1.types.RecrawlUrisResponse` + Response message for + `SiteSearchEngineService.RecrawlUris + `__ + method. """ # Create or coerce a protobuf request object. @@ -2490,7 +2556,8 @@ def sample_batch_verify_target_sites(): Args: request (Union[google.cloud.discoveryengine_v1.types.BatchVerifyTargetSitesRequest, dict]): The request object. Request message for - [SiteSearchEngineService.BatchVerifyTargetSites][google.cloud.discoveryengine.v1.SiteSearchEngineService.BatchVerifyTargetSites] + `SiteSearchEngineService.BatchVerifyTargetSites + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -2502,11 +2569,15 @@ def sample_batch_verify_target_sites(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1.types.BatchVerifyTargetSitesResponse` Response message for - [SiteSearchEngineService.BatchVerifyTargetSites][google.cloud.discoveryengine.v1.SiteSearchEngineService.BatchVerifyTargetSites] - method. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1.types.BatchVerifyTargetSitesResponse` + Response message for + `SiteSearchEngineService.BatchVerifyTargetSites + `__ + method. """ # Create or coerce a protobuf request object. @@ -2561,9 +2632,10 @@ def fetch_domain_verification_status( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.FetchDomainVerificationStatusPager: - r"""Returns list of target sites with its domain verification - status. This method can only be called under data store with - BASIC_SITE_SEARCH state at the moment. + r"""Returns list of target sites with its domain + verification status. This method can only be called + under data store with BASIC_SITE_SEARCH state at the + moment. .. code-block:: python @@ -2595,7 +2667,8 @@ def sample_fetch_domain_verification_status(): Args: request (Union[google.cloud.discoveryengine_v1.types.FetchDomainVerificationStatusRequest, dict]): The request object. Request message for - [SiteSearchEngineService.FetchDomainVerificationStatus][google.cloud.discoveryengine.v1.SiteSearchEngineService.FetchDomainVerificationStatus] + `SiteSearchEngineService.FetchDomainVerificationStatus + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -2608,11 +2681,13 @@ def sample_fetch_domain_verification_status(): Returns: google.cloud.discoveryengine_v1.services.site_search_engine_service.pagers.FetchDomainVerificationStatusPager: Response message for - [SiteSearchEngineService.FetchDomainVerificationStatus][google.cloud.discoveryengine.v1.SiteSearchEngineService.FetchDomainVerificationStatus] - method. + `SiteSearchEngineService.FetchDomainVerificationStatus + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/site_search_engine_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/site_search_engine_service/transports/base.py index cc325dbf414f..65593c566922 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/site_search_engine_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/site_search_engine_service/transports/base.py @@ -87,8 +87,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -103,11 +101,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/site_search_engine_service/transports/grpc.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/site_search_engine_service/transports/grpc.py index 082f14f87f21..4904d79e4809 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/site_search_engine_service/transports/grpc.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/site_search_engine_service/transports/grpc.py @@ -353,7 +353,8 @@ def get_site_search_engine( r"""Return a callable for the get site search engine method over gRPC. Gets the - [SiteSearchEngine][google.cloud.discoveryengine.v1.SiteSearchEngine]. + `SiteSearchEngine + `__. Returns: Callable[[~.GetSiteSearchEngineRequest], @@ -381,8 +382,8 @@ def create_target_site( ]: r"""Return a callable for the create target site method over gRPC. - Creates a - [TargetSite][google.cloud.discoveryengine.v1.TargetSite]. + Creates a `TargetSite + `__. Returns: Callable[[~.CreateTargetSiteRequest], @@ -411,8 +412,9 @@ def batch_create_target_sites( ]: r"""Return a callable for the batch create target sites method over gRPC. - Creates [TargetSite][google.cloud.discoveryengine.v1.TargetSite] - in a batch. + Creates `TargetSite + `__ in a + batch. Returns: Callable[[~.BatchCreateTargetSitesRequest], @@ -440,7 +442,8 @@ def get_target_site( ]: r"""Return a callable for the get target site method over gRPC. - Gets a [TargetSite][google.cloud.discoveryengine.v1.TargetSite]. + Gets a `TargetSite + `__. Returns: Callable[[~.GetTargetSiteRequest], @@ -468,8 +471,8 @@ def update_target_site( ]: r"""Return a callable for the update target site method over gRPC. - Updates a - [TargetSite][google.cloud.discoveryengine.v1.TargetSite]. + Updates a `TargetSite + `__. Returns: Callable[[~.UpdateTargetSiteRequest], @@ -497,8 +500,8 @@ def delete_target_site( ]: r"""Return a callable for the delete target site method over gRPC. - Deletes a - [TargetSite][google.cloud.discoveryengine.v1.TargetSite]. + Deletes a `TargetSite + `__. Returns: Callable[[~.DeleteTargetSiteRequest], @@ -527,8 +530,8 @@ def list_target_sites( ]: r"""Return a callable for the list target sites method over gRPC. - Gets a list of - [TargetSite][google.cloud.discoveryengine.v1.TargetSite]s. + Gets a list of `TargetSite + `__s. Returns: Callable[[~.ListTargetSitesRequest], @@ -556,7 +559,8 @@ def create_sitemap( ]: r"""Return a callable for the create sitemap method over gRPC. - Creates a [Sitemap][google.cloud.discoveryengine.v1.Sitemap]. + Creates a `Sitemap + `__. Returns: Callable[[~.CreateSitemapRequest], @@ -584,7 +588,8 @@ def delete_sitemap( ]: r"""Return a callable for the delete sitemap method over gRPC. - Deletes a [Sitemap][google.cloud.discoveryengine.v1.Sitemap]. + Deletes a `Sitemap + `__. Returns: Callable[[~.DeleteSitemapRequest], @@ -613,8 +618,10 @@ def fetch_sitemaps( ]: r"""Return a callable for the fetch sitemaps method over gRPC. - Fetch [Sitemap][google.cloud.discoveryengine.v1.Sitemap]s in a - [DataStore][google.cloud.discoveryengine.v1.DataStore]. + Fetch `Sitemap + `__s in a + `DataStore + `__. Returns: Callable[[~.FetchSitemapsRequest], @@ -767,9 +774,10 @@ def fetch_domain_verification_status( r"""Return a callable for the fetch domain verification status method over gRPC. - Returns list of target sites with its domain verification - status. This method can only be called under data store with - BASIC_SITE_SEARCH state at the moment. + Returns list of target sites with its domain + verification status. This method can only be called + under data store with BASIC_SITE_SEARCH state at the + moment. Returns: Callable[[~.FetchDomainVerificationStatusRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/site_search_engine_service/transports/grpc_asyncio.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/site_search_engine_service/transports/grpc_asyncio.py index 2614081a8a1b..918eabaca59d 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/site_search_engine_service/transports/grpc_asyncio.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/site_search_engine_service/transports/grpc_asyncio.py @@ -361,7 +361,8 @@ def get_site_search_engine( r"""Return a callable for the get site search engine method over gRPC. Gets the - [SiteSearchEngine][google.cloud.discoveryengine.v1.SiteSearchEngine]. + `SiteSearchEngine + `__. Returns: Callable[[~.GetSiteSearchEngineRequest], @@ -390,8 +391,8 @@ def create_target_site( ]: r"""Return a callable for the create target site method over gRPC. - Creates a - [TargetSite][google.cloud.discoveryengine.v1.TargetSite]. + Creates a `TargetSite + `__. Returns: Callable[[~.CreateTargetSiteRequest], @@ -420,8 +421,9 @@ def batch_create_target_sites( ]: r"""Return a callable for the batch create target sites method over gRPC. - Creates [TargetSite][google.cloud.discoveryengine.v1.TargetSite] - in a batch. + Creates `TargetSite + `__ in a + batch. Returns: Callable[[~.BatchCreateTargetSitesRequest], @@ -450,7 +452,8 @@ def get_target_site( ]: r"""Return a callable for the get target site method over gRPC. - Gets a [TargetSite][google.cloud.discoveryengine.v1.TargetSite]. + Gets a `TargetSite + `__. Returns: Callable[[~.GetTargetSiteRequest], @@ -479,8 +482,8 @@ def update_target_site( ]: r"""Return a callable for the update target site method over gRPC. - Updates a - [TargetSite][google.cloud.discoveryengine.v1.TargetSite]. + Updates a `TargetSite + `__. Returns: Callable[[~.UpdateTargetSiteRequest], @@ -509,8 +512,8 @@ def delete_target_site( ]: r"""Return a callable for the delete target site method over gRPC. - Deletes a - [TargetSite][google.cloud.discoveryengine.v1.TargetSite]. + Deletes a `TargetSite + `__. Returns: Callable[[~.DeleteTargetSiteRequest], @@ -539,8 +542,8 @@ def list_target_sites( ]: r"""Return a callable for the list target sites method over gRPC. - Gets a list of - [TargetSite][google.cloud.discoveryengine.v1.TargetSite]s. + Gets a list of `TargetSite + `__s. Returns: Callable[[~.ListTargetSitesRequest], @@ -569,7 +572,8 @@ def create_sitemap( ]: r"""Return a callable for the create sitemap method over gRPC. - Creates a [Sitemap][google.cloud.discoveryengine.v1.Sitemap]. + Creates a `Sitemap + `__. Returns: Callable[[~.CreateSitemapRequest], @@ -598,7 +602,8 @@ def delete_sitemap( ]: r"""Return a callable for the delete sitemap method over gRPC. - Deletes a [Sitemap][google.cloud.discoveryengine.v1.Sitemap]. + Deletes a `Sitemap + `__. Returns: Callable[[~.DeleteSitemapRequest], @@ -627,8 +632,10 @@ def fetch_sitemaps( ]: r"""Return a callable for the fetch sitemaps method over gRPC. - Fetch [Sitemap][google.cloud.discoveryengine.v1.Sitemap]s in a - [DataStore][google.cloud.discoveryengine.v1.DataStore]. + Fetch `Sitemap + `__s in a + `DataStore + `__. Returns: Callable[[~.FetchSitemapsRequest], @@ -782,9 +789,10 @@ def fetch_domain_verification_status( r"""Return a callable for the fetch domain verification status method over gRPC. - Returns list of target sites with its domain verification - status. This method can only be called under data store with - BASIC_SITE_SEARCH state at the moment. + Returns list of target sites with its domain + verification status. This method can only be called + under data store with BASIC_SITE_SEARCH state at the + moment. Returns: Callable[[~.FetchDomainVerificationStatusRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/site_search_engine_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/site_search_engine_service/transports/rest.py index d81dea2526f0..8ba4e44d5219 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/site_search_engine_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/site_search_engine_service/transports/rest.py @@ -1336,7 +1336,8 @@ def __call__( Args: request (~.site_search_engine_service.BatchCreateTargetSitesRequest): The request object. Request message for - [SiteSearchEngineService.BatchCreateTargetSites][google.cloud.discoveryengine.v1.SiteSearchEngineService.BatchCreateTargetSites] + `SiteSearchEngineService.BatchCreateTargetSites + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1492,7 +1493,8 @@ def __call__( Args: request (~.site_search_engine_service.BatchVerifyTargetSitesRequest): The request object. Request message for - [SiteSearchEngineService.BatchVerifyTargetSites][google.cloud.discoveryengine.v1.SiteSearchEngineService.BatchVerifyTargetSites] + `SiteSearchEngineService.BatchVerifyTargetSites + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1648,7 +1650,8 @@ def __call__( Args: request (~.site_search_engine_service.CreateSitemapRequest): The request object. Request message for - [SiteSearchEngineService.CreateSitemap][google.cloud.discoveryengine.v1.SiteSearchEngineService.CreateSitemap] + `SiteSearchEngineService.CreateSitemap + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1804,7 +1807,8 @@ def __call__( Args: request (~.site_search_engine_service.CreateTargetSiteRequest): The request object. Request message for - [SiteSearchEngineService.CreateTargetSite][google.cloud.discoveryengine.v1.SiteSearchEngineService.CreateTargetSite] + `SiteSearchEngineService.CreateTargetSite + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1961,7 +1965,8 @@ def __call__( Args: request (~.site_search_engine_service.DeleteSitemapRequest): The request object. Request message for - [SiteSearchEngineService.DeleteSitemap][google.cloud.discoveryengine.v1.SiteSearchEngineService.DeleteSitemap] + `SiteSearchEngineService.DeleteSitemap + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -2111,7 +2116,8 @@ def __call__( Args: request (~.site_search_engine_service.DeleteTargetSiteRequest): The request object. Request message for - [SiteSearchEngineService.DeleteTargetSite][google.cloud.discoveryengine.v1.SiteSearchEngineService.DeleteTargetSite] + `SiteSearchEngineService.DeleteTargetSite + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -2267,7 +2273,8 @@ def __call__( Args: request (~.site_search_engine_service.DisableAdvancedSiteSearchRequest): The request object. Request message for - [SiteSearchEngineService.DisableAdvancedSiteSearch][google.cloud.discoveryengine.v1.SiteSearchEngineService.DisableAdvancedSiteSearch] + `SiteSearchEngineService.DisableAdvancedSiteSearch + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -2424,7 +2431,8 @@ def __call__( Args: request (~.site_search_engine_service.EnableAdvancedSiteSearchRequest): The request object. Request message for - [SiteSearchEngineService.EnableAdvancedSiteSearch][google.cloud.discoveryengine.v1.SiteSearchEngineService.EnableAdvancedSiteSearch] + `SiteSearchEngineService.EnableAdvancedSiteSearch + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -2582,7 +2590,8 @@ def __call__( Args: request (~.site_search_engine_service.FetchDomainVerificationStatusRequest): The request object. Request message for - [SiteSearchEngineService.FetchDomainVerificationStatus][google.cloud.discoveryengine.v1.SiteSearchEngineService.FetchDomainVerificationStatus] + `SiteSearchEngineService.FetchDomainVerificationStatus + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -2595,7 +2604,8 @@ def __call__( Returns: ~.site_search_engine_service.FetchDomainVerificationStatusResponse: Response message for - [SiteSearchEngineService.FetchDomainVerificationStatus][google.cloud.discoveryengine.v1.SiteSearchEngineService.FetchDomainVerificationStatus] + `SiteSearchEngineService.FetchDomainVerificationStatus + `__ method. """ @@ -2743,7 +2753,8 @@ def __call__( Args: request (~.site_search_engine_service.FetchSitemapsRequest): The request object. Request message for - [SiteSearchEngineService.FetchSitemaps][google.cloud.discoveryengine.v1.SiteSearchEngineService.FetchSitemaps] + `SiteSearchEngineService.FetchSitemaps + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -2756,7 +2767,8 @@ def __call__( Returns: ~.site_search_engine_service.FetchSitemapsResponse: Response message for - [SiteSearchEngineService.FetchSitemaps][google.cloud.discoveryengine.v1.SiteSearchEngineService.FetchSitemaps] + `SiteSearchEngineService.FetchSitemaps + `__ method. """ @@ -2899,7 +2911,8 @@ def __call__( Args: request (~.site_search_engine_service.GetSiteSearchEngineRequest): The request object. Request message for - [SiteSearchEngineService.GetSiteSearchEngine][google.cloud.discoveryengine.v1.SiteSearchEngineService.GetSiteSearchEngine] + `SiteSearchEngineService.GetSiteSearchEngine + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -3056,7 +3069,8 @@ def __call__( Args: request (~.site_search_engine_service.GetTargetSiteRequest): The request object. Request message for - [SiteSearchEngineService.GetTargetSite][google.cloud.discoveryengine.v1.SiteSearchEngineService.GetTargetSite] + `SiteSearchEngineService.GetTargetSite + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -3207,7 +3221,8 @@ def __call__( Args: request (~.site_search_engine_service.ListTargetSitesRequest): The request object. Request message for - [SiteSearchEngineService.ListTargetSites][google.cloud.discoveryengine.v1.SiteSearchEngineService.ListTargetSites] + `SiteSearchEngineService.ListTargetSites + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -3220,7 +3235,8 @@ def __call__( Returns: ~.site_search_engine_service.ListTargetSitesResponse: Response message for - [SiteSearchEngineService.ListTargetSites][google.cloud.discoveryengine.v1.SiteSearchEngineService.ListTargetSites] + `SiteSearchEngineService.ListTargetSites + `__ method. """ @@ -3366,7 +3382,8 @@ def __call__( Args: request (~.site_search_engine_service.RecrawlUrisRequest): The request object. Request message for - [SiteSearchEngineService.RecrawlUris][google.cloud.discoveryengine.v1.SiteSearchEngineService.RecrawlUris] + `SiteSearchEngineService.RecrawlUris + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -3520,7 +3537,8 @@ def __call__( Args: request (~.site_search_engine_service.UpdateTargetSiteRequest): The request object. Request message for - [SiteSearchEngineService.UpdateTargetSite][google.cloud.discoveryengine.v1.SiteSearchEngineService.UpdateTargetSite] + `SiteSearchEngineService.UpdateTargetSite + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/user_event_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/user_event_service/async_client.py index f7f698f5f8bb..7e44110de5dc 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/user_event_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/user_event_service/async_client.py @@ -455,52 +455,61 @@ async def sample_collect_user_event(): Returns: google.api.httpbody_pb2.HttpBody: - Message that represents an arbitrary HTTP body. It should only be used for - payload formats that can't be represented as JSON, - such as raw binary or an HTML page. - - This message can be used both in streaming and - non-streaming API methods in the request as well as - the response. - - It can be used as a top-level request field, which is - convenient if one wants to extract parameters from - either the URL or HTTP template into the request - fields and also want access to the raw HTTP body. - - Example: - - message GetResourceRequest { - // A unique request id. string request_id = 1; - - // The raw HTTP body is bound to this field. - google.api.HttpBody http_body = 2; - - } - - service ResourceService { - rpc GetResource(GetResourceRequest) - returns (google.api.HttpBody); - - rpc UpdateResource(google.api.HttpBody) - returns (google.protobuf.Empty); - - } - - Example with streaming methods: - - service CaldavService { - rpc GetCalendar(stream google.api.HttpBody) - returns (stream google.api.HttpBody); - - rpc UpdateCalendar(stream google.api.HttpBody) - returns (stream google.api.HttpBody); - - } - - Use of this type only changes how the request and - response bodies are handled, all other features will - continue to work unchanged. + Message that represents an arbitrary + HTTP body. It should only be used for + payload formats that can't be + represented as JSON, such as raw binary + or an HTML page. + + This message can be used both in + streaming and non-streaming API methods + in the request as well as the response. + + It can be used as a top-level request + field, which is convenient if one wants + to extract parameters from either the + URL or HTTP template into the request + fields and also want access to the raw + HTTP body. + + Example: + + message GetResourceRequest { + // A unique request id. + string request_id = 1; + + // The raw HTTP body is bound to + this field. google.api.HttpBody + http_body = 2; + + } + + service ResourceService { + rpc + GetResource(GetResourceRequest) + returns (google.api.HttpBody); + rpc + UpdateResource(google.api.HttpBody) + returns (google.protobuf.Empty); + + } + + Example with streaming methods: + + service CaldavService { + rpc GetCalendar(stream + google.api.HttpBody) returns + (stream google.api.HttpBody); rpc + UpdateCalendar(stream + google.api.HttpBody) returns + (stream google.api.HttpBody); + + } + + Use of this type only changes how the + request and response bodies are handled, + all other features will continue to work + unchanged. """ # Create or coerce a protobuf request object. @@ -594,11 +603,17 @@ async def sample_purge_user_events(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1.types.PurgeUserEventsResponse` Response of the PurgeUserEventsRequest. If the long running operation is - successfully done, then this message is returned by - the google.longrunning.Operations.response field. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1.types.PurgeUserEventsResponse` + Response of the PurgeUserEventsRequest. + If the long running operation is + successfully done, then this message is + returned by the + google.longrunning.Operations.response + field. """ # Create or coerce a protobuf request object. @@ -707,13 +722,17 @@ async def sample_import_user_events(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1.types.ImportUserEventsResponse` Response of the ImportUserEventsRequest. If the long running - operation was successful, then this message is - returned by the - google.longrunning.Operations.response field if the - operation was successful. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1.types.ImportUserEventsResponse` + Response of the ImportUserEventsRequest. + If the long running operation was + successful, then this message is + returned by the + google.longrunning.Operations.response + field if the operation was successful. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/user_event_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/user_event_service/client.py index a91aa167e130..138f002852e4 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/user_event_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/user_event_service/client.py @@ -941,52 +941,61 @@ def sample_collect_user_event(): Returns: google.api.httpbody_pb2.HttpBody: - Message that represents an arbitrary HTTP body. It should only be used for - payload formats that can't be represented as JSON, - such as raw binary or an HTML page. + Message that represents an arbitrary + HTTP body. It should only be used for + payload formats that can't be + represented as JSON, such as raw binary + or an HTML page. - This message can be used both in streaming and - non-streaming API methods in the request as well as - the response. + This message can be used both in + streaming and non-streaming API methods + in the request as well as the response. - It can be used as a top-level request field, which is - convenient if one wants to extract parameters from - either the URL or HTTP template into the request - fields and also want access to the raw HTTP body. + It can be used as a top-level request + field, which is convenient if one wants + to extract parameters from either the + URL or HTTP template into the request + fields and also want access to the raw + HTTP body. - Example: + Example: - message GetResourceRequest { - // A unique request id. string request_id = 1; + message GetResourceRequest { + // A unique request id. + string request_id = 1; - // The raw HTTP body is bound to this field. - google.api.HttpBody http_body = 2; + // The raw HTTP body is bound to + this field. google.api.HttpBody + http_body = 2; - } - - service ResourceService { - rpc GetResource(GetResourceRequest) - returns (google.api.HttpBody); - - rpc UpdateResource(google.api.HttpBody) - returns (google.protobuf.Empty); + } - } + service ResourceService { + rpc + GetResource(GetResourceRequest) + returns (google.api.HttpBody); + rpc + UpdateResource(google.api.HttpBody) + returns (google.protobuf.Empty); - Example with streaming methods: + } - service CaldavService { - rpc GetCalendar(stream google.api.HttpBody) - returns (stream google.api.HttpBody); + Example with streaming methods: - rpc UpdateCalendar(stream google.api.HttpBody) - returns (stream google.api.HttpBody); + service CaldavService { + rpc GetCalendar(stream + google.api.HttpBody) returns + (stream google.api.HttpBody); rpc + UpdateCalendar(stream + google.api.HttpBody) returns + (stream google.api.HttpBody); - } + } - Use of this type only changes how the request and - response bodies are handled, all other features will - continue to work unchanged. + Use of this type only changes how the + request and response bodies are handled, + all other features will continue to work + unchanged. """ # Create or coerce a protobuf request object. @@ -1078,11 +1087,17 @@ def sample_purge_user_events(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1.types.PurgeUserEventsResponse` Response of the PurgeUserEventsRequest. If the long running operation is - successfully done, then this message is returned by - the google.longrunning.Operations.response field. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1.types.PurgeUserEventsResponse` + Response of the PurgeUserEventsRequest. + If the long running operation is + successfully done, then this message is + returned by the + google.longrunning.Operations.response + field. """ # Create or coerce a protobuf request object. @@ -1189,13 +1204,17 @@ def sample_import_user_events(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1.types.ImportUserEventsResponse` Response of the ImportUserEventsRequest. If the long running - operation was successful, then this message is - returned by the - google.longrunning.Operations.response field if the - operation was successful. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1.types.ImportUserEventsResponse` + Response of the ImportUserEventsRequest. + If the long running operation was + successful, then this message is + returned by the + google.longrunning.Operations.response + field if the operation was successful. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/user_event_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/user_event_service/transports/base.py index 79f375da5157..10a09f7ec21e 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/user_event_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/user_event_service/transports/base.py @@ -90,8 +90,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -106,11 +104,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/user_event_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/user_event_service/transports/rest.py index e93d914728ee..63d8de299e99 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/user_event_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/user_event_service/transports/rest.py @@ -710,55 +710,61 @@ def __call__( Returns: ~.httpbody_pb2.HttpBody: - Message that represents an arbitrary HTTP body. It - should only be used for payload formats that can't be - represented as JSON, such as raw binary or an HTML page. - - This message can be used both in streaming and - non-streaming API methods in the request as well as the - response. - - It can be used as a top-level request field, which is - convenient if one wants to extract parameters from - either the URL or HTTP template into the request fields - and also want access to the raw HTTP body. + Message that represents an arbitrary + HTTP body. It should only be used for + payload formats that can't be + represented as JSON, such as raw binary + or an HTML page. + + This message can be used both in + streaming and non-streaming API methods + in the request as well as the response. + + It can be used as a top-level request + field, which is convenient if one wants + to extract parameters from either the + URL or HTTP template into the request + fields and also want access to the raw + HTTP body. Example: - :: - message GetResourceRequest { // A unique request id. string request_id = 1; - // The raw HTTP body is bound to this field. - google.api.HttpBody http_body = 2; + // The raw HTTP body is bound to + this field. google.api.HttpBody + http_body = 2; } service ResourceService { - rpc GetResource(GetResourceRequest) + rpc + GetResource(GetResourceRequest) returns (google.api.HttpBody); - rpc UpdateResource(google.api.HttpBody) - returns (google.protobuf.Empty); + rpc + UpdateResource(google.api.HttpBody) + returns (google.protobuf.Empty); } Example with streaming methods: - :: - service CaldavService { - rpc GetCalendar(stream google.api.HttpBody) - returns (stream google.api.HttpBody); - rpc UpdateCalendar(stream google.api.HttpBody) - returns (stream google.api.HttpBody); + rpc GetCalendar(stream + google.api.HttpBody) returns + (stream google.api.HttpBody); rpc + UpdateCalendar(stream + google.api.HttpBody) returns + (stream google.api.HttpBody); } - Use of this type only changes how the request and - response bodies are handled, all other features will - continue to work unchanged. + Use of this type only changes how the + request and response bodies are handled, + all other features will continue to work + unchanged. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/user_license_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/user_license_service/async_client.py index dcebff58820b..36292e74e778 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/user_license_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/user_license_service/async_client.py @@ -343,10 +343,11 @@ async def sample_list_user_licenses(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.ListUserLicensesRequest, dict]]): The request object. Request message for - [UserLicenseService.ListUserLicenses][google.cloud.discoveryengine.v1.UserLicenseService.ListUserLicenses]. + `UserLicenseService.ListUserLicenses + `__. parent (:class:`str`): - Required. The parent [UserStore][] resource name, - format: + Required. The parent [UserStore][] + resource name, format: ``projects/{project}/locations/{location}/userStores/{user_store_id}``. This corresponds to the ``parent`` field @@ -363,10 +364,12 @@ async def sample_list_user_licenses(): Returns: google.cloud.discoveryengine_v1.services.user_license_service.pagers.ListUserLicensesAsyncPager: Response message for - [UserLicenseService.ListUserLicenses][google.cloud.discoveryengine.v1.UserLicenseService.ListUserLicenses]. + `UserLicenseService.ListUserLicenses + `__. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -480,7 +483,8 @@ async def sample_batch_update_user_licenses(): Args: request (Optional[Union[google.cloud.discoveryengine_v1.types.BatchUpdateUserLicensesRequest, dict]]): The request object. Request message for - [UserLicenseService.BatchUpdateUserLicenses][google.cloud.discoveryengine.v1.UserLicenseService.BatchUpdateUserLicenses] + `UserLicenseService.BatchUpdateUserLicenses + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -492,11 +496,15 @@ async def sample_batch_update_user_licenses(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1.types.BatchUpdateUserLicensesResponse` Response message for - [UserLicenseService.BatchUpdateUserLicenses][google.cloud.discoveryengine.v1.UserLicenseService.BatchUpdateUserLicenses] - method. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1.types.BatchUpdateUserLicensesResponse` + Response message for + `UserLicenseService.BatchUpdateUserLicenses + `__ + method. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/user_license_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/user_license_service/client.py index 07f06af0b848..796caed6c0ea 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/user_license_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/user_license_service/client.py @@ -803,10 +803,11 @@ def sample_list_user_licenses(): Args: request (Union[google.cloud.discoveryengine_v1.types.ListUserLicensesRequest, dict]): The request object. Request message for - [UserLicenseService.ListUserLicenses][google.cloud.discoveryengine.v1.UserLicenseService.ListUserLicenses]. + `UserLicenseService.ListUserLicenses + `__. parent (str): - Required. The parent [UserStore][] resource name, - format: + Required. The parent [UserStore][] + resource name, format: ``projects/{project}/locations/{location}/userStores/{user_store_id}``. This corresponds to the ``parent`` field @@ -823,10 +824,12 @@ def sample_list_user_licenses(): Returns: google.cloud.discoveryengine_v1.services.user_license_service.pagers.ListUserLicensesPager: Response message for - [UserLicenseService.ListUserLicenses][google.cloud.discoveryengine.v1.UserLicenseService.ListUserLicenses]. + `UserLicenseService.ListUserLicenses + `__. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -937,7 +940,8 @@ def sample_batch_update_user_licenses(): Args: request (Union[google.cloud.discoveryengine_v1.types.BatchUpdateUserLicensesRequest, dict]): The request object. Request message for - [UserLicenseService.BatchUpdateUserLicenses][google.cloud.discoveryengine.v1.UserLicenseService.BatchUpdateUserLicenses] + `UserLicenseService.BatchUpdateUserLicenses + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -949,11 +953,15 @@ def sample_batch_update_user_licenses(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1.types.BatchUpdateUserLicensesResponse` Response message for - [UserLicenseService.BatchUpdateUserLicenses][google.cloud.discoveryengine.v1.UserLicenseService.BatchUpdateUserLicenses] - method. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1.types.BatchUpdateUserLicensesResponse` + Response message for + `UserLicenseService.BatchUpdateUserLicenses + `__ + method. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/user_license_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/user_license_service/transports/base.py index b2e631df6c2f..ef0ae8a80c54 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/user_license_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/user_license_service/transports/base.py @@ -84,8 +84,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -100,11 +98,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/user_license_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/user_license_service/transports/rest.py index dd67d173a26e..a3f8225795d5 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/user_license_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/user_license_service/transports/rest.py @@ -585,7 +585,8 @@ def __call__( Args: request (~.user_license_service.BatchUpdateUserLicensesRequest): The request object. Request message for - [UserLicenseService.BatchUpdateUserLicenses][google.cloud.discoveryengine.v1.UserLicenseService.BatchUpdateUserLicenses] + `UserLicenseService.BatchUpdateUserLicenses + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -742,7 +743,8 @@ def __call__( Args: request (~.user_license_service.ListUserLicensesRequest): The request object. Request message for - [UserLicenseService.ListUserLicenses][google.cloud.discoveryengine.v1.UserLicenseService.ListUserLicenses]. + `UserLicenseService.ListUserLicenses + `__. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -754,7 +756,8 @@ def __call__( Returns: ~.user_license_service.ListUserLicensesResponse: Response message for - [UserLicenseService.ListUserLicenses][google.cloud.discoveryengine.v1.UserLicenseService.ListUserLicenses]. + `UserLicenseService.ListUserLicenses + `__. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/answer.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/answer.py index 39c29ccfbabd..ae7f0f53ec34 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/answer.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/answer.py @@ -45,8 +45,8 @@ class Answer(proto.Message): answer_text (str): The textual answer. grounding_score (float): - A score in the range of [0, 1] describing how grounded the - answer is by the reference chunks. + A score in the range of [0, 1] describing how + grounded the answer is by the reference chunks. This field is a member of `oneof`_ ``_grounding_score``. citations (MutableSequence[google.cloud.discoveryengine_v1.types.Answer.Citation]): @@ -233,17 +233,20 @@ class GroundingSupport(proto.Message): end_index (int): Required. End of the claim, exclusive. grounding_score (float): - A score in the range of [0, 1] describing how grounded is a - specific claim by the references. Higher value means that - the claim is better supported by the reference chunks. + A score in the range of [0, 1] describing how + grounded is a specific claim by the references. + Higher value means that the claim is better + supported by the reference chunks. This field is a member of `oneof`_ ``_grounding_score``. grounding_check_required (bool): - Indicates that this claim required grounding check. When the - system decided this claim didn't require - attribution/grounding check, this field is set to false. In - that case, no grounding check was done for the claim and - therefore ``grounding_score``, ``sources`` is not returned. + Indicates that this claim required grounding + check. When the system decided this claim didn't + require attribution/grounding check, this field + is set to false. In that case, no grounding + check was done for the claim and therefore + ``grounding_score``, ``sources`` is not + returned. This field is a member of `oneof`_ ``_grounding_check_required``. sources (MutableSequence[google.cloud.discoveryengine_v1.types.Answer.CitationSource]): @@ -597,11 +600,11 @@ class SearchResult(proto.Message): title (str): Title. snippet_info (MutableSequence[google.cloud.discoveryengine_v1.types.Answer.Step.Action.Observation.SearchResult.SnippetInfo]): - If citation_type is DOCUMENT_LEVEL_CITATION, populate - document level snippets. + If citation_type is DOCUMENT_LEVEL_CITATION, + populate document level snippets. chunk_info (MutableSequence[google.cloud.discoveryengine_v1.types.Answer.Step.Action.Observation.SearchResult.ChunkInfo]): - If citation_type is CHUNK_LEVEL_CITATION and chunk mode is - on, populate chunk info. + If citation_type is CHUNK_LEVEL_CITATION and + chunk mode is on, populate chunk info. struct_data (google.protobuf.struct_pb2.Struct): Data representation. The structured JSON data for the document. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/assist_answer.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/assist_answer.py index 3709ae87a66c..2d4b5d606c11 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/assist_answer.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/assist_answer.py @@ -31,15 +31,18 @@ class AssistAnswer(proto.Message): r"""AssistAnswer resource, main part of - [AssistResponse][google.cloud.discoveryengine.v1.AssistResponse]. + `AssistResponse + `__. Attributes: name (str): - Immutable. Resource name of the ``AssistAnswer``. Format: + Immutable. Resource name of the + ``AssistAnswer``. Format: + ``projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/assistAnswers/{assist_answer}`` - This field must be a UTF-8 encoded string with a length - limit of 1024 characters. + This field must be a UTF-8 encoded string with a + length limit of 1024 characters. state (google.cloud.discoveryengine_v1.types.AssistAnswer.State): State of the answer generation. replies (MutableSequence[google.cloud.discoveryengine_v1.types.AssistAnswer.Reply]): @@ -246,8 +249,8 @@ class Outcome(proto.Enum): OUTCOME_OK (1): Code execution completed successfully. OUTCOME_FAILED (2): - Code execution finished but with a failure. ``stderr`` - should contain the reason. + Code execution finished but with a failure. + ``stderr`` should contain the reason. OUTCOME_DEADLINE_EXCEEDED (3): Code execution ran for too long, and was cancelled. There may or may not be a partial @@ -409,10 +412,10 @@ class DocumentMetadata(proto.Message): This field is a member of `oneof`_ ``_page_identifier``. domain (str): - Domain name from the document URI. Note that the ``uri`` - field may contain a URL that redirects to the actual - website, in which case this will contain the domain name of - the target site. + Domain name from the document URI. Note that the + ``uri`` field may contain a URL that redirects + to the actual website, in which case this will + contain the domain name of the target site. This field is a member of `oneof`_ ``_domain``. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/assistant.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/assistant.py index 16f301e40e2c..42d90d8c4209 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/assistant.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/assistant.py @@ -32,11 +32,13 @@ class Assistant(proto.Message): Attributes: name (str): - Immutable. Resource name of the assistant. Format: + Immutable. Resource name of the assistant. + Format: + ``projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`` - It must be a UTF-8 encoded string with a length limit of - 1024 characters. + It must be a UTF-8 encoded string with a length + limit of 1024 characters. """ name: str = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/assistant_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/assistant_service.py index ccee1a3bff80..725473d2ba79 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/assistant_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/assistant_service.py @@ -59,31 +59,36 @@ class AssistUserMetadata(proto.Message): class StreamAssistRequest(proto.Message): r"""Request for the - [AssistantService.StreamAssist][google.cloud.discoveryengine.v1.AssistantService.StreamAssist] + `AssistantService.StreamAssist + `__ method. Attributes: name (str): Required. The resource name of the - [Assistant][google.cloud.discoveryengine.v1.Assistant]. + `Assistant + `__. Format: + ``projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`` query (google.cloud.discoveryengine_v1.types.Query): Optional. Current user query. - Empty query is only supported if ``file_ids`` are provided. - In this case, the answer will be generated based on those - context files. + Empty query is only supported if ``file_ids`` + are provided. In this case, the answer will be + generated based on those context files. session (str): - Optional. The session to use for the request. If specified, - the assistant has access to the session history, and the - query and the answer are stored there. + Optional. The session to use for the request. If + specified, the assistant has access to the + session history, and the query and the answer + are stored there. - If ``-`` is specified as the session ID, or it is left - empty, then a new session is created with an automatically - generated ID. + If ``-`` is specified as the session ID, or it + is left empty, then a new session is created + with an automatically generated ID. Format: + ``projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}`` user_metadata (google.cloud.discoveryengine_v1.types.AssistUserMetadata): Optional. Information about the user @@ -104,9 +109,11 @@ class ToolsSpec(proto.Message): Optional. Specification of the Vertex AI Search tool. web_grounding_spec (google.cloud.discoveryengine_v1.types.StreamAssistRequest.ToolsSpec.WebGroundingSpec): - Optional. Specification of the web grounding tool. If field - is present, enables grounding with web search. Works only if - [Assistant.web_grounding_type][google.cloud.discoveryengine.v1.Assistant.web_grounding_type] + Optional. Specification of the web grounding + tool. If field is present, enables grounding + with web search. Works only if + `Assistant.web_grounding_type + `__ is [WEB_GROUNDING_TYPE_GOOGLE_SEARCH][] or [WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH][]. image_generation_spec (google.cloud.discoveryengine_v1.types.StreamAssistRequest.ToolsSpec.ImageGenerationSpec): @@ -123,30 +130,35 @@ class VertexAiSearchSpec(proto.Message): Attributes: data_store_specs (MutableSequence[google.cloud.discoveryengine_v1.types.SearchRequest.DataStoreSpec]): Optional. Specs defining - [DataStore][google.cloud.discoveryengine.v1.DataStore]s to - filter on in a search call and configurations for those data - stores. This is only considered for - [Engine][google.cloud.discoveryengine.v1.Engine]s with - multiple data stores. + `DataStore + `__s + to filter on in a search call and configurations + for those data stores. This is only considered + for `Engine + `__s + with multiple data stores. filter (str): - Optional. The filter syntax consists of an expression - language for constructing a predicate from one or more - fields of the documents being filtered. Filter expression is - case-sensitive. - - If this field is unrecognizable, an ``INVALID_ARGUMENT`` is - returned. - - Filtering in Vertex AI Search is done by mapping the LHS - filter key to a key property defined in the Vertex AI Search - backend -- this mapping is defined by the customer in their - schema. For example a media customer might have a field - 'name' in their schema. In this case the filter would look - like this: filter --> name:'ANY("king kong")' - - For more information about filtering including syntax and - filter operators, see - `Filter `__ + Optional. The filter syntax consists of an + expression language for constructing a predicate + from one or more fields of the documents being + filtered. Filter expression is case-sensitive. + + If this field is unrecognizable, an + ``INVALID_ARGUMENT`` is returned. + + Filtering in Vertex AI Search is done by mapping + the LHS filter key to a key property defined in + the Vertex AI Search backend -- this mapping is + defined by the customer in their schema. For + example a media customer might have a field + 'name' in their schema. In this case the filter + would look like this: filter --> name:'ANY("king + kong")' + + For more information about filtering including + syntax and filter operators, see + `Filter + `__ """ data_store_specs: MutableSequence[ @@ -206,8 +218,9 @@ class GenerationSpec(proto.Message): Attributes: model_id (str): - Optional. The Vertex AI model_id used for the generative - model. If not set, the default Assistant model will be used. + Optional. The Vertex AI model_id used for the + generative model. If not set, the default + Assistant model will be used. """ model_id: str = proto.Field( @@ -247,30 +260,36 @@ class GenerationSpec(proto.Message): class StreamAssistResponse(proto.Message): r"""Response for the - [AssistantService.StreamAssist][google.cloud.discoveryengine.v1.AssistantService.StreamAssist] + `AssistantService.StreamAssist + `__ method. Attributes: answer (google.cloud.discoveryengine_v1.types.AssistAnswer): - Assist answer resource object containing parts of the - assistant's final answer for the user's query. + Assist answer resource object containing parts + of the assistant's final answer for the user's + query. - Not present if the current response doesn't add anything to - previously sent - [AssistAnswer.replies][google.cloud.discoveryengine.v1.AssistAnswer.replies]. + Not present if the current response doesn't add + anything to previously sent + `AssistAnswer.replies + `__. Observe - [AssistAnswer.state][google.cloud.discoveryengine.v1.AssistAnswer.state] - to see if more parts are to be expected. While the state is - ``IN_PROGRESS``, the - [AssistAnswer.replies][google.cloud.discoveryengine.v1.AssistAnswer.replies] - field in each response will contain replies (reply - fragments) to be appended to the ones received in previous - responses. [AssistAnswer.name][] won't be filled. - - If the state is ``SUCCEEDED``, ``FAILED`` or ``SKIPPED``, - the response is the last response and [AssistAnswer.name][] - will have a value. + `AssistAnswer.state + `__ + to see if more parts are to be expected. While + the state is ``IN_PROGRESS``, the + `AssistAnswer.replies + `__ + field in each response will contain replies + (reply fragments) to be appended to the ones + received in previous responses. + [AssistAnswer.name][] won't be filled. + + If the state is ``SUCCEEDED``, ``FAILED`` or + ``SKIPPED``, the response is the last response + and [AssistAnswer.name][] will have a value. session_info (google.cloud.discoveryengine_v1.types.StreamAssistResponse.SessionInfo): Session information. assist_token (str): @@ -284,9 +303,10 @@ class SessionInfo(proto.Message): Attributes: session (str): - Name of the newly generated or continued session. - + Name of the newly generated or continued + session. Format: + ``projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}``. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/chunk.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/chunk.py index c476c9ea4e8f..07d06b1bb7f6 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/chunk.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/chunk.py @@ -37,39 +37,47 @@ class Chunk(proto.Message): Attributes: name (str): - The full resource name of the chunk. Format: + The full resource name of the chunk. + Format: + ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}/chunks/{chunk_id}``. - This field must be a UTF-8 encoded string with a length - limit of 1024 characters. + This field must be a UTF-8 encoded string with a + length limit of 1024 characters. id (str): Unique chunk ID of the current chunk. content (str): Content is a string from a document (parsed content). relevance_score (float): - Output only. Represents the relevance score based on - similarity. Higher score indicates higher chunk relevance. - The score is in range [-1.0, 1.0]. Only populated on - [SearchResponse][google.cloud.discoveryengine.v1.SearchResponse]. + Output only. Represents the relevance score + based on similarity. Higher score indicates + higher chunk relevance. The score is in range + [-1.0, 1.0]. + Only populated on + `SearchResponse + `__. This field is a member of `oneof`_ ``_relevance_score``. document_metadata (google.cloud.discoveryengine_v1.types.Chunk.DocumentMetadata): Metadata of the document from the current chunk. derived_struct_data (google.protobuf.struct_pb2.Struct): - Output only. This field is OUTPUT_ONLY. It contains derived - data that are not in the original input document. + Output only. This field is OUTPUT_ONLY. + It contains derived data that are not in the + original input document. page_span (google.cloud.discoveryengine_v1.types.Chunk.PageSpan): Page span of the chunk. chunk_metadata (google.cloud.discoveryengine_v1.types.Chunk.ChunkMetadata): Output only. Metadata of the current chunk. data_urls (MutableSequence[str]): - Output only. Image Data URLs if the current chunk contains - images. Data URLs are composed of four parts: a prefix - (data:), a MIME type indicating the type of data, an - optional base64 token if non-textual, and the data itself: - data:[][;base64], + Output only. Image Data URLs if the current + chunk contains images. Data URLs are composed of + four parts: a prefix (data:), a MIME type + indicating the type of data, an optional base64 + token if non-textual, and the data itself: + + data:` <;base64>`__, annotation_contents (MutableSequence[str]): Output only. Annotation contents if the current chunk contains annotations. @@ -107,10 +115,11 @@ class DocumentMetadata(proto.Message): title (str): Title of the document. struct_data (google.protobuf.struct_pb2.Struct): - Data representation. The structured JSON data for the - document. It should conform to the registered - [Schema][google.cloud.discoveryengine.v1.Schema] or an - ``INVALID_ARGUMENT`` error is thrown. + Data representation. + The structured JSON data for the document. It + should conform to the registered `Schema + `__ or + an ``INVALID_ARGUMENT`` error is thrown. """ uri: str = proto.Field( @@ -148,23 +157,27 @@ class PageSpan(proto.Message): class ChunkMetadata(proto.Message): r"""Metadata of the current chunk. This field is only populated on - [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] - API. + `SearchService.Search + `__ API. Attributes: previous_chunks (MutableSequence[google.cloud.discoveryengine_v1.types.Chunk]): - The previous chunks of the current chunk. The number is - controlled by - [SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks][google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks]. + The previous chunks of the current chunk. The + number is controlled by + `SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks + `__. This field is only populated on - [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] + `SearchService.Search + `__ API. next_chunks (MutableSequence[google.cloud.discoveryengine_v1.types.Chunk]): - The next chunks of the current chunk. The number is - controlled by - [SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks][google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks]. + The next chunks of the current chunk. The number + is controlled by + `SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks + `__. This field is only populated on - [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] + `SearchService.Search + `__ API. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/cmek_config_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/cmek_config_service.py index 378cd38ad0b7..de8b823f8ce0 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/cmek_config_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/cmek_config_service.py @@ -66,14 +66,16 @@ class GetCmekConfigRequest(proto.Message): Attributes: name (str): Required. Resource name of - [CmekConfig][google.cloud.discoveryengine.v1.CmekConfig], + `CmekConfig + `__, such as ``projects/*/locations/*/cmekConfig`` or ``projects/*/locations/*/cmekConfigs/*``. - If the caller does not have permission to access the - [CmekConfig][google.cloud.discoveryengine.v1.CmekConfig], - regardless of whether or not it exists, a PERMISSION_DENIED - error is returned. + If the caller does not have permission to access + the `CmekConfig + `__, + regardless of whether or not it exists, a + PERMISSION_DENIED error is returned. """ name: str = proto.Field( @@ -87,8 +89,8 @@ class SingleRegionKey(proto.Message): Attributes: kms_key (str): - Required. Single-regional kms key resource name which will - be used to encrypt resources + Required. Single-regional kms key resource name + which will be used to encrypt resources ``projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{keyId}``. """ @@ -105,15 +107,17 @@ class CmekConfig(proto.Message): Attributes: name (str): Required. The name of the CmekConfig of the form - ``projects/{project}/locations/{location}/cmekConfig`` or + ``projects/{project}/locations/{location}/cmekConfig`` + or ``projects/{project}/locations/{location}/cmekConfigs/{cmek_config}``. kms_key (str): - KMS key resource name which will be used to encrypt - resources + KMS key resource name which will be used to + encrypt resources ``projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{keyId}``. kms_key_version (str): - KMS key version resource name which will be used to encrypt - resources ``/cryptoKeyVersions/{keyVersion}``. + KMS key version resource name which will be used + to encrypt resources + ``/cryptoKeyVersions/{keyVersion}``. state (google.cloud.discoveryengine_v1.types.CmekConfig.State): Output only. The states of the CmekConfig. is_default (bool): @@ -223,7 +227,8 @@ class NotebookLMState(proto.Enum): class UpdateCmekConfigMetadata(proto.Message): r"""Metadata related to the progress of the - [CmekConfigService.UpdateCmekConfig][google.cloud.discoveryengine.v1.CmekConfigService.UpdateCmekConfig] + `CmekConfigService.UpdateCmekConfig + `__ operation. This will be returned by the google.longrunning.Operation.metadata field. @@ -249,18 +254,22 @@ class UpdateCmekConfigMetadata(proto.Message): class ListCmekConfigsRequest(proto.Message): r"""Request message for - [CmekConfigService.ListCmekConfigs][google.cloud.discoveryengine.v1.CmekConfigService.ListCmekConfigs] + `CmekConfigService.ListCmekConfigs + `__ method. Attributes: parent (str): - Required. The parent location resource name, such as + Required. The parent location resource name, + such as ``projects/{project}/locations/{location}``. If the caller does not have permission to list - [CmekConfig][google.cloud.discoveryengine.v1.CmekConfig]s - under this location, regardless of whether or not a - CmekConfig exists, a PERMISSION_DENIED error is returned. + `CmekConfig + `__s + under this location, regardless of whether or + not a CmekConfig exists, a PERMISSION_DENIED + error is returned. """ parent: str = proto.Field( @@ -271,13 +280,15 @@ class ListCmekConfigsRequest(proto.Message): class ListCmekConfigsResponse(proto.Message): r"""Response message for - [CmekConfigService.ListCmekConfigs][google.cloud.discoveryengine.v1.CmekConfigService.ListCmekConfigs] + `CmekConfigService.ListCmekConfigs + `__ method. Attributes: cmek_configs (MutableSequence[google.cloud.discoveryengine_v1.types.CmekConfig]): All the customer's - [CmekConfig][google.cloud.discoveryengine.v1.CmekConfig]s. + `CmekConfig + `__s. """ cmek_configs: MutableSequence["CmekConfig"] = proto.RepeatedField( @@ -289,14 +300,16 @@ class ListCmekConfigsResponse(proto.Message): class DeleteCmekConfigRequest(proto.Message): r"""Request message for - [CmekConfigService.DeleteCmekConfig][google.cloud.discoveryengine.v1.CmekConfigService.DeleteCmekConfig] + `CmekConfigService.DeleteCmekConfig + `__ method. Attributes: name (str): Required. The resource name of the - [CmekConfig][google.cloud.discoveryengine.v1.CmekConfig] to - delete, such as + `CmekConfig + `__ + to delete, such as ``projects/{project}/locations/{location}/cmekConfigs/{cmek_config}``. """ @@ -308,7 +321,8 @@ class DeleteCmekConfigRequest(proto.Message): class DeleteCmekConfigMetadata(proto.Message): r"""Metadata related to the progress of the - [CmekConfigService.DeleteCmekConfig][google.cloud.discoveryengine.v1.CmekConfigService.DeleteCmekConfig] + `CmekConfigService.DeleteCmekConfig + `__ operation. This will be returned by the google.longrunning.Operation.metadata field. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/common.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/common.py index ee09c5fad591..22e7596b13f5 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/common.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/common.py @@ -40,7 +40,7 @@ class IndustryVertical(proto.Enum): r"""The industry vertical associated with the - [DataStore][google.cloud.discoveryengine.v1.DataStore]. + `DataStore `__. Values: INDUSTRY_VERTICAL_UNSPECIFIED (0): @@ -73,10 +73,10 @@ class SolutionType(proto.Enum): Used for use cases related to the Generative AI agent. SOLUTION_TYPE_GENERATIVE_CHAT (4): - Used for use cases related to the Generative Chat agent. - It's used for Generative chat engine only, the associated - data stores must enrolled with ``SOLUTION_TYPE_CHAT`` - solution. + Used for use cases related to the Generative + Chat agent. It's used for Generative chat engine + only, the associated data stores must enrolled + with ``SOLUTION_TYPE_CHAT`` solution. """ SOLUTION_TYPE_UNSPECIFIED = 0 SOLUTION_TYPE_RECOMMENDATION = 1 @@ -86,19 +86,22 @@ class SolutionType(proto.Enum): class SearchUseCase(proto.Enum): - r"""Defines a further subdivision of ``SolutionType``. Specifically - applies to - [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1.SolutionType.SOLUTION_TYPE_SEARCH]. + r"""Defines a further subdivision of ``SolutionType``. + Specifically applies to + `SOLUTION_TYPE_SEARCH + `__. Values: SEARCH_USE_CASE_UNSPECIFIED (0): Value used when unset. Will not occur in CSS. SEARCH_USE_CASE_SEARCH (1): - Search use case. Expects the traffic has a non-empty - [query][google.cloud.discoveryengine.v1.SearchRequest.query]. + Search use case. Expects the traffic has a + non-empty `query + `__. SEARCH_USE_CASE_BROWSE (2): - Browse use case. Expects the traffic has an empty - [query][google.cloud.discoveryengine.v1.SearchRequest.query]. + Browse use case. Expects the traffic has an + empty `query + `__. """ SEARCH_USE_CASE_UNSPECIFIED = 0 SEARCH_USE_CASE_SEARCH = 1 @@ -191,32 +194,38 @@ class Interval(proto.Message): class CustomAttribute(proto.Message): r"""A custom attribute that is not explicitly modeled in a resource, - e.g. [UserEvent][google.cloud.discoveryengine.v1.UserEvent]. + e.g. `UserEvent `__. Attributes: text (MutableSequence[str]): - The textual values of this custom attribute. For example, - ``["yellow", "green"]`` when the key is "color". + The textual values of this custom attribute. For + example, ``["yellow", "green"]`` when the key is + "color". Empty string is not allowed. Otherwise, an ``INVALID_ARGUMENT`` error is returned. Exactly one of - [CustomAttribute.text][google.cloud.discoveryengine.v1.CustomAttribute.text] + `CustomAttribute.text + `__ or - [CustomAttribute.numbers][google.cloud.discoveryengine.v1.CustomAttribute.numbers] - should be set. Otherwise, an ``INVALID_ARGUMENT`` error is - returned. + `CustomAttribute.numbers + `__ + should be set. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. numbers (MutableSequence[float]): - The numerical values of this custom attribute. For example, - ``[2.3, 15.4]`` when the key is "lengths_cm". + The numerical values of this custom attribute. + For example, ``[2.3, 15.4]`` when the key is + "lengths_cm". Exactly one of - [CustomAttribute.text][google.cloud.discoveryengine.v1.CustomAttribute.text] + `CustomAttribute.text + `__ or - [CustomAttribute.numbers][google.cloud.discoveryengine.v1.CustomAttribute.numbers] - should be set. Otherwise, an ``INVALID_ARGUMENT`` error is - returned. + `CustomAttribute.numbers + `__ + should be set. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. """ text: MutableSequence[str] = proto.RepeatedField( @@ -234,31 +243,35 @@ class UserInfo(proto.Message): Attributes: user_id (str): - Highly recommended for logged-in users. Unique identifier - for logged-in user, such as a user name. Don't set for - anonymous users. + Highly recommended for logged-in users. Unique + identifier for logged-in user, such as a user + name. Don't set for anonymous users. Always use a hashed value for this ID. - Don't set the field to the same fixed ID for different - users. This mixes the event history of those users together, - which results in degraded model quality. + Don't set the field to the same fixed ID for + different users. This mixes the event history of + those users together, which results in degraded + model quality. - The field must be a UTF-8 encoded string with a length limit - of 128 characters. Otherwise, an ``INVALID_ARGUMENT`` error - is returned. + The field must be a UTF-8 encoded string with a + length limit of 128 characters. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. user_agent (str): User agent as included in the HTTP header. - The field must be a UTF-8 encoded string with a length limit - of 1,000 characters. Otherwise, an ``INVALID_ARGUMENT`` - error is returned. + The field must be a UTF-8 encoded string with a + length limit of 1,000 characters. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. - This should not be set when using the client side event - reporting with GTM or JavaScript tag in - [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1.UserEventService.CollectUserEvent] + This should not be set when using the client + side event reporting with GTM or JavaScript tag + in + `UserEventService.CollectUserEvent + `__ or if - [UserEvent.direct_user_request][google.cloud.discoveryengine.v1.UserEvent.direct_user_request] + `UserEvent.direct_user_request + `__ is set. time_zone (str): Optional. IANA time zone, e.g. @@ -305,18 +318,21 @@ class Principal(proto.Message): Attributes: user_id (str): - User identifier. For Google Workspace user account, user_id - should be the google workspace user email. For non-google - identity provider user account, user_id is the mapped user - identifier configured during the workforcepool config. + User identifier. + For Google Workspace user account, user_id + should be the google workspace user email. + For non-google identity provider user account, + user_id is the mapped user identifier configured + during the workforcepool config. This field is a member of `oneof`_ ``principal``. group_id (str): - Group identifier. For Google Workspace user account, - group_id should be the google workspace group email. For - non-google identity provider user account, group_id is the - mapped group identifier configured during the workforcepool - config. + Group identifier. + For Google Workspace user account, group_id + should be the google workspace group email. + For non-google identity provider user account, + group_id is the mapped group identifier + configured during the workforcepool config. This field is a member of `oneof`_ ``principal``. external_entity_id (str): @@ -350,16 +366,17 @@ class HealthcareFhirConfig(proto.Message): enable_configurable_schema (bool): Whether to enable configurable schema for ``HEALTHCARE_FHIR`` vertical. - - If set to ``true``, the predefined healthcare fhir schema - can be extended for more customized searching and filtering. + If set to ``true``, the predefined healthcare + fhir schema can be extended for more customized + searching and filtering. enable_static_indexing_for_batch_ingestion (bool): - Whether to enable static indexing for ``HEALTHCARE_FHIR`` - batch ingestion. + Whether to enable static indexing for + ``HEALTHCARE_FHIR`` batch ingestion. - If set to ``true``, the batch ingestion will be processed in - a static indexing mode which is slower but more capable of - handling larger volume. + If set to ``true``, the batch ingestion will be + processed in a static indexing mode which is + slower but more capable of handling larger + volume. """ enable_configurable_schema: bool = proto.Field( @@ -385,10 +402,11 @@ class SearchLinkPromotion(proto.Message): to promote. Must be set for site search. For other verticals, this is optional. document (str): - Optional. The - [Document][google.cloud.discoveryengine.v1.Document] the - user wants to promote. For site search, leave unset and only - populate uri. Can be set along with uri. + Optional. The `Document + `__ + the user wants to promote. For site search, + leave unset and only populate uri. Can be set + along with uri. image_uri (str): Optional. The promotion thumbnail image url. description (str): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/completion.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/completion.py index f7f45960f38e..5f080bdbe0cb 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/completion.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/completion.py @@ -49,10 +49,11 @@ class MatchOperator(proto.Enum): MATCH_OPERATOR_UNSPECIFIED (0): Default value. Should not be used EXACT_MATCH (1): - If the suggestion is an exact match to the block_phrase, - then block it. + If the suggestion is an exact match to the + block_phrase, then block it. CONTAINS (2): - If the suggestion contains the block_phrase, then block it. + If the suggestion contains the block_phrase, + then block it. """ MATCH_OPERATOR_UNSPECIFIED = 0 EXACT_MATCH = 1 diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/completion_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/completion_service.py index d4c75d5e46c4..c610525dd280 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/completion_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/completion_service.py @@ -30,58 +30,65 @@ class CompleteQueryRequest(proto.Message): r"""Request message for - [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1.CompletionService.CompleteQuery] + `CompletionService.CompleteQuery + `__ method. Attributes: data_store (str): - Required. The parent data store resource name for which the - completion is performed, such as + Required. The parent data store resource name + for which the completion is performed, such as ``projects/*/locations/global/collections/default_collection/dataStores/default_data_store``. query (str): Required. The typeahead input used to fetch suggestions. Maximum length is 128 characters. query_model (str): - Specifies the autocomplete data model. This overrides any - model specified in the Configuration > Autocomplete section - of the Cloud console. Currently supported values: - - - ``document`` - Using suggestions generated from - user-imported documents. - - ``search-history`` - Using suggestions generated from the - past history of - [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] - API calls. Do not use it when there is no traffic for - Search API. - - ``user-event`` - Using suggestions generated from - user-imported search events. - - ``document-completable`` - Using suggestions taken - directly from user-imported document fields marked as - completable. + Specifies the autocomplete data model. This + overrides any model specified in the + Configuration > Autocomplete section of the + Cloud console. Currently supported values: + + * ``document`` - Using suggestions generated + from user-imported documents. * + ``search-history`` - Using suggestions generated + from the past history of `SearchService.Search + `__ + API calls. Do not use it when there is no + traffic for Search API. + + * ``user-event`` - Using suggestions generated + from user-imported search events. + + * ``document-completable`` - Using suggestions + taken directly from user-imported document + fields marked as completable. Default values: - - ``document`` is the default model for regular dataStores. - - ``search-history`` is the default model for site search - dataStores. + * ``document`` is the default model for regular + dataStores. * ``search-history`` is the default + model for site search dataStores. user_pseudo_id (str): - A unique identifier for tracking visitors. For example, this - could be implemented with an HTTP cookie, which should be - able to uniquely identify a visitor on a single device. This - unique identifier should not change if the visitor logs in - or out of the website. + A unique identifier for tracking visitors. For + example, this could be implemented with an HTTP + cookie, which should be able to uniquely + identify a visitor on a single device. This + unique identifier should not change if the + visitor logs in or out of the website. This field should NOT have a fixed value such as ``unknown_visitor``. This should be the same identifier as - [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1.UserEvent.user_pseudo_id] + `UserEvent.user_pseudo_id + `__ and - [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1.SearchRequest.user_pseudo_id]. + `SearchRequest.user_pseudo_id + `__. - The field must be a UTF-8 encoded string with a length limit - of 128 characters. Otherwise, an ``INVALID_ARGUMENT`` error - is returned. + The field must be a UTF-8 encoded string with a + length limit of 128 characters. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. include_tail_suggestions (bool): Indicates if tail suggestions should be returned if there are no suggestions that match @@ -115,7 +122,8 @@ class CompleteQueryRequest(proto.Message): class CompleteQueryResponse(proto.Message): r"""Response message for - [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1.CompletionService.CompleteQuery] + `CompletionService.CompleteQuery + `__ method. Attributes: @@ -124,11 +132,12 @@ class CompleteQueryResponse(proto.Message): result list is ordered and the first result is a top suggestion. tail_match_triggered (bool): - True if the returned suggestions are all tail suggestions. - - For tail matching to be triggered, include_tail_suggestions - in the request must be true and there must be no suggestions - that match the full query. + True if the returned suggestions are all tail + suggestions. + For tail matching to be triggered, + include_tail_suggestions in the request must be + true and there must be no suggestions that match + the full query. """ class QuerySuggestion(proto.Message): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/control.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/control.py index 8d8b1e4a4bf0..f3abb1cdb514 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/control.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/control.py @@ -37,9 +37,11 @@ class Condition(proto.Message): Attributes: query_terms (MutableSequence[google.cloud.discoveryengine_v1.types.Condition.QueryTerm]): - Search only A list of terms to match the query on. Cannot be - set when - [Condition.query_regex][google.cloud.discoveryengine.v1.Condition.query_regex] + Search only + A list of terms to match the query on. + Cannot be set when + `Condition.query_regex + `__ is set. Maximum of 10 query terms. @@ -48,11 +50,12 @@ class Condition(proto.Message): active. Maximum of 10 time ranges. query_regex (str): - Optional. Query regex to match the whole search query. - Cannot be set when - [Condition.query_terms][google.cloud.discoveryengine.v1.Condition.query_terms] - is set. Only supported for Basic Site Search promotion - serving controls. + Optional. Query regex to match the whole search + query. Cannot be set when + `Condition.query_terms + `__ + is set. Only supported for Basic Site Search + promotion serving controls. """ class QueryTerm(proto.Message): @@ -62,9 +65,10 @@ class QueryTerm(proto.Message): value (str): The specific query value to match against - Must be lowercase, must be UTF-8. Can have at most 3 space - separated terms if full_match is true. Cannot be an empty - string. Maximum length of 5000 characters. + Must be lowercase, must be UTF-8. + Can have at most 3 space separated terms if + full_match is true. Cannot be an empty string. + Maximum length of 5000 characters. full_match (bool): Whether the search query needs to exactly match the query term. @@ -122,9 +126,10 @@ class TimeRange(proto.Message): class Control(proto.Message): - r"""Defines a conditioned behavior to employ during serving. Must be - attached to a - [ServingConfig][google.cloud.discoveryengine.v1.ServingConfig] to be + r"""Defines a conditioned behavior to employ during serving. + Must be attached to a + `ServingConfig + `__ to be considered at serving time. Permitted actions dependent on ``SolutionType``. @@ -170,21 +175,25 @@ class Control(proto.Message): error is thrown. associated_serving_config_ids (MutableSequence[str]): Output only. List of all - [ServingConfig][google.cloud.discoveryengine.v1.ServingConfig] - IDs this control is attached to. May take up to 10 minutes - to update after changes. + `ServingConfig + `__ + IDs this control is attached to. May take up to + 10 minutes to update after changes. solution_type (google.cloud.discoveryengine_v1.types.SolutionType): Required. Immutable. What solution the control belongs to. Must be compatible with vertical of resource. Otherwise an INVALID ARGUMENT error is thrown. use_cases (MutableSequence[google.cloud.discoveryengine_v1.types.SearchUseCase]): - Specifies the use case for the control. Affects what - condition fields can be set. Only applies to - [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1.SolutionType.SOLUTION_TYPE_SEARCH]. - Currently only allow one use case per control. Must be set - when solution_type is - [SolutionType.SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1.SolutionType.SOLUTION_TYPE_SEARCH]. + Specifies the use case for the control. + Affects what condition fields can be set. + Only applies to + `SOLUTION_TYPE_SEARCH + `__. + Currently only allow one use case per control. + Must be set when solution_type is + `SolutionType.SOLUTION_TYPE_SEARCH + `__. conditions (MutableSequence[google.cloud.discoveryengine_v1.types.Condition]): Determines when the associated action will trigger. @@ -206,8 +215,9 @@ class BoostAction(proto.Message): Attributes: fixed_boost (float): - Optional. Strength of the boost, which should be in [-1, 1]. - Negative boost means demotion. Default is 0.0 (No-op). + Optional. Strength of the boost, which should be + in [-1, 1]. Negative boost means demotion. + Default is 0.0 (No-op). This field is a member of `oneof`_ ``boost_spec``. interpolation_boost_spec (google.cloud.discoveryengine_v1.types.Control.BoostAction.InterpolationBoostSpec): @@ -217,8 +227,9 @@ class BoostAction(proto.Message): This field is a member of `oneof`_ ``boost_spec``. boost (float): - Strength of the boost, which should be in [-1, 1]. Negative - boost means demotion. Default is 0.0 (No-op). + Strength of the boost, which should be in [-1, + 1]. Negative boost means demotion. Default is + 0.0 (No-op). filter (str): Required. Specifies which products to apply the boost to. @@ -229,8 +240,9 @@ class BoostAction(proto.Message): Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown. data_store (str): - Required. Specifies which data store's documents can be - boosted by this control. Full data store name e.g. + Required. Specifies which data store's documents + can be boosted by this control. Full data store + name e.g. projects/123/locations/global/collections/default_collection/dataStores/default_data_store """ @@ -244,20 +256,23 @@ class InterpolationBoostSpec(proto.Message): Optional. The name of the field whose value will be used to determine the boost amount. attribute_type (google.cloud.discoveryengine_v1.types.Control.BoostAction.InterpolationBoostSpec.AttributeType): - Optional. The attribute type to be used to determine the - boost amount. The attribute value can be derived from the - field value of the specified field_name. In the case of - numerical it is straightforward i.e. attribute_value = - numerical_field_value. In the case of freshness however, - attribute_value = (time.now() - datetime_field_value). + Optional. The attribute type to be used to + determine the boost amount. The attribute value + can be derived from the field value of the + specified field_name. In the case of numerical + it is straightforward i.e. attribute_value = + numerical_field_value. In the case of freshness + however, attribute_value = (time.now() - + datetime_field_value). interpolation_type (google.cloud.discoveryengine_v1.types.Control.BoostAction.InterpolationBoostSpec.InterpolationType): Optional. The interpolation type to be applied to connect the control points listed below. control_points (MutableSequence[google.cloud.discoveryengine_v1.types.Control.BoostAction.InterpolationBoostSpec.ControlPoint]): - Optional. The control points used to define the curve. The - monotonic function (defined through the interpolation_type - above) passes through the control points listed here. + Optional. The control points used to define the + curve. The monotonic function (defined through + the interpolation_type above) passes through the + control points listed here. """ class AttributeType(proto.Enum): @@ -268,19 +283,21 @@ class AttributeType(proto.Enum): ATTRIBUTE_TYPE_UNSPECIFIED (0): Unspecified AttributeType. NUMERICAL (1): - The value of the numerical field will be used to dynamically - update the boost amount. In this case, the attribute_value - (the x value) of the control point will be the actual value - of the numerical field for which the boost_amount is + The value of the numerical field will be used to + dynamically update the boost amount. In this + case, the attribute_value (the x value) of the + control point will be the actual value of the + numerical field for which the boost_amount is specified. FRESHNESS (2): - For the freshness use case the attribute value will be the - duration between the current time and the date in the - datetime field specified. The value must be formatted as an - XSD ``dayTimeDuration`` value (a restricted subset of an ISO - 8601 duration value). The pattern for this is: - ``[nD][T[nH][nM][nS]]``. For example, ``5D``, ``3DT12H30M``, - ``T24H``. + For the freshness use case the attribute value + will be the duration between the current time + and the date in the datetime field specified. + The value must be formatted as an XSD + ``dayTimeDuration`` value (a restricted subset + of an ISO 8601 duration value). The pattern for + this is: ```nD `__`nM `__]``. For + example, ``5D``, ``3DT12H30M``, ``T24H``. """ ATTRIBUTE_TYPE_UNSPECIFIED = 0 NUMERICAL = 1 @@ -311,14 +328,16 @@ class ControlPoint(proto.Message): Optional. Can be one of: 1. The numerical field value. - 2. The duration spec for freshness: The value must be - formatted as an XSD ``dayTimeDuration`` value (a - restricted subset of an ISO 8601 duration value). The - pattern for this is: ``[nD][T[nH][nM][nS]]``. + 2. The duration spec for freshness: + + The value must be formatted as an XSD + ``dayTimeDuration`` value (a restricted subset + of an ISO 8601 duration value). The pattern for + this is: ```nD `__`nM `__]``. boost_amount (float): - Optional. The value between -1 to 1 by which to boost the - score if the attribute_value evaluates to the value - specified above. + Optional. The value between -1 to 1 by which to + boost the score if the attribute_value evaluates + to the value specified above. """ attribute_value: str = proto.Field( @@ -393,8 +412,9 @@ class FilterAction(proto.Message): Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown. data_store (str): - Required. Specifies which data store's documents can be - filtered by this control. Full data store name e.g. + Required. Specifies which data store's documents + can be filtered by this control. Full data store + name e.g. projects/123/locations/global/collections/default_collection/dataStores/default_data_store """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/control_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/control_service.py index b32fe3220982..a85138d16767 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/control_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/control_service.py @@ -40,18 +40,20 @@ class CreateControlRequest(proto.Message): Attributes: parent (str): - Required. Full resource name of parent data store. Format: + Required. Full resource name of parent data + store. Format: ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`` or ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}``. control (google.cloud.discoveryengine_v1.types.Control): Required. The Control to create. control_id (str): - Required. The ID to use for the Control, which will become - the final component of the Control's resource name. + Required. The ID to use for the Control, which + will become the final component of the Control's + resource name. - This value must be within 1-63 characters. Valid characters - are /[a-z][0-9]-\_/. + This value must be within 1-63 characters. + Valid characters are /`a-z <0-9>`__-_/. """ parent: str = proto.Field( @@ -77,13 +79,17 @@ class UpdateControlRequest(proto.Message): Required. The Control to update. update_mask (google.protobuf.field_mask_pb2.FieldMask): Optional. Indicates which fields in the provided - [Control][google.cloud.discoveryengine.v1.Control] to + `Control + `__ to update. The following are NOT supported: - - [Control.name][google.cloud.discoveryengine.v1.Control.name] - - [Control.solution_type][google.cloud.discoveryengine.v1.Control.solution_type] + * `Control.name + `__ + * `Control.solution_type + `__ - If not set or empty, all supported fields are updated. + If not set or empty, all supported fields are + updated. """ control: gcd_control.Control = proto.Field( @@ -103,8 +109,8 @@ class DeleteControlRequest(proto.Message): Attributes: name (str): - Required. The resource name of the Control to delete. - Format: + Required. The resource name of the Control to + delete. Format: ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`` """ @@ -119,7 +125,8 @@ class GetControlRequest(proto.Message): Attributes: name (str): - Required. The resource name of the Control to get. Format: + Required. The resource name of the Control to + get. Format: ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`` """ @@ -144,15 +151,15 @@ class ListControlsRequest(proto.Message): allowed value is 1000. page_token (str): Optional. A page token, received from a previous - ``ListControls`` call. Provide this to retrieve the - subsequent page. + ``ListControls`` call. Provide this to retrieve + the subsequent page. filter (str): - Optional. A filter to apply on the list results. Supported - features: - - - List all the products under the parent branch if - [filter][google.cloud.discoveryengine.v1.ListControlsRequest.filter] - is unset. Currently this field is unsupported. + Optional. A filter to apply on the list results. + Supported features: + * List all the products under the parent branch + if `filter + `__ + is unset. Currently this field is unsupported. """ parent: str = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/conversational_search_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/conversational_search_service.py index d12fbaea8277..44b27332d060 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/conversational_search_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/conversational_search_service.py @@ -51,24 +51,28 @@ class ConverseConversationRequest(proto.Message): r"""Request message for - [ConversationalSearchService.ConverseConversation][google.cloud.discoveryengine.v1.ConversationalSearchService.ConverseConversation] + `ConversationalSearchService.ConverseConversation + `__ method. Attributes: name (str): - Required. The resource name of the Conversation to get. - Format: + Required. The resource name of the Conversation + to get. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}``. Use ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/-`` - to activate auto session mode, which automatically creates a - new conversation inside a ConverseConversation session. + to activate auto session mode, which + automatically creates a new conversation inside + a ConverseConversation session. query (google.cloud.discoveryengine_v1.types.TextInput): Required. Current user input. serving_config (str): - The resource name of the Serving Config to use. Format: + The resource name of the Serving Config to use. + Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/servingConfigs/{serving_config_id}`` - If this is not set, the default serving config will be used. + If this is not set, the default serving config + will be used. conversation (google.cloud.discoveryengine_v1.types.Conversation): The conversation to be used by auto session only. The name field will be ignored as we @@ -77,55 +81,66 @@ class ConverseConversationRequest(proto.Message): safe_search (bool): Whether to turn on safe search. user_labels (MutableMapping[str, str]): - The user labels applied to a resource must meet the - following requirements: - - - Each resource can have multiple labels, up to a maximum of - 64. - - Each label must be a key-value pair. - - Keys have a minimum length of 1 character and a maximum - length of 63 characters and cannot be empty. Values can be - empty and have a maximum length of 63 characters. - - Keys and values can contain only lowercase letters, - numeric characters, underscores, and dashes. All - characters must use UTF-8 encoding, and international - characters are allowed. - - The key portion of a label must be unique. However, you - can use the same key with multiple resources. - - Keys must start with a lowercase letter or international - character. + The user labels applied to a resource must meet + the following requirements: + * Each resource can have multiple labels, up to + a maximum of 64. + + * Each label must be a key-value pair. + * Keys have a minimum length of 1 character and + a maximum length of 63 characters and cannot + be empty. Values can be empty and have a maximum + length of 63 characters. + + * Keys and values can contain only lowercase + letters, numeric characters, underscores, and + dashes. All characters must use UTF-8 encoding, + and international characters are allowed. + + * The key portion of a label must be unique. + However, you can use the same key with + multiple resources. + + * Keys must start with a lowercase letter or + international character. See `Google Cloud - Document `__ + Document + `__ for more details. summary_spec (google.cloud.discoveryengine_v1.types.SearchRequest.ContentSearchSpec.SummarySpec): A specification for configuring the summary returned in the response. filter (str): - The filter syntax consists of an expression language for - constructing a predicate from one or more fields of the - documents being filtered. Filter expression is - case-sensitive. This will be used to filter search results - which may affect the summary response. - - If this field is unrecognizable, an ``INVALID_ARGUMENT`` is - returned. - - Filtering in Vertex AI Search is done by mapping the LHS - filter key to a key property defined in the Vertex AI Search - backend -- this mapping is defined by the customer in their - schema. For example a media customer might have a field - 'name' in their schema. In this case the filter would look - like this: filter --> name:'ANY("king kong")' - - For more information about filtering including syntax and - filter operators, see - `Filter `__ + The filter syntax consists of an expression + language for constructing a predicate from one + or more fields of the documents being filtered. + Filter expression is case-sensitive. This will + be used to filter search results which may + affect the summary response. + + If this field is unrecognizable, an + ``INVALID_ARGUMENT`` is returned. + + Filtering in Vertex AI Search is done by mapping + the LHS filter key to a key property defined in + the Vertex AI Search backend -- this mapping is + defined by the customer in their schema. For + example a media customer might have a field + 'name' in their schema. In this case the filter + would look like this: filter --> name:'ANY("king + kong")' + + For more information about filtering including + syntax and filter operators, see + `Filter + `__ boost_spec (google.cloud.discoveryengine_v1.types.SearchRequest.BoostSpec): - Boost specification to boost certain documents in search - results which may affect the converse response. For more - information on boosting, see - `Boosting `__ + Boost specification to boost certain documents + in search results which may affect the converse + response. For more information on boosting, see + `Boosting + `__ """ name: str = proto.Field( @@ -175,7 +190,8 @@ class ConverseConversationRequest(proto.Message): class ConverseConversationResponse(proto.Message): r"""Response message for - [ConversationalSearchService.ConverseConversation][google.cloud.discoveryengine.v1.ConversationalSearchService.ConverseConversation] + `ConversationalSearchService.ConverseConversation + `__ method. Attributes: @@ -211,7 +227,8 @@ class CreateConversationRequest(proto.Message): Attributes: parent (str): - Required. Full resource name of parent data store. Format: + Required. Full resource name of parent data + store. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`` conversation (google.cloud.discoveryengine_v1.types.Conversation): Required. The conversation to create. @@ -236,12 +253,15 @@ class UpdateConversationRequest(proto.Message): Required. The Conversation to update. update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided - [Conversation][google.cloud.discoveryengine.v1.Conversation] + `Conversation + `__ to update. The following are NOT supported: - - [Conversation.name][google.cloud.discoveryengine.v1.Conversation.name] + * `Conversation.name + `__ - If not set or empty, all supported fields are updated. + If not set or empty, all supported fields are + updated. """ conversation: gcd_conversation.Conversation = proto.Field( @@ -261,8 +281,8 @@ class DeleteConversationRequest(proto.Message): Attributes: name (str): - Required. The resource name of the Conversation to delete. - Format: + Required. The resource name of the Conversation + to delete. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`` """ @@ -277,8 +297,8 @@ class GetConversationRequest(proto.Message): Attributes: name (str): - Required. The resource name of the Conversation to get. - Format: + Required. The resource name of the Conversation + to get. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`` """ @@ -300,23 +320,30 @@ class ListConversationsRequest(proto.Message): unspecified, defaults to 50. Max allowed value is 1000. page_token (str): - A page token, received from a previous ``ListConversations`` - call. Provide this to retrieve the subsequent page. + A page token, received from a previous + ``ListConversations`` call. Provide this to + retrieve the subsequent page. filter (str): - A filter to apply on the list results. The supported - features are: user_pseudo_id, state. + A filter to apply on the list results. The + supported features are: user_pseudo_id, state. - Example: "user_pseudo_id = some_id". + Example: + + "user_pseudo_id = some_id". order_by (str): - A comma-separated list of fields to order by, sorted in - ascending order. Use "desc" after a field name for - descending. Supported fields: + A comma-separated list of fields to order by, + sorted in ascending order. Use "desc" after a + field name for descending. Supported fields: + + * ``update_time`` + * ``create_time`` - - ``update_time`` - - ``create_time`` - - ``conversation_name`` + * ``conversation_name`` + + Example: - Example: "update_time desc" "create_time". + "update_time desc" + "create_time". """ parent: str = proto.Field( @@ -369,29 +396,31 @@ def raw_page(self): class AnswerQueryRequest(proto.Message): r"""Request message for - [ConversationalSearchService.AnswerQuery][google.cloud.discoveryengine.v1.ConversationalSearchService.AnswerQuery] + `ConversationalSearchService.AnswerQuery + `__ method. Attributes: serving_config (str): - Required. The resource name of the Search serving config, - such as + Required. The resource name of the Search + serving config, such as ``projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config``, or ``projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config``. - This field is used to identify the serving configuration - name, set of models used to make the search. + This field is used to identify the serving + configuration name, set of models used to make + the search. query (google.cloud.discoveryengine_v1.types.Query): Required. Current user query. session (str): The session resource name. Not required. - When session field is not set, the API is in sessionless - mode. + When session field is not set, the API is in + sessionless mode. - We support auto session mode: users can use the wildcard - symbol ``-`` as session ID. A new ID will be automatically - generated and assigned. + We support auto session mode: users can use the + wildcard symbol ``-`` as session ID. A new ID + will be automatically generated and assigned. safety_spec (google.cloud.discoveryengine_v1.types.AnswerQueryRequest.SafetySpec): Model specification. related_questions_spec (google.cloud.discoveryengine_v1.types.AnswerQueryRequest.RelatedQuestionsSpec): @@ -405,73 +434,84 @@ class AnswerQueryRequest(proto.Message): query_understanding_spec (google.cloud.discoveryengine_v1.types.AnswerQueryRequest.QueryUnderstandingSpec): Query understanding specification. asynchronous_mode (bool): - Deprecated: This field is deprecated. Streaming Answer API - will be supported. + Deprecated: This field is deprecated. Streaming + Answer API will be supported. Asynchronous mode control. If enabled, the response will be returned with - answer/session resource name without final answer. The API - users need to do the polling to get the latest status of - answer/session by calling - [ConversationalSearchService.GetAnswer][google.cloud.discoveryengine.v1.ConversationalSearchService.GetAnswer] + answer/session resource name without final + answer. The API users need to do the polling to + get the latest status of answer/session by + calling `ConversationalSearchService.GetAnswer + `__ or - [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1.ConversationalSearchService.GetSession] + `ConversationalSearchService.GetSession + `__ method. user_pseudo_id (str): - A unique identifier for tracking visitors. For example, this - could be implemented with an HTTP cookie, which should be - able to uniquely identify a visitor on a single device. This - unique identifier should not change if the visitor logs in - or out of the website. + A unique identifier for tracking visitors. For + example, this could be implemented with an HTTP + cookie, which should be able to uniquely + identify a visitor on a single device. This + unique identifier should not change if the + visitor logs in or out of the website. This field should NOT have a fixed value such as ``unknown_visitor``. - The field must be a UTF-8 encoded string with a length limit - of 128 characters. Otherwise, an ``INVALID_ARGUMENT`` error - is returned. + The field must be a UTF-8 encoded string with a + length limit of 128 characters. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. user_labels (MutableMapping[str, str]): - The user labels applied to a resource must meet the - following requirements: - - - Each resource can have multiple labels, up to a maximum of - 64. - - Each label must be a key-value pair. - - Keys have a minimum length of 1 character and a maximum - length of 63 characters and cannot be empty. Values can be - empty and have a maximum length of 63 characters. - - Keys and values can contain only lowercase letters, - numeric characters, underscores, and dashes. All - characters must use UTF-8 encoding, and international - characters are allowed. - - The key portion of a label must be unique. However, you - can use the same key with multiple resources. - - Keys must start with a lowercase letter or international - character. + The user labels applied to a resource must meet + the following requirements: + * Each resource can have multiple labels, up to + a maximum of 64. + + * Each label must be a key-value pair. + * Keys have a minimum length of 1 character and + a maximum length of 63 characters and cannot + be empty. Values can be empty and have a maximum + length of 63 characters. + + * Keys and values can contain only lowercase + letters, numeric characters, underscores, and + dashes. All characters must use UTF-8 encoding, + and international characters are allowed. + + * The key portion of a label must be unique. + However, you can use the same key with + multiple resources. + + * Keys must start with a lowercase letter or + international character. See `Google Cloud - Document `__ + Document + `__ for more details. end_user_spec (google.cloud.discoveryengine_v1.types.AnswerQueryRequest.EndUserSpec): Optional. End user specification. """ class SafetySpec(proto.Message): - r"""Safety specification. There are two use cases: + r"""Safety specification. + There are two use cases: 1. when only safety_spec.enable is set, the BLOCK_LOW_AND_ABOVE - threshold will be applied for all categories. - 2. when safety_spec.enable is set and some safety_settings are set, - only specified safety_settings are applied. + threshold will be applied for all categories. + 2. when safety_spec.enable is set and some safety_settings are + set, only specified safety_settings are applied. Attributes: enable (bool): Enable the safety filtering on the answer response. It is false by default. safety_settings (MutableSequence[google.cloud.discoveryengine_v1.types.AnswerQueryRequest.SafetySpec.SafetySetting]): - Optional. Safety settings. This settings are effective only - when the safety_spec.enable is true. + Optional. Safety settings. + This settings are effective only when the + safety_spec.enable is true. """ class SafetySetting(proto.Message): @@ -550,12 +590,13 @@ class GroundingSpec(proto.Message): Attributes: include_grounding_supports (bool): - Optional. Specifies whether to include grounding_supports in - the answer. The default value is ``false``. + Optional. Specifies whether to include + grounding_supports in the answer. The default + value is ``false``. - When this field is set to ``true``, returned answer will - have ``grounding_score`` and will contain GroundingSupports - for each claim. + When this field is set to ``true``, returned + answer will have ``grounding_score`` and will + contain GroundingSupports for each claim. filtering_level (google.cloud.discoveryengine_v1.types.AnswerQueryRequest.GroundingSpec.FilteringLevel): Optional. Specifies whether to enable the filtering based on grounding score and at what @@ -600,57 +641,65 @@ class AnswerGenerationSpec(proto.Message): prompt_spec (google.cloud.discoveryengine_v1.types.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec): Answer generation prompt specification. include_citations (bool): - Specifies whether to include citation metadata in the - answer. The default value is ``false``. + Specifies whether to include citation metadata + in the answer. The default value is ``false``. answer_language_code (str): - Language code for Answer. Use language tags defined by - `BCP47 `__. + Language code for Answer. Use language tags + defined by `BCP47 + `__. Note: This is an experimental feature. ignore_adversarial_query (bool): - Specifies whether to filter out adversarial queries. The - default value is ``false``. - - Google employs search-query classification to detect - adversarial queries. No answer is returned if the search - query is classified as an adversarial query. For example, a - user might ask a question regarding negative comments about - the company or submit a query designed to generate unsafe, - policy-violating output. If this field is set to ``true``, - we skip generating answers for adversarial queries and - return fallback messages instead. + Specifies whether to filter out adversarial + queries. The default value is ``false``. + + Google employs search-query classification to + detect adversarial queries. No answer is + returned if the search query is classified as an + adversarial query. For example, a user might ask + a question regarding negative comments about the + company or submit a query designed to generate + unsafe, policy-violating output. If this field + is set to ``true``, we skip generating answers + for adversarial queries and return fallback + messages instead. ignore_non_answer_seeking_query (bool): - Specifies whether to filter out queries that are not - answer-seeking. The default value is ``false``. - - Google employs search-query classification to detect - answer-seeking queries. No answer is returned if the search - query is classified as a non-answer seeking query. If this - field is set to ``true``, we skip generating answers for - non-answer seeking queries and return fallback messages - instead. + Specifies whether to filter out queries that are + not answer-seeking. The default value is + ``false``. + + Google employs search-query classification to + detect answer-seeking queries. No answer is + returned if the search query is classified as a + non-answer seeking query. If this field is set + to ``true``, we skip generating answers for + non-answer seeking queries and return fallback + messages instead. ignore_low_relevant_content (bool): - Specifies whether to filter out queries that have low - relevance. - - If this field is set to ``false``, all search results are - used regardless of relevance to generate answers. If set to - ``true`` or unset, the behavior will be determined - automatically by the service. + Specifies whether to filter out queries that + have low relevance. + If this field is set to ``false``, all search + results are used regardless of relevance to + generate answers. If set to ``true`` or unset, + the behavior will be determined automatically by + the service. This field is a member of `oneof`_ ``_ignore_low_relevant_content``. ignore_jail_breaking_query (bool): - Optional. Specifies whether to filter out jail-breaking - queries. The default value is ``false``. - - Google employs search-query classification to detect - jail-breaking queries. No summary is returned if the search - query is classified as a jail-breaking query. A user might - add instructions to the query to change the tone, style, - language, content of the answer, or ask the model to act as - a different entity, e.g. "Reply in the tone of a competing - company's CEO". If this field is set to ``true``, we skip - generating summaries for jail-breaking queries and return - fallback messages instead. + Optional. Specifies whether to filter out + jail-breaking queries. The default value is + ``false``. + + Google employs search-query classification to + detect jail-breaking queries. No summary is + returned if the search query is classified as a + jail-breaking query. A user might add + instructions to the query to change the tone, + style, language, content of the answer, or ask + the model to act as a different entity, e.g. + "Reply in the tone of a competing company's + CEO". If this field is set to ``true``, we skip + generating summaries for jail-breaking queries + and return fallback messages instead. """ class ModelSpec(proto.Message): @@ -746,45 +795,53 @@ class SearchParams(proto.Message): Number of search results to return. The default value is 10. filter (str): - The filter syntax consists of an expression language for - constructing a predicate from one or more fields of the - documents being filtered. Filter expression is - case-sensitive. This will be used to filter search results - which may affect the Answer response. - - If this field is unrecognizable, an ``INVALID_ARGUMENT`` is - returned. - - Filtering in Vertex AI Search is done by mapping the LHS - filter key to a key property defined in the Vertex AI Search - backend -- this mapping is defined by the customer in their - schema. For example a media customers might have a field - 'name' in their schema. In this case the filter would look - like this: filter --> name:'ANY("king kong")' - - For more information about filtering including syntax and - filter operators, see - `Filter `__ + The filter syntax consists of an expression + language for constructing a predicate from one + or more fields of the documents being filtered. + Filter expression is case-sensitive. This will + be used to filter search results which may + affect the Answer response. + + If this field is unrecognizable, an + ``INVALID_ARGUMENT`` is returned. + + Filtering in Vertex AI Search is done by mapping + the LHS filter key to a key property defined in + the Vertex AI Search backend -- this mapping is + defined by the customer in their schema. For + example a media customers might have a field + 'name' in their schema. In this case the filter + would look like this: filter --> name:'ANY("king + kong")' + + For more information about filtering including + syntax and filter operators, see + `Filter + `__ boost_spec (google.cloud.discoveryengine_v1.types.SearchRequest.BoostSpec): - Boost specification to boost certain documents in search - results which may affect the answer query response. For more - information on boosting, see - `Boosting `__ + Boost specification to boost certain documents + in search results which may affect the answer + query response. For more information on + boosting, see `Boosting + `__ order_by (str): - The order in which documents are returned. Documents can be - ordered by a field in an - [Document][google.cloud.discoveryengine.v1.Document] object. - Leave it unset if ordered by relevance. ``order_by`` - expression is case-sensitive. For more information on - ordering, see - `Ordering `__ - - If this field is unrecognizable, an ``INVALID_ARGUMENT`` is - returned. + The order in which documents are returned. + Documents can be ordered by a field in an + `Document + `__ + object. Leave it unset if ordered by relevance. + ``order_by`` expression is case-sensitive. For + more information on ordering, see `Ordering + `__ + + If this field is unrecognizable, an + ``INVALID_ARGUMENT`` is returned. search_result_mode (google.cloud.discoveryengine_v1.types.SearchRequest.ContentSearchSpec.SearchResultMode): - Specifies the search result mode. If unspecified, the search - result mode defaults to ``DOCUMENTS``. See `parse and chunk - documents `__ + Specifies the search result mode. If + unspecified, the search result mode defaults to + ``DOCUMENTS``. See `parse and chunk + documents + `__ data_store_specs (MutableSequence[google.cloud.discoveryengine_v1.types.SearchRequest.DataStoreSpec]): Specs defining dataStores to filter on in a search call and configurations for those @@ -871,9 +928,11 @@ class UnstructuredDocumentInfo(proto.Message): extractive_segments (MutableSequence[google.cloud.discoveryengine_v1.types.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment]): List of extractive segments. extractive_answers (MutableSequence[google.cloud.discoveryengine_v1.types.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer]): - Deprecated: This field is deprecated and will have no effect - on the Answer generation. Please use document_contexts and - extractive_segments fields. List of extractive answers. + Deprecated: This field is deprecated and will + have no effect on the Answer generation. + Please use document_contexts and + extractive_segments fields. List of extractive + answers. """ class DocumentContext(proto.Message): @@ -898,9 +957,10 @@ class DocumentContext(proto.Message): class ExtractiveSegment(proto.Message): r"""Extractive segment. - `Guide `__ - Answer generation will only use it if document_contexts is empty. - This is supposed to be shorter snippets. + `Guide + `__ + Answer generation will only use it if document_contexts is + empty. This is supposed to be shorter snippets. Attributes: page_identifier (str): @@ -920,7 +980,8 @@ class ExtractiveSegment(proto.Message): class ExtractiveAnswer(proto.Message): r"""Extractive answer. - `Guide `__ + `Guide + `__ Attributes: page_identifier (str): @@ -1064,8 +1125,8 @@ class QueryUnderstandingSpec(proto.Message): query_rephraser_spec (google.cloud.discoveryengine_v1.types.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec): Query rephraser specification. disable_spell_correction (bool): - Optional. Whether to disable spell correction. The default - value is ``false``. + Optional. Whether to disable spell correction. + The default value is ``false``. """ class QueryClassificationSpec(proto.Message): @@ -1327,22 +1388,28 @@ class DocumentMetadata(proto.Message): class AnswerQueryResponse(proto.Message): r"""Response message for - [ConversationalSearchService.AnswerQuery][google.cloud.discoveryengine.v1.ConversationalSearchService.AnswerQuery] + `ConversationalSearchService.AnswerQuery + `__ method. Attributes: answer (google.cloud.discoveryengine_v1.types.Answer): - Answer resource object. If - [AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.max_rephrase_steps][google.cloud.discoveryengine.v1.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.max_rephrase_steps] + Answer resource object. + If + `AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.max_rephrase_steps + `__ is greater than 1, use - [Answer.name][google.cloud.discoveryengine.v1.Answer.name] + `Answer.name + `__ to fetch answer information using - [ConversationalSearchService.GetAnswer][google.cloud.discoveryengine.v1.ConversationalSearchService.GetAnswer] + `ConversationalSearchService.GetAnswer + `__ API. session (google.cloud.discoveryengine_v1.types.Session): - Session resource object. It will be only available when - session field is set and valid in the - [AnswerQueryRequest][google.cloud.discoveryengine.v1.AnswerQueryRequest] + Session resource object. + It will be only available when session field is + set and valid in the `AnswerQueryRequest + `__ request. answer_query_token (str): A global unique ID used for logging. @@ -1369,7 +1436,8 @@ class GetAnswerRequest(proto.Message): Attributes: name (str): - Required. The resource name of the Answer to get. Format: + Required. The resource name of the Answer to + get. Format: ``projects/{project}/locations/{location}/collections/{collection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`` """ @@ -1384,7 +1452,8 @@ class CreateSessionRequest(proto.Message): Attributes: parent (str): - Required. Full resource name of parent data store. Format: + Required. Full resource name of parent data + store. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`` session (google.cloud.discoveryengine_v1.types.Session): Required. The session to create. @@ -1409,12 +1478,15 @@ class UpdateSessionRequest(proto.Message): Required. The Session to update. update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided - [Session][google.cloud.discoveryengine.v1.Session] to + `Session + `__ to update. The following are NOT supported: - - [Session.name][google.cloud.discoveryengine.v1.Session.name] + * `Session.name + `__ - If not set or empty, all supported fields are updated. + If not set or empty, all supported fields are + updated. """ session: gcd_session.Session = proto.Field( @@ -1434,8 +1506,8 @@ class DeleteSessionRequest(proto.Message): Attributes: name (str): - Required. The resource name of the Session to delete. - Format: + Required. The resource name of the Session to + delete. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`` """ @@ -1450,7 +1522,8 @@ class GetSessionRequest(proto.Message): Attributes: name (str): - Required. The resource name of the Session to get. Format: + Required. The resource name of the Session to + get. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`` include_answer_details (bool): Optional. If set to true, the full session @@ -1479,40 +1552,51 @@ class ListSessionsRequest(proto.Message): unspecified, defaults to 50. Max allowed value is 1000. page_token (str): - A page token, received from a previous ``ListSessions`` - call. Provide this to retrieve the subsequent page. + A page token, received from a previous + ``ListSessions`` call. Provide this to retrieve + the subsequent page. filter (str): - A comma-separated list of fields to filter by, in EBNF - grammar. The supported fields are: - - - ``user_pseudo_id`` - - ``state`` - - ``display_name`` - - ``starred`` - - ``is_pinned`` - - ``labels`` - - ``create_time`` - - ``update_time`` - - Examples: "user_pseudo_id = some_id" "display_name = - "some_name"" "starred = true" "is_pinned=true AND (NOT - labels:hidden)" "create_time > "1970-01-01T12:00:00Z"". + A comma-separated list of fields to filter by, + in EBNF grammar. The supported fields are: + + * ``user_pseudo_id`` + * ``state`` + + * ``display_name`` + * ``starred`` + + * ``is_pinned`` + * ``labels`` + + * ``create_time`` + * ``update_time`` + + Examples: + + "user_pseudo_id = some_id" + "display_name = \"some_name\"" + "starred = true" + "is_pinned=true AND (NOT labels:hidden)" + "create_time > \"1970-01-01T12:00:00Z\"". order_by (str): - A comma-separated list of fields to order by, sorted in - ascending order. Use "desc" after a field name for - descending. Supported fields: + A comma-separated list of fields to order by, + sorted in ascending order. Use "desc" after a + field name for descending. Supported fields: - - ``update_time`` - - ``create_time`` - - ``session_name`` - - ``is_pinned`` + * ``update_time`` + * ``create_time`` + + * ``session_name`` + * ``is_pinned`` Example: - - "update_time desc" - - "create_time" - - "is_pinned desc,update_time desc": list sessions by - is_pinned first, then by update_time. + * "update_time desc" + * "create_time" + + * "is_pinned desc,update_time desc": list + sessions by is_pinned first, then by + update_time. """ parent: str = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/custom_tuning_model.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/custom_tuning_model.py index d4eacc8b57c8..e5c995df38f3 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/custom_tuning_model.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/custom_tuning_model.py @@ -33,20 +33,21 @@ class CustomTuningModel(proto.Message): Attributes: name (str): - Required. The fully qualified resource name of the model. - + Required. The fully qualified resource name of + the model. Format: + ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/customTuningModels/{custom_tuning_model}``. - Model must be an alpha-numerical string with limit of 40 - characters. + Model must be an alpha-numerical string with + limit of 40 characters. display_name (str): The display name of the model. model_version (int): The version of the model. model_state (google.cloud.discoveryengine_v1.types.CustomTuningModel.ModelState): - The state that the model is in (e.g.\ ``TRAINING`` or - ``TRAINING_FAILED``). + The state that the model is in (e.g.``TRAINING`` + or ``TRAINING_FAILED``). create_time (google.protobuf.timestamp_pb2.Timestamp): Deprecated: Timestamp the Model was created at. @@ -55,8 +56,8 @@ class CustomTuningModel(proto.Message): metrics (MutableMapping[str, float]): The metrics of the trained model. error_message (str): - Currently this is only populated if the model state is - ``INPUT_VALIDATION_FAILED``. + Currently this is only populated if the model + state is ``INPUT_VALIDATION_FAILED``. """ class ModelState(proto.Enum): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/data_store.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/data_store.py index 397e4dce92ba..2df1b69c48aa 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/data_store.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/data_store.py @@ -42,55 +42,59 @@ class DataStore(proto.Message): Attributes: name (str): - Immutable. Identifier. The full resource name of the data - store. Format: + Immutable. Identifier. The full resource name of + the data store. Format: + ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}``. - This field must be a UTF-8 encoded string with a length - limit of 1024 characters. + This field must be a UTF-8 encoded string with a + length limit of 1024 characters. display_name (str): Required. The data store display name. - This field must be a UTF-8 encoded string with a length - limit of 128 characters. Otherwise, an INVALID_ARGUMENT - error is returned. + This field must be a UTF-8 encoded string with a + length limit of 128 characters. Otherwise, an + INVALID_ARGUMENT error is returned. industry_vertical (google.cloud.discoveryengine_v1.types.IndustryVertical): Immutable. The industry vertical that the data store registers. solution_types (MutableSequence[google.cloud.discoveryengine_v1.types.SolutionType]): - The solutions that the data store enrolls. Available - solutions for each - [industry_vertical][google.cloud.discoveryengine.v1.DataStore.industry_vertical]: - - - ``MEDIA``: ``SOLUTION_TYPE_RECOMMENDATION`` and - ``SOLUTION_TYPE_SEARCH``. - - ``SITE_SEARCH``: ``SOLUTION_TYPE_SEARCH`` is automatically - enrolled. Other solutions cannot be enrolled. + The solutions that the data store enrolls. + Available solutions for each `industry_vertical + `__: + + * ``MEDIA``: ``SOLUTION_TYPE_RECOMMENDATION`` + and ``SOLUTION_TYPE_SEARCH``. * ``SITE_SEARCH``: + ``SOLUTION_TYPE_SEARCH`` is automatically + enrolled. Other solutions cannot be enrolled. default_schema_id (str): Output only. The id of the default - [Schema][google.cloud.discoveryengine.v1.Schema] associated - to this data store. + `Schema + `__ + associated to this data store. content_config (google.cloud.discoveryengine_v1.types.DataStore.ContentConfig): - Immutable. The content config of the data store. If this - field is unset, the server behavior defaults to - [ContentConfig.NO_CONTENT][google.cloud.discoveryengine.v1.DataStore.ContentConfig.NO_CONTENT]. + Immutable. The content config of the data store. + If this field is unset, the server behavior + defaults to `ContentConfig.NO_CONTENT + `__. create_time (google.protobuf.timestamp_pb2.Timestamp): Output only. Timestamp the - [DataStore][google.cloud.discoveryengine.v1.DataStore] was - created at. + `DataStore + `__ + was created at. advanced_site_search_config (google.cloud.discoveryengine_v1.types.AdvancedSiteSearchConfig): Optional. Configuration for advanced site search. kms_key_name (str): - Input only. The KMS key to be used to protect this DataStore - at creation time. + Input only. The KMS key to be used to protect + this DataStore at creation time. - Must be set for requests that need to comply with CMEK Org - Policy protections. + Must be set for requests that need to comply + with CMEK Org Policy protections. - If this field is set and processed successfully, the - DataStore will be protected by the KMS key, as indicated in - the cmek_config field. + If this field is set and processed successfully, + the DataStore will be protected by the KMS key, + as indicated in the cmek_config field. cmek_config (google.cloud.discoveryengine_v1.types.CmekConfig): Output only. CMEK-related information for the DataStore. @@ -99,58 +103,78 @@ class DataStore(proto.Message): billing. acl_enabled (bool): Immutable. Whether data in the - [DataStore][google.cloud.discoveryengine.v1.DataStore] has - ACL information. If set to ``true``, the source data must - have ACL. ACL will be ingested when data is ingested by - [DocumentService.ImportDocuments][google.cloud.discoveryengine.v1.DocumentService.ImportDocuments] + `DataStore + `__ + has ACL information. If set to ``true``, the + source data must have ACL. ACL will be ingested + when data is ingested by + `DocumentService.ImportDocuments + `__ methods. When ACL is enabled for the - [DataStore][google.cloud.discoveryengine.v1.DataStore], - [Document][google.cloud.discoveryengine.v1.Document] can't - be accessed by calling - [DocumentService.GetDocument][google.cloud.discoveryengine.v1.DocumentService.GetDocument] + `DataStore + `__, + `Document + `__ + can't be accessed by calling + `DocumentService.GetDocument + `__ or - [DocumentService.ListDocuments][google.cloud.discoveryengine.v1.DocumentService.ListDocuments]. + `DocumentService.ListDocuments + `__. - Currently ACL is only supported in ``GENERIC`` industry - vertical with non-``PUBLIC_WEBSITE`` content config. + Currently ACL is only supported in ``GENERIC`` + industry vertical with non-``PUBLIC_WEBSITE`` + content config. workspace_config (google.cloud.discoveryengine_v1.types.WorkspaceConfig): - Config to store data store type configuration for workspace - data. This must be set when - [DataStore.content_config][google.cloud.discoveryengine.v1.DataStore.content_config] + Config to store data store type configuration + for workspace data. This must be set when + `DataStore.content_config + `__ is set as - [DataStore.ContentConfig.GOOGLE_WORKSPACE][google.cloud.discoveryengine.v1.DataStore.ContentConfig.GOOGLE_WORKSPACE]. + `DataStore.ContentConfig.GOOGLE_WORKSPACE + `__. document_processing_config (google.cloud.discoveryengine_v1.types.DocumentProcessingConfig): Configuration for Document understanding and enrichment. starting_schema (google.cloud.discoveryengine_v1.types.Schema): The start schema to use for this - [DataStore][google.cloud.discoveryengine.v1.DataStore] when - provisioning it. If unset, a default vertical specialized - schema will be used. + `DataStore + `__ + when provisioning it. If unset, a default + vertical specialized schema will be used. This field is only used by - [CreateDataStore][google.cloud.discoveryengine.v1.DataStoreService.CreateDataStore] - API, and will be ignored if used in other APIs. This field - will be omitted from all API responses including - [CreateDataStore][google.cloud.discoveryengine.v1.DataStoreService.CreateDataStore] + `CreateDataStore + `__ + API, and will be ignored if used in other APIs. + This field will be omitted from all API + responses including + `CreateDataStore + `__ API. To retrieve a schema of a - [DataStore][google.cloud.discoveryengine.v1.DataStore], use - [SchemaService.GetSchema][google.cloud.discoveryengine.v1.SchemaService.GetSchema] + `DataStore + `__, + use `SchemaService.GetSchema + `__ API instead. - The provided schema will be validated against certain rules - on schema. Learn more from `this - doc `__. + The provided schema will be validated against + certain rules on schema. Learn more from `this + doc + `__. healthcare_fhir_config (google.cloud.discoveryengine_v1.types.HealthcareFhirConfig): - Optional. Configuration for ``HEALTHCARE_FHIR`` vertical. + Optional. Configuration for ``HEALTHCARE_FHIR`` + vertical. identity_mapping_store (str): - Immutable. The fully qualified resource name of the - associated - [IdentityMappingStore][google.cloud.discoveryengine.v1.IdentityMappingStore]. - This field can only be set for acl_enabled DataStores with - ``THIRD_PARTY`` or ``GSUITE`` IdP. Format: + Immutable. The fully qualified resource name of + the associated `IdentityMappingStore + `__. + This field can only be set for acl_enabled + DataStores with ``THIRD_PARTY`` or ``GSUITE`` + IdP. Format: + ``projects/{project}/locations/{location}/identityMappingStores/{identity_mapping_store}``. """ @@ -162,17 +186,20 @@ class ContentConfig(proto.Enum): Default value. NO_CONTENT (1): Only contains documents without any - [Document.content][google.cloud.discoveryengine.v1.Document.content]. + `Document.content + `__. CONTENT_REQUIRED (2): Only contains documents with - [Document.content][google.cloud.discoveryengine.v1.Document.content]. + `Document.content + `__. PUBLIC_WEBSITE (3): The data store is used for public website search. GOOGLE_WORKSPACE (4): - The data store is used for workspace search. Details of - workspace data store are specified in the - [WorkspaceConfig][google.cloud.discoveryengine.v1.WorkspaceConfig]. + The data store is used for workspace search. + Details of workspace data store are specified in + the `WorkspaceConfig + `__. """ CONTENT_CONFIG_UNSPECIFIED = 0 NO_CONTENT = 1 diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/data_store_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/data_store_service.py index 6415db9c91d7..9ad546117e91 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/data_store_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/data_store_service.py @@ -40,7 +40,8 @@ class CreateDataStoreRequest(proto.Message): r"""Request for - [DataStoreService.CreateDataStore][google.cloud.discoveryengine.v1.DataStoreService.CreateDataStore] + `DataStoreService.CreateDataStore + `__ method. This message has `oneof`_ fields (mutually exclusive fields). @@ -67,33 +68,40 @@ class CreateDataStoreRequest(proto.Message): Required. The parent resource name, such as ``projects/{project}/locations/{location}/collections/{collection}``. data_store (google.cloud.discoveryengine_v1.types.DataStore): - Required. The - [DataStore][google.cloud.discoveryengine.v1.DataStore] to - create. + Required. The `DataStore + `__ + to create. data_store_id (str): Required. The ID to use for the - [DataStore][google.cloud.discoveryengine.v1.DataStore], + `DataStore + `__, which will become the final component of the - [DataStore][google.cloud.discoveryengine.v1.DataStore]'s + `DataStore + `__'s resource name. - This field must conform to - `RFC-1034 `__ standard - with a length limit of 63 characters. Otherwise, an - INVALID_ARGUMENT error is returned. + This field must conform to `RFC-1034 + `__ + standard with a length limit of 63 characters. + Otherwise, an INVALID_ARGUMENT error is + returned. create_advanced_site_search (bool): - A boolean flag indicating whether user want to directly - create an advanced data store for site search. If the data - store is not configured as site search (GENERIC vertical and - PUBLIC_WEBSITE content_config), this flag will be ignored. + A boolean flag indicating whether user want to + directly create an advanced data store for site + search. If the data store is not configured as + site + search (GENERIC vertical and PUBLIC_WEBSITE + content_config), this flag will be ignored. skip_default_schema_creation (bool): - A boolean flag indicating whether to skip the default schema - creation for the data store. Only enable this flag if you - are certain that the default schema is incompatible with - your use case. + A boolean flag indicating whether to skip the + default schema creation for the data store. Only + enable this flag if you are certain that the + default schema is incompatible with your use + case. - If set to true, you must manually create a schema for the - data store before any documents can be ingested. + If set to true, you must manually create a + schema for the data store before any documents + can be ingested. This flag cannot be specified if ``data_store.starting_schema`` is specified. @@ -134,24 +142,27 @@ class CreateDataStoreRequest(proto.Message): class GetDataStoreRequest(proto.Message): r"""Request message for - [DataStoreService.GetDataStore][google.cloud.discoveryengine.v1.DataStoreService.GetDataStore] + `DataStoreService.GetDataStore + `__ method. Attributes: name (str): Required. Full resource name of - [DataStore][google.cloud.discoveryengine.v1.DataStore], such - as + `DataStore + `__, + such as ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}``. - If the caller does not have permission to access the - [DataStore][google.cloud.discoveryengine.v1.DataStore], - regardless of whether or not it exists, a PERMISSION_DENIED - error is returned. + If the caller does not have permission to access + the `DataStore + `__, + regardless of whether or not it exists, a + PERMISSION_DENIED error is returned. - If the requested - [DataStore][google.cloud.discoveryengine.v1.DataStore] does - not exist, a NOT_FOUND error is returned. + If the requested `DataStore + `__ + does not exist, a NOT_FOUND error is returned. """ name: str = proto.Field( @@ -162,7 +173,8 @@ class GetDataStoreRequest(proto.Message): class CreateDataStoreMetadata(proto.Message): r"""Metadata related to the progress of the - [DataStoreService.CreateDataStore][google.cloud.discoveryengine.v1.DataStoreService.CreateDataStore] + `DataStoreService.CreateDataStore + `__ operation. This will be returned by the google.longrunning.Operation.metadata field. @@ -188,39 +200,51 @@ class CreateDataStoreMetadata(proto.Message): class ListDataStoresRequest(proto.Message): r"""Request message for - [DataStoreService.ListDataStores][google.cloud.discoveryengine.v1.DataStoreService.ListDataStores] + `DataStoreService.ListDataStores + `__ method. Attributes: parent (str): - Required. The parent branch resource name, such as + Required. The parent branch resource name, such + as ``projects/{project}/locations/{location}/collections/{collection_id}``. If the caller does not have permission to list - [DataStore][google.cloud.discoveryengine.v1.DataStore]s - under this location, regardless of whether or not this data - store exists, a PERMISSION_DENIED error is returned. + `DataStore + `__s + under this location, regardless of whether or + not this data store exists, a PERMISSION_DENIED + error is returned. page_size (int): - Maximum number of - [DataStore][google.cloud.discoveryengine.v1.DataStore]s to - return. If unspecified, defaults to 10. The maximum allowed - value is 50. Values above 50 will be coerced to 50. - - If this field is negative, an INVALID_ARGUMENT is returned. + Maximum number of `DataStore + `__s + to return. If unspecified, defaults to 10. The + maximum allowed value is 50. Values above 50 + will be coerced to 50. + + If this field is negative, an INVALID_ARGUMENT + is returned. page_token (str): A page token - [ListDataStoresResponse.next_page_token][google.cloud.discoveryengine.v1.ListDataStoresResponse.next_page_token], + `ListDataStoresResponse.next_page_token + `__, received from a previous - [DataStoreService.ListDataStores][google.cloud.discoveryengine.v1.DataStoreService.ListDataStores] - call. Provide this to retrieve the subsequent page. - - When paginating, all other parameters provided to - [DataStoreService.ListDataStores][google.cloud.discoveryengine.v1.DataStoreService.ListDataStores] - must match the call that provided the page token. Otherwise, - an INVALID_ARGUMENT error is returned. + `DataStoreService.ListDataStores + `__ + call. Provide this to retrieve the subsequent + page. + + When paginating, all other parameters provided + to `DataStoreService.ListDataStores + `__ + must match the call that provided the page + token. Otherwise, an INVALID_ARGUMENT error is + returned. filter (str): - Filter by solution type . For example: - ``filter = 'solution_type:SOLUTION_TYPE_SEARCH'`` + Filter by solution type . + For example: ``filter = + 'solution_type:SOLUTION_TYPE_SEARCH'`` """ parent: str = proto.Field( @@ -243,18 +267,20 @@ class ListDataStoresRequest(proto.Message): class ListDataStoresResponse(proto.Message): r"""Response message for - [DataStoreService.ListDataStores][google.cloud.discoveryengine.v1.DataStoreService.ListDataStores] + `DataStoreService.ListDataStores + `__ method. Attributes: data_stores (MutableSequence[google.cloud.discoveryengine_v1.types.DataStore]): - All the customer's - [DataStore][google.cloud.discoveryengine.v1.DataStore]s. + All the customer's `DataStore + `__s. next_page_token (str): A token that can be sent as - [ListDataStoresRequest.page_token][google.cloud.discoveryengine.v1.ListDataStoresRequest.page_token] - to retrieve the next page. If this field is omitted, there - are no subsequent pages. + `ListDataStoresRequest.page_token + `__ + to retrieve the next page. If this field is + omitted, there are no subsequent pages. """ @property @@ -274,24 +300,28 @@ def raw_page(self): class DeleteDataStoreRequest(proto.Message): r"""Request message for - [DataStoreService.DeleteDataStore][google.cloud.discoveryengine.v1.DataStoreService.DeleteDataStore] + `DataStoreService.DeleteDataStore + `__ method. Attributes: name (str): Required. Full resource name of - [DataStore][google.cloud.discoveryengine.v1.DataStore], such - as + `DataStore + `__, + such as ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}``. - If the caller does not have permission to delete the - [DataStore][google.cloud.discoveryengine.v1.DataStore], - regardless of whether or not it exists, a PERMISSION_DENIED - error is returned. + If the caller does not have permission to delete + the `DataStore + `__, + regardless of whether or not it exists, a + PERMISSION_DENIED error is returned. - If the - [DataStore][google.cloud.discoveryengine.v1.DataStore] to - delete does not exist, a NOT_FOUND error is returned. + If the `DataStore + `__ + to delete does not exist, a NOT_FOUND error is + returned. """ name: str = proto.Field( @@ -302,30 +332,34 @@ class DeleteDataStoreRequest(proto.Message): class UpdateDataStoreRequest(proto.Message): r"""Request message for - [DataStoreService.UpdateDataStore][google.cloud.discoveryengine.v1.DataStoreService.UpdateDataStore] + `DataStoreService.UpdateDataStore + `__ method. Attributes: data_store (google.cloud.discoveryengine_v1.types.DataStore): - Required. The - [DataStore][google.cloud.discoveryengine.v1.DataStore] to - update. - - If the caller does not have permission to update the - [DataStore][google.cloud.discoveryengine.v1.DataStore], - regardless of whether or not it exists, a PERMISSION_DENIED - error is returned. - - If the - [DataStore][google.cloud.discoveryengine.v1.DataStore] to - update does not exist, a NOT_FOUND error is returned. + Required. The `DataStore + `__ + to update. + + If the caller does not have permission to update + the `DataStore + `__, + regardless of whether or not it exists, a + PERMISSION_DENIED error is returned. + + If the `DataStore + `__ + to update does not exist, a NOT_FOUND error is + returned. update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided - [DataStore][google.cloud.discoveryengine.v1.DataStore] to - update. + `DataStore + `__ + to update. - If an unsupported or unknown field is provided, an - INVALID_ARGUMENT error is returned. + If an unsupported or unknown field is provided, + an INVALID_ARGUMENT error is returned. """ data_store: gcd_data_store.DataStore = proto.Field( @@ -342,7 +376,8 @@ class UpdateDataStoreRequest(proto.Message): class DeleteDataStoreMetadata(proto.Message): r"""Metadata related to the progress of the - [DataStoreService.DeleteDataStore][google.cloud.discoveryengine.v1.DataStoreService.DeleteDataStore] + `DataStoreService.DeleteDataStore + `__ operation. This will be returned by the google.longrunning.Operation.metadata field. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/document.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/document.py index aa775043afc9..d0b88ee4bc58 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/document.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/document.py @@ -45,66 +45,73 @@ class Document(proto.Message): Attributes: struct_data (google.protobuf.struct_pb2.Struct): - The structured JSON data for the document. It should conform - to the registered - [Schema][google.cloud.discoveryengine.v1.Schema] or an - ``INVALID_ARGUMENT`` error is thrown. + The structured JSON data for the document. It + should conform to the registered `Schema + `__ or + an ``INVALID_ARGUMENT`` error is thrown. This field is a member of `oneof`_ ``data``. json_data (str): - The JSON string representation of the document. It should - conform to the registered - [Schema][google.cloud.discoveryengine.v1.Schema] or an - ``INVALID_ARGUMENT`` error is thrown. + The JSON string representation of the document. + It should conform to the registered `Schema + `__ or + an ``INVALID_ARGUMENT`` error is thrown. This field is a member of `oneof`_ ``data``. name (str): - Immutable. The full resource name of the document. Format: + Immutable. The full resource name of the + document. Format: + ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}``. - This field must be a UTF-8 encoded string with a length - limit of 1024 characters. + This field must be a UTF-8 encoded string with a + length limit of 1024 characters. id (str): Immutable. The identifier of the document. - Id should conform to - `RFC-1034 `__ standard - with a length limit of 128 characters. + Id should conform to `RFC-1034 + `__ + standard with a length limit of 128 characters. schema_id (str): The identifier of the schema located in the same data store. content (google.cloud.discoveryengine_v1.types.Document.Content): - The unstructured data linked to this document. Content can - only be set and must be set if this document is under a - ``CONTENT_REQUIRED`` data store. + The unstructured data linked to this document. + Content can only be set and must be set if this + document is under a ``CONTENT_REQUIRED`` data + store. parent_document_id (str): - The identifier of the parent document. Currently supports at - most two level document hierarchy. + The identifier of the parent document. Currently + supports at most two level document hierarchy. - Id should conform to - `RFC-1034 `__ standard - with a length limit of 63 characters. + Id should conform to `RFC-1034 + `__ + standard with a length limit of 63 characters. derived_struct_data (google.protobuf.struct_pb2.Struct): - Output only. This field is OUTPUT_ONLY. It contains derived - data that are not in the original input document. + Output only. This field is OUTPUT_ONLY. + It contains derived data that are not in the + original input document. acl_info (google.cloud.discoveryengine_v1.types.Document.AclInfo): Access control information for the document. index_time (google.protobuf.timestamp_pb2.Timestamp): - Output only. The last time the document was indexed. If this - field is set, the document could be returned in search - results. + Output only. The last time the document was + indexed. If this field is set, the document + could be returned in search results. - This field is OUTPUT_ONLY. If this field is not populated, - it means the document has never been indexed. + This field is OUTPUT_ONLY. If this field is not + populated, it means the document has never been + indexed. index_status (google.cloud.discoveryengine_v1.types.Document.IndexStatus): Output only. The index status of the document. - - If document is indexed successfully, the index_time field - is populated. - - Otherwise, if document is not indexed due to errors, the - error_samples field is populated. - - Otherwise, if document's index is in progress, the - pending_message field is populated. + * If document is indexed successfully, the + index_time field is populated. + + * Otherwise, if document is not indexed due to + errors, the error_samples field is populated. + + * Otherwise, if document's index is in progress, + the pending_message field is populated. """ class Content(proto.Message): @@ -119,49 +126,62 @@ class Content(proto.Message): Attributes: raw_bytes (bytes): - The content represented as a stream of bytes. The maximum - length is 1,000,000 bytes (1 MB / ~0.95 MiB). - - Note: As with all ``bytes`` fields, this field is - represented as pure binary in Protocol Buffers and - base64-encoded string in JSON. For example, - ``abc123!?$*&()'-=@~`` should be represented as - ``YWJjMTIzIT8kKiYoKSctPUB+`` in JSON. See + The content represented as a stream of bytes. + The maximum length is 1,000,000 bytes (1 MB / + ~0.95 MiB). + + Note: As with all ``bytes`` fields, this field + is represented as pure binary in Protocol + Buffers and base64-encoded string in JSON. For + example, ``abc123!?$*&()'-=@~`` should be + represented as ``YWJjMTIzIT8kKiYoKSctPUB+`` in + JSON. See https://developers.google.com/protocol-buffers/docs/proto3#json. This field is a member of `oneof`_ ``content``. uri (str): - The URI of the content. Only Cloud Storage URIs (e.g. - ``gs://bucket-name/path/to/file``) are supported. The - maximum file size is 2.5 MB for text-based formats, 200 MB - for other formats. + The URI of the content. Only Cloud Storage URIs + (e.g. ``gs://bucket-name/path/to/file``) are + supported. The maximum file size is 2.5 MB for + text-based formats, 200 MB for other formats. This field is a member of `oneof`_ ``content``. mime_type (str): The MIME type of the content. Supported types: - - ``application/pdf`` (PDF, only native PDFs are supported - for now) - - ``text/html`` (HTML) - - ``text/plain`` (TXT) - - ``application/xml`` or ``text/xml`` (XML) - - ``application/json`` (JSON) - - ``application/vnd.openxmlformats-officedocument.wordprocessingml.document`` - (DOCX) - - ``application/vnd.openxmlformats-officedocument.presentationml.presentation`` - (PPTX) - - ``application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`` - (XLSX) - - ``application/vnd.ms-excel.sheet.macroenabled.12`` (XLSM) - - The following types are supported only if layout parser is - enabled in the data store: - - - ``image/bmp`` (BMP) - - ``image/gif`` (GIF) - - ``image/jpeg`` (JPEG) - - ``image/png`` (PNG) - - ``image/tiff`` (TIFF) + * ``application/pdf`` (PDF, only native PDFs are + supported for now) + + * ``text/html`` (HTML) + * ``text/plain`` (TXT) + + * ``application/xml`` or ``text/xml`` (XML) + * ``application/json`` (JSON) + + * + ``application/vnd.openxmlformats-officedocument.wordprocessingml.document`` + (DOCX) * + ``application/vnd.openxmlformats-officedocument.presentationml.presentation`` + (PPTX) + + * + ``application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`` + (XLSX) + + * + ``application/vnd.ms-excel.sheet.macroenabled.12`` + (XLSM) + + The following types are supported only if layout + parser is enabled in the data store: + + * ``image/bmp`` (BMP) + * ``image/gif`` (GIF) + + * ``image/jpeg`` (JPEG) + * ``image/png`` (PNG) + + * ``image/tiff`` (TIFF) See https://www.iana.org/assignments/media-types/media-types.xhtml. @@ -198,16 +218,59 @@ class AccessRestriction(proto.Message): Document Hierarchy - Space_S --> Page_P. - Readers: Space_S: group_1, user_1 Page_P: group_2, group_3, user_2 - - Space_S ACL Restriction - { "acl_info": { "readers": [ { - "principals": [ { "group_id": "group_1" }, { "user_id": "user_1" } ] - } ] } } - - Page_P ACL Restriction. { "acl_info": { "readers": [ { "principals": - [ { "group_id": "group_2" }, { "group_id": "group_3" }, { "user_id": - "user_2" } ], }, { "principals": [ { "group_id": "group_1" }, { - "user_id": "user_1" } ], } ] } } + Readers: + + Space_S: group_1, user_1 + Page_P: group_2, group_3, user_2 + + Space_S ACL Restriction - + { + "acl_info": { + "readers": [ + { + "principals": [ + { + "group_id": "group_1" + }, + { + "user_id": "user_1" + } + ] + } + ] + } + } + + Page_P ACL Restriction. + { + "acl_info": { + "readers": [ + { + "principals": [ + { + "group_id": "group_2" + }, + { + "group_id": "group_3" + }, + { + "user_id": "user_2" + } + ], + }, + { + "principals": [ + { + "group_id": "group_1" + }, + { + "user_id": "user_1" + } + ], + } + ] + } + } Attributes: principals (MutableSequence[google.cloud.discoveryengine_v1.types.Principal]): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/document_processing_config.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/document_processing_config.py index 319afeb26b8d..5b2e162074b3 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/document_processing_config.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/document_processing_config.py @@ -29,17 +29,19 @@ class DocumentProcessingConfig(proto.Message): r"""A singleton resource of - [DataStore][google.cloud.discoveryengine.v1.DataStore]. If it's - empty when [DataStore][google.cloud.discoveryengine.v1.DataStore] is - created and [DataStore][google.cloud.discoveryengine.v1.DataStore] - is set to - [DataStore.ContentConfig.CONTENT_REQUIRED][google.cloud.discoveryengine.v1.DataStore.ContentConfig.CONTENT_REQUIRED], + `DataStore `__. If + it's empty when `DataStore + `__ is created and + `DataStore `__ is set + to `DataStore.ContentConfig.CONTENT_REQUIRED + `__, the default parser will default to digital parser. Attributes: name (str): - The full resource name of the Document Processing Config. - Format: + The full resource name of the Document + Processing Config. Format: + ``projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig``. chunking_config (google.cloud.discoveryengine_v1.types.DocumentProcessingConfig.ChunkingConfig): Whether chunking mode is enabled. @@ -50,22 +52,33 @@ class DocumentProcessingConfig(proto.Message): parsing config will be applied to all file types for Document parsing. parsing_config_overrides (MutableMapping[str, google.cloud.discoveryengine_v1.types.DocumentProcessingConfig.ParsingConfig]): - Map from file type to override the default parsing - configuration based on the file type. Supported keys: - - - ``pdf``: Override parsing config for PDF files, either - digital parsing, ocr parsing or layout parsing is - supported. - - ``html``: Override parsing config for HTML files, only - digital parsing and layout parsing are supported. - - ``docx``: Override parsing config for DOCX files, only - digital parsing and layout parsing are supported. - - ``pptx``: Override parsing config for PPTX files, only - digital parsing and layout parsing are supported. - - ``xlsm``: Override parsing config for XLSM files, only - digital parsing and layout parsing are supported. - - ``xlsx``: Override parsing config for XLSX files, only - digital parsing and layout parsing are supported. + Map from file type to override the default + parsing configuration based on the file type. + Supported keys: + + * ``pdf``: Override parsing config for PDF + files, either digital parsing, ocr parsing or + layout parsing is supported. + + * ``html``: Override parsing config for HTML + files, only digital parsing and layout parsing + are supported. + + * ``docx``: Override parsing config for DOCX + files, only digital parsing and layout parsing + are supported. + + * ``pptx``: Override parsing config for PPTX + files, only digital parsing and layout parsing + are supported. + + * ``xlsm``: Override parsing config for XLSM + files, only digital parsing and layout parsing + are supported. + + * ``xlsx``: Override parsing config for XLSX + files, only digital parsing and layout parsing + are supported. """ class ChunkingConfig(proto.Message): @@ -148,8 +161,9 @@ class OcrParsingConfig(proto.Message): Attributes: enhanced_document_elements (MutableSequence[str]): - [DEPRECATED] This field is deprecated. To use the additional - enhanced document elements processing, please switch to + [DEPRECATED] This field is deprecated. To use + the additional enhanced document elements + processing, please switch to ``layout_parsing_config``. use_native_text (bool): If true, will use native text instead of OCR @@ -176,10 +190,10 @@ class LayoutParsingConfig(proto.Message): Optional. If true, the LLM based annotation is added to the image during parsing. structured_content_types (MutableSequence[str]): - Optional. Contains the required structure types to extract - from the document. Supported values: + Optional. Contains the required structure types + to extract from the document. Supported values: - - ``shareholder-structure`` + * ``shareholder-structure`` exclude_html_elements (MutableSequence[str]): Optional. List of HTML elements to exclude from the parsed content. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/document_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/document_service.py index 6a4718de16f0..d9edd210c506 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/document_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/document_service.py @@ -40,24 +40,28 @@ class GetDocumentRequest(proto.Message): r"""Request message for - [DocumentService.GetDocument][google.cloud.discoveryengine.v1.DocumentService.GetDocument] + `DocumentService.GetDocument + `__ method. Attributes: name (str): Required. Full resource name of - [Document][google.cloud.discoveryengine.v1.Document], such - as + `Document + `__, + such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}``. - If the caller does not have permission to access the - [Document][google.cloud.discoveryengine.v1.Document], + If the caller does not have permission to access + the `Document + `__, regardless of whether or not it exists, a ``PERMISSION_DENIED`` error is returned. - If the requested - [Document][google.cloud.discoveryengine.v1.Document] does - not exist, a ``NOT_FOUND`` error is returned. + If the requested `Document + `__ + does not exist, a ``NOT_FOUND`` error is + returned. """ name: str = proto.Field( @@ -68,39 +72,49 @@ class GetDocumentRequest(proto.Message): class ListDocumentsRequest(proto.Message): r"""Request message for - [DocumentService.ListDocuments][google.cloud.discoveryengine.v1.DocumentService.ListDocuments] + `DocumentService.ListDocuments + `__ method. Attributes: parent (str): - Required. The parent branch resource name, such as + Required. The parent branch resource name, such + as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}``. - Use ``default_branch`` as the branch ID, to list documents - under the default branch. + Use ``default_branch`` as the branch ID, to list + documents under the default branch. If the caller does not have permission to list - [Document][google.cloud.discoveryengine.v1.Document]s under - this branch, regardless of whether or not this branch - exists, a ``PERMISSION_DENIED`` error is returned. + `Document + `__s + under this branch, regardless of whether or not + this branch exists, a ``PERMISSION_DENIED`` + error is returned. page_size (int): - Maximum number of - [Document][google.cloud.discoveryengine.v1.Document]s to - return. If unspecified, defaults to 100. The maximum allowed - value is 1000. Values above 1000 are set to 1000. + Maximum number of `Document + `__s + to return. If unspecified, defaults to 100. The + maximum allowed value is 1000. Values above 1000 + are set to 1000. - If this field is negative, an ``INVALID_ARGUMENT`` error is - returned. + If this field is negative, an + ``INVALID_ARGUMENT`` error is returned. page_token (str): A page token - [ListDocumentsResponse.next_page_token][google.cloud.discoveryengine.v1.ListDocumentsResponse.next_page_token], + `ListDocumentsResponse.next_page_token + `__, received from a previous - [DocumentService.ListDocuments][google.cloud.discoveryengine.v1.DocumentService.ListDocuments] - call. Provide this to retrieve the subsequent page. - - When paginating, all other parameters provided to - [DocumentService.ListDocuments][google.cloud.discoveryengine.v1.DocumentService.ListDocuments] - must match the call that provided the page token. Otherwise, - an ``INVALID_ARGUMENT`` error is returned. + `DocumentService.ListDocuments + `__ + call. Provide this to retrieve the subsequent + page. + + When paginating, all other parameters provided + to `DocumentService.ListDocuments + `__ + must match the call that provided the page + token. Otherwise, an ``INVALID_ARGUMENT`` error + is returned. """ parent: str = proto.Field( @@ -119,17 +133,20 @@ class ListDocumentsRequest(proto.Message): class ListDocumentsResponse(proto.Message): r"""Response message for - [DocumentService.ListDocuments][google.cloud.discoveryengine.v1.DocumentService.ListDocuments] + `DocumentService.ListDocuments + `__ method. Attributes: documents (MutableSequence[google.cloud.discoveryengine_v1.types.Document]): - The [Document][google.cloud.discoveryengine.v1.Document]s. + The `Document + `__s. next_page_token (str): A token that can be sent as - [ListDocumentsRequest.page_token][google.cloud.discoveryengine.v1.ListDocumentsRequest.page_token] - to retrieve the next page. If this field is omitted, there - are no subsequent pages. + `ListDocumentsRequest.page_token + `__ + to retrieve the next page. If this field is + omitted, there are no subsequent pages. """ @property @@ -149,7 +166,8 @@ def raw_page(self): class CreateDocumentRequest(proto.Message): r"""Request message for - [DocumentService.CreateDocument][google.cloud.discoveryengine.v1.DocumentService.CreateDocument] + `DocumentService.CreateDocument + `__ method. Attributes: @@ -157,30 +175,36 @@ class CreateDocumentRequest(proto.Message): Required. The parent resource name, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}``. document (google.cloud.discoveryengine_v1.types.Document): - Required. The - [Document][google.cloud.discoveryengine.v1.Document] to + Required. The `Document + `__ to create. document_id (str): Required. The ID to use for the - [Document][google.cloud.discoveryengine.v1.Document], which - becomes the final component of the - [Document.name][google.cloud.discoveryengine.v1.Document.name]. - - If the caller does not have permission to create the - [Document][google.cloud.discoveryengine.v1.Document], + `Document + `__, + which becomes the final component of the + `Document.name + `__. + + If the caller does not have permission to create + the `Document + `__, regardless of whether or not it exists, a ``PERMISSION_DENIED`` error is returned. This field must be unique among all - [Document][google.cloud.discoveryengine.v1.Document]s with - the same - [parent][google.cloud.discoveryengine.v1.CreateDocumentRequest.parent]. - Otherwise, an ``ALREADY_EXISTS`` error is returned. - - This field must conform to - `RFC-1034 `__ standard - with a length limit of 128 characters. Otherwise, an - ``INVALID_ARGUMENT`` error is returned. + `Document + `__s + with the same `parent + `__. + Otherwise, an ``ALREADY_EXISTS`` error is + returned. + + This field must conform to `RFC-1034 + `__ + standard with a length limit of 128 characters. + Otherwise, an ``INVALID_ARGUMENT`` error is + returned. """ parent: str = proto.Field( @@ -200,28 +224,33 @@ class CreateDocumentRequest(proto.Message): class UpdateDocumentRequest(proto.Message): r"""Request message for - [DocumentService.UpdateDocument][google.cloud.discoveryengine.v1.DocumentService.UpdateDocument] + `DocumentService.UpdateDocument + `__ method. Attributes: document (google.cloud.discoveryengine_v1.types.Document): Required. The document to update/create. - If the caller does not have permission to update the - [Document][google.cloud.discoveryengine.v1.Document], + If the caller does not have permission to update + the `Document + `__, regardless of whether or not it exists, a ``PERMISSION_DENIED`` error is returned. - If the [Document][google.cloud.discoveryengine.v1.Document] - to update does not exist and - [allow_missing][google.cloud.discoveryengine.v1.UpdateDocumentRequest.allow_missing] + If the `Document + `__ to + update does not exist and + `allow_missing + `__ is not set, a ``NOT_FOUND`` error is returned. allow_missing (bool): If set to ``true`` and the - [Document][google.cloud.discoveryengine.v1.Document] is not - found, a new - [Document][google.cloud.discoveryengine.v1.Document] is be - created. + `Document + `__ is + not found, a new `Document + `__ is + be created. update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided imported 'document' to update. If not set, by @@ -246,23 +275,28 @@ class UpdateDocumentRequest(proto.Message): class DeleteDocumentRequest(proto.Message): r"""Request message for - [DocumentService.DeleteDocument][google.cloud.discoveryengine.v1.DocumentService.DeleteDocument] + `DocumentService.DeleteDocument + `__ method. Attributes: name (str): Required. Full resource name of - [Document][google.cloud.discoveryengine.v1.Document], such - as + `Document + `__, + such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}``. - If the caller does not have permission to delete the - [Document][google.cloud.discoveryengine.v1.Document], + If the caller does not have permission to delete + the `Document + `__, regardless of whether or not it exists, a ``PERMISSION_DENIED`` error is returned. - If the [Document][google.cloud.discoveryengine.v1.Document] - to delete does not exist, a ``NOT_FOUND`` error is returned. + If the `Document + `__ to + delete does not exist, a ``NOT_FOUND`` error is + returned. """ name: str = proto.Field( @@ -273,21 +307,24 @@ class DeleteDocumentRequest(proto.Message): class BatchGetDocumentsMetadataRequest(proto.Message): r"""Request message for - [DocumentService.BatchGetDocumentsMetadata][google.cloud.discoveryengine.v1.DocumentService.BatchGetDocumentsMetadata] + `DocumentService.BatchGetDocumentsMetadata + `__ method. Attributes: parent (str): - Required. The parent branch resource name, such as + Required. The parent branch resource name, such + as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}``. matcher (google.cloud.discoveryengine_v1.types.BatchGetDocumentsMetadataRequest.Matcher): Required. Matcher for the - [Document][google.cloud.discoveryengine.v1.Document]s. + `Document + `__s. """ class UrisMatcher(proto.Message): - r"""Matcher for the - [Document][google.cloud.discoveryengine.v1.Document]s by exact uris. + r"""Matcher for the `Document + `__s by exact uris. Attributes: uris (MutableSequence[str]): @@ -300,13 +337,15 @@ class UrisMatcher(proto.Message): ) class FhirMatcher(proto.Message): - r"""Matcher for the - [Document][google.cloud.discoveryengine.v1.Document]s by FHIR - resource names. + r"""Matcher for the `Document + `__s by FHIR resource + names. Attributes: fhir_resources (MutableSequence[str]): - Required. The FHIR resources to match by. Format: + Required. The FHIR resources to match by. + Format: + projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}/fhir/{resource_type}/{fhir_resource_id} """ @@ -316,8 +355,8 @@ class FhirMatcher(proto.Message): ) class Matcher(proto.Message): - r"""Matcher for the - [Document][google.cloud.discoveryengine.v1.Document]s. Currently + r"""Matcher for the `Document + `__s. Currently supports matching by exact URIs. This message has `oneof`_ fields (mutually exclusive fields). @@ -364,31 +403,36 @@ class Matcher(proto.Message): class BatchGetDocumentsMetadataResponse(proto.Message): r"""Response message for - [DocumentService.BatchGetDocumentsMetadata][google.cloud.discoveryengine.v1.DocumentService.BatchGetDocumentsMetadata] + `DocumentService.BatchGetDocumentsMetadata + `__ method. Attributes: documents_metadata (MutableSequence[google.cloud.discoveryengine_v1.types.BatchGetDocumentsMetadataResponse.DocumentMetadata]): - The metadata of the - [Document][google.cloud.discoveryengine.v1.Document]s. + The metadata of the `Document + `__s. """ class State(proto.Enum): - r"""The state of the - [Document][google.cloud.discoveryengine.v1.Document]. + r"""The state of the `Document + `__. Values: STATE_UNSPECIFIED (0): Should never be set. INDEXED (1): - The [Document][google.cloud.discoveryengine.v1.Document] is + The `Document + `__ is indexed. NOT_IN_TARGET_SITE (2): - The [Document][google.cloud.discoveryengine.v1.Document] is + The `Document + `__ is not indexed because its URI is not in the - [TargetSite][google.cloud.discoveryengine.v1.TargetSite]. + `TargetSite + `__. NOT_IN_INDEX (3): - The [Document][google.cloud.discoveryengine.v1.Document] is + The `Document + `__ is not indexed. """ STATE_UNSPECIFIED = 0 @@ -397,34 +441,36 @@ class State(proto.Enum): NOT_IN_INDEX = 3 class DocumentMetadata(proto.Message): - r"""The metadata of a - [Document][google.cloud.discoveryengine.v1.Document]. + r"""The metadata of a `Document + `__. Attributes: matcher_value (google.cloud.discoveryengine_v1.types.BatchGetDocumentsMetadataResponse.DocumentMetadata.MatcherValue): - The value of the matcher that was used to match the - [Document][google.cloud.discoveryengine.v1.Document]. + The value of the matcher that was used to match + the `Document + `__. state (google.cloud.discoveryengine_v1.types.BatchGetDocumentsMetadataResponse.State): The state of the document. last_refreshed_time (google.protobuf.timestamp_pb2.Timestamp): The timestamp of the last time the - [Document][google.cloud.discoveryengine.v1.Document] was - last indexed. + `Document + `__ + was last indexed. data_ingestion_source (str): The data ingestion source of the - [Document][google.cloud.discoveryengine.v1.Document]. + `Document + `__. Allowed values are: - - ``batch``: Data ingested via Batch API, e.g., - ImportDocuments. - - ``streaming`` Data ingested via Streaming API, e.g., FHIR - streaming. + * ``batch``: Data ingested via Batch API, e.g., + ImportDocuments. * ``streaming`` Data ingested + via Streaming API, e.g., FHIR streaming. """ class MatcherValue(proto.Message): r"""The value of the matcher that was used to match the - [Document][google.cloud.discoveryengine.v1.Document]. + `Document `__. This message has `oneof`_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. @@ -436,11 +482,13 @@ class MatcherValue(proto.Message): Attributes: uri (str): If match by URI, the URI of the - [Document][google.cloud.discoveryengine.v1.Document]. + `Document + `__. This field is a member of `oneof`_ ``matcher_value``. fhir_resource (str): Format: + projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}/fhir/{resource_type}/{fhir_resource_id} This field is a member of `oneof`_ ``matcher_value``. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/engine.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/engine.py index 6269a62ef070..1da567b08cd2 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/engine.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/engine.py @@ -31,8 +31,8 @@ class Engine(proto.Message): - r"""Metadata that describes the training and serving parameters of an - [Engine][google.cloud.discoveryengine.v1.Engine]. + r"""Metadata that describes the training and serving parameters of + an `Engine `__. This message has `oneof`_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. @@ -43,49 +43,56 @@ class Engine(proto.Message): Attributes: chat_engine_config (google.cloud.discoveryengine_v1.types.Engine.ChatEngineConfig): - Configurations for the Chat Engine. Only applicable if - [solution_type][google.cloud.discoveryengine.v1.Engine.solution_type] - is - [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1.SolutionType.SOLUTION_TYPE_CHAT]. + Configurations for the Chat Engine. Only + applicable if `solution_type + `__ + is `SOLUTION_TYPE_CHAT + `__. This field is a member of `oneof`_ ``engine_config``. search_engine_config (google.cloud.discoveryengine_v1.types.Engine.SearchEngineConfig): - Configurations for the Search Engine. Only applicable if - [solution_type][google.cloud.discoveryengine.v1.Engine.solution_type] - is - [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1.SolutionType.SOLUTION_TYPE_SEARCH]. + Configurations for the Search Engine. Only + applicable if `solution_type + `__ + is `SOLUTION_TYPE_SEARCH + `__. This field is a member of `oneof`_ ``engine_config``. media_recommendation_engine_config (google.cloud.discoveryengine_v1.types.Engine.MediaRecommendationEngineConfig): - Configurations for the Media Engine. Only applicable on the - data stores with - [solution_type][google.cloud.discoveryengine.v1.Engine.solution_type] - [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1.SolutionType.SOLUTION_TYPE_RECOMMENDATION] + Configurations for the Media Engine. Only + applicable on the data stores with + `solution_type + `__ + `SOLUTION_TYPE_RECOMMENDATION + `__ and - [IndustryVertical.MEDIA][google.cloud.discoveryengine.v1.IndustryVertical.MEDIA] + `IndustryVertical.MEDIA + `__ vertical. This field is a member of `oneof`_ ``engine_config``. chat_engine_metadata (google.cloud.discoveryengine_v1.types.Engine.ChatEngineMetadata): - Output only. Additional information of the Chat Engine. Only - applicable if - [solution_type][google.cloud.discoveryengine.v1.Engine.solution_type] + Output only. Additional information of the Chat + Engine. Only applicable if `solution_type + `__ is - [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1.SolutionType.SOLUTION_TYPE_CHAT]. + `SOLUTION_TYPE_CHAT + `__. This field is a member of `oneof`_ ``engine_metadata``. name (str): - Immutable. Identifier. The fully qualified resource name of - the engine. - - This field must be a UTF-8 encoded string with a length - limit of 1024 characters. + Immutable. Identifier. The fully qualified + resource name of the engine. + This field must be a UTF-8 encoded string with a + length limit of 1024 characters. Format: + ``projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`` - engine should be 1-63 characters, and valid characters are - /[a-z0-9][a-z0-9-\_]*/. Otherwise, an INVALID_ARGUMENT error - is returned. + engine should be 1-63 characters, and valid + characters are /`a-z0-9 `__*/. + Otherwise, an INVALID_ARGUMENT error is + returned. display_name (str): Required. The display name of the engine. Should be human readable. UTF-8 encoded string @@ -97,37 +104,41 @@ class Engine(proto.Message): Output only. Timestamp the Recommendation Engine was last updated. data_store_ids (MutableSequence[str]): - Optional. The data stores associated with this engine. - + Optional. The data stores associated with this + engine. For - [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1.SolutionType.SOLUTION_TYPE_SEARCH] + `SOLUTION_TYPE_SEARCH + `__ and - [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1.SolutionType.SOLUTION_TYPE_RECOMMENDATION] - type of engines, they can only associate with at most one - data store. - - If - [solution_type][google.cloud.discoveryengine.v1.Engine.solution_type] - is - [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1.SolutionType.SOLUTION_TYPE_CHAT], - multiple - [DataStore][google.cloud.discoveryengine.v1.DataStore]s in - the same - [Collection][google.cloud.discoveryengine.v1.Collection] can - be associated here. + `SOLUTION_TYPE_RECOMMENDATION + `__ + type of engines, they can only associate with at + most one data store. + + If `solution_type + `__ + is `SOLUTION_TYPE_CHAT + `__, + multiple `DataStore + `__s + in the same `Collection + `__ + can be associated here. Note that when used in - [CreateEngineRequest][google.cloud.discoveryengine.v1.CreateEngineRequest], - one DataStore id must be provided as the system will use it - for necessary initializations. + `CreateEngineRequest + `__, + one DataStore id must be provided as the system + will use it for necessary initializations. solution_type (google.cloud.discoveryengine_v1.types.SolutionType): Required. The solutions of the engine. industry_vertical (google.cloud.discoveryengine_v1.types.IndustryVertical): - Optional. The industry vertical that the engine registers. - The restriction of the Engine industry vertical is based on - [DataStore][google.cloud.discoveryengine.v1.DataStore]: - Vertical on Engine has to match vertical of the DataStore - linked to the engine. + Optional. The industry vertical that the engine + registers. The restriction of the Engine + industry vertical is based on `DataStore + `__: + Vertical on Engine has to match vertical of the + DataStore linked to the engine. common_config (google.cloud.discoveryengine_v1.types.Engine.CommonConfig): Common config spec that specifies the metadata of the engine. @@ -143,11 +154,13 @@ class SearchEngineConfig(proto.Message): search_tier (google.cloud.discoveryengine_v1.types.SearchTier): The search feature tier of this engine. - Different tiers might have different pricing. To learn more, - check the pricing documentation. + Different tiers might have different + pricing. To learn more, check the pricing + documentation. Defaults to - [SearchTier.SEARCH_TIER_STANDARD][google.cloud.discoveryengine.v1.SearchTier.SEARCH_TIER_STANDARD] + `SearchTier.SEARCH_TIER_STANDARD + `__ if not specified. search_add_ons (MutableSequence[google.cloud.discoveryengine_v1.types.SearchAddOn]): The add-on that this search engine enables. @@ -169,51 +182,60 @@ class MediaRecommendationEngineConfig(proto.Message): Attributes: type_ (str): - Required. The type of engine. e.g., ``recommended-for-you``. - + Required. The type of engine. e.g., + ``recommended-for-you``. This field together with - [optimization_objective][google.cloud.discoveryengine.v1.Engine.MediaRecommendationEngineConfig.optimization_objective] - describe engine metadata to use to control engine training - and serving. + `optimization_objective + `__ + describe engine metadata to use to control + engine training and serving. - Currently supported values: ``recommended-for-you``, + Currently supported values: + ``recommended-for-you``, ``others-you-may-like``, ``more-like-this``, ``most-popular-items``. optimization_objective (str): The optimization objective. e.g., ``cvr``. This field together with - [optimization_objective][google.cloud.discoveryengine.v1.Engine.MediaRecommendationEngineConfig.type] - describe engine metadata to use to control engine training - and serving. + `optimization_objective + `__ + describe engine metadata to use to control + engine training and serving. - Currently supported values: ``ctr``, ``cvr``. + Currently supported + values: ``ctr``, ``cvr``. - If not specified, we choose default based on engine type. - Default depends on type of recommendation: + If not specified, we choose default based on + engine type. Default depends on type of + recommendation: ``recommended-for-you`` => ``ctr`` ``others-you-may-like`` => ``ctr`` optimization_objective_config (google.cloud.discoveryengine_v1.types.Engine.MediaRecommendationEngineConfig.OptimizationObjectiveConfig): Name and value of the custom threshold for cvr - optimization_objective. For target_field ``watch-time``, - target_field_value must be an integer value indicating the - media progress time in seconds between (0, 86400] (excludes - 0, includes 86400) (e.g., 90). For target_field - ``watch-percentage``, the target_field_value must be a valid - float value between (0, 1.0] (excludes 0, includes 1.0) + optimization_objective. For target_field + ``watch-time``, target_field_value must be an + integer value indicating the media progress time + in seconds between (0, 86400] (excludes 0, + includes 86400) (e.g., 90). + For target_field ``watch-percentage``, the + target_field_value must be a valid float value + between (0, 1.0] (excludes 0, includes 1.0) (e.g., 0.5). training_state (google.cloud.discoveryengine_v1.types.Engine.MediaRecommendationEngineConfig.TrainingState): - The training state that the engine is in (e.g. ``TRAINING`` - or ``PAUSED``). - - Since part of the cost of running the service is frequency - of training - this can be used to determine when to train - engine in order to control cost. If not specified: the - default value for ``CreateEngine`` method is ``TRAINING``. - The default value for ``UpdateEngine`` method is to keep the - state the same as before. + The training state that the engine is in (e.g. + ``TRAINING`` or ``PAUSED``). + + Since part of the cost of running the service is + frequency of training - this can be used to + determine when to train engine in order to + control cost. If not specified: the default + value for ``CreateEngine`` method is + ``TRAINING``. The default value for + ``UpdateEngine`` method is to keep the state the + same as before. engine_features_config (google.cloud.discoveryengine_v1.types.Engine.MediaRecommendationEngineConfig.EngineFeaturesConfig): Optional. Additional engine features config. """ @@ -238,8 +260,9 @@ class OptimizationObjectiveConfig(proto.Message): Attributes: target_field (str): - Required. The name of the field to target. Currently - supported values: ``watch-percentage``, ``watch-time``. + Required. The name of the field to target. + Currently supported values: + ``watch-percentage``, ``watch-time``. target_field_value_float (float): Required. The threshold to be applied to the target (e.g., 0.5). @@ -294,15 +317,18 @@ class RecommendedForYouFeatureConfig(proto.Message): Attributes: context_event_type (str): - The type of event with which the engine is queried at - prediction time. If set to ``generic``, only ``view-item``, - ``media-play``,and ``media-complete`` will be used as - ``context-event`` in engine training. If set to - ``view-home-page``, ``view-home-page`` will also be used as - ``context-events`` in addition to ``view-item``, - ``media-play``, and ``media-complete``. Currently supported - for the ``recommended-for-you`` engine. Currently supported - values: ``view-home-page``, ``generic``. + The type of event with which the engine is + queried at prediction time. If set to + ``generic``, only ``view-item``, + ``media-play``,and ``media-complete`` will be + used as ``context-event`` in engine training. If + set to ``view-home-page``, ``view-home-page`` + will also be used as ``context-events`` in + addition to ``view-item``, ``media-play``, and + ``media-complete``. Currently supported for the + ``recommended-for-you`` engine. Currently + supported values: ``view-home-page``, + ``generic``. """ context_event_type: str = proto.Field( @@ -316,10 +342,11 @@ class MostPopularFeatureConfig(proto.Message): Attributes: time_window_days (int): - The time window of which the engine is queried at training - and prediction time. Positive integers only. The value - translates to the last X days of events. Currently required - for the ``most-popular-items`` engine. + The time window of which the engine is queried + at training and prediction time. Positive + integers only. The value translates to the last + X days of events. Currently required for the + ``most-popular-items`` engine. """ time_window_days: int = proto.Field( @@ -358,58 +385,70 @@ class ChatEngineConfig(proto.Message): Attributes: agent_creation_config (google.cloud.discoveryengine_v1.types.Engine.ChatEngineConfig.AgentCreationConfig): - The configurationt generate the Dialogflow agent that is - associated to this Engine. - - Note that these configurations are one-time consumed by and - passed to Dialogflow service. It means they cannot be - retrieved using - [EngineService.GetEngine][google.cloud.discoveryengine.v1.EngineService.GetEngine] + The configurationt generate the Dialogflow agent + that is associated to this Engine. + + Note that these configurations are one-time + consumed by and passed to Dialogflow service. It + means they cannot be retrieved using + `EngineService.GetEngine + `__ or - [EngineService.ListEngines][google.cloud.discoveryengine.v1.EngineService.ListEngines] + `EngineService.ListEngines + `__ API after engine creation. dialogflow_agent_to_link (str): - The resource name of an exist Dialogflow agent to link to - this Chat Engine. Customers can either provide - ``agent_creation_config`` to create agent or provide an - agent name that links the agent with the Chat engine. - - Format: - ``projects//locations//agents/``. - - Note that the ``dialogflow_agent_to_link`` are one-time - consumed by and passed to Dialogflow service. It means they - cannot be retrieved using - [EngineService.GetEngine][google.cloud.discoveryengine.v1.EngineService.GetEngine] + The resource name of an exist Dialogflow agent + to link to this Chat Engine. Customers can + either provide ``agent_creation_config`` to + create agent or provide an agent name that links + the agent with the Chat engine. + + Format: ``projects//locations//agents/``. + + Note that the ``dialogflow_agent_to_link`` are + one-time consumed by and passed to Dialogflow + service. It means they cannot be retrieved using + `EngineService.GetEngine + `__ or - [EngineService.ListEngines][google.cloud.discoveryengine.v1.EngineService.ListEngines] + `EngineService.ListEngines + `__ API after engine creation. Use - [ChatEngineMetadata.dialogflow_agent][google.cloud.discoveryengine.v1.Engine.ChatEngineMetadata.dialogflow_agent] - for actual agent association after Engine is created. + `ChatEngineMetadata.dialogflow_agent + `__ + for actual agent association after Engine is + created. allow_cross_region (bool): - Optional. If the flag set to true, we allow the agent and - engine are in different locations, otherwise the agent and - engine are required to be in the same location. The flag is - set to false by default. - - Note that the ``allow_cross_region`` are one-time consumed - by and passed to - [EngineService.CreateEngine][google.cloud.discoveryengine.v1.EngineService.CreateEngine]. + Optional. If the flag set to true, we allow the + agent and engine are in different locations, + otherwise the agent and engine are required to + be in the same location. The flag is set to + false by default. + + Note that the ``allow_cross_region`` are + one-time consumed by and passed to + `EngineService.CreateEngine + `__. It means they cannot be retrieved using - [EngineService.GetEngine][google.cloud.discoveryengine.v1.EngineService.GetEngine] + `EngineService.GetEngine + `__ or - [EngineService.ListEngines][google.cloud.discoveryengine.v1.EngineService.ListEngines] + `EngineService.ListEngines + `__ API after engine creation. """ class AgentCreationConfig(proto.Message): r"""Configurations for generating a Dialogflow agent. - Note that these configurations are one-time consumed by and passed - to Dialogflow service. It means they cannot be retrieved using - [EngineService.GetEngine][google.cloud.discoveryengine.v1.EngineService.GetEngine] - or - [EngineService.ListEngines][google.cloud.discoveryengine.v1.EngineService.ListEngines] + Note that these configurations are one-time consumed by and + passed to Dialogflow service. It means they cannot be retrieved + using `EngineService.GetEngine + `__ or + `EngineService.ListEngines + `__ API after engine creation. Attributes: @@ -419,13 +458,16 @@ class AgentCreationConfig(proto.Message): knowledge connector LLM prompt and for knowledge search. default_language_code (str): - Required. The default language of the agent as a language - tag. See `Language - Support `__ - for a list of the currently supported language codes. + Required. The default language of the agent as a + language tag. See `Language + Support + `__ + for a list of the currently supported language + codes. time_zone (str): - Required. The time zone of the agent from the `time zone - database `__, e.g., + Required. The time zone of the agent from the + `time zone database + `__, e.g., America/New_York, Europe/Paris. location (str): Agent location for Agent creation, supported @@ -489,11 +531,11 @@ class ChatEngineMetadata(proto.Message): Attributes: dialogflow_agent (str): - The resource name of a Dialogflow agent, that this Chat - Engine refers to. + The resource name of a Dialogflow agent, that + this Chat Engine refers to. - Format: - ``projects//locations//agents/``. + Format: ``projects//locations//agents/``. """ dialogflow_agent: str = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/engine_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/engine_service.py index 484dbbcd23e3..37d88767c6c5 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/engine_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/engine_service.py @@ -40,7 +40,8 @@ class CreateEngineRequest(proto.Message): r"""Request for - [EngineService.CreateEngine][google.cloud.discoveryengine.v1.EngineService.CreateEngine] + `EngineService.CreateEngine + `__ method. Attributes: @@ -48,19 +49,23 @@ class CreateEngineRequest(proto.Message): Required. The parent resource name, such as ``projects/{project}/locations/{location}/collections/{collection}``. engine (google.cloud.discoveryengine_v1.types.Engine): - Required. The - [Engine][google.cloud.discoveryengine.v1.Engine] to create. + Required. The `Engine + `__ to + create. engine_id (str): Required. The ID to use for the - [Engine][google.cloud.discoveryengine.v1.Engine], which will - become the final component of the - [Engine][google.cloud.discoveryengine.v1.Engine]'s resource - name. - - This field must conform to - `RFC-1034 `__ standard - with a length limit of 63 characters. Otherwise, an - INVALID_ARGUMENT error is returned. + `Engine + `__, + which will become the final component of the + `Engine + `__'s + resource name. + + This field must conform to `RFC-1034 + `__ + standard with a length limit of 63 characters. + Otherwise, an INVALID_ARGUMENT error is + returned. """ parent: str = proto.Field( @@ -80,7 +85,8 @@ class CreateEngineRequest(proto.Message): class CreateEngineMetadata(proto.Message): r"""Metadata related to the progress of the - [EngineService.CreateEngine][google.cloud.discoveryengine.v1.EngineService.CreateEngine] + `EngineService.CreateEngine + `__ operation. This will be returned by the google.longrunning.Operation.metadata field. @@ -106,22 +112,28 @@ class CreateEngineMetadata(proto.Message): class DeleteEngineRequest(proto.Message): r"""Request message for - [EngineService.DeleteEngine][google.cloud.discoveryengine.v1.EngineService.DeleteEngine] + `EngineService.DeleteEngine + `__ method. Attributes: name (str): Required. Full resource name of - [Engine][google.cloud.discoveryengine.v1.Engine], such as + `Engine + `__, + such as ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}``. - If the caller does not have permission to delete the - [Engine][google.cloud.discoveryengine.v1.Engine], regardless - of whether or not it exists, a PERMISSION_DENIED error is - returned. + If the caller does not have permission to delete + the `Engine + `__, + regardless of whether or not it exists, a + PERMISSION_DENIED error is returned. - If the [Engine][google.cloud.discoveryengine.v1.Engine] to - delete does not exist, a NOT_FOUND error is returned. + If the `Engine + `__ to + delete does not exist, a NOT_FOUND error is + returned. """ name: str = proto.Field( @@ -132,7 +144,8 @@ class DeleteEngineRequest(proto.Message): class DeleteEngineMetadata(proto.Message): r"""Metadata related to the progress of the - [EngineService.DeleteEngine][google.cloud.discoveryengine.v1.EngineService.DeleteEngine] + `EngineService.DeleteEngine + `__ operation. This will be returned by the google.longrunning.Operation.metadata field. @@ -158,13 +171,16 @@ class DeleteEngineMetadata(proto.Message): class GetEngineRequest(proto.Message): r"""Request message for - [EngineService.GetEngine][google.cloud.discoveryengine.v1.EngineService.GetEngine] + `EngineService.GetEngine + `__ method. Attributes: name (str): Required. Full resource name of - [Engine][google.cloud.discoveryengine.v1.Engine], such as + `Engine + `__, + such as ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}``. """ @@ -176,7 +192,8 @@ class GetEngineRequest(proto.Message): class ListEnginesRequest(proto.Message): r"""Request message for - [EngineService.ListEngines][google.cloud.discoveryengine.v1.EngineService.ListEngines] + `EngineService.ListEngines + `__ method. Attributes: @@ -212,13 +229,14 @@ class ListEnginesRequest(proto.Message): class ListEnginesResponse(proto.Message): r"""Response message for - [EngineService.ListEngines][google.cloud.discoveryengine.v1.EngineService.ListEngines] + `EngineService.ListEngines + `__ method. Attributes: engines (MutableSequence[google.cloud.discoveryengine_v1.types.Engine]): - All the customer's - [Engine][google.cloud.discoveryengine.v1.Engine]s. + All the customer's `Engine + `__s. next_page_token (str): Not supported. """ @@ -240,27 +258,32 @@ def raw_page(self): class UpdateEngineRequest(proto.Message): r"""Request message for - [EngineService.UpdateEngine][google.cloud.discoveryengine.v1.EngineService.UpdateEngine] + `EngineService.UpdateEngine + `__ method. Attributes: engine (google.cloud.discoveryengine_v1.types.Engine): - Required. The - [Engine][google.cloud.discoveryengine.v1.Engine] to update. - - If the caller does not have permission to update the - [Engine][google.cloud.discoveryengine.v1.Engine], regardless - of whether or not it exists, a PERMISSION_DENIED error is + Required. The `Engine + `__ to + update. If the caller does not have permission + to update the `Engine + `__, + regardless of whether or not it exists, a + PERMISSION_DENIED error is returned. + + If the `Engine + `__ to + update does not exist, a NOT_FOUND error is returned. - - If the [Engine][google.cloud.discoveryengine.v1.Engine] to - update does not exist, a NOT_FOUND error is returned. update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided - [Engine][google.cloud.discoveryengine.v1.Engine] to update. + `Engine + `__ to + update. - If an unsupported or unknown field is provided, an - INVALID_ARGUMENT error is returned. + If an unsupported or unknown field is provided, + an INVALID_ARGUMENT error is returned. """ engine: gcd_engine.Engine = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/grounded_generation_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/grounded_generation_service.py index 31c733582e6a..64fd48f334da 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/grounded_generation_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/grounded_generation_service.py @@ -40,13 +40,13 @@ class GroundedGenerationContent(proto.Message): Attributes: role (str): - Producer of the content. Must be either ``user`` or - ``model``. - - Intended to be used for multi-turn conversations. Otherwise, - it can be left unset. + Producer of the content. Must be either ``user`` + or ``model``. + Intended to be used for multi-turn + conversations. Otherwise, it can be left unset. parts (MutableSequence[google.cloud.discoveryengine_v1.types.GroundedGenerationContent.Part]): - Ordered ``Parts`` that constitute a single message. + Ordered ``Parts`` that constitute a single + message. """ class Part(proto.Message): @@ -86,7 +86,8 @@ class GenerateGroundedContentRequest(proto.Message): location (str): Required. Location resource. - Format: ``projects/{project}/locations/{location}``. + Format: + ``projects/{project}/locations/{location}``. system_instruction (google.cloud.discoveryengine_v1.types.GroundedGenerationContent): Content of the system instruction for the current API. @@ -105,26 +106,32 @@ class GenerateGroundedContentRequest(proto.Message): grounding_spec (google.cloud.discoveryengine_v1.types.GenerateGroundedContentRequest.GroundingSpec): Grounding specification. user_labels (MutableMapping[str, str]): - The user labels applied to a resource must meet the - following requirements: - - - Each resource can have multiple labels, up to a maximum of - 64. - - Each label must be a key-value pair. - - Keys have a minimum length of 1 character and a maximum - length of 63 characters and cannot be empty. Values can be - empty and have a maximum length of 63 characters. - - Keys and values can contain only lowercase letters, - numeric characters, underscores, and dashes. All - characters must use UTF-8 encoding, and international - characters are allowed. - - The key portion of a label must be unique. However, you - can use the same key with multiple resources. - - Keys must start with a lowercase letter or international - character. + The user labels applied to a resource must meet + the following requirements: + * Each resource can have multiple labels, up to + a maximum of 64. + + * Each label must be a key-value pair. + * Keys have a minimum length of 1 character and + a maximum length of 63 characters and cannot + be empty. Values can be empty and have a maximum + length of 63 characters. + + * Keys and values can contain only lowercase + letters, numeric characters, underscores, and + dashes. All characters must use UTF-8 encoding, + and international characters are allowed. + + * The key portion of a label must be unique. + However, you can use the same key with + multiple resources. + + * Keys must start with a lowercase letter or + international character. See `Google Cloud - Document `__ + Document + `__ for more details. """ @@ -138,8 +145,9 @@ class GenerationSpec(proto.Message): Specifies which Vertex model id to use for generation. language_code (str): - Language code for content. Use language tags defined by - `BCP47 `__. + Language code for content. Use language tags + defined by `BCP47 + `__. temperature (float): If specified, custom value for the temperature will be used. @@ -320,9 +328,10 @@ class InlineSource(proto.Message): attributes (MutableMapping[str, str]): Attributes associated with the content. - Common attributes include ``source`` (indicating where the - content was sourced from) and ``author`` (indicating the - author of the content). + Common attributes include ``source`` (indicating + where the content was sourced from) and + ``author`` (indicating the author of the + content). """ grounding_facts: MutableSequence[ @@ -346,6 +355,7 @@ class SearchSource(proto.Message): The resource name of the Engine to use. Format: + ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}`` max_result_count (int): Number of search results to return. @@ -356,7 +366,8 @@ class SearchSource(proto.Message): Filter expression to be applied to the search. The syntax is the same as - [SearchRequest.filter][google.cloud.discoveryengine.v1.SearchRequest.filter]. + `SearchRequest.filter + `__. safe_search (bool): If set, safe search is enabled in Vertex AI Search requests. @@ -495,8 +506,8 @@ class Candidate(proto.Message): content (google.cloud.discoveryengine_v1.types.GroundedGenerationContent): Content of the candidate. grounding_score (float): - The overall grounding score for the candidate, in the range - of [0, 1]. + The overall grounding score for the candidate, + in the range of [0, 1]. This field is a member of `oneof`_ ``_grounding_score``. grounding_metadata (google.cloud.discoveryengine_v1.types.GenerateGroundedContentResponse.Candidate.GroundingMetadata): @@ -599,12 +610,13 @@ class DynamicRetrievalPredictorMetadata(proto.Message): The version of the predictor which was used in dynamic retrieval. prediction (float): - The value of the predictor. This should be between [0, 1] - where a value of 0 means that the query would not benefit - from grounding, while a value of 1.0 means that the query - would benefit the most. In between values allow to - differentiate between different usefulness scores for - grounding. + The value of the predictor. This should be + between [0, 1] where a value of 0 means that the + query would not benefit from grounding, while a + value of 1.0 means that the query would benefit + the most. In between values allow to + differentiate between different usefulness + scores for grounding. This field is a member of `oneof`_ ``_prediction``. """ @@ -665,14 +677,17 @@ class GroundingSupport(proto.Message): Text for the claim in the candidate. Always provided when a support is found. support_chunk_indices (MutableSequence[int]): - A list of indices (into 'support_chunks') specifying the - citations associated with the claim. For instance [1,3,4] - means that support_chunks[1], support_chunks[3], - support_chunks[4] are the chunks attributed to the claim. + A list of indices (into 'support_chunks') + specifying the citations associated with the + claim. For instance [1,3,4] means that + support_chunks[1], support_chunks[3], + support_chunks[4] are the chunks attributed to + the claim. support_score (float): - A score in the range of [0, 1] describing how grounded is a - specific claim in the support chunks indicated. Higher value - means that the claim is better supported by the chunks. + A score in the range of [0, 1] describing how + grounded is a specific claim in the support + chunks indicated. Higher value means that the + claim is better supported by the chunks. This field is a member of `oneof`_ ``_support_score``. """ @@ -834,12 +849,13 @@ class CheckGroundingSpec(proto.Message): Attributes: citation_threshold (float): - The threshold (in [0,1]) used for determining whether a fact - must be cited for a claim in the answer candidate. Choosing - a higher threshold will lead to fewer but very strong - citations, while choosing a lower threshold may lead to more - but somewhat weaker citations. If unset, the threshold will - default to 0.6. + The threshold (in [0,1]) used for determining + whether a fact must be cited for a claim in the + answer candidate. Choosing a higher threshold + will lead to fewer but very strong citations, + while choosing a lower threshold may lead to + more but somewhat weaker citations. If unset, + the threshold will default to 0.6. This field is a member of `oneof`_ ``_citation_threshold``. enable_claim_level_score (bool): @@ -863,12 +879,14 @@ class CheckGroundingSpec(proto.Message): class CheckGroundingRequest(proto.Message): r"""Request message for - [GroundedGenerationService.CheckGrounding][google.cloud.discoveryengine.v1.GroundedGenerationService.CheckGrounding] + `GroundedGenerationService.CheckGrounding + `__ method. Attributes: grounding_config (str): - Required. The resource name of the grounding config, such as + Required. The resource name of the grounding + config, such as ``projects/*/locations/global/groundingConfigs/default_grounding_config``. answer_candidate (str): Answer candidate to check. It can have a @@ -879,26 +897,32 @@ class CheckGroundingRequest(proto.Message): grounding_spec (google.cloud.discoveryengine_v1.types.CheckGroundingSpec): Configuration of the grounding check. user_labels (MutableMapping[str, str]): - The user labels applied to a resource must meet the - following requirements: - - - Each resource can have multiple labels, up to a maximum of - 64. - - Each label must be a key-value pair. - - Keys have a minimum length of 1 character and a maximum - length of 63 characters and cannot be empty. Values can be - empty and have a maximum length of 63 characters. - - Keys and values can contain only lowercase letters, - numeric characters, underscores, and dashes. All - characters must use UTF-8 encoding, and international - characters are allowed. - - The key portion of a label must be unique. However, you - can use the same key with multiple resources. - - Keys must start with a lowercase letter or international - character. + The user labels applied to a resource must meet + the following requirements: + * Each resource can have multiple labels, up to + a maximum of 64. + + * Each label must be a key-value pair. + * Keys have a minimum length of 1 character and + a maximum length of 63 characters and cannot + be empty. Values can be empty and have a maximum + length of 63 characters. + + * Keys and values can contain only lowercase + letters, numeric characters, underscores, and + dashes. All characters must use UTF-8 encoding, + and international characters are allowed. + + * The key portion of a label must be unique. + However, you can use the same key with + multiple resources. + + * Keys must start with a lowercase letter or + international character. See `Google Cloud - Document `__ + Document + `__ for more details. """ @@ -929,7 +953,8 @@ class CheckGroundingRequest(proto.Message): class CheckGroundingResponse(proto.Message): r"""Response message for the - [GroundedGenerationService.CheckGrounding][google.cloud.discoveryengine.v1.GroundedGenerationService.CheckGrounding] + `GroundedGenerationService.CheckGrounding + `__ method. @@ -1010,24 +1035,29 @@ class Claim(proto.Message): Always provided regardless of whether citations or anti-citations are found. citation_indices (MutableSequence[int]): - A list of indices (into 'cited_chunks') specifying the - citations associated with the claim. For instance [1,3,4] - means that cited_chunks[1], cited_chunks[3], cited_chunks[4] - are the facts cited supporting for the claim. A citation to - a fact indicates that the claim is supported by the fact. + A list of indices (into 'cited_chunks') + specifying the citations associated with the + claim. For instance [1,3,4] means that + cited_chunks[1], cited_chunks[3], + cited_chunks[4] are the facts cited supporting + for the claim. A citation to a fact indicates + that the claim is supported by the fact. grounding_check_required (bool): - Indicates that this claim required grounding check. When the - system decided this claim doesn't require - attribution/grounding check, this field will be set to - false. In that case, no grounding check was done for the - claim and therefore - [citation_indices][google.cloud.discoveryengine.v1.CheckGroundingResponse.Claim.citation_indices] + Indicates that this claim required grounding + check. When the system decided this claim + doesn't require attribution/grounding check, + this field will be set to false. In that case, + no grounding check was done for the claim and + therefore + `citation_indices + `__ should not be returned. This field is a member of `oneof`_ ``_grounding_check_required``. score (float): - Confidence score for the claim in the answer candidate, in - the range of [0, 1]. This is set only when + Confidence score for the claim in the answer + candidate, in the range of [0, 1]. This is set + only when ``CheckGroundingRequest.grounding_spec.enable_claim_level_score`` is true. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/grounding.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/grounding.py index 8fa92a7cdabd..4b77e23edfd9 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/grounding.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/grounding.py @@ -36,10 +36,10 @@ class GroundingFact(proto.Message): Text content of the fact. Can be at most 10K characters long. attributes (MutableMapping[str, str]): - Attributes associated with the fact. Common attributes - include ``source`` (indicating where the fact was sourced - from), ``author`` (indicating the author of the fact), and - so on. + Attributes associated with the fact. + Common attributes include ``source`` (indicating + where the fact was sourced from), ``author`` + (indicating the author of the fact), and so on. """ fact_text: str = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/identity_mapping_store.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/identity_mapping_store.py index 9d8d066786de..8fd66f677d96 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/identity_mapping_store.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/identity_mapping_store.py @@ -36,21 +36,23 @@ class IdentityMappingStore(proto.Message): Attributes: name (str): - Immutable. The full resource name of the identity mapping - store. Format: + Immutable. The full resource name of the + identity mapping store. Format: + ``projects/{project}/locations/{location}/identityMappingStores/{identity_mapping_store}``. - This field must be a UTF-8 encoded string with a length - limit of 1024 characters. + This field must be a UTF-8 encoded string with a + length limit of 1024 characters. kms_key_name (str): - Input only. The KMS key to be used to protect this Identity - Mapping Store at creation time. + Input only. The KMS key to be used to protect + this Identity Mapping Store at creation time. - Must be set for requests that need to comply with CMEK Org - Policy protections. + Must be set for requests that need to comply + with CMEK Org Policy protections. - If this field is set and processed successfully, the - Identity Mapping Store will be protected by the KMS key, as - indicated in the cmek_config field. + If this field is set and processed successfully, + the Identity Mapping Store will be protected by + the KMS key, as indicated in the cmek_config + field. cmek_config (google.cloud.discoveryengine_v1.types.CmekConfig): Output only. CMEK-related information for the Identity Mapping Store. @@ -84,17 +86,21 @@ class IdentityMappingEntry(proto.Message): Attributes: user_id (str): - User identifier. For Google Workspace user account, user_id - should be the google workspace user email. For non-google - identity provider, user_id is the mapped user identifier - configured during the workforcepool config. + User identifier. + For Google Workspace user account, user_id + should be the google workspace user email. + For non-google identity provider, user_id is the + mapped user identifier configured during the + workforcepool config. This field is a member of `oneof`_ ``identity_provider_id``. group_id (str): - Group identifier. For Google Workspace user account, - group_id should be the google workspace group email. For - non-google identity provider, group_id is the mapped group - identifier configured during the workforcepool config. + Group identifier. + For Google Workspace user account, group_id + should be the google workspace group email. + For non-google identity provider, group_id is + the mapped group identifier configured during + the workforcepool config. This field is a member of `oneof`_ ``identity_provider_id``. external_identity (str): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/identity_mapping_store_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/identity_mapping_store_service.py index 1cce182f70d0..7d78977cca01 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/identity_mapping_store_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/identity_mapping_store_service.py @@ -46,7 +46,8 @@ class CreateIdentityMappingStoreRequest(proto.Message): r"""Request message for - [IdentityMappingStoreService.CreateIdentityMappingStore][google.cloud.discoveryengine.v1.IdentityMappingStoreService.CreateIdentityMappingStore] + `IdentityMappingStoreService.CreateIdentityMappingStore + `__ This message has `oneof`_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. @@ -69,14 +70,15 @@ class CreateIdentityMappingStoreRequest(proto.Message): This field is a member of `oneof`_ ``cmek_options``. parent (str): - Required. The parent collection resource name, such as + Required. The parent collection resource name, + such as ``projects/{project}/locations/{location}``. identity_mapping_store_id (str): - Required. The ID of the Identity Mapping Store to create. - - The ID must contain only letters (a-z, A-Z), numbers (0-9), - underscores (\_), and hyphens (-). The maximum length is 63 - characters. + Required. The ID of the Identity Mapping Store + to create. + The ID must contain only letters (a-z, A-Z), + numbers (0-9), underscores (_), and hyphens (-). + The maximum length is 63 characters. identity_mapping_store (google.cloud.discoveryengine_v1.types.IdentityMappingStore): Required. The Identity Mapping Store to create. @@ -111,12 +113,14 @@ class CreateIdentityMappingStoreRequest(proto.Message): class GetIdentityMappingStoreRequest(proto.Message): r"""Request message for - [IdentityMappingStoreService.GetIdentityMappingStore][google.cloud.discoveryengine.v1.IdentityMappingStoreService.GetIdentityMappingStore] + `IdentityMappingStoreService.GetIdentityMappingStore + `__ Attributes: name (str): - Required. The name of the Identity Mapping Store to get. - Format: + Required. The name of the Identity Mapping Store + to get. Format: + ``projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`` """ @@ -128,12 +132,14 @@ class GetIdentityMappingStoreRequest(proto.Message): class DeleteIdentityMappingStoreRequest(proto.Message): r"""Request message for - [IdentityMappingStoreService.DeleteIdentityMappingStore][google.cloud.discoveryengine.v1.IdentityMappingStoreService.DeleteIdentityMappingStore] + `IdentityMappingStoreService.DeleteIdentityMappingStore + `__ Attributes: name (str): - Required. The name of the Identity Mapping Store to delete. - Format: + Required. The name of the Identity Mapping Store + to delete. Format: + ``projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`` """ @@ -145,7 +151,8 @@ class DeleteIdentityMappingStoreRequest(proto.Message): class ImportIdentityMappingsRequest(proto.Message): r"""Request message for - [IdentityMappingStoreService.ImportIdentityMappings][google.cloud.discoveryengine.v1.IdentityMappingStoreService.ImportIdentityMappings] + `IdentityMappingStoreService.ImportIdentityMappings + `__ .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -157,8 +164,9 @@ class ImportIdentityMappingsRequest(proto.Message): This field is a member of `oneof`_ ``source``. identity_mapping_store (str): - Required. The name of the Identity Mapping Store to import - Identity Mapping Entries to. Format: + Required. The name of the Identity Mapping Store + to import Identity Mapping Entries to. Format: + ``projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`` """ @@ -193,7 +201,8 @@ class InlineSource(proto.Message): class ImportIdentityMappingsResponse(proto.Message): r"""Response message for - [IdentityMappingStoreService.ImportIdentityMappings][google.cloud.discoveryengine.v1.IdentityMappingStoreService.ImportIdentityMappings] + `IdentityMappingStoreService.ImportIdentityMappings + `__ Attributes: error_samples (MutableSequence[google.rpc.status_pb2.Status]): @@ -210,7 +219,8 @@ class ImportIdentityMappingsResponse(proto.Message): class PurgeIdentityMappingsRequest(proto.Message): r"""Request message for - [IdentityMappingStoreService.PurgeIdentityMappings][google.cloud.discoveryengine.v1.IdentityMappingStoreService.PurgeIdentityMappings] + `IdentityMappingStoreService.PurgeIdentityMappings + `__ .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -222,34 +232,46 @@ class PurgeIdentityMappingsRequest(proto.Message): This field is a member of `oneof`_ ``source``. identity_mapping_store (str): - Required. The name of the Identity Mapping Store to purge - Identity Mapping Entries from. Format: + Required. The name of the Identity Mapping Store + to purge Identity Mapping Entries from. Format: + ``projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`` filter (str): - Filter matching identity mappings to purge. The eligible - field for filtering is: + Filter matching identity mappings to purge. + The eligible field for filtering is: - - ``update_time``: in ISO 8601 "zulu" format. - - ``external_id`` + * ``update_time``: in ISO 8601 "zulu" format. * + ``external_id`` Examples: - - Deleting all identity mappings updated in a time range: - ``update_time > "2012-04-23T18:25:43.511Z" AND update_time < "2012-04-23T18:30:43.511Z"`` - - Deleting all identity mappings for a given external_id: - ``external_id = "id1"`` - - Deleting all identity mappings inside an identity mapping - store: ``*`` + * Deleting all identity mappings updated in a + time range: + + ``update_time > "2012-04-23T18:25:43.511Z" AND + update_time < "2012-04-23T18:30:43.511Z"`` + + * Deleting all identity mappings for a given + external_id: - The filtering fields are assumed to have an implicit AND. - Should not be used with source. An error will be thrown, if - both are provided. + ``external_id = "id1"`` + + * Deleting all identity mappings inside an + identity mapping store: + + ``*`` + + The filtering fields are assumed to have an + implicit AND. Should not be used with source. An + error will be thrown, if both are provided. force (bool): - Actually performs the purge. If ``force`` is set to false, - return the expected purge count without deleting any - identity mappings. This field is only supported for purge - with filter. For input source this field is ignored and data - will be purged regardless of the value of this field. + Actually performs the purge. If ``force`` is set + to false, return the expected purge count + without deleting any identity mappings. This + field is only supported for purge with filter. + For input source this field is ignored and data + will be purged regardless of the value of this + field. This field is a member of `oneof`_ ``_force``. """ @@ -294,12 +316,14 @@ class InlineSource(proto.Message): class ListIdentityMappingsRequest(proto.Message): r"""Request message for - [IdentityMappingStoreService.ListIdentityMappings][google.cloud.discoveryengine.v1.IdentityMappingStoreService.ListIdentityMappings] + `IdentityMappingStoreService.ListIdentityMappings + `__ Attributes: identity_mapping_store (str): - Required. The name of the Identity Mapping Store to list - Identity Mapping Entries in. Format: + Required. The name of the Identity Mapping Store + to list Identity Mapping Entries in. Format: + ``projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`` page_size (int): Maximum number of IdentityMappings to return. @@ -308,12 +332,12 @@ class ListIdentityMappingsRequest(proto.Message): be coerced to 10000. page_token (str): A page token, received from a previous - ``ListIdentityMappings`` call. Provide this to retrieve the - subsequent page. + ``ListIdentityMappings`` call. Provide this to + retrieve the subsequent page. - When paginating, all other parameters provided to - ``ListIdentityMappings`` must match the call that provided - the page token. + When paginating, all other parameters provided + to ``ListIdentityMappings`` must match the call + that provided the page token. """ identity_mapping_store: str = proto.Field( @@ -332,15 +356,16 @@ class ListIdentityMappingsRequest(proto.Message): class ListIdentityMappingsResponse(proto.Message): r"""Response message for - [IdentityMappingStoreService.ListIdentityMappings][google.cloud.discoveryengine.v1.IdentityMappingStoreService.ListIdentityMappings] + `IdentityMappingStoreService.ListIdentityMappings + `__ Attributes: identity_mapping_entries (MutableSequence[google.cloud.discoveryengine_v1.types.IdentityMappingEntry]): The Identity Mapping Entries. next_page_token (str): - A token that can be sent as ``page_token`` to retrieve the - next page. If this field is omitted, there are no subsequent - pages. + A token that can be sent as ``page_token`` to + retrieve the next page. If this field is + omitted, there are no subsequent pages. """ @property @@ -362,12 +387,15 @@ def raw_page(self): class ListIdentityMappingStoresRequest(proto.Message): r"""Request message for - [IdentityMappingStoreService.ListIdentityMappingStores][google.cloud.discoveryengine.v1.IdentityMappingStoreService.ListIdentityMappingStores] + `IdentityMappingStoreService.ListIdentityMappingStores + `__ Attributes: parent (str): - Required. The parent of the Identity Mapping Stores to list. - Format: ``projects/{project}/locations/{location}``. + Required. The parent of the Identity Mapping + Stores to list. Format: + + ``projects/{project}/locations/{location}``. page_size (int): Maximum number of IdentityMappingStores to return. If unspecified, defaults to 100. The @@ -375,12 +403,12 @@ class ListIdentityMappingStoresRequest(proto.Message): will be coerced to 1000. page_token (str): A page token, received from a previous - ``ListIdentityMappingStores`` call. Provide this to retrieve - the subsequent page. + ``ListIdentityMappingStores`` call. Provide this + to retrieve the subsequent page. - When paginating, all other parameters provided to - ``ListIdentityMappingStores`` must match the call that - provided the page token. + When paginating, all other parameters provided + to ``ListIdentityMappingStores`` must match the + call that provided the page token. """ parent: str = proto.Field( @@ -399,15 +427,16 @@ class ListIdentityMappingStoresRequest(proto.Message): class ListIdentityMappingStoresResponse(proto.Message): r"""Response message for - [IdentityMappingStoreService.ListIdentityMappingStores][google.cloud.discoveryengine.v1.IdentityMappingStoreService.ListIdentityMappingStores] + `IdentityMappingStoreService.ListIdentityMappingStores + `__ Attributes: identity_mapping_stores (MutableSequence[google.cloud.discoveryengine_v1.types.IdentityMappingStore]): The Identity Mapping Stores. next_page_token (str): - A token that can be sent as ``page_token`` to retrieve the - next page. If this field is omitted, there are no subsequent - pages. + A token that can be sent as ``page_token`` to + retrieve the next page. If this field is + omitted, there are no subsequent pages. """ @property @@ -429,9 +458,11 @@ def raw_page(self): class IdentityMappingEntryOperationMetadata(proto.Message): r"""IdentityMappingEntry LongRunningOperation metadata for - [IdentityMappingStoreService.ImportIdentityMappings][google.cloud.discoveryengine.v1.IdentityMappingStoreService.ImportIdentityMappings] + `IdentityMappingStoreService.ImportIdentityMappings + `__ and - [IdentityMappingStoreService.PurgeIdentityMappings][google.cloud.discoveryengine.v1.IdentityMappingStoreService.PurgeIdentityMappings] + `IdentityMappingStoreService.PurgeIdentityMappings + `__ Attributes: success_count (int): @@ -461,7 +492,8 @@ class IdentityMappingEntryOperationMetadata(proto.Message): class DeleteIdentityMappingStoreMetadata(proto.Message): r"""Metadata related to the progress of the - [IdentityMappingStoreService.DeleteIdentityMappingStore][google.cloud.discoveryengine.v1.IdentityMappingStoreService.DeleteIdentityMappingStore] + `IdentityMappingStoreService.DeleteIdentityMappingStore + `__ operation. This will be returned by the google.longrunning.Operation.metadata field. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/import_config.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/import_config.py index 8aa69e0939e7..26b3f0350d9e 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/import_config.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/import_config.py @@ -59,44 +59,55 @@ class GcsSource(proto.Message): Attributes: input_uris (MutableSequence[str]): - Required. Cloud Storage URIs to input files. Each URI can be - up to 2000 characters long. URIs can match the full object - path (for example, ``gs://bucket/directory/object.json``) or - a pattern matching one or more files, such as + Required. Cloud Storage URIs to input files. + Each URI can be up to 2000 characters long. URIs + can match the full object path (for example, + ``gs://bucket/directory/object.json``) or a + pattern matching one or more files, such as ``gs://bucket/directory/*.json``. - A request can contain at most 100 files (or 100,000 files if - ``data_schema`` is ``content``). Each file can be up to 2 GB - (or 100 MB if ``data_schema`` is ``content``). + A request can contain at most 100 files (or + 100,000 files if ``data_schema`` is + ``content``). Each file can be up to 2 GB (or + 100 MB if ``data_schema`` is ``content``). data_schema (str): - The schema to use when parsing the data from the source. - + The schema to use when parsing the data from the + source. Supported values for document imports: - - ``document`` (default): One JSON - [Document][google.cloud.discoveryengine.v1.Document] per - line. Each document must have a valid - [Document.id][google.cloud.discoveryengine.v1.Document.id]. - - ``content``: Unstructured data (e.g. PDF, HTML). Each file - matched by ``input_uris`` becomes a document, with the ID - set to the first 128 bits of SHA256(URI) encoded as a hex - string. - - ``custom``: One custom data JSON per row in arbitrary - format that conforms to the defined - [Schema][google.cloud.discoveryengine.v1.Schema] of the - data store. This can only be used by the GENERIC Data - Store vertical. - - ``csv``: A CSV file with header conforming to the defined - [Schema][google.cloud.discoveryengine.v1.Schema] of the - data store. Each entry after the header is imported as a - Document. This can only be used by the GENERIC Data Store - vertical. + * ``document`` (default): One JSON + `Document + `__ + per line. Each document must + have a valid `Document.id + `__. + + * ``content``: Unstructured data (e.g. PDF, + HTML). Each file matched by ``input_uris`` + becomes a document, with the ID set to the first + 128 bits of SHA256(URI) encoded as a hex + string. + + * ``custom``: One custom data JSON per row in + arbitrary format that conforms to the defined + `Schema + `__ of + the data store. This can only be used by the + GENERIC Data Store vertical. + + * ``csv``: A CSV file with header conforming to + the defined `Schema + `__ of + the data store. Each entry after the header is + imported as a Document. This can only be used + by the GENERIC Data Store vertical. Supported values for user event imports: - - ``user_event`` (default): One JSON - [UserEvent][google.cloud.discoveryengine.v1.UserEvent] per - line. + * ``user_event`` (default): One JSON + `UserEvent + `__ + per line. """ input_uris: MutableSequence[str] = proto.RepeatedField( @@ -116,8 +127,8 @@ class BigQuerySource(proto.Message): Attributes: partition_date (google.type.date_pb2.Date): - BigQuery time partitioned table's \_PARTITIONDATE in - YYYY-MM-DD format. + BigQuery time partitioned table's _PARTITIONDATE + in YYYY-MM-DD format. This field is a member of `oneof`_ ``partition``. project_id (str): @@ -139,29 +150,36 @@ class BigQuerySource(proto.Message): have the BigQuery export to a specific Cloud Storage directory. data_schema (str): - The schema to use when parsing the data from the source. - + The schema to use when parsing the data from the + source. Supported values for user event imports: - - ``user_event`` (default): One - [UserEvent][google.cloud.discoveryengine.v1.UserEvent] per - row. + * ``user_event`` (default): One + `UserEvent + `__ + per row. Supported values for document imports: - - ``document`` (default): One - [Document][google.cloud.discoveryengine.v1.Document] - format per row. Each document must have a valid - [Document.id][google.cloud.discoveryengine.v1.Document.id] - and one of - [Document.json_data][google.cloud.discoveryengine.v1.Document.json_data] - or - [Document.struct_data][google.cloud.discoveryengine.v1.Document.struct_data]. - - ``custom``: One custom data per row in arbitrary format - that conforms to the defined - [Schema][google.cloud.discoveryengine.v1.Schema] of the - data store. This can only be used by the GENERIC Data - Store vertical. + * ``document`` (default): One + `Document + `__ + format per row. Each document must have a + valid + `Document.id + `__ + and one of `Document.json_data + `__ + or + `Document.struct_data + `__. + + * ``custom``: One custom data per row in + arbitrary format that conforms to the defined + `Schema + `__ of + the data store. This can only be used by the + GENERIC Data Store vertical. """ partition_date: date_pb2.Date = proto.Field( @@ -211,9 +229,10 @@ class SpannerSource(proto.Message): Required. The table name of the Spanner database that needs to be imported. enable_data_boost (bool): - Whether to apply data boost on Spanner export. Enabling this - option will incur additional cost. More info can be found - `here `__. + Whether to apply data boost on Spanner export. + Enabling this option will incur additional cost. + More info can be found `here + `__. """ project_id: str = proto.Field( @@ -244,9 +263,9 @@ class BigtableOptions(proto.Message): Attributes: key_field_name (str): - The field name used for saving row key value in the - document. The name has to match the pattern - ``[a-zA-Z0-9][a-zA-Z0-9-_]*``. + The field name used for saving row key value in + the document. The name has to match the pattern + ```a-zA-Z0-9 `__*``. families (MutableMapping[str, google.cloud.discoveryengine_v1.types.BigtableOptions.BigtableColumnFamily]): The mapping from family names to an object that contains column families level information @@ -255,9 +274,11 @@ class BigtableOptions(proto.Message): """ class Type(proto.Enum): - r"""The type of values in a Bigtable column or column family. The values - are expected to be encoded using `HBase - Bytes.toBytes `__ + r"""The type of values in a Bigtable column or column family. + The values are expected to be encoded using + `HBase + Bytes.toBytes + `__ function when the encoding value is set to ``BINARY``. Values: @@ -307,25 +328,28 @@ class BigtableColumnFamily(proto.Message): Attributes: field_name (str): - The field name to use for this column family in the - document. The name has to match the pattern - ``[a-zA-Z0-9][a-zA-Z0-9-_]*``. If not set, it is parsed from - the family name with best effort. However, due to different - naming patterns, field name collisions could happen, where - parsing behavior is undefined. + The field name to use for this column family in + the document. The name has to match the pattern + ```a-zA-Z0-9 `__*``. If not set, it + is parsed from the family name with best effort. + However, due to different naming patterns, field + name collisions could happen, where parsing + behavior is undefined. encoding (google.cloud.discoveryengine_v1.types.BigtableOptions.Encoding): - The encoding mode of the values when the type is not STRING. - Acceptable encoding values are: - - - ``TEXT``: indicates values are alphanumeric text strings. - - ``BINARY``: indicates values are encoded using - ``HBase Bytes.toBytes`` family of functions. This can be - overridden for a specific column by listing that column in - ``columns`` and specifying an encoding for it. + The encoding mode of the values when the type is + not STRING. Acceptable encoding values are: + + * ``TEXT``: indicates values are alphanumeric + text strings. * ``BINARY``: indicates values are + encoded using ``HBase Bytes.toBytes`` family of + functions. This can be overridden for a specific + column by listing that column in ``columns`` and + specifying an encoding for it. type_ (google.cloud.discoveryengine_v1.types.BigtableOptions.Type): - The type of values in this column family. The values are - expected to be encoded using ``HBase Bytes.toBytes`` - function when the encoding value is set to ``BINARY``. + The type of values in this column family. + The values are expected to be encoded using + ``HBase Bytes.toBytes`` function when the + encoding value is set to ``BINARY``. columns (MutableSequence[google.cloud.discoveryengine_v1.types.BigtableOptions.BigtableColumn]): The list of objects that contains column level information for each column. If a column @@ -363,25 +387,28 @@ class BigtableColumn(proto.Message): cannot be decoded with utf-8, use a base-64 encoded string instead. field_name (str): - The field name to use for this column in the document. The - name has to match the pattern ``[a-zA-Z0-9][a-zA-Z0-9-_]*``. - If not set, it is parsed from the qualifier bytes with best - effort. However, due to different naming patterns, field - name collisions could happen, where parsing behavior is - undefined. + The field name to use for this column in the + document. The name has to match the pattern + ```a-zA-Z0-9 `__*``. If not set, it + is parsed from the qualifier bytes with best + effort. However, due to different naming + patterns, field name collisions could happen, + where parsing behavior is undefined. encoding (google.cloud.discoveryengine_v1.types.BigtableOptions.Encoding): - The encoding mode of the values when the type is not - ``STRING``. Acceptable encoding values are: - - - ``TEXT``: indicates values are alphanumeric text strings. - - ``BINARY``: indicates values are encoded using - ``HBase Bytes.toBytes`` family of functions. This can be - overridden for a specific column by listing that column in - ``columns`` and specifying an encoding for it. + The encoding mode of the values when the type is + not ``STRING``. Acceptable encoding values are: + + * ``TEXT``: indicates values are alphanumeric + text strings. * ``BINARY``: indicates values are + encoded using ``HBase Bytes.toBytes`` family of + functions. This can be overridden for a specific + column by listing that column in ``columns`` and + specifying an encoding for it. type_ (google.cloud.discoveryengine_v1.types.BigtableOptions.Type): - The type of values in this column family. The values are - expected to be encoded using ``HBase Bytes.toBytes`` - function when the encoding value is set to ``BINARY``. + The type of values in this column family. + The values are expected to be encoded using + ``HBase Bytes.toBytes`` function when the + encoding value is set to ``BINARY``. """ qualifier: bytes = proto.Field( @@ -461,8 +488,8 @@ class FhirStoreSource(proto.Message): Attributes: fhir_store (str): - Required. The full resource name of the FHIR store to import - data from, in the format of + Required. The full resource name of the FHIR + store to import data from, in the format of ``projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}``. gcs_staging_dir (str): Intermediate Cloud Storage directory used for @@ -471,21 +498,25 @@ class FhirStoreSource(proto.Message): have the FhirStore export to a specific Cloud Storage directory. resource_types (MutableSequence[str]): - The FHIR resource types to import. The resource types should - be a subset of all `supported FHIR resource - types `__. - Default to all supported FHIR resource types if empty. + The FHIR resource types to import. The resource + types should be a subset of all `supported FHIR + resource types + `__. + Default to all supported FHIR resource types if + empty. update_from_latest_predefined_schema (bool): - Optional. Whether to update the DataStore schema to the - latest predefined schema. - - If true, the DataStore schema will be updated to include any - FHIR fields or resource types that have been added since the - last import and corresponding FHIR resources will be - imported from the FHIR store. - - Note this field cannot be used in conjunction with - ``resource_types``. It should be used after initial import. + Optional. Whether to update the DataStore schema + to the latest predefined schema. + + If true, the DataStore schema will be updated to + include any FHIR fields or resource types that + have been added since the last import and + corresponding FHIR resources will be imported + from the FHIR store. + + Note this field cannot be used in conjunction + with ``resource_types``. It should be used after + initial import. """ fhir_store: str = proto.Field( @@ -535,9 +566,10 @@ class CloudSqlSource(proto.Message): the necessary Cloud Storage Admin permissions to access the specified Cloud Storage directory. offload (bool): - Option for serverless export. Enabling this option will - incur additional cost. More info can be found - `here `__. + Option for serverless export. Enabling this + option will incur additional cost. More info can + be found `here + `__. """ project_id: str = proto.Field( @@ -678,10 +710,11 @@ class ImportErrorConfig(proto.Message): Attributes: gcs_prefix (str): - Cloud Storage prefix for import errors. This must be an - empty, existing Cloud Storage directory. Import errors are - written to sharded files in this directory, one per line, as - a JSON-encoded ``google.rpc.Status`` message. + Cloud Storage prefix for import errors. This + must be an empty, existing Cloud Storage + directory. Import errors are written to sharded + files in this directory, one per line, as a + JSON-encoded ``google.rpc.Status`` message. This field is a member of `oneof`_ ``destination``. """ @@ -718,7 +751,8 @@ class ImportUserEventsRequest(proto.Message): This field is a member of `oneof`_ ``source``. parent (str): - Required. Parent DataStore resource name, of the form + Required. Parent DataStore resource name, of the + form ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`` error_config (google.cloud.discoveryengine_v1.types.ImportErrorConfig): The desired location of errors incurred @@ -946,98 +980,130 @@ class ImportDocumentsRequest(proto.Message): This field is a member of `oneof`_ ``source``. parent (str): - Required. The parent branch resource name, such as + Required. The parent branch resource name, such + as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}``. Requires create/update permission. error_config (google.cloud.discoveryengine_v1.types.ImportErrorConfig): The desired location of errors incurred during the Import. reconciliation_mode (google.cloud.discoveryengine_v1.types.ImportDocumentsRequest.ReconciliationMode): - The mode of reconciliation between existing documents and - the documents to be imported. Defaults to - [ReconciliationMode.INCREMENTAL][google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode.INCREMENTAL]. + The mode of reconciliation between existing + documents and the documents to be imported. + Defaults to `ReconciliationMode.INCREMENTAL + `__. update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided imported documents to update. If not set, the default is to update all fields. auto_generate_ids (bool): - Whether to automatically generate IDs for the documents if - absent. - + Whether to automatically generate IDs for the + documents if absent. If set to ``true``, - [Document.id][google.cloud.discoveryengine.v1.Document.id]s - are automatically generated based on the hash of the - payload, where IDs may not be consistent during multiple - imports. In which case - [ReconciliationMode.FULL][google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode.FULL] - is highly recommended to avoid duplicate contents. If unset - or set to ``false``, - [Document.id][google.cloud.discoveryengine.v1.Document.id]s + `Document.id + `__s + are automatically generated based on the hash of + the payload, where IDs may not be consistent + during multiple imports. In which case + `ReconciliationMode.FULL + `__ + is highly recommended to avoid duplicate + contents. If unset or set to ``false``, + `Document.id + `__s have to be specified using - [id_field][google.cloud.discoveryengine.v1.ImportDocumentsRequest.id_field], - otherwise, documents without IDs fail to be imported. + `id_field + `__, + otherwise, documents without IDs fail to be + imported. Supported data sources: - - [GcsSource][google.cloud.discoveryengine.v1.GcsSource]. - [GcsSource.data_schema][google.cloud.discoveryengine.v1.GcsSource.data_schema] - must be ``custom`` or ``csv``. Otherwise, an - INVALID_ARGUMENT error is thrown. - - [BigQuerySource][google.cloud.discoveryengine.v1.BigQuerySource]. - [BigQuerySource.data_schema][google.cloud.discoveryengine.v1.BigQuerySource.data_schema] - must be ``custom`` or ``csv``. Otherwise, an - INVALID_ARGUMENT error is thrown. - - [SpannerSource][google.cloud.discoveryengine.v1.SpannerSource]. - - [CloudSqlSource][google.cloud.discoveryengine.v1.CloudSqlSource]. - - [FirestoreSource][google.cloud.discoveryengine.v1.FirestoreSource]. - - [BigtableSource][google.cloud.discoveryengine.v1.BigtableSource]. + * `GcsSource + `__. + `GcsSource.data_schema + `__ + must be ``custom`` or ``csv``. Otherwise, an + INVALID_ARGUMENT error is thrown. + + * `BigQuerySource + `__. + `BigQuerySource.data_schema + `__ + must be ``custom`` or ``csv``. Otherwise, an + INVALID_ARGUMENT error is thrown. + + * `SpannerSource + `__. + * `CloudSqlSource + `__. + + * `FirestoreSource + `__. + * `BigtableSource + `__. id_field (str): - The field indicates the ID field or column to be used as - unique IDs of the documents. - - For [GcsSource][google.cloud.discoveryengine.v1.GcsSource] - it is the key of the JSON field. For instance, ``my_id`` for - JSON ``{"my_id": "some_uuid"}``. For others, it may be the - column name of the table where the unique ids are stored. - - The values of the JSON field or the table column are used as - the - [Document.id][google.cloud.discoveryengine.v1.Document.id]s. - The JSON field or the table column must be of string type, - and the values must be set as valid strings conform to - `RFC-1034 `__ with 1-63 - characters. Otherwise, documents without valid IDs fail to - be imported. + The field indicates the ID field or column to be + used as unique IDs of the documents. + + For `GcsSource + `__ + it is the key of the JSON field. For instance, + ``my_id`` for JSON ``{"my_id": "some_uuid"}``. + For others, it may be the column name of the + table where the unique ids are stored. + + The values of the JSON field or the table column + are used as the `Document.id + `__s. + The JSON field or the table column must be of + string type, and the values must be set as valid + strings conform to `RFC-1034 + `__ with + 1-63 characters. Otherwise, documents without + valid IDs fail to be imported. Only set this field when - [auto_generate_ids][google.cloud.discoveryengine.v1.ImportDocumentsRequest.auto_generate_ids] - is unset or set as ``false``. Otherwise, an INVALID_ARGUMENT - error is thrown. + `auto_generate_ids + `__ + is unset or set as ``false``. Otherwise, an + INVALID_ARGUMENT error is thrown. - If it is unset, a default value ``_id`` is used when - importing from the allowed data sources. + If it is unset, a default value ``_id`` is used + when importing from the allowed data sources. Supported data sources: - - [GcsSource][google.cloud.discoveryengine.v1.GcsSource]. - [GcsSource.data_schema][google.cloud.discoveryengine.v1.GcsSource.data_schema] - must be ``custom`` or ``csv``. Otherwise, an - INVALID_ARGUMENT error is thrown. - - [BigQuerySource][google.cloud.discoveryengine.v1.BigQuerySource]. - [BigQuerySource.data_schema][google.cloud.discoveryengine.v1.BigQuerySource.data_schema] - must be ``custom`` or ``csv``. Otherwise, an - INVALID_ARGUMENT error is thrown. - - [SpannerSource][google.cloud.discoveryengine.v1.SpannerSource]. - - [CloudSqlSource][google.cloud.discoveryengine.v1.CloudSqlSource]. - - [FirestoreSource][google.cloud.discoveryengine.v1.FirestoreSource]. - - [BigtableSource][google.cloud.discoveryengine.v1.BigtableSource]. + * `GcsSource + `__. + `GcsSource.data_schema + `__ + must be ``custom`` or ``csv``. Otherwise, an + INVALID_ARGUMENT error is thrown. + + * `BigQuerySource + `__. + `BigQuerySource.data_schema + `__ + must be ``custom`` or ``csv``. Otherwise, an + INVALID_ARGUMENT error is thrown. + + * `SpannerSource + `__. + * `CloudSqlSource + `__. + + * `FirestoreSource + `__. + * `BigtableSource + `__. force_refresh_content (bool): - Optional. Whether to force refresh the unstructured content - of the documents. + Optional. Whether to force refresh the + unstructured content of the documents. - If set to ``true``, the content part of the documents will - be refreshed regardless of the update status of the - referencing content. + If set to ``true``, the content part of the + documents will be refreshed regardless of the + update status of the referencing content. """ class ReconciliationMode(proto.Enum): @@ -1066,9 +1132,9 @@ class InlineSource(proto.Message): Attributes: documents (MutableSequence[google.cloud.discoveryengine_v1.types.Document]): - Required. A list of documents to update/create. Each - document must have a valid - [Document.id][google.cloud.discoveryengine.v1.Document.id]. + Required. A list of documents to update/create. + Each document must have a valid `Document.id + `__. Recommended max of 100 items. """ @@ -1167,10 +1233,11 @@ class InlineSource(proto.Message): class ImportDocumentsResponse(proto.Message): r"""Response of the - [ImportDocumentsRequest][google.cloud.discoveryengine.v1.ImportDocumentsRequest]. - If the long running operation is done, then this message is returned - by the google.longrunning.Operations.response field if the operation - was successful. + `ImportDocumentsRequest + `__. If + the long running operation is done, then this message is + returned by the google.longrunning.Operations.response field if + the operation was successful. Attributes: error_samples (MutableSequence[google.rpc.status_pb2.Status]): @@ -1195,7 +1262,8 @@ class ImportDocumentsResponse(proto.Message): class ImportSuggestionDenyListEntriesRequest(proto.Message): r"""Request message for - [CompletionService.ImportSuggestionDenyListEntries][google.cloud.discoveryengine.v1.CompletionService.ImportSuggestionDenyListEntries] + `CompletionService.ImportSuggestionDenyListEntries + `__ method. This message has `oneof`_ fields (mutually exclusive fields). @@ -1214,17 +1282,19 @@ class ImportSuggestionDenyListEntriesRequest(proto.Message): gcs_source (google.cloud.discoveryengine_v1.types.GcsSource): Cloud Storage location for the input content. - Only 1 file can be specified that contains all entries to - import. Supported values ``gcs_source.schema`` for - autocomplete suggestion deny list entry imports: + Only 1 file can be specified that contains all + entries to import. Supported values + ``gcs_source.schema`` for autocomplete + suggestion deny list entry imports: - - ``suggestion_deny_list`` (default): One JSON - [SuggestionDenyListEntry] per line. + * ``suggestion_deny_list`` (default): One JSON + [SuggestionDenyListEntry] per line. This field is a member of `oneof`_ ``source``. parent (str): - Required. The parent data store resource name for which to - import denylist entries. Follows pattern + Required. The parent data store resource name + for which to import denylist entries. Follows + pattern projects/*/locations/*/collections/*/dataStores/*. """ @@ -1265,7 +1335,8 @@ class InlineSource(proto.Message): class ImportSuggestionDenyListEntriesResponse(proto.Message): r"""Response message for - [CompletionService.ImportSuggestionDenyListEntries][google.cloud.discoveryengine.v1.CompletionService.ImportSuggestionDenyListEntries] + `CompletionService.ImportSuggestionDenyListEntries + `__ method. Attributes: @@ -1322,7 +1393,8 @@ class ImportSuggestionDenyListEntriesMetadata(proto.Message): class ImportCompletionSuggestionsRequest(proto.Message): r"""Request message for - [CompletionService.ImportCompletionSuggestions][google.cloud.discoveryengine.v1.CompletionService.ImportCompletionSuggestions] + `CompletionService.ImportCompletionSuggestions + `__ method. This message has `oneof`_ fields (mutually exclusive fields). @@ -1346,8 +1418,9 @@ class ImportCompletionSuggestionsRequest(proto.Message): This field is a member of `oneof`_ ``source``. parent (str): - Required. The parent data store resource name for which to - import customer autocomplete suggestions. + Required. The parent data store resource name + for which to import customer autocomplete + suggestions. Follows pattern ``projects/*/locations/*/collections/*/dataStores/*`` @@ -1404,10 +1477,11 @@ class InlineSource(proto.Message): class ImportCompletionSuggestionsResponse(proto.Message): r"""Response of the - [CompletionService.ImportCompletionSuggestions][google.cloud.discoveryengine.v1.CompletionService.ImportCompletionSuggestions] + `CompletionService.ImportCompletionSuggestions + `__ method. If the long running operation is done, this message is - returned by the google.longrunning.Operations.response field if the - operation is successful. + returned by the google.longrunning.Operations.response field if + the operation is successful. Attributes: error_samples (MutableSequence[google.rpc.status_pb2.Status]): @@ -1443,11 +1517,13 @@ class ImportCompletionSuggestionsMetadata(proto.Message): is done, this is also the finish time. success_count (int): Count of - [CompletionSuggestion][google.cloud.discoveryengine.v1.CompletionSuggestion]s + `CompletionSuggestion + `__s successfully imported. failure_count (int): Count of - [CompletionSuggestion][google.cloud.discoveryengine.v1.CompletionSuggestion]s + `CompletionSuggestion + `__s that failed to be imported. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/project.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/project.py index 23ec2dc21bae..2784661130f5 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/project.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/project.py @@ -34,9 +34,10 @@ class Project(proto.Message): Attributes: name (str): - Output only. Full resource name of the project, for example - ``projects/{project}``. Note that when making requests, - project number and project id are both acceptable, but the + Output only. Full resource name of the project, + for example ``projects/{project}``. + Note that when making requests, project number + and project id are both acceptable, but the server will always respond in project number. create_time (google.protobuf.timestamp_pb2.Timestamp): Output only. The timestamp when this project @@ -47,9 +48,9 @@ class Project(proto.Message): this project is still provisioning and is not ready for use. service_terms_map (MutableMapping[str, google.cloud.discoveryengine_v1.types.Project.ServiceTerms]): - Output only. A map of terms of services. The key is the - ``id`` of - [ServiceTerms][google.cloud.discoveryengine.v1.Project.ServiceTerms]. + Output only. A map of terms of services. The key + is the ``id`` of `ServiceTerms + `__. """ class ServiceTerms(proto.Message): @@ -57,18 +58,21 @@ class ServiceTerms(proto.Message): Attributes: id (str): - The unique identifier of this terms of service. Available - terms: + The unique identifier of this terms of service. + Available terms: - - ``GA_DATA_USE_TERMS``: `Terms for data - use `__. - When using this as ``id``, the acceptable - [version][google.cloud.discoveryengine.v1.Project.ServiceTerms.version] - to provide is ``2022-11-23``. + * ``GA_DATA_USE_TERMS``: `Terms for data + use + `__. + When using this as ``id``, the acceptable + `version + `__ + to provide is ``2022-11-23``. version (str): - The version string of the terms of service. For acceptable - values, see the comments for - [id][google.cloud.discoveryengine.v1.Project.ServiceTerms.id] + The version string of the terms of service. + For acceptable values, see the comments for + `id + `__ above. state (google.cloud.discoveryengine_v1.types.Project.ServiceTerms.State): Whether the project has accepted/rejected the diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/project_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/project_service.py index 77670cbe94f3..57ec8f64d2b0 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/project_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/project_service.py @@ -30,25 +30,30 @@ class ProvisionProjectRequest(proto.Message): r"""Request for - [ProjectService.ProvisionProject][google.cloud.discoveryengine.v1.ProjectService.ProvisionProject] + `ProjectService.ProvisionProject + `__ method. Attributes: name (str): Required. Full resource name of a - [Project][google.cloud.discoveryengine.v1.Project], such as - ``projects/{project_id_or_number}``. + `Project + `__, + such as ``projects/{project_id_or_number}``. accept_data_use_terms (bool): - Required. Set to ``true`` to specify that caller has read - and would like to give consent to the `Terms for data - use `__. + Required. Set to ``true`` to specify that caller + has read and would like to give consent to the + `Terms for data use + `__. data_use_terms_version (str): Required. The version of the `Terms for data - use `__ that - caller has read and would like to give consent to. + use + `__ + that caller has read and would like to give + consent to. - Acceptable version is ``2022-11-23``, and this may change - over time. + Acceptable version is ``2022-11-23``, and this + may change over time. """ name: str = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/purge_config.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/purge_config.py index 74cbdd1f53f1..e3d4d00cbc30 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/purge_config.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/purge_config.py @@ -48,44 +48,68 @@ class PurgeUserEventsRequest(proto.Message): Attributes: parent (str): - Required. The resource name of the catalog under which the - events are created. The format is + Required. The resource name of the catalog under + which the events are created. The format is ``projects/{project}/locations/global/collections/{collection}/dataStores/{dataStore}``. filter (str): - Required. The filter string to specify the events to be - deleted with a length limit of 5,000 characters. The - eligible fields for filtering are: + Required. The filter string to specify the + events to be deleted with a length limit of + 5,000 characters. The eligible fields for + filtering are: - - ``eventType``: Double quoted - [UserEvent.event_type][google.cloud.discoveryengine.v1.UserEvent.event_type] - string. - - ``eventTime``: in ISO 8601 "zulu" format. - - ``userPseudoId``: Double quoted string. Specifying this - will delete all events associated with a visitor. - - ``userId``: Double quoted string. Specifying this will - delete all events associated with a user. + * ``eventType``: Double quoted + `UserEvent.event_type + `__ + string. - Note: This API only supports purging a max range of 30 days. + * ``eventTime``: in ISO 8601 "zulu" format. + * ``userPseudoId``: Double quoted string. + Specifying this will delete all events + associated with a visitor. + + * ``userId``: Double quoted string. Specifying + this will delete all events associated with a + user. + + Note: This API only supports purging a max range + of 30 days. Examples: - - Deleting all events in a time range: - ``eventTime > "2012-04-23T18:25:43.511Z" eventTime < "2012-04-23T18:30:43.511Z"`` - - Deleting specific eventType in a time range: - ``eventTime > "2012-04-23T18:25:43.511Z" eventTime < "2012-04-23T18:30:43.511Z" eventType = "search"`` - - Deleting all events for a specific visitor in a time - range: - ``eventTime > "2012-04-23T18:25:43.511Z" eventTime < "2012-04-23T18:30:43.511Z" userPseudoId = "visitor1024"`` - - Deleting the past 30 days of events inside a DataStore: + * Deleting all events in a time range: + + ``eventTime > "2012-04-23T18:25:43.511Z" + eventTime < "2012-04-23T18:30:43.511Z"`` + + * Deleting specific eventType in a time range: + + ``eventTime > "2012-04-23T18:25:43.511Z" + eventTime < "2012-04-23T18:30:43.511Z" + eventType = "search"`` + + * Deleting all events for a specific visitor in + a time range: + + ``eventTime > "2012-04-23T18:25:43.511Z" + eventTime < "2012-04-23T18:30:43.511Z" + userPseudoId = "visitor1024"`` + + * Deleting the past 30 days of events inside a + DataStore: + ``*`` - The filtering fields are assumed to have an implicit AND. + The filtering fields are assumed to have an + implicit AND. force (bool): - The ``force`` field is currently not supported. Purge user - event requests will permanently delete all purgeable events. - Once the development is complete: If ``force`` is set to - false, the method will return the expected purge count - without deleting any user events. This field will default to + The ``force`` field is currently not supported. + Purge user event requests will permanently + delete all purgeable events. Once the + development is complete: + + If ``force`` is set to false, the method will + return the expected purge count without deleting + any user events. This field will default to false if not included in the request. """ @@ -166,10 +190,11 @@ class PurgeErrorConfig(proto.Message): Attributes: gcs_prefix (str): - Cloud Storage prefix for purge errors. This must be an - empty, existing Cloud Storage directory. Purge errors are - written to sharded files in this directory, one per line, as - a JSON-encoded ``google.rpc.Status`` message. + Cloud Storage prefix for purge errors. This must + be an empty, existing Cloud Storage directory. + Purge errors are written to sharded files in + this directory, one per line, as a JSON-encoded + ``google.rpc.Status`` message. This field is a member of `oneof`_ ``destination``. """ @@ -183,7 +208,8 @@ class PurgeErrorConfig(proto.Message): class PurgeDocumentsRequest(proto.Message): r"""Request message for - [DocumentService.PurgeDocuments][google.cloud.discoveryengine.v1.DocumentService.PurgeDocuments] + `DocumentService.PurgeDocuments + `__ method. This message has `oneof`_ fields (mutually exclusive fields). @@ -195,12 +221,13 @@ class PurgeDocumentsRequest(proto.Message): Attributes: gcs_source (google.cloud.discoveryengine_v1.types.GcsSource): - Cloud Storage location for the input content. Supported - ``data_schema``: + Cloud Storage location for the input content. + Supported ``data_schema``: - - ``document_id``: One valid - [Document.id][google.cloud.discoveryengine.v1.Document.id] - per line. + * ``document_id``: One valid + `Document.id + `__ + per line. This field is a member of `oneof`_ ``source``. inline_source (google.cloud.discoveryengine_v1.types.PurgeDocumentsRequest.InlineSource): @@ -212,26 +239,28 @@ class PurgeDocumentsRequest(proto.Message): Required. The parent resource name, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}``. filter (str): - Required. Filter matching documents to purge. Only currently - supported value is ``*`` (all items). + Required. Filter matching documents to purge. + Only currently supported value is + ``*`` (all items). error_config (google.cloud.discoveryengine_v1.types.PurgeErrorConfig): The desired location of errors incurred during the purge. force (bool): - Actually performs the purge. If ``force`` is set to false, - return the expected purge count without deleting any - documents. + Actually performs the purge. If ``force`` is set + to false, return the expected purge count + without deleting any documents. """ class InlineSource(proto.Message): r"""The inline source for the input config for - [DocumentService.PurgeDocuments][google.cloud.discoveryengine.v1.DocumentService.PurgeDocuments] + `DocumentService.PurgeDocuments + `__ method. Attributes: documents (MutableSequence[str]): - Required. A list of full resource name of documents to - purge. In the format + Required. A list of full resource name of + documents to purge. In the format ``projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*``. Recommended max of 100 items. """ @@ -274,7 +303,8 @@ class InlineSource(proto.Message): class PurgeDocumentsResponse(proto.Message): r"""Response message for - [DocumentService.PurgeDocuments][google.cloud.discoveryengine.v1.DocumentService.PurgeDocuments] + `DocumentService.PurgeDocuments + `__ method. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field. @@ -284,9 +314,10 @@ class PurgeDocumentsResponse(proto.Message): The total count of documents purged as a result of the operation. purge_sample (MutableSequence[str]): - A sample of document names that will be deleted. Only - populated if ``force`` is set to false. A max of 100 names - will be returned and the names are chosen at random. + A sample of document names that will be deleted. + Only populated if ``force`` is set to false. A + max of 100 names will be returned and the names + are chosen at random. """ purge_count: int = proto.Field( @@ -347,13 +378,15 @@ class PurgeDocumentsMetadata(proto.Message): class PurgeSuggestionDenyListEntriesRequest(proto.Message): r"""Request message for - [CompletionService.PurgeSuggestionDenyListEntries][google.cloud.discoveryengine.v1.CompletionService.PurgeSuggestionDenyListEntries] + `CompletionService.PurgeSuggestionDenyListEntries + `__ method. Attributes: parent (str): - Required. The parent data store resource name for which to - import denylist entries. Follows pattern + Required. The parent data store resource name + for which to import denylist entries. Follows + pattern projects/*/locations/*/collections/*/dataStores/*. """ @@ -365,7 +398,8 @@ class PurgeSuggestionDenyListEntriesRequest(proto.Message): class PurgeSuggestionDenyListEntriesResponse(proto.Message): r"""Response message for - [CompletionService.PurgeSuggestionDenyListEntries][google.cloud.discoveryengine.v1.CompletionService.PurgeSuggestionDenyListEntries] + `CompletionService.PurgeSuggestionDenyListEntries + `__ method. Attributes: @@ -415,13 +449,15 @@ class PurgeSuggestionDenyListEntriesMetadata(proto.Message): class PurgeCompletionSuggestionsRequest(proto.Message): r"""Request message for - [CompletionService.PurgeCompletionSuggestions][google.cloud.discoveryengine.v1.CompletionService.PurgeCompletionSuggestions] + `CompletionService.PurgeCompletionSuggestions + `__ method. Attributes: parent (str): - Required. The parent data store resource name for which to - purge completion suggestions. Follows pattern + Required. The parent data store resource name + for which to purge completion suggestions. + Follows pattern projects/*/locations/*/collections/*/dataStores/*. """ @@ -433,7 +469,8 @@ class PurgeCompletionSuggestionsRequest(proto.Message): class PurgeCompletionSuggestionsResponse(proto.Message): r"""Response message for - [CompletionService.PurgeCompletionSuggestions][google.cloud.discoveryengine.v1.CompletionService.PurgeCompletionSuggestions] + `CompletionService.PurgeCompletionSuggestions + `__ method. Attributes: diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/rank_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/rank_service.py index 523aabfa5335..9dee9f05ef12 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/rank_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/rank_service.py @@ -31,24 +31,30 @@ class RankingRecord(proto.Message): r"""Record message for - [RankService.Rank][google.cloud.discoveryengine.v1.RankService.Rank] - method. + `RankService.Rank + `__ method. Attributes: id (str): The unique ID to represent the record. title (str): - The title of the record. Empty by default. At least one of - [title][google.cloud.discoveryengine.v1.RankingRecord.title] - or - [content][google.cloud.discoveryengine.v1.RankingRecord.content] - should be set otherwise an INVALID_ARGUMENT error is thrown. + The title of the record. Empty by default. + At least one of + `title + `__ + or `content + `__ + should be set otherwise an INVALID_ARGUMENT + error is thrown. content (str): - The content of the record. Empty by default. At least one of - [title][google.cloud.discoveryengine.v1.RankingRecord.title] - or - [content][google.cloud.discoveryengine.v1.RankingRecord.content] - should be set otherwise an INVALID_ARGUMENT error is thrown. + The content of the record. Empty by default. + At least one of + `title + `__ + or `content + `__ + should be set otherwise an INVALID_ARGUMENT + error is thrown. score (float): The score of this record based on the given query and selected model. The score will be @@ -77,22 +83,22 @@ class RankingRecord(proto.Message): class RankRequest(proto.Message): r"""Request message for - [RankService.Rank][google.cloud.discoveryengine.v1.RankService.Rank] - method. + `RankService.Rank + `__ method. Attributes: ranking_config (str): - Required. The resource name of the rank service config, such - as + Required. The resource name of the rank service + config, such as ``projects/{project_num}/locations/{location}/rankingConfigs/default_ranking_config``. model (str): - The identifier of the model to use. It is one of: + The identifier of the model to use. It is one + of: + * ``semantic-ranker-512@latest``: Semantic + ranking model with maximum input token size 512. - - ``semantic-ranker-512@latest``: Semantic ranking model - with maximum input token size 512. - - It is set to ``semantic-ranker-512@latest`` by default if - unspecified. + It is set to ``semantic-ranker-512@latest`` by + default if unspecified. top_n (int): The number of results to return. If this is unset or no bigger than zero, returns all @@ -107,26 +113,32 @@ class RankRequest(proto.Message): record ID and score. By default, it is false, the response will contain record details. user_labels (MutableMapping[str, str]): - The user labels applied to a resource must meet the - following requirements: - - - Each resource can have multiple labels, up to a maximum of - 64. - - Each label must be a key-value pair. - - Keys have a minimum length of 1 character and a maximum - length of 63 characters and cannot be empty. Values can be - empty and have a maximum length of 63 characters. - - Keys and values can contain only lowercase letters, - numeric characters, underscores, and dashes. All - characters must use UTF-8 encoding, and international - characters are allowed. - - The key portion of a label must be unique. However, you - can use the same key with multiple resources. - - Keys must start with a lowercase letter or international - character. + The user labels applied to a resource must meet + the following requirements: + * Each resource can have multiple labels, up to + a maximum of 64. + + * Each label must be a key-value pair. + * Keys have a minimum length of 1 character and + a maximum length of 63 characters and cannot + be empty. Values can be empty and have a maximum + length of 63 characters. + + * Keys and values can contain only lowercase + letters, numeric characters, underscores, and + dashes. All characters must use UTF-8 encoding, + and international characters are allowed. + + * The key portion of a label must be unique. + However, you can use the same key with + multiple resources. + + * Keys must start with a lowercase letter or + international character. See `Google Cloud - Document `__ + Document + `__ for more details. """ @@ -164,8 +176,8 @@ class RankRequest(proto.Message): class RankResponse(proto.Message): r"""Response message for - [RankService.Rank][google.cloud.discoveryengine.v1.RankService.Rank] - method. + `RankService.Rank + `__ method. Attributes: records (MutableSequence[google.cloud.discoveryengine_v1.types.RankingRecord]): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/recommendation_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/recommendation_service.py index aa40514fe133..5b436ab96e11 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/recommendation_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/recommendation_service.py @@ -38,38 +38,48 @@ class RecommendRequest(proto.Message): Attributes: serving_config (str): Required. Full resource name of a - [ServingConfig][google.cloud.discoveryengine.v1.ServingConfig]: + `ServingConfig + `__: + ``projects/*/locations/global/collections/*/engines/*/servingConfigs/*``, or ``projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*`` - One default serving config is created along with your - recommendation engine creation. The engine ID is used as the - ID of the default serving config. For example, for Engine + One default serving config is created along with + your recommendation engine creation. The engine + ID is used as the ID of the default serving + config. For example, for Engine ``projects/*/locations/global/collections/*/engines/my-engine``, you can use ``projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine`` for your - [RecommendationService.Recommend][google.cloud.discoveryengine.v1.RecommendationService.Recommend] + `RecommendationService.Recommend + `__ requests. user_event (google.cloud.discoveryengine_v1.types.UserEvent): - Required. Context about the user, what they are looking at - and what action they took to trigger the Recommend request. - Note that this user event detail won't be ingested to - userEvent logs. Thus, a separate userEvent write request is + Required. Context about the user, what they are + looking at and what action they took to trigger + the Recommend request. Note that this user event + detail won't be ingested to userEvent logs. + Thus, a separate userEvent write request is required for event logging. Don't set - [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1.UserEvent.user_pseudo_id] + `UserEvent.user_pseudo_id + `__ or - [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1.UserInfo.user_id] - to the same fixed ID for different users. If you are trying - to receive non-personalized recommendations (not - recommended; this can negatively impact model performance), - instead set - [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1.UserEvent.user_pseudo_id] + `UserEvent.user_info.user_id + `__ + to the same fixed ID for different users. If you + are trying to receive non-personalized + recommendations (not recommended; this can + negatively impact model performance), instead + set + `UserEvent.user_pseudo_id + `__ to a random unique ID and leave - [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1.UserInfo.user_id] + `UserEvent.user_info.user_id + `__ unset. page_size (int): Maximum number of results to return. Set this @@ -78,95 +88,120 @@ class RecommendRequest(proto.Message): reasonable default. The maximum allowed value is 100. Values above 100 are set to 100. filter (str): - Filter for restricting recommendation results with a length - limit of 5,000 characters. Currently, only filter - expressions on the ``filter_tags`` attribute is supported. + Filter for restricting recommendation results + with a length limit of 5,000 characters. + Currently, only filter expressions on the + ``filter_tags`` attribute is supported. Examples: - - ``(filter_tags: ANY("Red", "Blue") OR filter_tags: ANY("Hot", "Cold"))`` - - ``(filter_tags: ANY("Red", "Blue")) AND NOT (filter_tags: ANY("Green"))`` - - If ``attributeFilteringSyntax`` is set to true under the - ``params`` field, then attribute-based expressions are - expected instead of the above described tag-based syntax. - Examples: - - - (language: ANY("en", "es")) AND NOT (categories: - ANY("Movie")) - - (available: true) AND (language: ANY("en", "es")) OR - (categories: ANY("Movie")) - - If your filter blocks all results, the API returns generic - (unfiltered) popular Documents. If you only want results - strictly matching the filters, set ``strictFiltering`` to - ``true`` in - [RecommendRequest.params][google.cloud.discoveryengine.v1.RecommendRequest.params] + * ``(filter_tags: ANY("Red", "Blue") OR + filter_tags: ANY("Hot", "Cold"))`` * + ``(filter_tags: ANY("Red", "Blue")) AND NOT + (filter_tags: ANY("Green"))`` + + If ``attributeFilteringSyntax`` is set to true + under the ``params`` field, then attribute-based + expressions are expected instead of the above + described tag-based syntax. Examples: + + * (language: ANY("en", "es")) AND NOT + (categories: ANY("Movie")) * (available: true) + AND + (language: ANY("en", "es")) OR (categories: + ANY("Movie")) + + If your filter blocks all results, the API + returns generic (unfiltered) popular Documents. + If you only want results strictly matching the + filters, set ``strictFiltering`` to ``true`` in + `RecommendRequest.params + `__ to receive empty results instead. Note that the API never returns - [Document][google.cloud.discoveryengine.v1.Document]s with - ``storageStatus`` as ``EXPIRED`` or ``DELETED`` regardless - of filter choices. + `Document + `__s + with ``storageStatus`` as ``EXPIRED`` or + ``DELETED`` regardless of filter choices. validate_only (bool): - Use validate only mode for this recommendation query. If set - to ``true``, a fake model is used that returns arbitrary - Document IDs. Note that the validate only mode should only - be used for testing the API, or if the model is not ready. + Use validate only mode for this recommendation + query. If set to ``true``, a fake model is used + that returns arbitrary Document IDs. Note that + the validate only mode should only be used for + testing the API, or if the model is not ready. params (MutableMapping[str, google.protobuf.struct_pb2.Value]): Additional domain specific parameters for the recommendations. - Allowed values: - - ``returnDocument``: Boolean. If set to ``true``, the - associated Document object is returned in - [RecommendResponse.RecommendationResult.document][google.cloud.discoveryengine.v1.RecommendResponse.RecommendationResult.document]. - - ``returnScore``: Boolean. If set to true, the - recommendation score corresponding to each returned - Document is set in - [RecommendResponse.RecommendationResult.metadata][google.cloud.discoveryengine.v1.RecommendResponse.RecommendationResult.metadata]. - The given score indicates the probability of a Document - conversion given the user's context and history. - - ``strictFiltering``: Boolean. True by default. If set to - ``false``, the service returns generic (unfiltered) - popular Documents instead of empty if your filter blocks - all recommendation results. - - ``diversityLevel``: String. Default empty. If set to be - non-empty, then it needs to be one of: - - - ``no-diversity`` - - ``low-diversity`` - - ``medium-diversity`` - - ``high-diversity`` - - ``auto-diversity`` This gives request-level control and - adjusts recommendation results based on Document - category. - - - ``attributeFilteringSyntax``: Boolean. False by default. - If set to true, the ``filter`` field is interpreted - according to the new, attribute-based syntax. + * ``returnDocument``: Boolean. If set to + ``true``, the associated Document object is + returned in + `RecommendResponse.RecommendationResult.document + `__. + + * ``returnScore``: Boolean. If set to true, the + recommendation score corresponding to each + returned Document is set in + `RecommendResponse.RecommendationResult.metadata + `__. + The given score indicates the probability of a + Document conversion given the user's context + and history. + + * ``strictFiltering``: Boolean. True by default. + If set to ``false``, the service + returns generic (unfiltered) popular + Documents instead of empty if your filter + blocks all recommendation results. + + * ``diversityLevel``: String. Default empty. If + set to be non-empty, then it needs to be one + of: + + * ``no-diversity`` + * ``low-diversity`` + + * ``medium-diversity`` + * ``high-diversity`` + + * ``auto-diversity`` + This gives request-level control and adjusts + recommendation results based on Document + category. + + * ``attributeFilteringSyntax``: Boolean. False + by default. If set to true, the ``filter`` + field is interpreted according to the new, + attribute-based syntax. user_labels (MutableMapping[str, str]): - The user labels applied to a resource must meet the - following requirements: - - - Each resource can have multiple labels, up to a maximum of - 64. - - Each label must be a key-value pair. - - Keys have a minimum length of 1 character and a maximum - length of 63 characters and cannot be empty. Values can be - empty and have a maximum length of 63 characters. - - Keys and values can contain only lowercase letters, - numeric characters, underscores, and dashes. All - characters must use UTF-8 encoding, and international - characters are allowed. - - The key portion of a label must be unique. However, you - can use the same key with multiple resources. - - Keys must start with a lowercase letter or international - character. + The user labels applied to a resource must meet + the following requirements: + * Each resource can have multiple labels, up to + a maximum of 64. + + * Each label must be a key-value pair. + * Keys have a minimum length of 1 character and + a maximum length of 63 characters and cannot + be empty. Values can be empty and have a maximum + length of 63 characters. + + * Keys and values can contain only lowercase + letters, numeric characters, underscores, and + dashes. All characters must use UTF-8 encoding, + and international characters are allowed. + + * The key portion of a label must be unique. + However, you can use the same key with + multiple resources. + + * Keys must start with a lowercase letter or + international character. See `Requirements for - labels `__ + labels + `__ for more details. """ @@ -213,17 +248,20 @@ class RecommendResponse(proto.Message): represents the ranking (from the most relevant Document to the least). attribution_token (str): - A unique attribution token. This should be included in the - [UserEvent][google.cloud.discoveryengine.v1.UserEvent] logs - resulting from this recommendation, which enables accurate - attribution of recommendation model performance. + A unique attribution token. This should be + included in the `UserEvent + `__ + logs resulting from this recommendation, which + enables accurate attribution of recommendation + model performance. missing_ids (MutableSequence[str]): IDs of documents in the request that were missing from the default Branch associated with the requested ServingConfig. validate_only (bool): True if - [RecommendRequest.validate_only][google.cloud.discoveryengine.v1.RecommendRequest.validate_only] + `RecommendRequest.validate_only + `__ was set. """ @@ -236,15 +274,18 @@ class RecommendationResult(proto.Message): Resource ID of the recommended Document. document (google.cloud.discoveryengine_v1.types.Document): Set if ``returnDocument`` is set to true in - [RecommendRequest.params][google.cloud.discoveryengine.v1.RecommendRequest.params]. + `RecommendRequest.params + `__. metadata (MutableMapping[str, google.protobuf.struct_pb2.Value]): Additional Document metadata or annotations. Possible values: - - ``score``: Recommendation score in double value. Is set if - ``returnScore`` is set to true in - [RecommendRequest.params][google.cloud.discoveryengine.v1.RecommendRequest.params]. + * ``score``: Recommendation score in double + value. Is set if ``returnScore`` is set to + true in + `RecommendRequest.params + `__. """ id: str = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/schema.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/schema.py index 18e6d43e0a35..9d0dc820efb0 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/schema.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/schema.py @@ -48,12 +48,12 @@ class Schema(proto.Message): This field is a member of `oneof`_ ``schema``. name (str): - Immutable. The full resource name of the schema, in the - format of + Immutable. The full resource name of the schema, + in the format of ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}``. - This field must be a UTF-8 encoded string with a length - limit of 1024 characters. + This field must be a UTF-8 encoded string with a + length limit of 1024 characters. """ struct_schema: struct_pb2.Struct = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/schema_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/schema_service.py index a54f02bcbd97..6500a84a4b9d 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/schema_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/schema_service.py @@ -40,13 +40,14 @@ class GetSchemaRequest(proto.Message): r"""Request message for - [SchemaService.GetSchema][google.cloud.discoveryengine.v1.SchemaService.GetSchema] + `SchemaService.GetSchema + `__ method. Attributes: name (str): - Required. The full resource name of the schema, in the - format of + Required. The full resource name of the schema, + in the format of ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}``. """ @@ -58,33 +59,40 @@ class GetSchemaRequest(proto.Message): class ListSchemasRequest(proto.Message): r"""Request message for - [SchemaService.ListSchemas][google.cloud.discoveryengine.v1.SchemaService.ListSchemas] + `SchemaService.ListSchemas + `__ method. Attributes: parent (str): - Required. The parent data store resource name, in the format - of + Required. The parent data store resource name, + in the format of ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}``. page_size (int): - The maximum number of - [Schema][google.cloud.discoveryengine.v1.Schema]s to return. - The service may return fewer than this value. + The maximum number of `Schema + `__s to + return. The service may return fewer than this + value. If unspecified, at most 100 - [Schema][google.cloud.discoveryengine.v1.Schema]s are + `Schema + `__s are returned. - The maximum value is 1000; values above 1000 are set to - 1000. + The maximum value is 1000; values above 1000 are + set to 1000. page_token (str): A page token, received from a previous - [SchemaService.ListSchemas][google.cloud.discoveryengine.v1.SchemaService.ListSchemas] - call. Provide this to retrieve the subsequent page. - - When paginating, all other parameters provided to - [SchemaService.ListSchemas][google.cloud.discoveryengine.v1.SchemaService.ListSchemas] - must match the call that provided the page token. + `SchemaService.ListSchemas + `__ + call. Provide this to retrieve the subsequent + page. + + When paginating, all other parameters provided + to `SchemaService.ListSchemas + `__ + must match the call that provided the page + token. """ parent: str = proto.Field( @@ -103,17 +111,20 @@ class ListSchemasRequest(proto.Message): class ListSchemasResponse(proto.Message): r"""Response message for - [SchemaService.ListSchemas][google.cloud.discoveryengine.v1.SchemaService.ListSchemas] + `SchemaService.ListSchemas + `__ method. Attributes: schemas (MutableSequence[google.cloud.discoveryengine_v1.types.Schema]): - The [Schema][google.cloud.discoveryengine.v1.Schema]s. + The `Schema + `__s. next_page_token (str): A token that can be sent as - [ListSchemasRequest.page_token][google.cloud.discoveryengine.v1.ListSchemasRequest.page_token] - to retrieve the next page. If this field is omitted, there - are no subsequent pages. + `ListSchemasRequest.page_token + `__ + to retrieve the next page. If this field is + omitted, there are no subsequent pages. """ @property @@ -133,26 +144,31 @@ def raw_page(self): class CreateSchemaRequest(proto.Message): r"""Request message for - [SchemaService.CreateSchema][google.cloud.discoveryengine.v1.SchemaService.CreateSchema] + `SchemaService.CreateSchema + `__ method. Attributes: parent (str): - Required. The parent data store resource name, in the format - of + Required. The parent data store resource name, + in the format of ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}``. schema (google.cloud.discoveryengine_v1.types.Schema): - Required. The - [Schema][google.cloud.discoveryengine.v1.Schema] to create. + Required. The `Schema + `__ to + create. schema_id (str): Required. The ID to use for the - [Schema][google.cloud.discoveryengine.v1.Schema], which - becomes the final component of the - [Schema.name][google.cloud.discoveryengine.v1.Schema.name]. + `Schema + `__, + which becomes the final component of the + `Schema.name + `__. This field should conform to - `RFC-1034 `__ standard - with a length limit of 63 characters. + `RFC-1034 + `__ + standard with a length limit of 63 characters. """ parent: str = proto.Field( @@ -172,19 +188,22 @@ class CreateSchemaRequest(proto.Message): class UpdateSchemaRequest(proto.Message): r"""Request message for - [SchemaService.UpdateSchema][google.cloud.discoveryengine.v1.SchemaService.UpdateSchema] + `SchemaService.UpdateSchema + `__ method. Attributes: schema (google.cloud.discoveryengine_v1.types.Schema): - Required. The - [Schema][google.cloud.discoveryengine.v1.Schema] to update. + Required. The `Schema + `__ to + update. allow_missing (bool): - If set to true, and the - [Schema][google.cloud.discoveryengine.v1.Schema] is not - found, a new - [Schema][google.cloud.discoveryengine.v1.Schema] is created. - In this situation, ``update_mask`` is ignored. + If set to true, and the `Schema + `__ is + not found, a new `Schema + `__ is + created. In this situation, ``update_mask`` is + ignored. """ schema: gcd_schema.Schema = proto.Field( @@ -200,13 +219,14 @@ class UpdateSchemaRequest(proto.Message): class DeleteSchemaRequest(proto.Message): r"""Request message for - [SchemaService.DeleteSchema][google.cloud.discoveryengine.v1.SchemaService.DeleteSchema] + `SchemaService.DeleteSchema + `__ method. Attributes: name (str): - Required. The full resource name of the schema, in the - format of + Required. The full resource name of the schema, + in the format of ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}``. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/search_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/search_service.py index 0bbbbac3121a..56eb0d2d2d06 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/search_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/search_service.py @@ -35,164 +35,192 @@ class SearchRequest(proto.Message): r"""Request message for - [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] + `SearchService.Search + `__ method. Attributes: serving_config (str): - Required. The resource name of the Search serving config, - such as + Required. The resource name of the Search + serving config, such as ``projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config``, or ``projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config``. - This field is used to identify the serving configuration - name, set of models used to make the search. + This field is used to identify the serving + configuration name, set of models used to make + the search. branch (str): The branch resource name, such as ``projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0``. - Use ``default_branch`` as the branch ID or leave this field - empty, to search documents under the default branch. + Use ``default_branch`` as the branch ID or leave + this field empty, to search documents under the + default branch. query (str): Raw search query. image_query (google.cloud.discoveryengine_v1.types.SearchRequest.ImageQuery): Raw image query. page_size (int): - Maximum number of - [Document][google.cloud.discoveryengine.v1.Document]s to - return. The maximum allowed value depends on the data type. - Values above the maximum value are coerced to the maximum - value. - - - Websites with basic indexing: Default ``10``, Maximum - ``25``. - - Websites with advanced indexing: Default ``25``, Maximum - ``50``. - - Other: Default ``50``, Maximum ``100``. - - If this field is negative, an ``INVALID_ARGUMENT`` is - returned. + Maximum number of `Document + `__s + to return. The maximum allowed value depends on + the data type. Values above the maximum value + are coerced to the maximum value. + + * Websites with basic indexing: Default ``10``, + Maximum ``25``. * Websites with advanced + indexing: Default ``25``, Maximum ``50``. + + * Other: Default ``50``, Maximum ``100``. + + If this field is negative, an + ``INVALID_ARGUMENT`` is returned. page_token (str): A page token received from a previous - [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] - call. Provide this to retrieve the subsequent page. - - When paginating, all other parameters provided to - [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] - must match the call that provided the page token. Otherwise, - an ``INVALID_ARGUMENT`` error is returned. + `SearchService.Search + `__ + call. Provide this to retrieve the subsequent + page. + + When paginating, all other parameters provided + to `SearchService.Search + `__ + must match the call that provided the page + token. Otherwise, an ``INVALID_ARGUMENT`` + error is returned. offset (int): - A 0-indexed integer that specifies the current offset (that - is, starting result location, amongst the - [Document][google.cloud.discoveryengine.v1.Document]s deemed - by the API as relevant) in search results. This field is - only considered if - [page_token][google.cloud.discoveryengine.v1.SearchRequest.page_token] + A 0-indexed integer that specifies the current + offset (that is, starting result location, + amongst the `Document + `__s + deemed by the API as relevant) in search + results. This field is only considered if + `page_token + `__ is unset. - If this field is negative, an ``INVALID_ARGUMENT`` is - returned. + If this field is negative, an + ``INVALID_ARGUMENT`` is returned. one_box_page_size (int): The maximum number of results to return for OneBox. This applies to each OneBox type individually. Default number is 10. data_store_specs (MutableSequence[google.cloud.discoveryengine_v1.types.SearchRequest.DataStoreSpec]): Specifications that define the specific - [DataStore][google.cloud.discoveryengine.v1.DataStore]s to - be searched, along with configurations for those data - stores. This is only considered for - [Engine][google.cloud.discoveryengine.v1.Engine]s with - multiple data stores. For engines with a single data store, - the specs directly under - [SearchRequest][google.cloud.discoveryengine.v1.SearchRequest] + `DataStore + `__s + to be searched, along with configurations for + those data stores. This is only considered for + `Engine + `__s + with multiple data stores. For engines with a + single data store, the specs directly under + `SearchRequest + `__ should be used. filter (str): - The filter syntax consists of an expression language for - constructing a predicate from one or more fields of the - documents being filtered. Filter expression is - case-sensitive. - - If this field is unrecognizable, an ``INVALID_ARGUMENT`` is - returned. - - Filtering in Vertex AI Search is done by mapping the LHS - filter key to a key property defined in the Vertex AI Search - backend -- this mapping is defined by the customer in their - schema. For example a media customer might have a field - 'name' in their schema. In this case the filter would look - like this: filter --> name:'ANY("king kong")' - - For more information about filtering including syntax and - filter operators, see - `Filter `__ + The filter syntax consists of an expression + language for constructing a predicate from one + or more fields of the documents being filtered. + Filter expression is case-sensitive. + + If this field is unrecognizable, an + ``INVALID_ARGUMENT`` is returned. + + Filtering in Vertex AI Search is done by mapping + the LHS filter key to a key property defined in + the Vertex AI Search backend -- this mapping is + defined by the customer in their schema. For + example a media customer might have a field + 'name' in their schema. In this case the filter + would look like this: filter --> name:'ANY("king + kong")' + + For more information about filtering including + syntax and filter operators, see + `Filter + `__ canonical_filter (str): - The default filter that is applied when a user performs a - search without checking any filters on the search page. - - The filter applied to every search request when quality - improvement such as query expansion is needed. In the case a - query does not have a sufficient amount of results this - filter will be used to determine whether or not to enable - the query expansion flow. The original filter will still be - used for the query expanded search. This field is strongly - recommended to achieve high search quality. + The default filter that is applied when a user + performs a search without checking any filters + on the search page. + + The filter applied to every search request when + quality improvement such as query expansion is + needed. In the case a query does not have a + sufficient amount of results this filter will be + used to determine whether or not to enable the + query expansion flow. The original filter will + still be used for the query expanded search. + This field is strongly recommended to achieve + high search quality. For more information about filter syntax, see - [SearchRequest.filter][google.cloud.discoveryengine.v1.SearchRequest.filter]. + `SearchRequest.filter + `__. order_by (str): - The order in which documents are returned. Documents can be - ordered by a field in an - [Document][google.cloud.discoveryengine.v1.Document] object. - Leave it unset if ordered by relevance. ``order_by`` - expression is case-sensitive. - - For more information on ordering the website search results, - see `Order web search - results `__. - For more information on ordering the healthcare search - results, see `Order healthcare search - results `__. - If this field is unrecognizable, an ``INVALID_ARGUMENT`` is - returned. + The order in which documents are returned. + Documents can be ordered by a field in an + `Document + `__ + object. Leave it unset if ordered by relevance. + ``order_by`` expression is case-sensitive. + + For more information on ordering the website + search results, see `Order web search + results + `__. + For more information on ordering the healthcare + search results, see `Order healthcare search + results + `__. + If this field is unrecognizable, an + ``INVALID_ARGUMENT`` is returned. user_info (google.cloud.discoveryengine_v1.types.UserInfo): - Information about the end user. Highly recommended for - analytics and personalization. - [UserInfo.user_agent][google.cloud.discoveryengine.v1.UserInfo.user_agent] + Information about the end user. + Highly recommended for analytics and + personalization. `UserInfo.user_agent + `__ is used to deduce ``device_type`` for analytics. language_code (str): - The BCP-47 language code, such as "en-US" or "sr-Latn". For - more information, see `Standard - fields `__. - This field helps to better interpret the query. If a value - isn't specified, the query language code is automatically - detected, which may not be accurate. + The BCP-47 language code, such as "en-US" or + "sr-Latn". For more information, see `Standard + fields + `__. + This field helps to better interpret the query. + If a value isn't specified, the query language + code is automatically detected, which may not be + accurate. facet_specs (MutableSequence[google.cloud.discoveryengine_v1.types.SearchRequest.FacetSpec]): - Facet specifications for faceted search. If empty, no facets - are returned. - - A maximum of 100 values are allowed. Otherwise, an - ``INVALID_ARGUMENT`` error is returned. + Facet specifications for faceted search. If + empty, no facets are returned. + A maximum of 100 values are allowed. Otherwise, + an ``INVALID_ARGUMENT`` error is returned. boost_spec (google.cloud.discoveryengine_v1.types.SearchRequest.BoostSpec): - Boost specification to boost certain documents. For more - information on boosting, see - `Boosting `__ + Boost specification to boost certain documents. + For more information on boosting, see + `Boosting + `__ params (MutableMapping[str, google.protobuf.struct_pb2.Value]): Additional search parameters. - For public website search only, supported values are: + For public website search only, supported values + are: - - ``user_country_code``: string. Default empty. If set to - non-empty, results are restricted or boosted based on the - location provided. For example, - ``user_country_code: "au"`` + * ``user_country_code``: string. Default empty. + If set to non-empty, results are restricted + or boosted based on the location provided. + For example, ``user_country_code: "au"`` - For available codes see `Country - Codes `__ + For available codes see `Country + Codes + `__ - - ``search_type``: double. Default empty. Enables - non-webpage searching depending on the value. The only - valid non-default value is 1, which enables image - searching. For example, ``search_type: 1`` + * ``search_type``: double. Default empty. + Enables non-webpage searching depending on + the value. The only valid non-default value is + 1, which enables image searching. + For example, ``search_type: 1`` query_expansion_spec (google.cloud.discoveryengine_v1.types.SearchRequest.QueryExpansionSpec): The query expansion specification that specifies the conditions under which query @@ -202,23 +230,26 @@ class SearchRequest(proto.Message): specifies the mode under which spell correction takes effect. user_pseudo_id (str): - A unique identifier for tracking visitors. For example, this - could be implemented with an HTTP cookie, which should be - able to uniquely identify a visitor on a single device. This - unique identifier should not change if the visitor logs in - or out of the website. + A unique identifier for tracking visitors. For + example, this could be implemented with an HTTP + cookie, which should be able to uniquely + identify a visitor on a single device. This + unique identifier should not change if the + visitor logs in or out of the website. This field should NOT have a fixed value such as ``unknown_visitor``. This should be the same identifier as - [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1.UserEvent.user_pseudo_id] + `UserEvent.user_pseudo_id + `__ and - [CompleteQueryRequest.user_pseudo_id][google.cloud.discoveryengine.v1.CompleteQueryRequest.user_pseudo_id] + `CompleteQueryRequest.user_pseudo_id + `__ - The field must be a UTF-8 encoded string with a length limit - of 128 characters. Otherwise, an ``INVALID_ARGUMENT`` error - is returned. + The field must be a UTF-8 encoded string with a + length limit of 128 characters. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. content_search_spec (google.cloud.discoveryengine_v1.types.SearchRequest.ContentSearchSpec): A specification for configuring the behavior of content search. @@ -226,30 +257,37 @@ class SearchRequest(proto.Message): Whether to turn on safe search. This is only supported for website search. user_labels (MutableMapping[str, str]): - The user labels applied to a resource must meet the - following requirements: - - - Each resource can have multiple labels, up to a maximum of - 64. - - Each label must be a key-value pair. - - Keys have a minimum length of 1 character and a maximum - length of 63 characters and cannot be empty. Values can be - empty and have a maximum length of 63 characters. - - Keys and values can contain only lowercase letters, - numeric characters, underscores, and dashes. All - characters must use UTF-8 encoding, and international - characters are allowed. - - The key portion of a label must be unique. However, you - can use the same key with multiple resources. - - Keys must start with a lowercase letter or international - character. + The user labels applied to a resource must meet + the following requirements: + * Each resource can have multiple labels, up to + a maximum of 64. + + * Each label must be a key-value pair. + * Keys have a minimum length of 1 character and + a maximum length of 63 characters and cannot + be empty. Values can be empty and have a maximum + length of 63 characters. + + * Keys and values can contain only lowercase + letters, numeric characters, underscores, and + dashes. All characters must use UTF-8 encoding, + and international characters are allowed. + + * The key portion of a label must be unique. + However, you can use the same key with + multiple resources. + + * Keys must start with a lowercase letter or + international character. See `Google Cloud - Document `__ + Document + `__ for more details. search_as_you_type_spec (google.cloud.discoveryengine_v1.types.SearchRequest.SearchAsYouTypeSpec): - Search as you type configuration. Only supported for the - [IndustryVertical.MEDIA][google.cloud.discoveryengine.v1.IndustryVertical.MEDIA] + Search as you type configuration. Only supported + for the `IndustryVertical.MEDIA + `__ vertical. display_spec (google.cloud.discoveryengine_v1.types.SearchRequest.DisplaySpec): Optional. Config for display feature, like @@ -302,35 +340,22 @@ class SearchRequest(proto.Message): Optional. The specification for returning the relevance score. ranking_expression (str): - The ranking expression controls the customized ranking on - retrieval documents. This overrides - [ServingConfig.ranking_expression][google.cloud.discoveryengine.v1.ServingConfig.ranking_expression]. - The syntax and supported features depend on the - ``ranking_expression_backend`` value. If - ``ranking_expression_backend`` is not provided, it defaults - to ``RANK_BY_EMBEDDING``. - - If - [ranking_expression_backend][google.cloud.discoveryengine.v1.SearchRequest.ranking_expression_backend] - is not provided or set to ``RANK_BY_EMBEDDING``, it should - be a single function or multiple functions that are joined - by "+". - - - ranking_expression = function, { " + ", function }; + The ranking expression controls the customized ranking on retrieval documents. This overrides [ServingConfig.ranking_expression][google.cloud.discoveryengine.v1.ServingConfig.ranking_expression]. The syntax and supported features depend on the ``ranking_expression_backend`` value. If ``ranking_expression_backend`` is not provided, it defaults to ``RANK_BY_EMBEDDING``. + + If [ranking_expression_backend][google.cloud.discoveryengine.v1.SearchRequest.ranking_expression_backend] is not provided or set to ``RANK_BY_EMBEDDING``, it should be a single function or multiple functions that are joined by "+". + + - ranking_expression = function, { " + ", function }; Supported functions: - - double \* relevance_score - - double \* dotProduct(embedding_field_path) + - double \* relevance_score + - double \* dotProduct(embedding_field_path) Function variables: - - ``relevance_score``: pre-defined keywords, used for - measure relevance between query and document. - - ``embedding_field_path``: the document embedding field - used with query embedding vector. - - ``dotProduct``: embedding function between - ``embedding_field_path`` and query embedding vector. + - ``relevance_score``: pre-defined keywords, used for measure relevance between query and document. + - ``embedding_field_path``: the document embedding field used with query embedding vector. + - ``dotProduct``: embedding function between ``embedding_field_path`` and query embedding vector. Example ranking expression: @@ -339,71 +364,34 @@ class SearchRequest(proto.Message): If document has an embedding field doc_embedding, the ranking expression could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`. - If - [ranking_expression_backend][google.cloud.discoveryengine.v1.SearchRequest.ranking_expression_backend] - is set to ``RANK_BY_FORMULA``, the following expression - types (and combinations of those chained using + or - - - operators) are supported: - - - ``double`` - - ``signal`` - - ``log(signal)`` - - ``exp(signal)`` - - ``rr(signal, double > 0)`` -- reciprocal rank - transformation with second argument being a denominator - constant. - - ``is_nan(signal)`` -- returns 0 if signal is NaN, 1 - otherwise. - - ``fill_nan(signal1, signal2 | double)`` -- if signal1 is - NaN, returns signal2 \| double, else returns signal1. - - Here are a few examples of ranking formulas that use the - supported ranking expression types: - - - ``0.2 * semantic_similarity_score + 0.8 * log(keyword_similarity_score)`` - -- mostly rank by the logarithm of - ``keyword_similarity_score`` with slight - ``semantic_smilarity_score`` adjustment. - - ``0.2 * exp(fill_nan(semantic_similarity_score, 0)) + 0.3 * is_nan(keyword_similarity_score)`` - -- rank by the exponent of ``semantic_similarity_score`` - filling the value with 0 if it's NaN, also add constant - 0.3 adjustment to the final score if - ``semantic_similarity_score`` is NaN. - - ``0.2 * rr(semantic_similarity_score, 16) + 0.8 * rr(keyword_similarity_score, 16)`` - -- mostly rank by the reciprocal rank of - ``keyword_similarity_score`` with slight adjustment of - reciprocal rank of ``semantic_smilarity_score``. + If [ranking_expression_backend][google.cloud.discoveryengine.v1.SearchRequest.ranking_expression_backend] is set to ``RANK_BY_FORMULA``, the following expression types (and combinations of those chained using + or + + - operators) are supported: + + - ``double`` + - ``signal`` + - ``log(signal)`` + - ``exp(signal)`` + - ``rr(signal, double > 0)`` -- reciprocal rank transformation with second argument being a denominator constant. + - ``is_nan(signal)`` -- returns 0 if signal is NaN, 1 otherwise. + - ``fill_nan(signal1, signal2 | double)`` -- if signal1 is NaN, returns signal2 \| double, else returns signal1. + + Here are a few examples of ranking formulas that use the supported ranking expression types: + + - ``0.2 * semantic_similarity_score + 0.8 * log(keyword_similarity_score)`` -- mostly rank by the logarithm of ``keyword_similarity_score`` with slight ``semantic_smilarity_score`` adjustment. + - ``0.2 * exp(fill_nan(semantic_similarity_score, 0)) + 0.3 * is_nan(keyword_similarity_score)`` -- rank by the exponent of ``semantic_similarity_score`` filling the value with 0 if it's NaN, also add constant 0.3 adjustment to the final score if ``semantic_similarity_score`` is NaN. + - ``0.2 * rr(semantic_similarity_score, 16) + 0.8 * rr(keyword_similarity_score, 16)`` -- mostly rank by the reciprocal rank of ``keyword_similarity_score`` with slight adjustment of reciprocal rank of ``semantic_smilarity_score``. The following signals are supported: - - ``semantic_similarity_score``: semantic similarity - adjustment that is calculated using the embeddings - generated by a proprietary Google model. This score - determines how semantically similar a search query is to a - document. - - ``keyword_similarity_score``: keyword match adjustment - uses the Best Match 25 (BM25) ranking function. This score - is calculated using a probabilistic model to estimate the - probability that a document is relevant to a given query. - - ``relevance_score``: semantic relevance adjustment that - uses a proprietary Google model to determine the meaning - and intent behind a user's query in context with the - content in the documents. - - ``pctr_rank``: predicted conversion rate adjustment as a - rank use predicted Click-through rate (pCTR) to gauge the - relevance and attractiveness of a search result from a - user's perspective. A higher pCTR suggests that the result - is more likely to satisfy the user's query and intent, - making it a valuable signal for ranking. - - ``freshness_rank``: freshness adjustment as a rank - - ``document_age``: The time in hours elapsed since the - document was last updated, a floating-point number (e.g., - 0.25 means 15 minutes). - - ``topicality_rank``: topicality adjustment as a rank. Uses - proprietary Google model to determine the keyword-based - overlap between the query and the document. - - ``base_rank``: the default rank of the result + - ``semantic_similarity_score``: semantic similarity adjustment that is calculated using the embeddings generated by a proprietary Google model. This score determines how semantically similar a search query is to a document. + - ``keyword_similarity_score``: keyword match adjustment uses the Best Match 25 (BM25) ranking function. This score is calculated using a probabilistic model to estimate the probability that a document is relevant to a given query. + - ``relevance_score``: semantic relevance adjustment that uses a proprietary Google model to determine the meaning and intent behind a user's query in context with the content in the documents. + - ``pctr_rank``: predicted conversion rate adjustment as a rank use predicted Click-through rate (pCTR) to gauge the relevance and attractiveness of a search result from a user's perspective. A higher pCTR suggests that the result is more likely to satisfy the user's query and intent, making it a valuable signal for ranking. + - ``freshness_rank``: freshness adjustment as a rank + - ``document_age``: The time in hours elapsed since the document was last updated, a floating-point number (e.g., 0.25 means 15 minutes). + - ``topicality_rank``: topicality adjustment as a rank. Uses proprietary Google model to determine the keyword-based overlap between the query and the document. + - ``base_rank``: the default rank of the result ranking_expression_backend (google.cloud.discoveryengine_v1.types.SearchRequest.RankingExpressionBackend): The backend to use for the ranking expression evaluation. @@ -477,23 +465,28 @@ class DataStoreSpec(proto.Message): Attributes: data_store (str): Required. Full resource name of - [DataStore][google.cloud.discoveryengine.v1.DataStore], such - as + `DataStore + `__, + such as ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}``. filter (str): - Optional. Filter specification to filter documents in the - data store specified by data_store field. For more - information on filtering, see - `Filtering `__ + Optional. Filter specification to filter + documents in the data store specified by + data_store field. For more information on + filtering, see `Filtering + `__ boost_spec (google.cloud.discoveryengine_v1.types.SearchRequest.BoostSpec): - Optional. Boost specification to boost certain documents. - For more information on boosting, see - `Boosting `__ + Optional. Boost specification to boost certain + documents. For more information on boosting, see + `Boosting + `__ custom_search_operators (str): - Optional. Custom search operators which if specified will be - used to filter results from workspace data stores. For more - information on custom search operators, see - `SearchOperators `__. + Optional. Custom search operators which if + specified will be used to filter results from + workspace data stores. For more information on + custom search operators, see + `SearchOperators + `__. """ data_store: str = proto.Field( @@ -521,80 +514,91 @@ class FacetSpec(proto.Message): facet_key (google.cloud.discoveryengine_v1.types.SearchRequest.FacetSpec.FacetKey): Required. The facet key specification. limit (int): - Maximum facet values that are returned for this facet. If - unspecified, defaults to 20. The maximum allowed value is - 300. Values above 300 are coerced to 300. For aggregation in - healthcare search, when the [FacetKey.key] is - "healthcare_aggregation_key", the limit will be overridden - to 10,000 internally, regardless of the value set here. - - If this field is negative, an ``INVALID_ARGUMENT`` is - returned. + Maximum facet values that are returned for this + facet. If unspecified, defaults to 20. The + maximum allowed value is 300. Values above 300 + are coerced to 300. + For aggregation in healthcare search, when the + [FacetKey.key] is "healthcare_aggregation_key", + the limit will be overridden to 10,000 + internally, regardless of the value set here. + + If this field is negative, an + ``INVALID_ARGUMENT`` is returned. excluded_filter_keys (MutableSequence[str]): List of keys to exclude when faceting. By default, - [FacetKey.key][google.cloud.discoveryengine.v1.SearchRequest.FacetSpec.FacetKey.key] - is not excluded from the filter unless it is listed in this - field. - - Listing a facet key in this field allows its values to - appear as facet results, even when they are filtered out of - search results. Using this field does not affect what search - results are returned. - - For example, suppose there are 100 documents with the color - facet "Red" and 200 documents with the color facet "Blue". A - query containing the filter "color:ANY("Red")" and having - "color" as - [FacetKey.key][google.cloud.discoveryengine.v1.SearchRequest.FacetSpec.FacetKey.key] - would by default return only "Red" documents in the search - results, and also return "Red" with count 100 as the only - color facet. Although there are also blue documents - available, "Blue" would not be shown as an available facet - value. - - If "color" is listed in "excludedFilterKeys", then the query - returns the facet values "Red" with count 100 and "Blue" - with count 200, because the "color" key is now excluded from - the filter. Because this field doesn't affect search - results, the search results are still correctly filtered to - return only "Red" documents. - - A maximum of 100 values are allowed. Otherwise, an - ``INVALID_ARGUMENT`` error is returned. + `FacetKey.key + `__ + is not excluded from the filter unless it is + listed in this field. + + Listing a facet key in this field allows its + values to appear as facet results, even when + they are filtered out of search results. Using + this field does not affect what search results + are returned. + + For example, suppose there are 100 documents + with the color facet "Red" and 200 documents + with the color facet "Blue". A query containing + the filter "color:ANY("Red")" and having "color" + as `FacetKey.key + `__ + would by default return only "Red" documents in + the search results, and also return "Red" with + count 100 as the only color facet. Although + there are also blue documents available, "Blue" + would not be shown as an available facet value. + + If "color" is listed in "excludedFilterKeys", + then the query returns the facet values "Red" + with count 100 and "Blue" with count 200, + because the "color" key is now excluded from the + filter. Because this field doesn't affect search + results, the search results are still correctly + filtered to return only "Red" documents. + + A maximum of 100 values are allowed. Otherwise, + an ``INVALID_ARGUMENT`` error is returned. enable_dynamic_position (bool): - Enables dynamic position for this facet. If set to true, the - position of this facet among all facets in the response is - determined automatically. If dynamic facets are enabled, it - is ordered together. If set to false, the position of this - facet in the response is the same as in the request, and it - is ranked before the facets with dynamic position enable and - all dynamic facets. - - For example, you may always want to have rating facet - returned in the response, but it's not necessarily to always - display the rating facet at the top. In that case, you can - set enable_dynamic_position to true so that the position of - rating facet in response is determined automatically. - - Another example, assuming you have the following facets in - the request: - - - "rating", enable_dynamic_position = true - - - "price", enable_dynamic_position = false - - - "brands", enable_dynamic_position = false - - And also you have a dynamic facets enabled, which generates - a facet ``gender``. Then the final order of the facets in - the response can be ("price", "brands", "rating", "gender") - or ("price", "brands", "gender", "rating") depends on how - API orders "gender" and "rating" facets. However, notice - that "price" and "brands" are always ranked at first and - second position because their enable_dynamic_position is - false. + Enables dynamic position for this facet. If set + to true, the position of this facet among all + facets in the response is determined + automatically. If dynamic facets are enabled, it + is ordered together. If set to false, the + position of this facet in the response is the + same as in the request, and it is ranked before + the facets with dynamic position enable and all + dynamic facets. + + For example, you may always want to have rating + facet returned in the response, but it's not + necessarily to always display the rating facet + at the top. In that case, you can set + enable_dynamic_position to true so that the + position of rating facet in response is + determined automatically. + + Another example, assuming you have the following + facets in the request: + + * "rating", enable_dynamic_position = true + + * "price", enable_dynamic_position = false + + * "brands", enable_dynamic_position = false + + And also you have a dynamic facets enabled, + which generates a facet ``gender``. Then the + final order of the facets in the response can be + ("price", "brands", "rating", "gender") or + ("price", "brands", "gender", "rating") depends + on how API orders "gender" and "rating" facets. + However, notice that "price" and "brands" are + always ranked at first and second position + because their enable_dynamic_position is false. """ class FacetKey(proto.Message): @@ -602,21 +606,23 @@ class FacetKey(proto.Message): Attributes: key (str): - Required. Supported textual and numerical facet keys in - [Document][google.cloud.discoveryengine.v1.Document] object, - over which the facet values are computed. Facet key is - case-sensitive. + Required. Supported textual and numerical facet + keys in `Document + `__ + object, over which the facet values are + computed. Facet key is case-sensitive. intervals (MutableSequence[google.cloud.discoveryengine_v1.types.Interval]): Set only if values should be bucketed into intervals. Must be set for facets with numerical values. Must not be set for facet with text values. Maximum number of intervals is 30. restricted_values (MutableSequence[str]): - Only get facet for the given restricted values. Only - supported on textual fields. For example, suppose "category" - has three values "Action > 2022", "Action > 2021" and - "Sci-Fi > 2022". If set "restricted_values" to "Action > - 2022", the "category" facet only contains "Action > 2022". + Only get facet for the given restricted values. + Only supported on textual fields. For example, + suppose "category" has three values "Action > + 2022", "Action > 2021" and "Sci-Fi > 2022". If + set "restricted_values" to "Action > 2022", the + "category" facet only contains "Action > 2022". Only supported on textual fields. Maximum is 10. prefixes (MutableSequence[str]): Only get facet values that start with the @@ -644,18 +650,24 @@ class FacetKey(proto.Message): Allowed values are: - - "count desc", which means order by - [SearchResponse.Facet.values.count][google.cloud.discoveryengine.v1.SearchResponse.Facet.FacetValue.count] - descending. - - - "value desc", which means order by - [SearchResponse.Facet.values.value][google.cloud.discoveryengine.v1.SearchResponse.Facet.FacetValue.value] - descending. Only applies to textual facets. - - If not set, textual values are sorted in `natural - order `__; - numerical intervals are sorted in the order given by - [FacetSpec.FacetKey.intervals][google.cloud.discoveryengine.v1.SearchRequest.FacetSpec.FacetKey.intervals]. + * "count desc", which means order by + `SearchResponse.Facet.values.count + `__ + descending. + + * "value desc", which means order by + `SearchResponse.Facet.values.value + `__ + descending. + Only applies to textual facets. + + If not set, textual values are sorted in + `natural order + `__; + numerical intervals are sorted in the order + given by + `FacetSpec.FacetKey.intervals + `__. """ key: str = proto.Field( @@ -724,39 +736,46 @@ class ConditionBoostSpec(proto.Message): Attributes: condition (str): - An expression which specifies a boost condition. The syntax - and supported fields are the same as a filter expression. - See - [SearchRequest.filter][google.cloud.discoveryengine.v1.SearchRequest.filter] + An expression which specifies a boost condition. + The syntax and supported fields are the same as + a filter expression. See `SearchRequest.filter + `__ for detail syntax and limitations. Examples: - - To boost documents with document ID "doc_1" or "doc_2", - and color "Red" or "Blue": - ``(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))`` + * To boost documents with document ID "doc_1" or + "doc_2", and color "Red" or "Blue": + + ``(document_id: ANY("doc_1", "doc_2")) AND + (color: ANY("Red", "Blue"))`` boost (float): - Strength of the condition boost, which should be in [-1, 1]. - Negative boost means demotion. Default is 0.0. - - Setting to 1.0 gives the document a big promotion. However, - it does not necessarily mean that the boosted document will - be the top result at all times, nor that other documents - will be excluded. Results could still be shown even when - none of them matches the condition. And results that are - significantly more relevant to the search query can still - trump your heavily favored but irrelevant documents. - - Setting to -1.0 gives the document a big demotion. However, - results that are deeply relevant might still be shown. The - document will have an upstream battle to get a fairly high + Strength of the condition boost, which should be + in [-1, 1]. Negative boost means demotion. + Default is 0.0. + + Setting to 1.0 gives the document a big + promotion. However, it does not necessarily mean + that the boosted document will be the top result + at all times, nor that other documents will be + excluded. Results could still be shown even when + none of them matches the condition. And results + that are significantly more relevant to the + search query can still trump your heavily + favored but irrelevant documents. + + Setting to -1.0 gives the document a big + demotion. However, results that are deeply + relevant might still be shown. The document will + have an upstream battle to get a fairly high ranking, but it is not blocked out completely. - Setting to 0.0 means no boost applied. The boosting - condition is ignored. Only one of the (condition, boost) - combination or the boost_control_spec below are set. If both - are set then the global boost is ignored and the more - fine-grained boost_control_spec is applied. + Setting to 0.0 means no boost applied. The + boosting condition is ignored. Only one of the + (condition, boost) combination or the + boost_control_spec below are set. If both are + set then the global boost is ignored and the + more fine-grained boost_control_spec is applied. boost_control_spec (google.cloud.discoveryengine_v1.types.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec): Complex specification for custom ranking based on customer defined attribute value. @@ -772,19 +791,22 @@ class BoostControlSpec(proto.Message): The name of the field whose value will be used to determine the boost amount. attribute_type (google.cloud.discoveryengine_v1.types.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.AttributeType): - The attribute type to be used to determine the boost amount. - The attribute value can be derived from the field value of - the specified field_name. In the case of numerical it is + The attribute type to be used to determine the + boost amount. The attribute value can be derived + from the field value of the specified + field_name. In the case of numerical it is straightforward i.e. attribute_value = - numerical_field_value. In the case of freshness however, - attribute_value = (time.now() - datetime_field_value). + numerical_field_value. In the case of freshness + however, attribute_value = (time.now() - + datetime_field_value). interpolation_type (google.cloud.discoveryengine_v1.types.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.InterpolationType): The interpolation type to be applied to connect the control points listed below. control_points (MutableSequence[google.cloud.discoveryengine_v1.types.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint]): - The control points used to define the curve. The monotonic - function (defined through the interpolation_type above) - passes through the control points listed here. + The control points used to define the curve. The + monotonic function (defined through the + interpolation_type above) passes through the + control points listed here. """ class AttributeType(proto.Enum): @@ -795,19 +817,21 @@ class AttributeType(proto.Enum): ATTRIBUTE_TYPE_UNSPECIFIED (0): Unspecified AttributeType. NUMERICAL (1): - The value of the numerical field will be used to dynamically - update the boost amount. In this case, the attribute_value - (the x value) of the control point will be the actual value - of the numerical field for which the boost_amount is + The value of the numerical field will be used to + dynamically update the boost amount. In this + case, the attribute_value (the x value) of the + control point will be the actual value of the + numerical field for which the boost_amount is specified. FRESHNESS (2): - For the freshness use case the attribute value will be the - duration between the current time and the date in the - datetime field specified. The value must be formatted as an - XSD ``dayTimeDuration`` value (a restricted subset of an ISO - 8601 duration value). The pattern for this is: - ``[nD][T[nH][nM][nS]]``. For example, ``5D``, ``3DT12H30M``, - ``T24H``. + For the freshness use case the attribute value + will be the duration between the current time + and the date in the datetime field specified. + The value must be formatted as an XSD + ``dayTimeDuration`` value (a restricted subset + of an ISO 8601 duration value). The pattern for + this is: ```nD `__`nM `__]``. For + example, ``5D``, ``3DT12H30M``, ``T24H``. """ ATTRIBUTE_TYPE_UNSPECIFIED = 0 NUMERICAL = 1 @@ -838,13 +862,16 @@ class ControlPoint(proto.Message): Can be one of: 1. The numerical field value. - 2. The duration spec for freshness: The value must be - formatted as an XSD ``dayTimeDuration`` value (a - restricted subset of an ISO 8601 duration value). The - pattern for this is: ``[nD][T[nH][nM][nS]]``. + 2. The duration spec for freshness: + + The value must be formatted as an XSD + ``dayTimeDuration`` value (a restricted subset + of an ISO 8601 duration value). The pattern for + this is: ```nD `__`nM `__]``. boost_amount (float): - The value between -1 to 1 by which to boost the score if the - attribute_value evaluates to the value specified above. + The value between -1 to 1 by which to boost the + score if the attribute_value evaluates to the + value specified above. """ attribute_value: str = proto.Field( @@ -906,9 +933,9 @@ class QueryExpansionSpec(proto.Message): Attributes: condition (google.cloud.discoveryengine_v1.types.SearchRequest.QueryExpansionSpec.Condition): - The condition under which query expansion should occur. - Default to - [Condition.DISABLED][google.cloud.discoveryengine.v1.SearchRequest.QueryExpansionSpec.Condition.DISABLED]. + The condition under which query expansion should + occur. Default to `Condition.DISABLED + `__. pin_unexpanded_results (bool): Whether to pin unexpanded results. If this field is set to true, unexpanded products are @@ -922,13 +949,15 @@ class Condition(proto.Enum): Values: CONDITION_UNSPECIFIED (0): - Unspecified query expansion condition. In this case, server - behavior defaults to - [Condition.DISABLED][google.cloud.discoveryengine.v1.SearchRequest.QueryExpansionSpec.Condition.DISABLED]. + Unspecified query expansion condition. In this + case, server behavior defaults to + `Condition.DISABLED + `__. DISABLED (1): - Disabled query expansion. Only the exact search query is - used, even if - [SearchResponse.total_size][google.cloud.discoveryengine.v1.SearchResponse.total_size] + Disabled query expansion. Only the exact search + query is used, even if + `SearchResponse.total_size + `__ is zero. AUTO (2): Automatic query expansion built by the Search @@ -953,9 +982,10 @@ class SpellCorrectionSpec(proto.Message): Attributes: mode (google.cloud.discoveryengine_v1.types.SearchRequest.SpellCorrectionSpec.Mode): - The mode under which spell correction replaces the original - search query. Defaults to - [Mode.AUTO][google.cloud.discoveryengine.v1.SearchRequest.SpellCorrectionSpec.Mode.AUTO]. + The mode under which spell correction + replaces the original search query. Defaults to + `Mode.AUTO + `__. """ class Mode(proto.Enum): @@ -964,14 +994,17 @@ class Mode(proto.Enum): Values: MODE_UNSPECIFIED (0): - Unspecified spell correction mode. In this case, server - behavior defaults to - [Mode.AUTO][google.cloud.discoveryengine.v1.SearchRequest.SpellCorrectionSpec.Mode.AUTO]. + Unspecified spell correction mode. In this case, + server behavior defaults to + `Mode.AUTO + `__. SUGGESTION_ONLY (1): - Search API tries to find a spelling suggestion. If a - suggestion is found, it is put in the - [SearchResponse.corrected_query][google.cloud.discoveryengine.v1.SearchResponse.corrected_query]. - The spelling suggestion won't be used as the search query. + Search API tries to find a spelling suggestion. + If a suggestion is found, it is put in the + `SearchResponse.corrected_query + `__. + The spelling suggestion won't be used as the + search query. AUTO (2): Automatic spell correction built by the Search API. Search will be based on the @@ -993,28 +1026,32 @@ class ContentSearchSpec(proto.Message): Attributes: snippet_spec (google.cloud.discoveryengine_v1.types.SearchRequest.ContentSearchSpec.SnippetSpec): - If ``snippetSpec`` is not specified, snippets are not - included in the search response. + If ``snippetSpec`` is not specified, snippets + are not included in the search response. summary_spec (google.cloud.discoveryengine_v1.types.SearchRequest.ContentSearchSpec.SummarySpec): - If ``summarySpec`` is not specified, summaries are not - included in the search response. + If ``summarySpec`` is not specified, summaries + are not included in the search response. extractive_content_spec (google.cloud.discoveryengine_v1.types.SearchRequest.ContentSearchSpec.ExtractiveContentSpec): - If there is no extractive_content_spec provided, there will - be no extractive answer in the search response. + If there is no extractive_content_spec provided, + there will be no extractive answer in the search + response. search_result_mode (google.cloud.discoveryengine_v1.types.SearchRequest.ContentSearchSpec.SearchResultMode): - Specifies the search result mode. If unspecified, the search - result mode defaults to ``DOCUMENTS``. + Specifies the search result mode. If + unspecified, the search result mode defaults to + ``DOCUMENTS``. chunk_spec (google.cloud.discoveryengine_v1.types.SearchRequest.ContentSearchSpec.ChunkSpec): - Specifies the chunk spec to be returned from the search - response. Only available if the - [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.search_result_mode] + Specifies the chunk spec to be returned from the + search response. Only available if the + `SearchRequest.ContentSearchSpec.search_result_mode + `__ is set to - [CHUNKS][google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS] + `CHUNKS + `__ """ class SearchResultMode(proto.Enum): - r"""Specifies the search result mode. If unspecified, the search result - mode defaults to ``DOCUMENTS``. + r"""Specifies the search result mode. If unspecified, the + search result mode defaults to ``DOCUMENTS``. Values: SEARCH_RESULT_MODE_UNSPECIFIED (0): @@ -1022,8 +1059,10 @@ class SearchResultMode(proto.Enum): DOCUMENTS (1): Returns documents in the search result. CHUNKS (2): - Returns chunks in the search result. Only available if the - [DocumentProcessingConfig.chunking_config][google.cloud.discoveryengine.v1.DocumentProcessingConfig.chunking_config] + Returns chunks in the search result. Only + available if the + `DocumentProcessingConfig.chunking_config + `__ is specified. """ SEARCH_RESULT_MODE_UNSPECIFIED = 0 @@ -1036,18 +1075,19 @@ class SnippetSpec(proto.Message): Attributes: max_snippet_count (int): - [DEPRECATED] This field is deprecated. To control snippet - return, use ``return_snippet`` field. For backwards - compatibility, we will return snippet if max_snippet_count > - 0. + [DEPRECATED] This field is deprecated. To + control snippet return, use ``return_snippet`` + field. For backwards compatibility, we will + return snippet if max_snippet_count > 0. reference_only (bool): - [DEPRECATED] This field is deprecated and will have no - affect on the snippet. + [DEPRECATED] This field is deprecated and will + have no affect on the snippet. return_snippet (bool): - If ``true``, then return snippet. If no snippet can be - generated, we return "No snippet is available for this - page." A ``snippet_status`` with ``SUCCESS`` or - ``NO_SNIPPET_AVAILABLE`` will also be returned. + If ``true``, then return snippet. If no snippet + can be generated, we return "No snippet is + available for this page." A ``snippet_status`` + with ``SUCCESS`` or ``NO_SNIPPET_AVAILABLE`` + will also be returned. """ max_snippet_count: int = proto.Field( @@ -1069,90 +1109,105 @@ class SummarySpec(proto.Message): Attributes: summary_result_count (int): - The number of top results to generate the summary from. If - the number of results returned is less than - ``summaryResultCount``, the summary is generated from all of - the results. - - At most 10 results for documents mode, or 50 for chunks - mode, can be used to generate a summary. The chunks mode is - used when - [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.search_result_mode] + The number of top results to generate the + summary from. If the number of results returned + is less than ``summaryResultCount``, the summary + is generated from all of the results. + + At most 10 results for documents mode, or 50 for + chunks mode, can be used to generate a summary. + The chunks mode is used when + `SearchRequest.ContentSearchSpec.search_result_mode + `__ is set to - [CHUNKS][google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]. + `CHUNKS + `__. include_citations (bool): - Specifies whether to include citations in the summary. The - default value is ``false``. + Specifies whether to include citations in the + summary. The default value is ``false``. - When this field is set to ``true``, summaries include - in-line citation numbers. + When this field is set to ``true``, summaries + include in-line citation numbers. Example summary including citations: - BigQuery is Google Cloud's fully managed and completely - serverless enterprise data warehouse [1]. BigQuery supports - all data types, works across clouds, and has built-in - machine learning and business intelligence, all within a - unified platform [2, 3]. - - The citation numbers refer to the returned search results - and are 1-indexed. For example, [1] means that the sentence - is attributed to the first search result. [2, 3] means that - the sentence is attributed to both the second and third - search results. + BigQuery is Google Cloud's fully managed and + completely serverless enterprise data warehouse + [1]. BigQuery supports all data types, works + across clouds, and has built-in machine learning + and business intelligence, all within a unified + platform [2, 3]. + + The citation numbers refer to the returned + search results and are 1-indexed. For example, + [1] means that the sentence is attributed to the + first search result. [2, 3] means that the + sentence is attributed to both the second and + third search results. ignore_adversarial_query (bool): - Specifies whether to filter out adversarial queries. The - default value is ``false``. + Specifies whether to filter out adversarial + queries. The default value is ``false``. - Google employs search-query classification to detect - adversarial queries. No summary is returned if the search - query is classified as an adversarial query. For example, a - user might ask a question regarding negative comments about - the company or submit a query designed to generate unsafe, - policy-violating output. If this field is set to ``true``, - we skip generating summaries for adversarial queries and - return fallback messages instead. + Google employs search-query classification to + detect adversarial queries. No summary is + returned if the search query is classified as an + adversarial query. For example, a user might ask + a question regarding negative comments about the + company or submit a query designed to generate + unsafe, policy-violating output. If this field + is set to ``true``, we skip generating summaries + for adversarial queries and return fallback + messages instead. ignore_non_summary_seeking_query (bool): - Specifies whether to filter out queries that are not - summary-seeking. The default value is ``false``. - - Google employs search-query classification to detect - summary-seeking queries. No summary is returned if the - search query is classified as a non-summary seeking query. - For example, ``why is the sky blue`` and - ``Who is the best soccer player in the world?`` are - summary-seeking queries, but ``SFO airport`` and - ``world cup 2026`` are not. They are most likely - navigational queries. If this field is set to ``true``, we - skip generating summaries for non-summary seeking queries - and return fallback messages instead. + Specifies whether to filter out queries that are + not summary-seeking. The default value is + ``false``. + + Google employs search-query classification to + detect summary-seeking queries. No summary is + returned if the search query is classified as a + non-summary seeking query. For example, ``why is + the sky blue`` and ``Who is the best soccer + player in the world?`` are summary-seeking + queries, but ``SFO airport`` and ``world cup + 2026`` are not. They are most likely + navigational queries. If this field is set to + ``true``, we skip generating summaries for + non-summary seeking queries and return fallback + messages instead. ignore_low_relevant_content (bool): - Specifies whether to filter out queries that have low - relevance. The default value is ``false``. - - If this field is set to ``false``, all search results are - used regardless of relevance to generate answers. If set to - ``true``, only queries with high relevance search results - will generate answers. + Specifies whether to filter out queries that + have low relevance. The default value is + ``false``. + + If this field is set to ``false``, all search + results are used regardless of relevance to + generate answers. If set to ``true``, only + queries with high relevance search results will + generate answers. ignore_jail_breaking_query (bool): - Optional. Specifies whether to filter out jail-breaking - queries. The default value is ``false``. - - Google employs search-query classification to detect - jail-breaking queries. No summary is returned if the search - query is classified as a jail-breaking query. A user might - add instructions to the query to change the tone, style, - language, content of the answer, or ask the model to act as - a different entity, e.g. "Reply in the tone of a competing - company's CEO". If this field is set to ``true``, we skip - generating summaries for jail-breaking queries and return - fallback messages instead. + Optional. Specifies whether to filter out + jail-breaking queries. The default value is + ``false``. + + Google employs search-query classification to + detect jail-breaking queries. No summary is + returned if the search query is classified as a + jail-breaking query. A user might add + instructions to the query to change the tone, + style, language, content of the answer, or ask + the model to act as a different entity, e.g. + "Reply in the tone of a competing company's + CEO". If this field is set to ``true``, we skip + generating summaries for jail-breaking queries + and return fallback messages instead. model_prompt_spec (google.cloud.discoveryengine_v1.types.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec): If specified, the spec will be used to modify the prompt provided to the LLM. language_code (str): - Language code for Summary. Use language tags defined by - `BCP47 `__. + Language code for Summary. Use language tags + defined by `BCP47 + `__. Note: This is an experimental feature. model_spec (google.cloud.discoveryengine_v1.types.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec): If specified, the spec will be used to modify @@ -1192,15 +1247,19 @@ class ModelSpec(proto.Message): Supported values are: - - ``stable``: string. Default value when no value is - specified. Uses a generally available, fine-tuned model. - For more information, see `Answer generation model - versions and - lifecycle `__. - - ``preview``: string. (Public preview) Uses a preview - model. For more information, see `Answer generation model - versions and - lifecycle `__. + * ``stable``: string. Default value when no + value is specified. Uses a generally + available, fine-tuned model. For more + information, see `Answer generation model + versions and + lifecycle + `__. + + * ``preview``: string. (Public preview) Uses a + preview model. For more information, see + `Answer generation model versions and + lifecycle + `__. """ version: str = proto.Field( @@ -1259,53 +1318,63 @@ class ExtractiveContentSpec(proto.Message): Attributes: max_extractive_answer_count (int): - The maximum number of extractive answers returned in each - search result. + The maximum number of extractive answers + returned in each search result. - An extractive answer is a verbatim answer extracted from the - original document, which provides a precise and contextually - relevant answer to the search query. + An extractive answer is a verbatim answer + extracted from the original document, which + provides a precise and contextually relevant + answer to the search query. - If the number of matching answers is less than the - ``max_extractive_answer_count``, return all of the answers. - Otherwise, return the ``max_extractive_answer_count``. + If the number of matching answers is less than + the ``max_extractive_answer_count``, return all + of the answers. Otherwise, return the + ``max_extractive_answer_count``. At most five answers are returned for each - [SearchResult][google.cloud.discoveryengine.v1.SearchResponse.SearchResult]. + `SearchResult + `__. max_extractive_segment_count (int): - The max number of extractive segments returned in each - search result. Only applied if the - [DataStore][google.cloud.discoveryengine.v1.DataStore] is - set to - [DataStore.ContentConfig.CONTENT_REQUIRED][google.cloud.discoveryengine.v1.DataStore.ContentConfig.CONTENT_REQUIRED] + The max number of extractive segments returned + in each search result. Only applied if the + `DataStore + `__ + is set to + `DataStore.ContentConfig.CONTENT_REQUIRED + `__ or - [DataStore.solution_types][google.cloud.discoveryengine.v1.DataStore.solution_types] + `DataStore.solution_types + `__ is - [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1.SolutionType.SOLUTION_TYPE_CHAT]. + `SOLUTION_TYPE_CHAT + `__. - An extractive segment is a text segment extracted from the - original document that is relevant to the search query, and, - in general, more verbose than an extractive answer. The - segment could then be used as input for LLMs to generate - summaries and answers. + An extractive segment is a text segment + extracted from the original document that is + relevant to the search query, and, in general, + more verbose than an extractive answer. The + segment could then be used as input for LLMs to + generate summaries and answers. If the number of matching segments is less than - ``max_extractive_segment_count``, return all of the - segments. Otherwise, return the + ``max_extractive_segment_count``, return all of + the segments. Otherwise, return the ``max_extractive_segment_count``. return_extractive_segment_score (bool): - Specifies whether to return the confidence score from the - extractive segments in each search result. This feature is - available only for new or allowlisted data stores. To - allowlist your data store, contact your Customer Engineer. - The default value is ``false``. + Specifies whether to return the confidence score + from the extractive segments in each search + result. This feature is available only for new + or allowlisted data stores. To allowlist your + data store, contact your Customer Engineer. The + default value is ``false``. num_previous_segments (int): - Specifies whether to also include the adjacent from each - selected segments. Return at most ``num_previous_segments`` + Specifies whether to also include the adjacent + from each selected segments. + Return at most ``num_previous_segments`` segments before each selected segments. num_next_segments (int): - Return at most ``num_next_segments`` segments after each - selected segments. + Return at most ``num_next_segments`` segments + after each selected segments. """ max_extractive_answer_count: int = proto.Field( @@ -1330,11 +1399,13 @@ class ExtractiveContentSpec(proto.Message): ) class ChunkSpec(proto.Message): - r"""Specifies the chunk spec to be returned from the search response. - Only available if the - [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.search_result_mode] + r"""Specifies the chunk spec to be returned from the search + response. Only available if the + `SearchRequest.ContentSearchSpec.search_result_mode + `__ is set to - [CHUNKS][google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS] + `CHUNKS + `__ Attributes: num_previous_chunks (int): @@ -1391,9 +1462,10 @@ class SearchAsYouTypeSpec(proto.Message): Attributes: condition (google.cloud.discoveryengine_v1.types.SearchRequest.SearchAsYouTypeSpec.Condition): - The condition under which search as you type should occur. - Default to - [Condition.DISABLED][google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec.Condition.DISABLED]. + The condition under which search as you type + should occur. Default to + `Condition.DISABLED + `__. """ class Condition(proto.Enum): @@ -1403,7 +1475,8 @@ class Condition(proto.Enum): Values: CONDITION_UNSPECIFIED (0): Server behavior defaults to - [Condition.DISABLED][google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec.Condition.DISABLED]. + `Condition.DISABLED + `__. DISABLED (1): Disables Search As You Type. ENABLED (2): @@ -1470,38 +1543,48 @@ class SessionSpec(proto.Message): Attributes: query_id (str): - If set, the search result gets stored to the "turn" - specified by this query ID. + If set, the search result gets stored to the + "turn" specified by this query ID. - Example: Let's say the session looks like this: session { - name: ".../sessions/xxx" turns { query { text: "What is - foo?" query_id: ".../questions/yyy" } answer: "Foo is ..." } - turns { query { text: "How about bar then?" query_id: - ".../questions/zzz" } } } + Example: Let's say the session looks like this: - The user can call /search API with a request like this: + session { + name: ".../sessions/xxx" + turns { + query { text: "What is foo?" query_id: + ".../questions/yyy" } answer: "Foo is ..." + } + turns { + query { text: "How about bar then?" + query_id: ".../questions/zzz" } } + } - :: + The user can call /search API with a request + like this: session: ".../sessions/xxx" - session_spec { query_id: ".../questions/zzz" } - - Then, the API stores the search result, associated with the - last turn. The stored search result can be used by a - subsequent /answer API call (with the session ID and the - query ID specified). Also, it is possible to call /search - and /answer in parallel with the same session ID & query ID. + session_spec { query_id: ".../questions/zzz" + } + + Then, the API stores the search result, + associated with the last turn. The stored search + result can be used by a subsequent /answer API + call (with the session ID and the query ID + specified). Also, it is possible to call /search + and /answer in parallel with the same session ID + & query ID. search_result_persistence_count (int): - The number of top search results to persist. The persisted - search results can be used for the subsequent /answer api - call. + The number of top search results to persist. The + persisted search results can be used for the + subsequent /answer api call. - This field is similar to the ``summary_result_count`` field - in - [SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count][google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count]. + This field is similar to the + ``summary_result_count`` field in + `SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count + `__. - At most 10 results for documents mode, or 50 for chunks - mode. + At most 10 results for documents mode, or 50 for + chunks mode. This field is a member of `oneof`_ ``_search_result_persistence_count``. """ @@ -1676,7 +1759,8 @@ class RelevanceScoreSpec(proto.Message): class SearchResponse(proto.Message): r"""Response message for - [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] + `SearchService.Search + `__ method. Attributes: @@ -1686,39 +1770,47 @@ class SearchResponse(proto.Message): facets (MutableSequence[google.cloud.discoveryengine_v1.types.SearchResponse.Facet]): Results of facets requested by user. total_size (int): - The estimated total count of matched items irrespective of - pagination. The count of - [results][google.cloud.discoveryengine.v1.SearchResponse.results] + The estimated total count of matched items + irrespective of pagination. The count of + `results + `__ returned by pagination may be less than the - [total_size][google.cloud.discoveryengine.v1.SearchResponse.total_size] + `total_size + `__ that matches. attribution_token (str): - A unique search token. This should be included in the - [UserEvent][google.cloud.discoveryengine.v1.UserEvent] logs - resulting from this search, which enables accurate - attribution of search model performance. This also helps to - identify a request during the customer support scenarios. + A unique search token. This should be included + in the `UserEvent + `__ + logs resulting from this search, which enables + accurate attribution of search model + performance. This also helps to identify a + request during the customer support scenarios. redirect_uri (str): - The URI of a customer-defined redirect page. If redirect - action is triggered, no search is performed, and only - [redirect_uri][google.cloud.discoveryengine.v1.SearchResponse.redirect_uri] + The URI of a customer-defined redirect page. If + redirect action is triggered, no search is + performed, and only `redirect_uri + `__ and - [attribution_token][google.cloud.discoveryengine.v1.SearchResponse.attribution_token] + `attribution_token + `__ are set in the response. next_page_token (str): A token that can be sent as - [SearchRequest.page_token][google.cloud.discoveryengine.v1.SearchRequest.page_token] - to retrieve the next page. If this field is omitted, there - are no subsequent pages. + `SearchRequest.page_token + `__ + to retrieve the next page. If this field is + omitted, there are no subsequent pages. corrected_query (str): - Contains the spell corrected query, if found. If the spell - correction type is AUTOMATIC, then the search results are - based on corrected_query. Otherwise the original query is - used for search. + Contains the spell corrected query, if found. If + the spell correction type is AUTOMATIC, then the + search results are based on corrected_query. + Otherwise the original query is used for search. summary (google.cloud.discoveryengine_v1.types.SearchResponse.Summary): - A summary as part of the search results. This field is only - returned if - [SearchRequest.ContentSearchSpec.summary_spec][google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.summary_spec] + A summary as part of the search results. + This field is only returned if + `SearchRequest.ContentSearchSpec.summary_spec + `__ is set. query_expansion_info (google.cloud.discoveryengine_v1.types.SearchResponse.QueryExpansionInfo): Query expansion information for the returned @@ -1727,8 +1819,10 @@ class SearchResponse(proto.Message): Session information. Only set if - [SearchRequest.session][google.cloud.discoveryengine.v1.SearchRequest.session] - is provided. See its description for more details. + `SearchRequest.session + `__ + is provided. See its description for more + details. search_link_promotions (MutableSequence[google.cloud.discoveryengine_v1.types.SearchLinkPromotion]): Promotions for site search. """ @@ -1738,17 +1832,21 @@ class SearchResult(proto.Message): Attributes: id (str): - [Document.id][google.cloud.discoveryengine.v1.Document.id] - of the searched - [Document][google.cloud.discoveryengine.v1.Document]. + `Document.id + `__ + of the searched `Document + `__. document (google.cloud.discoveryengine_v1.types.Document): - The document data snippet in the search response. Only - fields that are marked as ``retrievable`` are populated. + The document data snippet in the search + response. Only fields that are marked as + ``retrievable`` are populated. chunk (google.cloud.discoveryengine_v1.types.Chunk): The chunk data in the search response if the - [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.search_result_mode] + `SearchRequest.ContentSearchSpec.search_result_mode + `__ is set to - [CHUNKS][google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]. + `CHUNKS + `__. model_scores (MutableMapping[str, google.cloud.discoveryengine_v1.types.DoubleList]): Output only. Google provided available scores. @@ -1896,9 +1994,10 @@ class Facet(proto.Message): Attributes: key (str): - The key for this facet. For example, ``"colors"`` or - ``"price"``. It matches - [SearchRequest.FacetSpec.FacetKey.key][google.cloud.discoveryengine.v1.SearchRequest.FacetSpec.FacetKey.key]. + The key for this facet. For example, + ``"colors"`` or ``"price"``. It matches + `SearchRequest.FacetSpec.FacetKey.key + `__. values (MutableSequence[google.cloud.discoveryengine_v1.types.SearchResponse.Facet.FacetValue]): The facet values for this field. dynamic_facet (bool): @@ -1922,9 +2021,10 @@ class FacetValue(proto.Message): This field is a member of `oneof`_ ``facet_value``. interval (google.cloud.discoveryengine_v1.types.Interval): - Interval value for a facet, such as [10, 20) for facet - "price". It matches - [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.discoveryengine.v1.SearchRequest.FacetSpec.FacetKey.intervals]. + Interval value for a facet, such as `10, 20) for + facet "price". It matches + [SearchRequest.FacetSpec.FacetKey.intervals + `__. This field is a member of `oneof`_ ``facet_value``. count (int): @@ -1992,14 +2092,16 @@ class SummarySkippedReason(proto.Enum): The adversarial query ignored case. Only used when - [SummarySpec.ignore_adversarial_query][google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SummarySpec.ignore_adversarial_query] + `SummarySpec.ignore_adversarial_query + `__ is set to ``true``. NON_SUMMARY_SEEKING_QUERY_IGNORED (2): The non-summary seeking query ignored case. - Google skips the summary if the query is chit chat. Only - used when - [SummarySpec.ignore_non_summary_seeking_query][google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_summary_seeking_query] + Google skips the summary if the query is chit + chat. Only used when + `SummarySpec.ignore_non_summary_seeking_query + `__ is set to ``true``. OUT_OF_DOMAIN_QUERY_IGNORED (3): The out-of-domain query ignored case. @@ -2028,8 +2130,8 @@ class SummarySkippedReason(proto.Enum): JAIL_BREAKING_QUERY_IGNORED (7): The jail-breaking query ignored case. - For example, "Reply in the tone of a competing company's - CEO". Only used when + For example, "Reply in the tone of a competing + company's CEO". Only used when [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query] is set to ``true``. CUSTOMER_POLICY_VIOLATION (8): @@ -2041,8 +2143,8 @@ class SummarySkippedReason(proto.Enum): NON_SUMMARY_SEEKING_QUERY_IGNORED_V2 (9): The non-answer seeking query ignored case. - Google skips the summary if the query doesn't have clear - intent. Only used when + Google skips the summary if the query doesn't + have clear intent. Only used when [SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_answer_seeking_query] is set to ``true``. TIME_OUT (10): @@ -2137,9 +2239,9 @@ class CitationSource(proto.Message): Attributes: reference_index (int): Document reference index from - SummaryWithMetadata.references. It is 0-indexed and the - value will be zero if the reference_index is not set - explicitly. + SummaryWithMetadata.references. It is 0-indexed + and the value will be zero if the + reference_index is not set explicitly. """ reference_index: int = proto.Field( @@ -2155,9 +2257,10 @@ class Reference(proto.Message): Title of the document. document (str): Required. - [Document.name][google.cloud.discoveryengine.v1.Document.name] - of the document. Full resource name of the referenced - document, in the format + `Document.name + `__ + of the document. Full resource name of the + referenced document, in the format ``projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*``. uri (str): Cloud Storage or HTTP uri for the document. @@ -2267,9 +2370,10 @@ class QueryExpansionInfo(proto.Message): Bool describing whether query expansion has occurred. pinned_result_count (int): - Number of pinned results. This field will only be set when - expansion happens and - [SearchRequest.QueryExpansionSpec.pin_unexpanded_results][google.cloud.discoveryengine.v1.SearchRequest.QueryExpansionSpec.pin_unexpanded_results] + Number of pinned results. This field will only + be set when expansion happens and + `SearchRequest.QueryExpansionSpec.pin_unexpanded_results + `__ is set to true. """ @@ -2287,10 +2391,12 @@ class SessionInfo(proto.Message): Attributes: name (str): - Name of the session. If the auto-session mode is used (when - [SearchRequest.session][google.cloud.discoveryengine.v1.SearchRequest.session] - ends with "-"), this field holds the newly generated session - name. + Name of the session. + If the auto-session mode is used (when + `SearchRequest.session + `__ + ends with "-"), this field holds the newly + generated session name. query_id (str): Query ID that corresponds to this search API call. One session can have multiple turns, each diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/search_tuning_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/search_tuning_service.py index c054af1613aa..055ca583be5d 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/search_tuning_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/search_tuning_service.py @@ -37,16 +37,17 @@ class ListCustomModelsRequest(proto.Message): r"""Request message for - [SearchTuningService.ListCustomModels][google.cloud.discoveryengine.v1.SearchTuningService.ListCustomModels] + `SearchTuningService.ListCustomModels + `__ method. Attributes: data_store (str): - Required. The resource name of the parent Data Store, such - as + Required. The resource name of the parent Data + Store, such as ``projects/*/locations/global/collections/default_collection/dataStores/default_data_store``. - This field is used to identify the data store where to fetch - the models from. + This field is used to identify the data store + where to fetch the models from. """ data_store: str = proto.Field( @@ -57,7 +58,8 @@ class ListCustomModelsRequest(proto.Message): class ListCustomModelsResponse(proto.Message): r"""Response message for - [SearchTuningService.ListCustomModels][google.cloud.discoveryengine.v1.SearchTuningService.ListCustomModels] + `SearchTuningService.ListCustomModels + `__ method. Attributes: @@ -76,7 +78,8 @@ class ListCustomModelsResponse(proto.Message): class TrainCustomModelRequest(proto.Message): r"""Request message for - [SearchTuningService.TrainCustomModel][google.cloud.discoveryengine.v1.SearchTuningService.TrainCustomModel] + `SearchTuningService.TrainCustomModel + `__ method. @@ -88,15 +91,16 @@ class TrainCustomModelRequest(proto.Message): This field is a member of `oneof`_ ``training_input``. data_store (str): - Required. The resource name of the Data Store, such as + Required. The resource name of the Data Store, + such as ``projects/*/locations/global/collections/default_collection/dataStores/default_data_store``. - This field is used to identify the data store where to train - the models. + This field is used to identify the data store + where to train the models. model_type (str): Model to be trained. Supported values are: - - **search-tuning**: Fine tuning the search system based on - data provided. + * **search-tuning**: Fine tuning the search + system based on data provided. error_config (google.cloud.discoveryengine_v1.types.ImportErrorConfig): The desired location of errors incurred during the data ingestion and training. @@ -109,39 +113,45 @@ class GcsTrainingInput(proto.Message): Attributes: corpus_data_path (str): - The Cloud Storage corpus data which could be associated in - train data. The data path format is - ``gs:///``. A newline - delimited jsonl/ndjson file. + The Cloud Storage corpus data which could be + associated in train data. The data path format + is ``gs:///``. + A newline delimited jsonl/ndjson file. + + For search-tuning model, each line should have + the _id, title and text. Example: - For search-tuning model, each line should have the \_id, - title and text. Example: - ``{"_id": "doc1", title: "relevant doc", "text": "relevant text"}`` + ``{"_id": "doc1", title: "relevant doc", "text": + "relevant text"}`` query_data_path (str): - The gcs query data which could be associated in train data. - The data path format is - ``gs:///``. A newline - delimited jsonl/ndjson file. + The gcs query data which could be associated in + train data. The data path format is + ``gs:///``. A + newline delimited jsonl/ndjson file. - For search-tuning model, each line should have the \_id and - text. Example: {"\_id": "query1", "text": "example query"} + For search-tuning model, each line should have + the _id and text. Example: {"_id": "query1", + "text": "example query"} train_data_path (str): - Cloud Storage training data path whose format should be - ``gs:///``. The file should - be in tsv format. Each line should have the doc_id and - query_id and score (number). - - For search-tuning model, it should have the query-id - corpus-id score as tsv file header. The score should be a - number in ``[0, inf+)``. The larger the number is, the more - relevant the pair is. Example: - - - ``query-id\tcorpus-id\tscore`` - - ``query1\tdoc1\t1`` + Cloud Storage training data path whose format + should be + ``gs:///``. The + file should be in tsv format. Each line should + have the doc_id and query_id and score (number). + + For search-tuning model, it should have the + query-id corpus-id score as tsv file header. The + score should be a number in ``[0, inf+)``. The + larger the number is, the more relevant the pair + is. Example: + + * ``query-id\tcorpus-id\tscore`` + * ``query1\tdoc1\t1`` test_data_path (str): - Cloud Storage test data. Same format as train_data_path. If - not provided, a random 80/20 train/test split will be - performed on train_data_path. + Cloud Storage test data. Same format as + train_data_path. If not provided, a random 80/20 + train/test split will be performed on + train_data_path. """ corpus_data_path: str = proto.Field( @@ -188,7 +198,8 @@ class GcsTrainingInput(proto.Message): class TrainCustomModelResponse(proto.Message): r"""Response of the - [TrainCustomModelRequest][google.cloud.discoveryengine.v1.TrainCustomModelRequest]. + `TrainCustomModelRequest + `__. This message is returned by the google.longrunning.Operations.response field. @@ -202,15 +213,20 @@ class TrainCustomModelResponse(proto.Message): model_status (str): The trained model status. Possible values are: - - **bad-data**: The training data quality is bad. - - **no-improvement**: Tuning didn't improve performance. - Won't deploy. - - **in-progress**: Model training job creation is in - progress. - - **training**: Model is actively training. - - **evaluating**: The model is evaluating trained metrics. - - **indexing**: The model trained metrics are indexing. - - **ready**: The model is ready for serving. + * **bad-data**: The training data quality is + bad. + + * **no-improvement**: Tuning didn't improve + performance. Won't deploy. * **in-progress**: + Model training job creation is in progress. + + * **training**: Model is actively training. + * **evaluating**: The model is evaluating + trained metrics. + + * **indexing**: The model trained metrics are + indexing. * **ready**: The model is ready for + serving. metrics (MutableMapping[str, float]): The metrics of the trained model. model_name (str): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/serving_config.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/serving_config.py index a8e4f0566f16..b49fd8941e64 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/serving_config.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/serving_config.py @@ -57,78 +57,92 @@ class ServingConfig(proto.Message): Immutable. Fully qualified name ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}`` display_name (str): - Required. The human readable serving config display name. - Used in Discovery UI. + Required. The human readable serving config + display name. Used in Discovery UI. - This field must be a UTF-8 encoded string with a length - limit of 128 characters. Otherwise, an INVALID_ARGUMENT - error is returned. + This field must be a UTF-8 encoded string with a + length limit of 128 characters. Otherwise, an + INVALID_ARGUMENT error is returned. solution_type (google.cloud.discoveryengine_v1.types.SolutionType): Required. Immutable. Specifies the solution type that a serving config can be associated with. model_id (str): - The id of the model to use at serving time. Currently only - RecommendationModels are supported. Can be changed but only - to a compatible model (e.g. others-you-may-like CTR to - others-you-may-like CVR). - - Required when - [SolutionType][google.cloud.discoveryengine.v1.SolutionType] + The id of the model to use at serving time. + Currently only RecommendationModels are + supported. Can be changed but only to a + compatible model (e.g. others-you-may-like CTR + to others-you-may-like CVR). + + Required when `SolutionType + `__ is - [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. + `SOLUTION_TYPE_RECOMMENDATION + `__. diversity_level (str): - How much diversity to use in recommendation model results - e.g. ``medium-diversity`` or ``high-diversity``. Currently - supported values: + How much diversity to use in recommendation + model results e.g. ``medium-diversity`` or + ``high-diversity``. Currently supported values: - - ``no-diversity`` - - ``low-diversity`` - - ``medium-diversity`` - - ``high-diversity`` - - ``auto-diversity`` + * ``no-diversity`` + * ``low-diversity`` - If not specified, we choose default based on recommendation - model type. Default value: ``no-diversity``. + * ``medium-diversity`` + * ``high-diversity`` - Can only be set if - [SolutionType][google.cloud.discoveryengine.v1.SolutionType] - is - [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. - ranking_expression (str): - The ranking expression controls the customized ranking on - retrieval documents. To leverage this, document embedding is - required. The ranking expression setting in ServingConfig - applies to all search requests served by the serving config. - However, if ``SearchRequest.ranking_expression`` is - specified, it overrides the ServingConfig ranking - expression. + * ``auto-diversity`` - The ranking expression is a single function or multiple - functions that are joined by "+". + If not specified, we choose default based on + recommendation model type. Default value: + ``no-diversity``. - - ranking_expression = function, { " + ", function }; + Can only be set if + `SolutionType + `__ + is `SOLUTION_TYPE_RECOMMENDATION + `__. + ranking_expression (str): + The ranking expression controls the customized + ranking on retrieval documents. To leverage + this, document embedding is required. The + ranking expression setting in ServingConfig + applies to all search requests served by the + serving config. However, if + ``SearchRequest.ranking_expression`` is + specified, it overrides the ServingConfig + ranking expression. + + The ranking expression is a single function or + multiple functions that are joined by "+". + + * ranking_expression = function, { " + ", + function }; Supported functions: - - double \* relevance_score - - double \* dotProduct(embedding_field_path) + * double * relevance_score + * double * dotProduct(embedding_field_path) Function variables: - - ``relevance_score``: pre-defined keywords, used for - measure relevance between query and document. - - ``embedding_field_path``: the document embedding field - used with query embedding vector. - - ``dotProduct``: embedding function between - embedding_field_path and query embedding vector. + * ``relevance_score``: pre-defined keywords, + used for measure relevance between query and + document. + + * ``embedding_field_path``: the document + embedding field used with query embedding + vector. - Example ranking expression: + * ``dotProduct``: embedding function between + embedding_field_path and query embedding + vector. - :: + Example ranking expression: - If document has an embedding field doc_embedding, the ranking expression - could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`. + If document has an embedding field + doc_embedding, the ranking expression could + be ``0.5 * relevance_score + 0.3 * + dotProduct(doc_embedding)``. create_time (google.protobuf.timestamp_pb2.Timestamp): Output only. ServingConfig created timestamp. update_time (google.protobuf.timestamp_pb2.Timestamp): @@ -146,52 +160,64 @@ class ServingConfig(proto.Message): the serving config. Maximum of 20 boost controls. redirect_control_ids (MutableSequence[str]): - IDs of the redirect controls. Only the first triggered - redirect action is applied, even if multiple apply. Maximum - number of specifications is 100. + IDs of the redirect controls. Only the first + triggered redirect action is applied, even if + multiple apply. Maximum number of specifications + is 100. Can only be set if - [SolutionType][google.cloud.discoveryengine.v1.SolutionType] - is - [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1.SolutionType.SOLUTION_TYPE_SEARCH]. + `SolutionType + `__ + is `SOLUTION_TYPE_SEARCH + `__. synonyms_control_ids (MutableSequence[str]): - Condition synonyms specifications. If multiple synonyms - conditions match, all matching synonyms controls in the list - will execute. Maximum number of specifications is 100. + Condition synonyms specifications. If multiple + synonyms conditions match, all matching synonyms + controls in the list will execute. Maximum + number of specifications is 100. Can only be set if - [SolutionType][google.cloud.discoveryengine.v1.SolutionType] - is - [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1.SolutionType.SOLUTION_TYPE_SEARCH]. + `SolutionType + `__ + is `SOLUTION_TYPE_SEARCH + `__. oneway_synonyms_control_ids (MutableSequence[str]): - Condition oneway synonyms specifications. If multiple oneway - synonyms conditions match, all matching oneway synonyms - controls in the list will execute. Maximum number of - specifications is 100. + Condition oneway synonyms specifications. If + multiple oneway synonyms conditions match, all + matching oneway synonyms controls in the list + will execute. Maximum number of specifications + is 100. Can only be set if - [SolutionType][google.cloud.discoveryengine.v1.SolutionType] - is - [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1.SolutionType.SOLUTION_TYPE_SEARCH]. + `SolutionType + `__ + is `SOLUTION_TYPE_SEARCH + `__. dissociate_control_ids (MutableSequence[str]): - Condition do not associate specifications. If multiple do - not associate conditions match, all matching do not - associate controls in the list will execute. Order does not - matter. Maximum number of specifications is 100. + Condition do not associate specifications. If + multiple do not associate conditions match, all + matching do not associate controls in the list + will execute. + Order does not matter. + Maximum number of specifications is 100. Can only be set if - [SolutionType][google.cloud.discoveryengine.v1.SolutionType] - is - [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1.SolutionType.SOLUTION_TYPE_SEARCH]. + `SolutionType + `__ + is `SOLUTION_TYPE_SEARCH + `__. replacement_control_ids (MutableSequence[str]): - Condition replacement specifications. Applied according to - the order in the list. A previously replaced term can not be - re-replaced. Maximum number of specifications is 100. + Condition replacement specifications. + Applied according to the order in the list. + A previously replaced term can not be + re-replaced. Maximum number of specifications is + 100. Can only be set if - [SolutionType][google.cloud.discoveryengine.v1.SolutionType] - is - [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1.SolutionType.SOLUTION_TYPE_SEARCH]. + `SolutionType + `__ + is `SOLUTION_TYPE_SEARCH + `__. ignore_control_ids (MutableSequence[str]): Condition ignore specifications. If multiple ignore conditions match, all matching ignore @@ -205,22 +231,24 @@ class ServingConfig(proto.Message): """ class MediaConfig(proto.Message): - r"""Specifies the configurations needed for Media Discovery. Currently - we support: - - - ``demote_content_watched``: Threshold for watched content - demotion. Customers can specify if using watched content demotion - or use viewed detail page. Using the content watched demotion, - customers need to specify the watched minutes or percentage - exceeds the threshold, the content will be demoted in the - recommendation result. - - ``promote_fresh_content``: cutoff days for fresh content - promotion. Customers can specify if using content freshness - promotion. If the content was published within the cutoff days, - the content will be promoted in the recommendation result. Can - only be set if - [SolutionType][google.cloud.discoveryengine.v1.SolutionType] is - [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. + r"""Specifies the configurations needed for Media Discovery. + Currently we support: + + * ``demote_content_watched``: Threshold for watched content + demotion. Customers can specify if using watched content + demotion or use viewed detail page. Using the content watched + demotion, customers need to specify the watched minutes or + percentage exceeds the threshold, the content will be demoted in + the recommendation result. + + * ``promote_fresh_content``: cutoff days for fresh content + promotion. Customers can specify if using content freshness + promotion. If the content was published within the cutoff days, + the content will be promoted in the recommendation result. + Can only be set if + `SolutionType `__ + is `SOLUTION_TYPE_RECOMMENDATION + `__. This message has `oneof`_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. @@ -231,9 +259,9 @@ class MediaConfig(proto.Message): Attributes: content_watched_percentage_threshold (float): - Specifies the content watched percentage threshold for - demotion. Threshold value must be between [0, 1.0] - inclusive. + Specifies the content watched percentage + threshold for demotion. Threshold value must be + between [0, 1.0] inclusive. This field is a member of `oneof`_ ``demote_content_watched``. content_watched_seconds_threshold (float): @@ -242,17 +270,20 @@ class MediaConfig(proto.Message): This field is a member of `oneof`_ ``demote_content_watched``. demotion_event_type (str): - Specifies the event type used for demoting recommendation - result. Currently supported values: + Specifies the event type used for demoting + recommendation result. Currently supported + values: + + * ``view-item``: Item viewed. + * ``media-play``: Start/resume watching a video, + playing a song, etc. - - ``view-item``: Item viewed. - - ``media-play``: Start/resume watching a video, playing a - song, etc. - - ``media-complete``: Finished or stopped midway through a - video, song, etc. + * ``media-complete``: Finished or stopped midway + through a video, song, etc. - If unset, watch history demotion will not be applied. - Content freshness demotion will still be applied. + If unset, watch history demotion will not be + applied. Content freshness demotion will still + be applied. demote_content_watched_past_days (int): Optional. Specifies the number of days to look back for demoting watched content. If set @@ -289,10 +320,11 @@ class MediaConfig(proto.Message): ) class GenericConfig(proto.Message): - r"""Specifies the configurations needed for Generic Discovery.Currently - we support: + r"""Specifies the configurations needed for Generic + Discovery.Currently we support: - - ``content_search_spec``: configuration for generic content search. + * ``content_search_spec``: configuration for generic content + search. Attributes: content_search_spec (google.cloud.discoveryengine_v1.types.SearchRequest.ContentSearchSpec): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/serving_config_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/serving_config_service.py index a98b56d80234..d7d62e60f5ea 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/serving_config_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/serving_config_service.py @@ -38,10 +38,12 @@ class UpdateServingConfigRequest(proto.Message): Required. The ServingConfig to update. update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided - [ServingConfig][google.cloud.discoveryengine.v1.ServingConfig] + `ServingConfig + `__ to update. The following are NOT supported: - - [ServingConfig.name][google.cloud.discoveryengine.v1.ServingConfig.name] + * `ServingConfig.name + `__ If not set, all supported fields are updated. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/session.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/session.py index ce86a30fea33..4c9d8d124653 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/session.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/session.py @@ -92,18 +92,22 @@ class Turn(proto.Message): call) happened in this turn. detailed_answer (google.cloud.discoveryengine_v1.types.Answer): Output only. In - [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1.ConversationalSearchService.GetSession] + `ConversationalSearchService.GetSession + `__ API, if - [GetSessionRequest.include_answer_details][google.cloud.discoveryengine.v1.GetSessionRequest.include_answer_details] - is set to true, this field will be populated when getting - answer query session. + `GetSessionRequest.include_answer_details + `__ + is set to true, this field will be populated + when getting answer query session. detailed_assist_answer (google.cloud.discoveryengine_v1.types.AssistAnswer): Output only. In - [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1.ConversationalSearchService.GetSession] + `ConversationalSearchService.GetSession + `__ API, if - [GetSessionRequest.include_answer_details][google.cloud.discoveryengine.v1.GetSessionRequest.include_answer_details] - is set to true, this field will be populated when getting - assistant session. + `GetSessionRequest.include_answer_details + `__ + is set to true, this field will be populated + when getting assistant session. query_config (MutableMapping[str, str]): Optional. Represents metadata related to the query config, for example LLM model and version diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/site_search_engine.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/site_search_engine.py index d9e98efc17a5..7d2692c8233b 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/site_search_engine.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/site_search_engine.py @@ -38,8 +38,8 @@ class SiteSearchEngine(proto.Message): Attributes: name (str): - The fully qualified resource name of the site search engine. - Format: + The fully qualified resource name of the site + search engine. Format: ``projects/*/locations/*/dataStores/*/siteSearchEngine`` """ @@ -54,30 +54,34 @@ class TargetSite(proto.Message): Attributes: name (str): - Output only. The fully qualified resource name of the target - site. + Output only. The fully qualified resource name + of the target site. ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}`` The ``target_site_id`` is system-generated. provided_uri_pattern (str): - Required. Input only. The user provided URI pattern from - which the ``generated_uri_pattern`` is generated. + Required. Input only. The user provided URI + pattern from which the ``generated_uri_pattern`` + is generated. type_ (google.cloud.discoveryengine_v1.types.TargetSite.Type): The type of the target site, e.g., whether the site is to be included or excluded. exact_match (bool): - Immutable. If set to false, a uri_pattern is generated to - include all pages whose address contains the - provided_uri_pattern. If set to true, an uri_pattern is - generated to try to be an exact match of the - provided_uri_pattern or just the specific page if the - provided_uri_pattern is a specific one. provided_uri_pattern - is always normalized to generate the URI pattern to be used - by the search engine. + Immutable. If set to false, a uri_pattern is + generated to include all pages whose address + contains the provided_uri_pattern. If set to + true, an uri_pattern is generated to try to be + an exact match of the provided_uri_pattern or + just the specific page if the + provided_uri_pattern is a specific one. + provided_uri_pattern is always normalized to + generate the URI pattern to be used by the + search engine. generated_uri_pattern (str): - Output only. This is system-generated based on the - provided_uri_pattern. + Output only. This is system-generated based on + the provided_uri_pattern. root_domain_uri (str): - Output only. Root domain of the provided_uri_pattern. + Output only. Root domain of the + provided_uri_pattern. site_verification_info (google.cloud.discoveryengine_v1.types.SiteVerificationInfo): Output only. Site ownership and validity verification status. @@ -95,9 +99,9 @@ class Type(proto.Enum): Values: TYPE_UNSPECIFIED (0): - This value is unused. In this case, server behavior defaults - to - [Type.INCLUDE][google.cloud.discoveryengine.v1.TargetSite.Type.INCLUDE]. + This value is unused. In this case, server + behavior defaults to `Type.INCLUDE + `__. INCLUDE (1): Include the target site. EXCLUDE (2): @@ -280,8 +284,8 @@ class Sitemap(proto.Message): This field is a member of `oneof`_ ``feed``. name (str): - Output only. The fully qualified resource name of the - sitemap. + Output only. The fully qualified resource name + of the sitemap. ``projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/sitemaps/*`` The ``sitemap_id`` suffix is system-generated. create_time (google.protobuf.timestamp_pb2.Timestamp): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/site_search_engine_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/site_search_engine_service.py index b4a266e68246..9b7776cd9685 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/site_search_engine_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/site_search_engine_service.py @@ -66,19 +66,22 @@ class GetSiteSearchEngineRequest(proto.Message): r"""Request message for - [SiteSearchEngineService.GetSiteSearchEngine][google.cloud.discoveryengine.v1.SiteSearchEngineService.GetSiteSearchEngine] + `SiteSearchEngineService.GetSiteSearchEngine + `__ method. Attributes: name (str): Required. Resource name of - [SiteSearchEngine][google.cloud.discoveryengine.v1.SiteSearchEngine], + `SiteSearchEngine + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine``. - If the caller does not have permission to access the - [SiteSearchEngine], regardless of whether or not it exists, - a PERMISSION_DENIED error is returned. + If the caller does not have permission to access + the [SiteSearchEngine], regardless of whether or + not it exists, a PERMISSION_DENIED error is + returned. """ name: str = proto.Field( @@ -89,19 +92,21 @@ class GetSiteSearchEngineRequest(proto.Message): class CreateTargetSiteRequest(proto.Message): r"""Request message for - [SiteSearchEngineService.CreateTargetSite][google.cloud.discoveryengine.v1.SiteSearchEngineService.CreateTargetSite] + `SiteSearchEngineService.CreateTargetSite + `__ method. Attributes: parent (str): Required. Parent resource name of - [TargetSite][google.cloud.discoveryengine.v1.TargetSite], + `TargetSite + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine``. target_site (google.cloud.discoveryengine_v1.types.TargetSite): - Required. The - [TargetSite][google.cloud.discoveryengine.v1.TargetSite] to - create. + Required. The `TargetSite + `__ + to create. """ parent: str = proto.Field( @@ -117,7 +122,8 @@ class CreateTargetSiteRequest(proto.Message): class CreateTargetSiteMetadata(proto.Message): r"""Metadata related to the progress of the - [SiteSearchEngineService.CreateTargetSite][google.cloud.discoveryengine.v1.SiteSearchEngineService.CreateTargetSite] + `SiteSearchEngineService.CreateTargetSite + `__ operation. This will be returned by the google.longrunning.Operation.metadata field. @@ -143,16 +149,18 @@ class CreateTargetSiteMetadata(proto.Message): class BatchCreateTargetSitesRequest(proto.Message): r"""Request message for - [SiteSearchEngineService.BatchCreateTargetSites][google.cloud.discoveryengine.v1.SiteSearchEngineService.BatchCreateTargetSites] + `SiteSearchEngineService.BatchCreateTargetSites + `__ method. Attributes: parent (str): - Required. The parent resource shared by all TargetSites - being created. + Required. The parent resource shared by all + TargetSites being created. ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine``. - The parent field in the CreateBookRequest messages must - either be empty or match this field. + The parent field in the CreateBookRequest + messages must either be empty or match this + field. requests (MutableSequence[google.cloud.discoveryengine_v1.types.CreateTargetSiteRequest]): Required. The request message specifying the resources to create. A maximum of 20 TargetSites @@ -172,23 +180,26 @@ class BatchCreateTargetSitesRequest(proto.Message): class GetTargetSiteRequest(proto.Message): r"""Request message for - [SiteSearchEngineService.GetTargetSite][google.cloud.discoveryengine.v1.SiteSearchEngineService.GetTargetSite] + `SiteSearchEngineService.GetTargetSite + `__ method. Attributes: name (str): Required. Full resource name of - [TargetSite][google.cloud.discoveryengine.v1.TargetSite], + `TargetSite + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}``. - If the caller does not have permission to access the - [TargetSite][google.cloud.discoveryengine.v1.TargetSite], - regardless of whether or not it exists, a PERMISSION_DENIED - error is returned. + If the caller does not have permission to access + the `TargetSite + `__, + regardless of whether or not it exists, a + PERMISSION_DENIED error is returned. - If the requested - [TargetSite][google.cloud.discoveryengine.v1.TargetSite] + If the requested `TargetSite + `__ does not exist, a NOT_FOUND error is returned. """ @@ -200,20 +211,23 @@ class GetTargetSiteRequest(proto.Message): class UpdateTargetSiteRequest(proto.Message): r"""Request message for - [SiteSearchEngineService.UpdateTargetSite][google.cloud.discoveryengine.v1.SiteSearchEngineService.UpdateTargetSite] + `SiteSearchEngineService.UpdateTargetSite + `__ method. Attributes: target_site (google.cloud.discoveryengine_v1.types.TargetSite): - Required. The target site to update. If the caller does not - have permission to update the - [TargetSite][google.cloud.discoveryengine.v1.TargetSite], - regardless of whether or not it exists, a PERMISSION_DENIED - error is returned. - - If the - [TargetSite][google.cloud.discoveryengine.v1.TargetSite] to - update does not exist, a NOT_FOUND error is returned. + Required. The target site to update. + If the caller does not have permission to update + the `TargetSite + `__, + regardless of whether or not it exists, a + PERMISSION_DENIED error is returned. + + If the `TargetSite + `__ + to update does not exist, a NOT_FOUND error is + returned. """ target_site: gcd_site_search_engine.TargetSite = proto.Field( @@ -225,7 +239,8 @@ class UpdateTargetSiteRequest(proto.Message): class UpdateTargetSiteMetadata(proto.Message): r"""Metadata related to the progress of the - [SiteSearchEngineService.UpdateTargetSite][google.cloud.discoveryengine.v1.SiteSearchEngineService.UpdateTargetSite] + `SiteSearchEngineService.UpdateTargetSite + `__ operation. This will be returned by the google.longrunning.Operation.metadata field. @@ -251,23 +266,26 @@ class UpdateTargetSiteMetadata(proto.Message): class DeleteTargetSiteRequest(proto.Message): r"""Request message for - [SiteSearchEngineService.DeleteTargetSite][google.cloud.discoveryengine.v1.SiteSearchEngineService.DeleteTargetSite] + `SiteSearchEngineService.DeleteTargetSite + `__ method. Attributes: name (str): Required. Full resource name of - [TargetSite][google.cloud.discoveryengine.v1.TargetSite], + `TargetSite + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}``. - If the caller does not have permission to access the - [TargetSite][google.cloud.discoveryengine.v1.TargetSite], - regardless of whether or not it exists, a PERMISSION_DENIED - error is returned. + If the caller does not have permission to access + the `TargetSite + `__, + regardless of whether or not it exists, a + PERMISSION_DENIED error is returned. - If the requested - [TargetSite][google.cloud.discoveryengine.v1.TargetSite] + If the requested `TargetSite + `__ does not exist, a NOT_FOUND error is returned. """ @@ -279,7 +297,8 @@ class DeleteTargetSiteRequest(proto.Message): class DeleteTargetSiteMetadata(proto.Message): r"""Metadata related to the progress of the - [SiteSearchEngineService.DeleteTargetSite][google.cloud.discoveryengine.v1.SiteSearchEngineService.DeleteTargetSite] + `SiteSearchEngineService.DeleteTargetSite + `__ operation. This will be returned by the google.longrunning.Operation.metadata field. @@ -305,34 +324,39 @@ class DeleteTargetSiteMetadata(proto.Message): class ListTargetSitesRequest(proto.Message): r"""Request message for - [SiteSearchEngineService.ListTargetSites][google.cloud.discoveryengine.v1.SiteSearchEngineService.ListTargetSites] + `SiteSearchEngineService.ListTargetSites + `__ method. Attributes: parent (str): - Required. The parent site search engine resource name, such - as + Required. The parent site search engine resource + name, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine``. If the caller does not have permission to list - [TargetSite][google.cloud.discoveryengine.v1.TargetSite]s - under this site search engine, regardless of whether or not - this branch exists, a PERMISSION_DENIED error is returned. + `TargetSite + `__s + under this site search engine, regardless of + whether or not this branch exists, a + PERMISSION_DENIED error is returned. page_size (int): - Requested page size. Server may return fewer items than - requested. If unspecified, server will pick an appropriate - default. The maximum value is 1000; values above 1000 will - be coerced to 1000. + Requested page size. Server may return fewer + items than requested. If unspecified, server + will pick an appropriate default. The maximum + value is 1000; values above 1000 will be coerced + to 1000. - If this field is negative, an INVALID_ARGUMENT error is - returned. + If this field is negative, an INVALID_ARGUMENT + error is returned. page_token (str): - A page token, received from a previous ``ListTargetSites`` - call. Provide this to retrieve the subsequent page. + A page token, received from a previous + ``ListTargetSites`` call. Provide this to + retrieve the subsequent page. - When paginating, all other parameters provided to - ``ListTargetSites`` must match the call that provided the - page token. + When paginating, all other parameters provided + to ``ListTargetSites`` must match the call that + provided the page token. """ parent: str = proto.Field( @@ -351,16 +375,17 @@ class ListTargetSitesRequest(proto.Message): class ListTargetSitesResponse(proto.Message): r"""Response message for - [SiteSearchEngineService.ListTargetSites][google.cloud.discoveryengine.v1.SiteSearchEngineService.ListTargetSites] + `SiteSearchEngineService.ListTargetSites + `__ method. Attributes: target_sites (MutableSequence[google.cloud.discoveryengine_v1.types.TargetSite]): List of TargetSites. next_page_token (str): - A token that can be sent as ``page_token`` to retrieve the - next page. If this field is omitted, there are no subsequent - pages. + A token that can be sent as ``page_token`` to + retrieve the next page. If this field is + omitted, there are no subsequent pages. total_size (int): The total number of items matching the request. This will always be populated in the @@ -390,7 +415,8 @@ def raw_page(self): class BatchCreateTargetSiteMetadata(proto.Message): r"""Metadata related to the progress of the - [SiteSearchEngineService.BatchCreateTargetSites][google.cloud.discoveryengine.v1.SiteSearchEngineService.BatchCreateTargetSites] + `SiteSearchEngineService.BatchCreateTargetSites + `__ operation. This will be returned by the google.longrunning.Operation.metadata field. @@ -416,7 +442,8 @@ class BatchCreateTargetSiteMetadata(proto.Message): class BatchCreateTargetSitesResponse(proto.Message): r"""Response message for - [SiteSearchEngineService.BatchCreateTargetSites][google.cloud.discoveryengine.v1.SiteSearchEngineService.BatchCreateTargetSites] + `SiteSearchEngineService.BatchCreateTargetSites + `__ method. Attributes: @@ -435,18 +462,20 @@ class BatchCreateTargetSitesResponse(proto.Message): class CreateSitemapRequest(proto.Message): r"""Request message for - [SiteSearchEngineService.CreateSitemap][google.cloud.discoveryengine.v1.SiteSearchEngineService.CreateSitemap] + `SiteSearchEngineService.CreateSitemap + `__ method. Attributes: parent (str): Required. Parent resource name of the - [SiteSearchEngine][google.cloud.discoveryengine.v1.SiteSearchEngine], + `SiteSearchEngine + `__, such as ``projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine``. sitemap (google.cloud.discoveryengine_v1.types.Sitemap): - Required. The - [Sitemap][google.cloud.discoveryengine.v1.Sitemap] to + Required. The `Sitemap + `__ to create. """ @@ -463,23 +492,27 @@ class CreateSitemapRequest(proto.Message): class DeleteSitemapRequest(proto.Message): r"""Request message for - [SiteSearchEngineService.DeleteSitemap][google.cloud.discoveryengine.v1.SiteSearchEngineService.DeleteSitemap] + `SiteSearchEngineService.DeleteSitemap + `__ method. Attributes: name (str): Required. Full resource name of - [Sitemap][google.cloud.discoveryengine.v1.Sitemap], such as + `Sitemap + `__, + such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/sitemaps/{sitemap}``. - If the caller does not have permission to access the - [Sitemap][google.cloud.discoveryengine.v1.Sitemap], - regardless of whether or not it exists, a PERMISSION_DENIED - error is returned. + If the caller does not have permission to access + the `Sitemap + `__, + regardless of whether or not it exists, a + PERMISSION_DENIED error is returned. - If the requested - [Sitemap][google.cloud.discoveryengine.v1.Sitemap] does not - exist, a NOT_FOUND error is returned. + If the requested `Sitemap + `__ + does not exist, a NOT_FOUND error is returned. """ name: str = proto.Field( @@ -490,30 +523,36 @@ class DeleteSitemapRequest(proto.Message): class FetchSitemapsRequest(proto.Message): r"""Request message for - [SiteSearchEngineService.FetchSitemaps][google.cloud.discoveryengine.v1.SiteSearchEngineService.FetchSitemaps] + `SiteSearchEngineService.FetchSitemaps + `__ method. Attributes: parent (str): Required. Parent resource name of the - [SiteSearchEngine][google.cloud.discoveryengine.v1.SiteSearchEngine], + `SiteSearchEngine + `__, such as ``projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine``. matcher (google.cloud.discoveryengine_v1.types.FetchSitemapsRequest.Matcher): Optional. If specified, fetches the matching - [Sitemap][google.cloud.discoveryengine.v1.Sitemap]s. If not - specified, fetches all - [Sitemap][google.cloud.discoveryengine.v1.Sitemap]s in the - [DataStore][google.cloud.discoveryengine.v1.DataStore]. + `Sitemap + `__s. + If not specified, fetches all `Sitemap + `__s in + the `DataStore + `__. """ class UrisMatcher(proto.Message): - r"""Matcher for the [Sitemap][google.cloud.discoveryengine.v1.Sitemap]s - by their uris. + r"""Matcher for the `Sitemap + `__s by their uris. Attributes: uris (MutableSequence[str]): - The [Sitemap][google.cloud.discoveryengine.v1.Sitemap] uris. + The `Sitemap + `__ + uris. """ uris: MutableSequence[str] = proto.RepeatedField( @@ -522,8 +561,9 @@ class UrisMatcher(proto.Message): ) class Matcher(proto.Message): - r"""Matcher for the [Sitemap][google.cloud.discoveryengine.v1.Sitemap]s. - Currently only supports uris matcher. + r"""Matcher for the `Sitemap + `__s. Currently only + supports uris matcher. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -555,7 +595,8 @@ class Matcher(proto.Message): class CreateSitemapMetadata(proto.Message): r"""Metadata related to the progress of the - [SiteSearchEngineService.CreateSitemap][google.cloud.discoveryengine.v1.SiteSearchEngineService.CreateSitemap] + `SiteSearchEngineService.CreateSitemap + `__ operation. This will be returned by the google.longrunning.Operation.metadata field. @@ -581,7 +622,8 @@ class CreateSitemapMetadata(proto.Message): class DeleteSitemapMetadata(proto.Message): r"""Metadata related to the progress of the - [SiteSearchEngineService.DeleteSitemap][google.cloud.discoveryengine.v1.SiteSearchEngineService.DeleteSitemap] + `SiteSearchEngineService.DeleteSitemap + `__ operation. This will be returned by the google.longrunning.Operation.metadata field. @@ -607,22 +649,25 @@ class DeleteSitemapMetadata(proto.Message): class FetchSitemapsResponse(proto.Message): r"""Response message for - [SiteSearchEngineService.FetchSitemaps][google.cloud.discoveryengine.v1.SiteSearchEngineService.FetchSitemaps] + `SiteSearchEngineService.FetchSitemaps + `__ method. Attributes: sitemaps_metadata (MutableSequence[google.cloud.discoveryengine_v1.types.FetchSitemapsResponse.SitemapMetadata]): - List of [Sitemap][google.cloud.discoveryengine.v1.Sitemap]s + List of `Sitemap + `__s fetched. """ class SitemapMetadata(proto.Message): - r"""Contains a [Sitemap][google.cloud.discoveryengine.v1.Sitemap] and - its metadata. + r"""Contains a `Sitemap `__ + and its metadata. Attributes: sitemap (google.cloud.discoveryengine_v1.types.Sitemap): - The [Sitemap][google.cloud.discoveryengine.v1.Sitemap]. + The `Sitemap + `__. """ sitemap: gcd_site_search_engine.Sitemap = proto.Field( @@ -640,13 +685,15 @@ class SitemapMetadata(proto.Message): class EnableAdvancedSiteSearchRequest(proto.Message): r"""Request message for - [SiteSearchEngineService.EnableAdvancedSiteSearch][google.cloud.discoveryengine.v1.SiteSearchEngineService.EnableAdvancedSiteSearch] + `SiteSearchEngineService.EnableAdvancedSiteSearch + `__ method. Attributes: site_search_engine (str): Required. Full resource name of the - [SiteSearchEngine][google.cloud.discoveryengine.v1.SiteSearchEngine], + `SiteSearchEngine + `__, such as ``projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSearchEngine``. """ @@ -659,7 +706,8 @@ class EnableAdvancedSiteSearchRequest(proto.Message): class EnableAdvancedSiteSearchResponse(proto.Message): r"""Response message for - [SiteSearchEngineService.EnableAdvancedSiteSearch][google.cloud.discoveryengine.v1.SiteSearchEngineService.EnableAdvancedSiteSearch] + `SiteSearchEngineService.EnableAdvancedSiteSearch + `__ method. """ @@ -667,7 +715,8 @@ class EnableAdvancedSiteSearchResponse(proto.Message): class EnableAdvancedSiteSearchMetadata(proto.Message): r"""Metadata related to the progress of the - [SiteSearchEngineService.EnableAdvancedSiteSearch][google.cloud.discoveryengine.v1.SiteSearchEngineService.EnableAdvancedSiteSearch] + `SiteSearchEngineService.EnableAdvancedSiteSearch + `__ operation. This will be returned by the google.longrunning.Operation.metadata field. @@ -693,13 +742,15 @@ class EnableAdvancedSiteSearchMetadata(proto.Message): class DisableAdvancedSiteSearchRequest(proto.Message): r"""Request message for - [SiteSearchEngineService.DisableAdvancedSiteSearch][google.cloud.discoveryengine.v1.SiteSearchEngineService.DisableAdvancedSiteSearch] + `SiteSearchEngineService.DisableAdvancedSiteSearch + `__ method. Attributes: site_search_engine (str): Required. Full resource name of the - [SiteSearchEngine][google.cloud.discoveryengine.v1.SiteSearchEngine], + `SiteSearchEngine + `__, such as ``projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSearchEngine``. """ @@ -712,7 +763,8 @@ class DisableAdvancedSiteSearchRequest(proto.Message): class DisableAdvancedSiteSearchResponse(proto.Message): r"""Response message for - [SiteSearchEngineService.DisableAdvancedSiteSearch][google.cloud.discoveryengine.v1.SiteSearchEngineService.DisableAdvancedSiteSearch] + `SiteSearchEngineService.DisableAdvancedSiteSearch + `__ method. """ @@ -720,7 +772,8 @@ class DisableAdvancedSiteSearchResponse(proto.Message): class DisableAdvancedSiteSearchMetadata(proto.Message): r"""Metadata related to the progress of the - [SiteSearchEngineService.DisableAdvancedSiteSearch][google.cloud.discoveryengine.v1.SiteSearchEngineService.DisableAdvancedSiteSearch] + `SiteSearchEngineService.DisableAdvancedSiteSearch + `__ operation. This will be returned by the google.longrunning.Operation.metadata field. @@ -746,21 +799,24 @@ class DisableAdvancedSiteSearchMetadata(proto.Message): class RecrawlUrisRequest(proto.Message): r"""Request message for - [SiteSearchEngineService.RecrawlUris][google.cloud.discoveryengine.v1.SiteSearchEngineService.RecrawlUris] + `SiteSearchEngineService.RecrawlUris + `__ method. Attributes: site_search_engine (str): Required. Full resource name of the - [SiteSearchEngine][google.cloud.discoveryengine.v1.SiteSearchEngine], + `SiteSearchEngine + `__, such as ``projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine``. uris (MutableSequence[str]): - Required. List of URIs to crawl. At most 10K URIs are - supported, otherwise an INVALID_ARGUMENT error is thrown. - Each URI should match at least one - [TargetSite][google.cloud.discoveryengine.v1.TargetSite] in - ``site_search_engine``. + Required. List of URIs to crawl. At most 10K + URIs are supported, otherwise an + INVALID_ARGUMENT error is thrown. Each URI + should match at least one `TargetSite + `__ + in ``site_search_engine``. site_credential (str): Optional. Credential id to use for crawling. """ @@ -781,12 +837,14 @@ class RecrawlUrisRequest(proto.Message): class RecrawlUrisResponse(proto.Message): r"""Response message for - [SiteSearchEngineService.RecrawlUris][google.cloud.discoveryengine.v1.SiteSearchEngineService.RecrawlUris] + `SiteSearchEngineService.RecrawlUris + `__ method. Attributes: failure_samples (MutableSequence[google.cloud.discoveryengine_v1.types.RecrawlUrisResponse.FailureInfo]): - Details for a sample of up to 10 ``failed_uris``. + Details for a sample of up to 10 + ``failed_uris``. failed_uris (MutableSequence[str]): URIs that were not crawled before the LRO terminated. @@ -870,7 +928,8 @@ class CorpusType(proto.Enum): class RecrawlUrisMetadata(proto.Message): r"""Metadata related to the progress of the - [SiteSearchEngineService.RecrawlUris][google.cloud.discoveryengine.v1.SiteSearchEngineService.RecrawlUris] + `SiteSearchEngineService.RecrawlUris + `__ operation. This will be returned by the google.longrunning.Operation.metadata field. @@ -902,8 +961,8 @@ class RecrawlUrisMetadata(proto.Message): Total number of URIs that don't match any TargetSites. valid_uris_count (int): - Total number of unique URIs in the request that are not in - invalid_uris. + Total number of unique URIs in the request that + are not in invalid_uris. success_count (int): Total number of URIs that have been crawled so far. @@ -969,13 +1028,14 @@ class RecrawlUrisMetadata(proto.Message): class BatchVerifyTargetSitesRequest(proto.Message): r"""Request message for - [SiteSearchEngineService.BatchVerifyTargetSites][google.cloud.discoveryengine.v1.SiteSearchEngineService.BatchVerifyTargetSites] + `SiteSearchEngineService.BatchVerifyTargetSites + `__ method. Attributes: parent (str): - Required. The parent resource shared by all TargetSites - being verified. + Required. The parent resource shared by all + TargetSites being verified. ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine``. """ @@ -987,7 +1047,8 @@ class BatchVerifyTargetSitesRequest(proto.Message): class BatchVerifyTargetSitesResponse(proto.Message): r"""Response message for - [SiteSearchEngineService.BatchVerifyTargetSites][google.cloud.discoveryengine.v1.SiteSearchEngineService.BatchVerifyTargetSites] + `SiteSearchEngineService.BatchVerifyTargetSites + `__ method. """ @@ -995,7 +1056,8 @@ class BatchVerifyTargetSitesResponse(proto.Message): class BatchVerifyTargetSitesMetadata(proto.Message): r"""Metadata related to the progress of the - [SiteSearchEngineService.BatchVerifyTargetSites][google.cloud.discoveryengine.v1.SiteSearchEngineService.BatchVerifyTargetSites] + `SiteSearchEngineService.BatchVerifyTargetSites + `__ operation. This will be returned by the google.longrunning.Operation.metadata field. @@ -1021,30 +1083,33 @@ class BatchVerifyTargetSitesMetadata(proto.Message): class FetchDomainVerificationStatusRequest(proto.Message): r"""Request message for - [SiteSearchEngineService.FetchDomainVerificationStatus][google.cloud.discoveryengine.v1.SiteSearchEngineService.FetchDomainVerificationStatus] + `SiteSearchEngineService.FetchDomainVerificationStatus + `__ method. Attributes: site_search_engine (str): - Required. The site search engine resource under which we - fetch all the domain verification status. + Required. The site search engine resource under + which we fetch all the domain verification + status. ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine``. page_size (int): - Requested page size. Server may return fewer items than - requested. If unspecified, server will pick an appropriate - default. The maximum value is 1000; values above 1000 will - be coerced to 1000. + Requested page size. Server may return fewer + items than requested. If unspecified, server + will pick an appropriate default. The maximum + value is 1000; values above 1000 will be coerced + to 1000. - If this field is negative, an INVALID_ARGUMENT error is - returned. + If this field is negative, an INVALID_ARGUMENT + error is returned. page_token (str): A page token, received from a previous - ``FetchDomainVerificationStatus`` call. Provide this to - retrieve the subsequent page. + ``FetchDomainVerificationStatus`` call. Provide + this to retrieve the subsequent page. - When paginating, all other parameters provided to - ``FetchDomainVerificationStatus`` must match the call that - provided the page token. + When paginating, all other parameters provided + to ``FetchDomainVerificationStatus`` must match + the call that provided the page token. """ site_search_engine: str = proto.Field( @@ -1063,7 +1128,8 @@ class FetchDomainVerificationStatusRequest(proto.Message): class FetchDomainVerificationStatusResponse(proto.Message): r"""Response message for - [SiteSearchEngineService.FetchDomainVerificationStatus][google.cloud.discoveryengine.v1.SiteSearchEngineService.FetchDomainVerificationStatus] + `SiteSearchEngineService.FetchDomainVerificationStatus + `__ method. Attributes: @@ -1071,9 +1137,9 @@ class FetchDomainVerificationStatusResponse(proto.Message): List of TargetSites containing the site verification status. next_page_token (str): - A token that can be sent as ``page_token`` to retrieve the - next page. If this field is omitted, there are no subsequent - pages. + A token that can be sent as ``page_token`` to + retrieve the next page. If this field is + omitted, there are no subsequent pages. total_size (int): The total number of items matching the request. This will always be populated in the diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/user_event.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/user_event.py index 4bed1bf502f0..4ab2ff6052e3 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/user_event.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/user_event.py @@ -49,206 +49,248 @@ class UserEvent(proto.Message): Generic values: - - ``search``: Search for Documents. - - ``view-item``: Detailed page view of a Document. - - ``view-item-list``: View of a panel or ordered list of - Documents. - - ``view-home-page``: View of the home page. - - ``view-category-page``: View of a category page, e.g. Home - > Men > Jeans - - ``add-feedback``: Add a user feedback. + * ``search``: Search for Documents. + * ``view-item``: Detailed page view of a + Document. + + * ``view-item-list``: View of a panel or ordered + list of Documents. * ``view-home-page``: View of + the home page. + + * ``view-category-page``: View of a category + page, e.g. Home > Men > Jeans * + ``add-feedback``: Add a user feedback. Retail-related values: - - ``add-to-cart``: Add an item(s) to cart, e.g. in Retail - online shopping - - ``purchase``: Purchase an item(s) + * ``add-to-cart``: Add an item(s) to cart, e.g. + in Retail online shopping * ``purchase``: + Purchase an item(s) Media-related values: - - ``media-play``: Start/resume watching a video, playing a - song, etc. - - ``media-complete``: Finished or stopped midway through a - video, song, etc. + * ``media-play``: Start/resume watching a video, + playing a song, etc. * ``media-complete``: + Finished or stopped midway through a video, + song, etc. Custom conversion value: - - ``conversion``: Customer defined conversion event. + * ``conversion``: Customer defined conversion + event. conversion_type (str): Optional. Conversion type. Required if - [UserEvent.event_type][google.cloud.discoveryengine.v1.UserEvent.event_type] - is ``conversion``. This is a customer-defined conversion - name in lowercase letters or numbers separated by "-", such - as "watch", "good-visit" etc. + `UserEvent.event_type + `__ + is ``conversion``. This is a customer-defined + conversion name in lowercase letters or numbers + separated by "-", such as "watch", "good-visit" + etc. Do not set the field if - [UserEvent.event_type][google.cloud.discoveryengine.v1.UserEvent.event_type] - is not ``conversion``. This mixes the custom conversion - event with predefined events like ``search``, ``view-item`` - etc. + `UserEvent.event_type + `__ + is not ``conversion``. This mixes the custom + conversion event with predefined events like + ``search``, ``view-item`` etc. user_pseudo_id (str): - Required. A unique identifier for tracking visitors. - - For example, this could be implemented with an HTTP cookie, - which should be able to uniquely identify a visitor on a - single device. This unique identifier should not change if - the visitor log in/out of the website. - - Do not set the field to the same fixed ID for different - users. This mixes the event history of those users together, - which results in degraded model quality. - - The field must be a UTF-8 encoded string with a length limit - of 128 characters. Otherwise, an ``INVALID_ARGUMENT`` error - is returned. + Required. A unique identifier for tracking + visitors. + For example, this could be implemented with an + HTTP cookie, which should be able to uniquely + identify a visitor on a single device. This + unique identifier should not change if the + visitor log in/out of the website. + + Do not set the field to the same fixed ID for + different users. This mixes the event history of + those users together, which results in degraded + model quality. + + The field must be a UTF-8 encoded string with a + length limit of 128 characters. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. - The field should not contain PII or user-data. We recommend - to use Google Analytics `Client - ID `__ + The field should not contain PII or user-data. + We recommend to use Google Analytics `Client + ID + `__ for this field. engine (str): - The [Engine][google.cloud.discoveryengine.v1.Engine] + The `Engine + `__ resource name, in the form of ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}``. Optional. Only required for - [Engine][google.cloud.discoveryengine.v1.Engine] produced - user events. For example, user events from blended search. + `Engine + `__ + produced user events. For example, user events + from blended search. data_store (str): - The [DataStore][google.cloud.discoveryengine.v1.DataStore] + The `DataStore + `__ resource full name, of the form ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}``. - Optional. Only required for user events whose data store - can't by determined by - [UserEvent.engine][google.cloud.discoveryengine.v1.UserEvent.engine] - or - [UserEvent.documents][google.cloud.discoveryengine.v1.UserEvent.documents]. - If data store is set in the parent of write/import/collect - user event requests, this field can be omitted. + Optional. Only required for user events whose + data store can't by determined by + `UserEvent.engine + `__ + or `UserEvent.documents + `__. + If data store is set in the parent of + write/import/collect user event requests, this + field can be omitted. event_time (google.protobuf.timestamp_pb2.Timestamp): Only required for - [UserEventService.ImportUserEvents][google.cloud.discoveryengine.v1.UserEventService.ImportUserEvents] - method. Timestamp of when the user event happened. + `UserEventService.ImportUserEvents + `__ + method. Timestamp of when the user event + happened. user_info (google.cloud.discoveryengine_v1.types.UserInfo): Information about the end user. direct_user_request (bool): - Should set to true if the request is made directly from the - end user, in which case the - [UserEvent.user_info.user_agent][google.cloud.discoveryengine.v1.UserInfo.user_agent] + Should set to true if the request is made + directly from the end user, in which case the + `UserEvent.user_info.user_agent + `__ can be populated from the HTTP request. - This flag should be set only if the API request is made - directly from the end user such as a mobile app (and not if - a gateway or a server is processing and pushing the user - events). + This flag should be set only if the API request + is made directly from the end user such as a + mobile app (and not if a gateway or a server is + processing and pushing the user events). - This should not be set when using the JavaScript tag in - [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1.UserEventService.CollectUserEvent]. + This should not be set when using the JavaScript + tag in `UserEventService.CollectUserEvent + `__. session_id (str): - A unique identifier for tracking a visitor session with a - length limit of 128 bytes. A session is an aggregation of an - end user behavior in a time span. + A unique identifier for tracking a visitor + session with a length limit of 128 bytes. A + session is an aggregation of an end user + behavior in a time span. A general guideline to populate the session_id: - 1. If user has no activity for 30 min, a new session_id - should be assigned. - 2. The session_id should be unique across users, suggest use - uuid or add - [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1.UserEvent.user_pseudo_id] - as prefix. + 1. If user has no activity for 30 min, a new + session_id should be assigned. + 2. The session_id should be unique across users, + suggest use uuid or add + `UserEvent.user_pseudo_id + `__ + as prefix. page_info (google.cloud.discoveryengine_v1.types.PageInfo): - Page metadata such as categories and other critical - information for certain event types such as - ``view-category-page``. + Page metadata such as categories and other + critical information for certain event types + such as ``view-category-page``. attribution_token (str): - Token to attribute an API response to user action(s) to - trigger the event. - - Highly recommended for user events that are the result of - [RecommendationService.Recommend][google.cloud.discoveryengine.v1.RecommendationService.Recommend]. - This field enables accurate attribution of recommendation - model performance. + Token to attribute an API response to user + action(s) to trigger the event. + Highly recommended for user events that are the + result of `RecommendationService.Recommend + `__. + This field enables accurate attribution of + recommendation model performance. The value must be one of: - - [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1.RecommendResponse.attribution_token] - for events that are the result of - [RecommendationService.Recommend][google.cloud.discoveryengine.v1.RecommendationService.Recommend]. - - [SearchResponse.attribution_token][google.cloud.discoveryengine.v1.SearchResponse.attribution_token] - for events that are the result of - [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search]. - - This token enables us to accurately attribute page view or - conversion completion back to the event and the particular - predict response containing this clicked/purchased product. - If user clicks on product K in the recommendation results, - pass - [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1.RecommendResponse.attribution_token] - as a URL parameter to product K's page. When recording - events on product K's page, log the - [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1.RecommendResponse.attribution_token] + * `RecommendResponse.attribution_token + `__ + for events that are the result of + `RecommendationService.Recommend + `__. + + * `SearchResponse.attribution_token + `__ + for events that are the result of + `SearchService.Search + `__. + + This token enables us to accurately attribute + page view or conversion completion back to the + event and the particular predict response + containing this clicked/purchased product. If + user clicks on product K in the recommendation + results, pass + `RecommendResponse.attribution_token + `__ + as a URL parameter to product K's page. When + recording events on product K's page, log the + `RecommendResponse.attribution_token + `__ to this field. filter (str): - The filter syntax consists of an expression language for - constructing a predicate from one or more fields of the - documents being filtered. + The filter syntax consists of an expression + language for constructing a predicate from one + or more fields of the documents being filtered. - One example is for ``search`` events, the associated - [SearchRequest][google.cloud.discoveryengine.v1.SearchRequest] + One example is for ``search`` events, the + associated `SearchRequest + `__ may contain a filter expression in - [SearchRequest.filter][google.cloud.discoveryengine.v1.SearchRequest.filter] - conforming to https://google.aip.dev/160#filtering. - - Similarly, for ``view-item-list`` events that are generated - from a - [RecommendRequest][google.cloud.discoveryengine.v1.RecommendRequest], + `SearchRequest.filter + `__ + conforming to + https://google.aip.dev/160#filtering. + + Similarly, for ``view-item-list`` events that + are generated from a `RecommendRequest + `__, this field may be populated directly from - [RecommendRequest.filter][google.cloud.discoveryengine.v1.RecommendRequest.filter] - conforming to https://google.aip.dev/160#filtering. + `RecommendRequest.filter + `__ + conforming to + https://google.aip.dev/160#filtering. - The value must be a UTF-8 encoded string with a length limit - of 1,000 characters. Otherwise, an ``INVALID_ARGUMENT`` - error is returned. + The value must be a UTF-8 encoded string with a + length limit of 1,000 characters. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. documents (MutableSequence[google.cloud.discoveryengine_v1.types.DocumentInfo]): - List of - [Document][google.cloud.discoveryengine.v1.Document]s + List of `Document + `__s associated with this user event. - This field is optional except for the following event types: - - - ``view-item`` - - ``add-to-cart`` - - ``purchase`` - - ``media-play`` - - ``media-complete`` - - In a ``search`` event, this field represents the documents - returned to the end user on the current page (the end user - may have not finished browsing the whole page yet). When a - new page is returned to the end user, after - pagination/filtering/ordering even for the same query, a new - ``search`` event with different - [UserEvent.documents][google.cloud.discoveryengine.v1.UserEvent.documents] + This field is optional except for the following + event types: + + * ``view-item`` + * ``add-to-cart`` + + * ``purchase`` + * ``media-play`` + + * ``media-complete`` + + In a ``search`` event, this field represents the + documents returned to the end user on the + current page (the end user may have not finished + browsing the whole page yet). When a new page is + returned to the end user, after + pagination/filtering/ordering even for the same + query, a new ``search`` event with different + `UserEvent.documents + `__ is desired. panel (google.cloud.discoveryengine_v1.types.PanelInfo): Panel metadata associated with this user event. search_info (google.cloud.discoveryengine_v1.types.SearchInfo): - [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] + `SearchService.Search + `__ details related to the event. This field should be set for ``search`` event. completion_info (google.cloud.discoveryengine_v1.types.CompletionInfo): - [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1.CompletionService.CompleteQuery] + `CompletionService.CompleteQuery + `__ details related to the event. - This field should be set for ``search`` event when - autocomplete function is enabled and the user clicks a - suggestion for search. + This field should be set for ``search`` event + when autocomplete function is enabled and the + user clicks a suggestion for search. transaction_info (google.cloud.discoveryengine_v1.types.TransactionInfo): The transaction metadata (if any) associated with this user event. @@ -262,34 +304,42 @@ class UserEvent(proto.Message): associated with promotions. Currently, this field is restricted to at most one ID. attributes (MutableMapping[str, google.cloud.discoveryengine_v1.types.CustomAttribute]): - Extra user event features to include in the recommendation - model. These attributes must NOT contain data that needs to - be parsed or processed further, e.g. JSON or other - encodings. - - If you provide custom attributes for ingested user events, - also include them in the user events that you associate with - prediction requests. Custom attribute formatting must be - consistent between imported events and events provided with - prediction requests. This lets the Discovery Engine API use - those custom attributes when training models and serving - predictions, which helps improve recommendation quality. - - This field needs to pass all below criteria, otherwise an - ``INVALID_ARGUMENT`` error is returned: - - - The key must be a UTF-8 encoded string with a length limit - of 5,000 characters. - - For text attributes, at most 400 values are allowed. Empty - values are not allowed. Each value must be a UTF-8 encoded - string with a length limit of 256 characters. - - For number attributes, at most 400 values are allowed. - - For product recommendations, an example of extra user - information is ``traffic_channel``, which is how a user - arrives at the site. Users can arrive at the site by coming - to the site directly, coming through Google search, or in - other ways. + Extra user event features to include in the + recommendation model. These attributes must NOT + contain data that needs to be parsed or + processed further, e.g. JSON or other encodings. + + If you provide custom attributes for ingested + user events, also include them in the user + events that you associate with prediction + requests. Custom attribute formatting must be + consistent between imported events and events + provided with prediction requests. This lets the + Discovery Engine API use those custom attributes + when training models and serving predictions, + which helps improve recommendation quality. + + This field needs to pass all below criteria, + otherwise an ``INVALID_ARGUMENT`` error is + returned: + + * The key must be a UTF-8 encoded string with a + length limit of 5,000 characters. + + * For text attributes, at most 400 values are + allowed. Empty values are not allowed. Each + value must be a UTF-8 encoded string with a + length limit of 256 characters. + + * For number attributes, at most 400 values are + allowed. + + For product recommendations, an example of extra + user information is ``traffic_channel``, which + is how a user arrives at the site. Users can + arrive + at the site by coming to the site directly, + coming through Google search, or in other ways. media_info (google.cloud.discoveryengine_v1.types.MediaInfo): Media-specific info. panels (MutableSequence[google.cloud.discoveryengine_v1.types.PanelInfo]): @@ -406,31 +456,36 @@ class PageInfo(proto.Message): pageview_id (str): A unique ID of a web page view. - This should be kept the same for all user events triggered - from the same pageview. For example, an item detail page - view could trigger multiple events as the user is browsing - the page. The ``pageview_id`` property should be kept the - same for all these events so that they can be grouped + This should be kept the same for all user events + triggered from the same pageview. For example, + an item detail page view could trigger multiple + events as the user is browsing the page. The + ``pageview_id`` property should be kept the same + for all these events so that they can be grouped together properly. - When using the client side event reporting with JavaScript - pixel and Google Tag Manager, this value is filled in - automatically. + When using the client side event reporting with + JavaScript pixel and Google Tag Manager, this + value is filled in automatically. page_category (str): - The most specific category associated with a category page. - - To represent full path of category, use '>' sign to separate - different hierarchies. If '>' is part of the category name, - replace it with other character(s). - - Category pages include special pages such as sales or - promotions. For instance, a special sale page may have the - category hierarchy: - ``"pageCategory" : "Sales > 2017 Black Friday Deals"``. - - Required for ``view-category-page`` events. Other event - types should not set this field. Otherwise, an - ``INVALID_ARGUMENT`` error is returned. + The most specific category associated with a + category page. + To represent full path of category, use '>' sign + to separate different hierarchies. If '>' is + part of the category name, replace it with other + character(s). + + Category pages include special pages such as + sales or promotions. For instance, a special + sale page may have the category hierarchy: + + ``"pageCategory" : "Sales > 2017 Black Friday + Deals"``. + + Required for ``view-category-page`` events. + Other event types should not set this field. + Otherwise, an ``INVALID_ARGUMENT`` error is + returned. uri (str): Complete URL (window.location.href) of the user's current page. @@ -476,49 +531,56 @@ class SearchInfo(proto.Message): The user's search query. See - [SearchRequest.query][google.cloud.discoveryengine.v1.SearchRequest.query] + `SearchRequest.query + `__ for definition. - The value must be a UTF-8 encoded string with a length limit - of 5,000 characters. Otherwise, an ``INVALID_ARGUMENT`` - error is returned. + The value must be a UTF-8 encoded string with a + length limit of 5,000 characters. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. At least one of - [search_query][google.cloud.discoveryengine.v1.SearchInfo.search_query] - or - [PageInfo.page_category][google.cloud.discoveryengine.v1.PageInfo.page_category] - is required for ``search`` events. Other event types should - not set this field. Otherwise, an ``INVALID_ARGUMENT`` error - is returned. + `search_query + `__ + or `PageInfo.page_category + `__ + is required for ``search`` events. Other event + types should not set this field. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. order_by (str): - The order in which products are returned, if applicable. - + The order in which products are returned, if + applicable. See - [SearchRequest.order_by][google.cloud.discoveryengine.v1.SearchRequest.order_by] + `SearchRequest.order_by + `__ for definition and syntax. - The value must be a UTF-8 encoded string with a length limit - of 1,000 characters. Otherwise, an ``INVALID_ARGUMENT`` - error is returned. - - This can only be set for ``search`` events. Other event - types should not set this field. Otherwise, an + The value must be a UTF-8 encoded string with a + length limit of 1,000 characters. Otherwise, an ``INVALID_ARGUMENT`` error is returned. + + This can only be set for ``search`` events. + Other event types should not set this field. + Otherwise, an ``INVALID_ARGUMENT`` error is + returned. offset (int): - An integer that specifies the current offset for pagination - (the 0-indexed starting location, amongst the products - deemed by the API as relevant). + An integer that specifies the current offset for + pagination (the 0-indexed starting location, + amongst the products deemed by the API as + relevant). See - [SearchRequest.offset][google.cloud.discoveryengine.v1.SearchRequest.offset] + `SearchRequest.offset + `__ for definition. - If this field is negative, an ``INVALID_ARGUMENT`` is - returned. + If this field is negative, an + ``INVALID_ARGUMENT`` is returned. - This can only be set for ``search`` events. Other event - types should not set this field. Otherwise, an - ``INVALID_ARGUMENT`` error is returned. + This can only be set for ``search`` events. + Other event types should not set this field. + Otherwise, an ``INVALID_ARGUMENT`` error is + returned. This field is a member of `oneof`_ ``_offset``. """ @@ -545,10 +607,12 @@ class CompletionInfo(proto.Message): Attributes: selected_suggestion (str): End user selected - [CompleteQueryResponse.QuerySuggestion.suggestion][google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion.suggestion]. + `CompleteQueryResponse.QuerySuggestion.suggestion + `__. selected_position (int): End user selected - [CompleteQueryResponse.QuerySuggestion.suggestion][google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion.suggestion] + `CompleteQueryResponse.QuerySuggestion.suggestion + `__ position, starting from 0. """ @@ -587,43 +651,49 @@ class TransactionInfo(proto.Message): This field is a member of `oneof`_ ``_tax``. cost (float): - All the costs associated with the products. These can be - manufacturing costs, shipping expenses not borne by the end - user, or any other costs, such that: - - - Profit = - [value][google.cloud.discoveryengine.v1.TransactionInfo.value] - - - [tax][google.cloud.discoveryengine.v1.TransactionInfo.tax] - - - [cost][google.cloud.discoveryengine.v1.TransactionInfo.cost] + All the costs associated with the products. + These can be manufacturing costs, shipping + expenses not borne by the end user, or any other + costs, such that: + + * Profit = `value + `__ + - `tax + `__ + - `cost + `__ This field is a member of `oneof`_ ``_cost``. discount_value (float): - The total discount(s) value applied to this transaction. - This figure should be excluded from - [TransactionInfo.value][google.cloud.discoveryengine.v1.TransactionInfo.value] + The total discount(s) value applied to this + transaction. This figure should be excluded from + `TransactionInfo.value + `__ For example, if a user paid - [TransactionInfo.value][google.cloud.discoveryengine.v1.TransactionInfo.value] - amount, then nominal (pre-discount) value of the transaction - is the sum of - [TransactionInfo.value][google.cloud.discoveryengine.v1.TransactionInfo.value] + `TransactionInfo.value + `__ + amount, then nominal (pre-discount) value of the + transaction is the sum of `TransactionInfo.value + `__ and - [TransactionInfo.discount_value][google.cloud.discoveryengine.v1.TransactionInfo.discount_value] + `TransactionInfo.discount_value + `__ - This means that profit is calculated the same way, - regardless of the discount value, and that - [TransactionInfo.discount_value][google.cloud.discoveryengine.v1.TransactionInfo.discount_value] + This means that profit is calculated the same + way, regardless of the discount value, and that + `TransactionInfo.discount_value + `__ can be larger than - [TransactionInfo.value][google.cloud.discoveryengine.v1.TransactionInfo.value]: + `TransactionInfo.value + `__: - - Profit = - [value][google.cloud.discoveryengine.v1.TransactionInfo.value] - - - [tax][google.cloud.discoveryengine.v1.TransactionInfo.tax] - - - [cost][google.cloud.discoveryengine.v1.TransactionInfo.cost] + * Profit = `value + `__ + - `tax + `__ + - `cost + `__ This field is a member of `oneof`_ ``_discount_value``. """ @@ -670,32 +740,37 @@ class DocumentInfo(proto.Message): Attributes: id (str): - The [Document][google.cloud.discoveryengine.v1.Document] + The `Document + `__ resource ID. This field is a member of `oneof`_ ``document_descriptor``. name (str): - The [Document][google.cloud.discoveryengine.v1.Document] + The `Document + `__ resource full name, of the form: + ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`` This field is a member of `oneof`_ ``document_descriptor``. uri (str): - The [Document][google.cloud.discoveryengine.v1.Document] URI - - only allowed for website data stores. + The `Document + `__ + URI - only allowed for website data stores. This field is a member of `oneof`_ ``document_descriptor``. quantity (int): - Quantity of the Document associated with the user event. - Defaults to 1. - - For example, this field is 2 if two quantities of the same - Document are involved in a ``add-to-cart`` event. + Quantity of the Document associated with the + user event. Defaults to 1. + For example, this field is 2 if two quantities + of the same Document are involved in a + ``add-to-cart`` event. - Required for events of the following event types: + Required for events of the following event + types: - - ``add-to-cart`` - - ``purchase`` + * ``add-to-cart`` + * ``purchase`` This field is a member of `oneof`_ ``_quantity``. promotion_ids (MutableSequence[str]): @@ -706,14 +781,15 @@ class DocumentInfo(proto.Message): Output only. Whether the referenced Document can be found in the data store. conversion_value (float): - Optional. The conversion value associated with this - Document. Must be set if - [UserEvent.event_type][google.cloud.discoveryengine.v1.UserEvent.event_type] + Optional. The conversion value associated with + this Document. Must be set if + `UserEvent.event_type + `__ is "conversion". - For example, a value of 1000 signifies that 1000 seconds - were spent viewing a Document for the ``watch`` conversion - type. + For example, a value of 1000 signifies that 1000 + seconds were spent viewing a Document for the + ``watch`` conversion type. This field is a member of `oneof`_ ``_conversion_value``. """ @@ -764,16 +840,18 @@ class PanelInfo(proto.Message): display_name (str): The display name of the panel. panel_position (int): - The ordered position of the panel, if shown to the user with - other panels. If set, then - [total_panels][google.cloud.discoveryengine.v1.PanelInfo.total_panels] + The ordered position of the panel, if shown to + the user with other panels. If set, then + `total_panels + `__ must also be set. This field is a member of `oneof`_ ``_panel_position``. total_panels (int): - The total number of panels, including this one, shown to the - user. Must be set if - [panel_position][google.cloud.discoveryengine.v1.PanelInfo.panel_position] + The total number of panels, including this one, + shown to the user. Must be set if + `panel_position + `__ is set. This field is a member of `oneof`_ ``_total_panels``. @@ -814,20 +892,24 @@ class MediaInfo(proto.Message): Attributes: media_progress_duration (google.protobuf.duration_pb2.Duration): - The media progress time in seconds, if applicable. For - example, if the end user has finished 90 seconds of a - playback video, then - [MediaInfo.media_progress_duration.seconds][google.protobuf.Duration.seconds] - should be set to 90. + The media progress time in seconds, if + applicable. For example, if the end user has + finished 90 seconds of a playback video, then + `MediaInfo.media_progress_duration.seconds + `__ should be + set to 90. media_progress_percentage (float): Media progress should be computed using only the - [media_progress_duration][google.cloud.discoveryengine.v1.MediaInfo.media_progress_duration] + `media_progress_duration + `__ relative to the media total length. - This value must be between ``[0, 1.0]`` inclusive. + This value must be between ``[0, 1.0]`` + inclusive. - If this is not a playback or the progress cannot be computed - (e.g. ongoing livestream), this field should be unset. + If this is not a playback or the progress cannot + be computed (e.g. ongoing livestream), this + field should be unset. This field is a member of `oneof`_ ``_media_progress_percentage``. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/user_event_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/user_event_service.py index c547864b34f8..8dc86fdb7b50 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/user_event_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/user_event_service.py @@ -37,18 +37,22 @@ class WriteUserEventRequest(proto.Message): Attributes: parent (str): - Required. The parent resource name. If the write user event - action is applied in - [DataStore][google.cloud.discoveryengine.v1.DataStore] + Required. The parent resource name. + If the write user event action is applied in + `DataStore + `__ level, the format is: + ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}``. If the write user event action is applied in - [Location][google.cloud.location.Location] level, for - example, the event with - [Document][google.cloud.discoveryengine.v1.Document] across - multiple - [DataStore][google.cloud.discoveryengine.v1.DataStore], the - format is: ``projects/{project}/locations/{location}``. + `Location `__ + level, for example, the event with `Document + `__ + across multiple `DataStore + `__, + the format is: + + ``projects/{project}/locations/{location}``. user_event (google.cloud.discoveryengine_v1.types.UserEvent): Required. User event to write. @@ -82,18 +86,22 @@ class CollectUserEventRequest(proto.Message): Attributes: parent (str): - Required. The parent resource name. If the collect user - event action is applied in - [DataStore][google.cloud.discoveryengine.v1.DataStore] + Required. The parent resource name. + If the collect user event action is applied in + `DataStore + `__ level, the format is: + ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}``. If the collect user event action is applied in - [Location][google.cloud.location.Location] level, for - example, the event with - [Document][google.cloud.discoveryengine.v1.Document] across - multiple - [DataStore][google.cloud.discoveryengine.v1.DataStore], the - format is: ``projects/{project}/locations/{location}``. + `Location `__ + level, for example, the event with `Document + `__ + across multiple `DataStore + `__, + the format is: + + ``projects/{project}/locations/{location}``. user_event (str): Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/user_license.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/user_license.py index 203b5ed77612..e7e6fa4bcad9 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/user_license.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/user_license.py @@ -73,15 +73,17 @@ class LicenseAssignmentState(proto.Enum): ASSIGNED (1): License assigned to the user. UNASSIGNED (2): - No license assigned to the user. Deprecated, translated to - NO_LICENSE. + No license assigned to the user. + Deprecated, translated to NO_LICENSE. NO_LICENSE (3): No license assigned to the user. NO_LICENSE_ATTEMPTED_LOGIN (4): - User attempted to login but no license assigned to the user. - This state is only used for no user first time login attempt - but cannot get license assigned. Users already logged in but - cannot get license assigned will be assigned NO_LICENSE + User attempted to login but no license assigned + to the user. This state is only used for no user + first time login attempt but cannot get license + assigned. + Users already logged in but cannot get license + assigned will be assigned NO_LICENSE state(License could be unassigned by admin). """ LICENSE_ASSIGNMENT_STATE_UNSPECIFIED = 0 diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/user_license_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/user_license_service.py index 44d117f50b75..4b3cd422c487 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/user_license_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/user_license_service.py @@ -38,45 +38,51 @@ class ListUserLicensesRequest(proto.Message): r"""Request message for - [UserLicenseService.ListUserLicenses][google.cloud.discoveryengine.v1.UserLicenseService.ListUserLicenses]. + `UserLicenseService.ListUserLicenses + `__. Attributes: parent (str): - Required. The parent [UserStore][] resource name, format: + Required. The parent [UserStore][] resource + name, format: ``projects/{project}/locations/{location}/userStores/{user_store_id}``. page_size (int): - Optional. Requested page size. Server may return fewer items - than requested. If unspecified, defaults to 10. The maximum - value is 50; values above 50 will be coerced to 50. + Optional. Requested page size. Server may return + fewer items than requested. If unspecified, + defaults to 10. The maximum value is 50; values + above 50 will be coerced to 50. - If this field is negative, an INVALID_ARGUMENT error is - returned. + If this field is negative, an INVALID_ARGUMENT + error is returned. page_token (str): Optional. A page token, received from a previous - ``ListUserLicenses`` call. Provide this to retrieve the - subsequent page. + ``ListUserLicenses`` call. Provide this to + retrieve the subsequent page. - When paginating, all other parameters provided to - ``ListUserLicenses`` must match the call that provided the - page token. + When paginating, all other parameters provided + to ``ListUserLicenses`` must match the call that + provided the page token. filter (str): Optional. Filter for the list request. Supported fields: - - ``license_assignment_state`` + * ``license_assignment_state`` Examples: - - ``license_assignment_state = ASSIGNED`` to list assigned - user licenses. - - ``license_assignment_state = NO_LICENSE`` to list not - licensed users. - - ``license_assignment_state = NO_LICENSE_ATTEMPTED_LOGIN`` - to list users who attempted login but no license assigned. - - ``license_assignment_state != NO_LICENSE_ATTEMPTED_LOGIN`` - to filter out users who attempted login but no license - assigned. + * ``license_assignment_state = ASSIGNED`` to + list assigned user licenses. * + ``license_assignment_state = NO_LICENSE`` to + list not licensed users. + + * ``license_assignment_state = + NO_LICENSE_ATTEMPTED_LOGIN`` to list users who + attempted login but no license assigned. + + * ``license_assignment_state != + NO_LICENSE_ATTEMPTED_LOGIN`` to filter out users + who attempted login but no license assigned. """ parent: str = proto.Field( @@ -99,16 +105,18 @@ class ListUserLicensesRequest(proto.Message): class ListUserLicensesResponse(proto.Message): r"""Response message for - [UserLicenseService.ListUserLicenses][google.cloud.discoveryengine.v1.UserLicenseService.ListUserLicenses]. + `UserLicenseService.ListUserLicenses + `__. Attributes: user_licenses (MutableSequence[google.cloud.discoveryengine_v1.types.UserLicense]): All the customer's - [UserLicense][google.cloud.discoveryengine.v1.UserLicense]s. + `UserLicense + `__s. next_page_token (str): - A token, which can be sent as ``page_token`` to retrieve the - next page. If this field is omitted, there are no subsequent - pages. + A token, which can be sent as ``page_token`` to + retrieve the next page. If this field is + omitted, there are no subsequent pages. """ @property @@ -128,7 +136,8 @@ def raw_page(self): class BatchUpdateUserLicensesRequest(proto.Message): r"""Request message for - [UserLicenseService.BatchUpdateUserLicenses][google.cloud.discoveryengine.v1.UserLicenseService.BatchUpdateUserLicenses] + `UserLicenseService.BatchUpdateUserLicenses + `__ method. @@ -141,7 +150,8 @@ class BatchUpdateUserLicensesRequest(proto.Message): This field is a member of `oneof`_ ``source``. parent (str): - Required. The parent [UserStore][] resource name, format: + Required. The parent [UserStore][] resource + name, format: ``projects/{project}/locations/{location}/userStores/{user_store_id}``. delete_unassigned_user_licenses (bool): Optional. If true, if user licenses removed @@ -156,9 +166,10 @@ class InlineSource(proto.Message): Attributes: user_licenses (MutableSequence[google.cloud.discoveryengine_v1.types.UserLicense]): - Required. A list of user licenses to update. Each user - license must have a valid - [UserLicense.user_principal][google.cloud.discoveryengine.v1.UserLicense.user_principal]. + Required. A list of user licenses to update. + Each user license must have a valid + `UserLicense.user_principal + `__. update_mask (google.protobuf.field_mask_pb2.FieldMask): Optional. The list of fields to update. """ @@ -192,7 +203,8 @@ class InlineSource(proto.Message): class BatchUpdateUserLicensesMetadata(proto.Message): r"""Metadata related to the progress of the - [UserLicenseService.BatchUpdateUserLicenses][google.cloud.discoveryengine.v1.UserLicenseService.BatchUpdateUserLicenses] + `UserLicenseService.BatchUpdateUserLicenses + `__ operation. This will be returned by the google.longrunning.Operation.metadata field. @@ -231,7 +243,8 @@ class BatchUpdateUserLicensesMetadata(proto.Message): class BatchUpdateUserLicensesResponse(proto.Message): r"""Response message for - [UserLicenseService.BatchUpdateUserLicenses][google.cloud.discoveryengine.v1.UserLicenseService.BatchUpdateUserLicenses] + `UserLicenseService.BatchUpdateUserLicenses + `__ method. Attributes: diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/gapic_version.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/gapic_version.py index be6c08cee3cf..fd79d4e761b7 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/gapic_version.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.16.0" # {x-release-please-version} +__version__ = "0.4.0" # {x-release-please-version} diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/acl_config_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/acl_config_service/async_client.py index d035bf351f59..d97ea3dc630a 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/acl_config_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/acl_config_service/async_client.py @@ -394,8 +394,8 @@ async def get_acl_config( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> acl_config.AclConfig: - r"""Gets the - [AclConfig][google.cloud.discoveryengine.v1alpha.AclConfig]. + r"""Gets the `AclConfig + `__. .. code-block:: python @@ -429,13 +429,16 @@ async def sample_get_acl_config(): GetAclConfigRequest method. name (:class:`str`): Required. Resource name of - [AclConfig][google.cloud.discoveryengine.v1alpha.AclConfig], - such as ``projects/*/locations/*/aclConfig``. - - If the caller does not have permission to access the - [AclConfig][google.cloud.discoveryengine.v1alpha.AclConfig], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + `AclConfig + `__, + such as + ``projects/*/locations/*/aclConfig``. + + If the caller does not have permission + to access the `AclConfig + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/acl_config_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/acl_config_service/client.py index 13fab280986f..5e47bbce820c 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/acl_config_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/acl_config_service/client.py @@ -831,8 +831,8 @@ def get_acl_config( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> acl_config.AclConfig: - r"""Gets the - [AclConfig][google.cloud.discoveryengine.v1alpha.AclConfig]. + r"""Gets the `AclConfig + `__. .. code-block:: python @@ -866,13 +866,16 @@ def sample_get_acl_config(): GetAclConfigRequest method. name (str): Required. Resource name of - [AclConfig][google.cloud.discoveryengine.v1alpha.AclConfig], - such as ``projects/*/locations/*/aclConfig``. - - If the caller does not have permission to access the - [AclConfig][google.cloud.discoveryengine.v1alpha.AclConfig], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + `AclConfig + `__, + such as + ``projects/*/locations/*/aclConfig``. + + If the caller does not have permission + to access the `AclConfig + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/acl_config_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/acl_config_service/transports/base.py index 618452017c71..44390077ff35 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/acl_config_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/acl_config_service/transports/base.py @@ -84,8 +84,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -100,11 +98,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/acl_config_service/transports/grpc.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/acl_config_service/transports/grpc.py index 43d56bd1e0cd..301821485a23 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/acl_config_service/transports/grpc.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/acl_config_service/transports/grpc.py @@ -358,8 +358,8 @@ def get_acl_config( ) -> Callable[[acl_config_service.GetAclConfigRequest], acl_config.AclConfig]: r"""Return a callable for the get acl config method over gRPC. - Gets the - [AclConfig][google.cloud.discoveryengine.v1alpha.AclConfig]. + Gets the `AclConfig + `__. Returns: Callable[[~.GetAclConfigRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/acl_config_service/transports/grpc_asyncio.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/acl_config_service/transports/grpc_asyncio.py index 3cdaf8d90c3a..bc7c16b89e97 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/acl_config_service/transports/grpc_asyncio.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/acl_config_service/transports/grpc_asyncio.py @@ -370,8 +370,8 @@ def get_acl_config( ]: r"""Return a callable for the get acl config method over gRPC. - Gets the - [AclConfig][google.cloud.discoveryengine.v1alpha.AclConfig]. + Gets the `AclConfig + `__. Returns: Callable[[~.GetAclConfigRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/chunk_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/chunk_service/async_client.py index 7960129d3aeb..dec342e0d600 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/chunk_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/chunk_service/async_client.py @@ -67,8 +67,8 @@ class ChunkServiceAsyncClient: """Service for displaying processed - [Chunk][google.cloud.discoveryengine.v1alpha.Chunk] information of - the customer's unstructured data. + `Chunk `__ + information of the customer's unstructured data. """ _client: ChunkServiceClient @@ -301,8 +301,8 @@ async def get_chunk( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> chunk.Chunk: - r"""Gets a - [Document][google.cloud.discoveryengine.v1alpha.Document]. + r"""Gets a `Document + `__. .. code-block:: python @@ -333,22 +333,27 @@ async def sample_get_chunk(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.GetChunkRequest, dict]]): The request object. Request message for - [ChunkService.GetChunk][google.cloud.discoveryengine.v1alpha.ChunkService.GetChunk] + `ChunkService.GetChunk + `__ method. name (:class:`str`): Required. Full resource name of - [Chunk][google.cloud.discoveryengine.v1alpha.Chunk], + `Chunk + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}``. - If the caller does not have permission to access the - [Chunk][google.cloud.discoveryengine.v1alpha.Chunk], - regardless of whether or not it exists, a - ``PERMISSION_DENIED`` error is returned. + If the caller does not have permission + to access the `Chunk + `__, + regardless of whether or not it exists, + a ``PERMISSION_DENIED`` error is + returned. - If the requested - [Chunk][google.cloud.discoveryengine.v1alpha.Chunk] does - not exist, a ``NOT_FOUND`` error is returned. + If the requested `Chunk + `__ + does not exist, a ``NOT_FOUND`` error is + returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -426,8 +431,8 @@ async def list_chunks( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListChunksAsyncPager: - r"""Gets a list of - [Chunk][google.cloud.discoveryengine.v1alpha.Chunk]s. + r"""Gets a list of `Chunk + `__s. .. code-block:: python @@ -459,17 +464,20 @@ async def sample_list_chunks(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.ListChunksRequest, dict]]): The request object. Request message for - [ChunkService.ListChunks][google.cloud.discoveryengine.v1alpha.ChunkService.ListChunks] + `ChunkService.ListChunks + `__ method. parent (:class:`str`): - Required. The parent document resource name, such as + Required. The parent document resource + name, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}``. - If the caller does not have permission to list - [Chunk][google.cloud.discoveryengine.v1alpha.Chunk]s - under this document, regardless of whether or not this - document exists, a ``PERMISSION_DENIED`` error is - returned. + If the caller does not have permission + to list `Chunk + `__s + under this document, regardless of + whether or not this document exists, a + ``PERMISSION_DENIED`` error is returned. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -485,11 +493,13 @@ async def sample_list_chunks(): Returns: google.cloud.discoveryengine_v1alpha.services.chunk_service.pagers.ListChunksAsyncPager: Response message for - [ChunkService.ListChunks][google.cloud.discoveryengine.v1alpha.ChunkService.ListChunks] - method. + `ChunkService.ListChunks + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/chunk_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/chunk_service/client.py index e33796d6aec2..ad09da4b6945 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/chunk_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/chunk_service/client.py @@ -111,8 +111,8 @@ def get_transport_class( class ChunkServiceClient(metaclass=ChunkServiceClientMeta): """Service for displaying processed - [Chunk][google.cloud.discoveryengine.v1alpha.Chunk] information of - the customer's unstructured data. + `Chunk `__ + information of the customer's unstructured data. """ @staticmethod @@ -771,8 +771,8 @@ def get_chunk( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> chunk.Chunk: - r"""Gets a - [Document][google.cloud.discoveryengine.v1alpha.Document]. + r"""Gets a `Document + `__. .. code-block:: python @@ -803,22 +803,27 @@ def sample_get_chunk(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.GetChunkRequest, dict]): The request object. Request message for - [ChunkService.GetChunk][google.cloud.discoveryengine.v1alpha.ChunkService.GetChunk] + `ChunkService.GetChunk + `__ method. name (str): Required. Full resource name of - [Chunk][google.cloud.discoveryengine.v1alpha.Chunk], + `Chunk + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}``. - If the caller does not have permission to access the - [Chunk][google.cloud.discoveryengine.v1alpha.Chunk], - regardless of whether or not it exists, a - ``PERMISSION_DENIED`` error is returned. + If the caller does not have permission + to access the `Chunk + `__, + regardless of whether or not it exists, + a ``PERMISSION_DENIED`` error is + returned. - If the requested - [Chunk][google.cloud.discoveryengine.v1alpha.Chunk] does - not exist, a ``NOT_FOUND`` error is returned. + If the requested `Chunk + `__ + does not exist, a ``NOT_FOUND`` error is + returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -893,8 +898,8 @@ def list_chunks( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListChunksPager: - r"""Gets a list of - [Chunk][google.cloud.discoveryengine.v1alpha.Chunk]s. + r"""Gets a list of `Chunk + `__s. .. code-block:: python @@ -926,17 +931,20 @@ def sample_list_chunks(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.ListChunksRequest, dict]): The request object. Request message for - [ChunkService.ListChunks][google.cloud.discoveryengine.v1alpha.ChunkService.ListChunks] + `ChunkService.ListChunks + `__ method. parent (str): - Required. The parent document resource name, such as + Required. The parent document resource + name, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}``. - If the caller does not have permission to list - [Chunk][google.cloud.discoveryengine.v1alpha.Chunk]s - under this document, regardless of whether or not this - document exists, a ``PERMISSION_DENIED`` error is - returned. + If the caller does not have permission + to list `Chunk + `__s + under this document, regardless of + whether or not this document exists, a + ``PERMISSION_DENIED`` error is returned. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -952,11 +960,13 @@ def sample_list_chunks(): Returns: google.cloud.discoveryengine_v1alpha.services.chunk_service.pagers.ListChunksPager: Response message for - [ChunkService.ListChunks][google.cloud.discoveryengine.v1alpha.ChunkService.ListChunks] - method. + `ChunkService.ListChunks + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/chunk_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/chunk_service/transports/base.py index fb7b439bfdb8..5d30ffaf1b4d 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/chunk_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/chunk_service/transports/base.py @@ -84,8 +84,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -100,11 +98,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/chunk_service/transports/grpc.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/chunk_service/transports/grpc.py index 46433ded4f84..d746bed4778c 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/chunk_service/transports/grpc.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/chunk_service/transports/grpc.py @@ -113,8 +113,8 @@ class ChunkServiceGrpcTransport(ChunkServiceTransport): """gRPC backend transport for ChunkService. Service for displaying processed - [Chunk][google.cloud.discoveryengine.v1alpha.Chunk] information of - the customer's unstructured data. + `Chunk `__ + information of the customer's unstructured data. This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -329,8 +329,8 @@ def grpc_channel(self) -> grpc.Channel: def get_chunk(self) -> Callable[[chunk_service.GetChunkRequest], chunk.Chunk]: r"""Return a callable for the get chunk method over gRPC. - Gets a - [Document][google.cloud.discoveryengine.v1alpha.Document]. + Gets a `Document + `__. Returns: Callable[[~.GetChunkRequest], @@ -356,8 +356,8 @@ def list_chunks( ) -> Callable[[chunk_service.ListChunksRequest], chunk_service.ListChunksResponse]: r"""Return a callable for the list chunks method over gRPC. - Gets a list of - [Chunk][google.cloud.discoveryengine.v1alpha.Chunk]s. + Gets a list of `Chunk + `__s. Returns: Callable[[~.ListChunksRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/chunk_service/transports/grpc_asyncio.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/chunk_service/transports/grpc_asyncio.py index 5698a2ab1916..3e57c836ec43 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/chunk_service/transports/grpc_asyncio.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/chunk_service/transports/grpc_asyncio.py @@ -119,8 +119,8 @@ class ChunkServiceGrpcAsyncIOTransport(ChunkServiceTransport): """gRPC AsyncIO backend transport for ChunkService. Service for displaying processed - [Chunk][google.cloud.discoveryengine.v1alpha.Chunk] information of - the customer's unstructured data. + `Chunk `__ + information of the customer's unstructured data. This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -339,8 +339,8 @@ def get_chunk( ) -> Callable[[chunk_service.GetChunkRequest], Awaitable[chunk.Chunk]]: r"""Return a callable for the get chunk method over gRPC. - Gets a - [Document][google.cloud.discoveryengine.v1alpha.Document]. + Gets a `Document + `__. Returns: Callable[[~.GetChunkRequest], @@ -368,8 +368,8 @@ def list_chunks( ]: r"""Return a callable for the list chunks method over gRPC. - Gets a list of - [Chunk][google.cloud.discoveryengine.v1alpha.Chunk]s. + Gets a list of `Chunk + `__s. Returns: Callable[[~.ListChunksRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/chunk_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/chunk_service/transports/rest.py index 1a05ebd9eaeb..4a3d06d904c8 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/chunk_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/chunk_service/transports/rest.py @@ -273,8 +273,8 @@ class ChunkServiceRestTransport(_BaseChunkServiceRestTransport): """REST backend synchronous transport for ChunkService. Service for displaying processed - [Chunk][google.cloud.discoveryengine.v1alpha.Chunk] information of - the customer's unstructured data. + `Chunk `__ + information of the customer's unstructured data. This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -390,7 +390,8 @@ def __call__( Args: request (~.chunk_service.GetChunkRequest): The request object. Request message for - [ChunkService.GetChunk][google.cloud.discoveryengine.v1alpha.ChunkService.GetChunk] + `ChunkService.GetChunk + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -543,7 +544,8 @@ def __call__( Args: request (~.chunk_service.ListChunksRequest): The request object. Request message for - [ChunkService.ListChunks][google.cloud.discoveryengine.v1alpha.ChunkService.ListChunks] + `ChunkService.ListChunks + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -556,7 +558,8 @@ def __call__( Returns: ~.chunk_service.ListChunksResponse: Response message for - [ChunkService.ListChunks][google.cloud.discoveryengine.v1alpha.ChunkService.ListChunks] + `ChunkService.ListChunks + `__ method. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/completion_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/completion_service/async_client.py index 664c2c4995ec..01915fb0a4f3 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/completion_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/completion_service/async_client.py @@ -340,7 +340,8 @@ async def sample_complete_query(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.CompleteQueryRequest, dict]]): The request object. Request message for - [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1alpha.CompletionService.CompleteQuery] + `CompletionService.CompleteQuery + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -353,8 +354,9 @@ async def sample_complete_query(): Returns: google.cloud.discoveryengine_v1alpha.types.CompleteQueryResponse: Response message for - [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1alpha.CompletionService.CompleteQuery] - method. + `CompletionService.CompleteQuery + `__ + method. """ # Create or coerce a protobuf request object. @@ -402,7 +404,8 @@ async def import_suggestion_deny_list_entries( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: r"""Imports all - [SuggestionDenyListEntry][google.cloud.discoveryengine.v1alpha.SuggestionDenyListEntry] + `SuggestionDenyListEntry + `__ for a DataStore. .. code-block:: python @@ -443,7 +446,8 @@ async def sample_import_suggestion_deny_list_entries(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.ImportSuggestionDenyListEntriesRequest, dict]]): The request object. Request message for - [CompletionService.ImportSuggestionDenyListEntries][google.cloud.discoveryengine.v1alpha.CompletionService.ImportSuggestionDenyListEntries] + `CompletionService.ImportSuggestionDenyListEntries + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -455,11 +459,15 @@ async def sample_import_suggestion_deny_list_entries(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1alpha.types.ImportSuggestionDenyListEntriesResponse` Response message for - [CompletionService.ImportSuggestionDenyListEntries][google.cloud.discoveryengine.v1alpha.CompletionService.ImportSuggestionDenyListEntries] - method. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1alpha.types.ImportSuggestionDenyListEntriesResponse` + Response message for + `CompletionService.ImportSuggestionDenyListEntries + `__ + method. """ # Create or coerce a protobuf request object. @@ -515,7 +523,8 @@ async def purge_suggestion_deny_list_entries( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: r"""Permanently deletes all - [SuggestionDenyListEntry][google.cloud.discoveryengine.v1alpha.SuggestionDenyListEntry] + `SuggestionDenyListEntry + `__ for a DataStore. .. code-block:: python @@ -551,7 +560,8 @@ async def sample_purge_suggestion_deny_list_entries(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.PurgeSuggestionDenyListEntriesRequest, dict]]): The request object. Request message for - [CompletionService.PurgeSuggestionDenyListEntries][google.cloud.discoveryengine.v1alpha.CompletionService.PurgeSuggestionDenyListEntries] + `CompletionService.PurgeSuggestionDenyListEntries + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -563,11 +573,15 @@ async def sample_purge_suggestion_deny_list_entries(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1alpha.types.PurgeSuggestionDenyListEntriesResponse` Response message for - [CompletionService.PurgeSuggestionDenyListEntries][google.cloud.discoveryengine.v1alpha.CompletionService.PurgeSuggestionDenyListEntries] - method. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1alpha.types.PurgeSuggestionDenyListEntriesResponse` + Response message for + `CompletionService.PurgeSuggestionDenyListEntries + `__ + method. """ # Create or coerce a protobuf request object. @@ -621,7 +635,8 @@ async def import_completion_suggestions( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: r"""Imports - [CompletionSuggestion][google.cloud.discoveryengine.v1alpha.CompletionSuggestion]s + `CompletionSuggestion + `__s for a DataStore. .. code-block:: python @@ -662,7 +677,8 @@ async def sample_import_completion_suggestions(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.ImportCompletionSuggestionsRequest, dict]]): The request object. Request message for - [CompletionService.ImportCompletionSuggestions][google.cloud.discoveryengine.v1alpha.CompletionService.ImportCompletionSuggestions] + `CompletionService.ImportCompletionSuggestions + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -674,14 +690,18 @@ async def sample_import_completion_suggestions(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1alpha.types.ImportCompletionSuggestionsResponse` Response of the - [CompletionService.ImportCompletionSuggestions][google.cloud.discoveryengine.v1alpha.CompletionService.ImportCompletionSuggestions] - method. If the long running operation is done, this - message is returned by the - google.longrunning.Operations.response field if the - operation is successful. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1alpha.types.ImportCompletionSuggestionsResponse` + Response of the + `CompletionService.ImportCompletionSuggestions + `__ + method. If the long running operation is + done, this message is returned by the + google.longrunning.Operations.response + field if the operation is successful. """ # Create or coerce a protobuf request object. @@ -735,7 +755,8 @@ async def purge_completion_suggestions( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: r"""Permanently deletes all - [CompletionSuggestion][google.cloud.discoveryengine.v1alpha.CompletionSuggestion]s + `CompletionSuggestion + `__s for a DataStore. .. code-block:: python @@ -771,7 +792,8 @@ async def sample_purge_completion_suggestions(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.PurgeCompletionSuggestionsRequest, dict]]): The request object. Request message for - [CompletionService.PurgeCompletionSuggestions][google.cloud.discoveryengine.v1alpha.CompletionService.PurgeCompletionSuggestions] + `CompletionService.PurgeCompletionSuggestions + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -783,11 +805,15 @@ async def sample_purge_completion_suggestions(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1alpha.types.PurgeCompletionSuggestionsResponse` Response message for - [CompletionService.PurgeCompletionSuggestions][google.cloud.discoveryengine.v1alpha.CompletionService.PurgeCompletionSuggestions] - method. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1alpha.types.PurgeCompletionSuggestionsResponse` + Response message for + `CompletionService.PurgeCompletionSuggestions + `__ + method. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/completion_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/completion_service/client.py index fe72b9917bdd..a566f2f7d09a 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/completion_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/completion_service/client.py @@ -782,7 +782,8 @@ def sample_complete_query(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.CompleteQueryRequest, dict]): The request object. Request message for - [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1alpha.CompletionService.CompleteQuery] + `CompletionService.CompleteQuery + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -795,8 +796,9 @@ def sample_complete_query(): Returns: google.cloud.discoveryengine_v1alpha.types.CompleteQueryResponse: Response message for - [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1alpha.CompletionService.CompleteQuery] - method. + `CompletionService.CompleteQuery + `__ + method. """ # Create or coerce a protobuf request object. @@ -842,7 +844,8 @@ def import_suggestion_deny_list_entries( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: r"""Imports all - [SuggestionDenyListEntry][google.cloud.discoveryengine.v1alpha.SuggestionDenyListEntry] + `SuggestionDenyListEntry + `__ for a DataStore. .. code-block:: python @@ -883,7 +886,8 @@ def sample_import_suggestion_deny_list_entries(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.ImportSuggestionDenyListEntriesRequest, dict]): The request object. Request message for - [CompletionService.ImportSuggestionDenyListEntries][google.cloud.discoveryengine.v1alpha.CompletionService.ImportSuggestionDenyListEntries] + `CompletionService.ImportSuggestionDenyListEntries + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -895,11 +899,15 @@ def sample_import_suggestion_deny_list_entries(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1alpha.types.ImportSuggestionDenyListEntriesResponse` Response message for - [CompletionService.ImportSuggestionDenyListEntries][google.cloud.discoveryengine.v1alpha.CompletionService.ImportSuggestionDenyListEntries] - method. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1alpha.types.ImportSuggestionDenyListEntriesResponse` + Response message for + `CompletionService.ImportSuggestionDenyListEntries + `__ + method. """ # Create or coerce a protobuf request object. @@ -955,7 +963,8 @@ def purge_suggestion_deny_list_entries( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: r"""Permanently deletes all - [SuggestionDenyListEntry][google.cloud.discoveryengine.v1alpha.SuggestionDenyListEntry] + `SuggestionDenyListEntry + `__ for a DataStore. .. code-block:: python @@ -991,7 +1000,8 @@ def sample_purge_suggestion_deny_list_entries(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.PurgeSuggestionDenyListEntriesRequest, dict]): The request object. Request message for - [CompletionService.PurgeSuggestionDenyListEntries][google.cloud.discoveryengine.v1alpha.CompletionService.PurgeSuggestionDenyListEntries] + `CompletionService.PurgeSuggestionDenyListEntries + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1003,11 +1013,15 @@ def sample_purge_suggestion_deny_list_entries(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1alpha.types.PurgeSuggestionDenyListEntriesResponse` Response message for - [CompletionService.PurgeSuggestionDenyListEntries][google.cloud.discoveryengine.v1alpha.CompletionService.PurgeSuggestionDenyListEntries] - method. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1alpha.types.PurgeSuggestionDenyListEntriesResponse` + Response message for + `CompletionService.PurgeSuggestionDenyListEntries + `__ + method. """ # Create or coerce a protobuf request object. @@ -1061,7 +1075,8 @@ def import_completion_suggestions( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: r"""Imports - [CompletionSuggestion][google.cloud.discoveryengine.v1alpha.CompletionSuggestion]s + `CompletionSuggestion + `__s for a DataStore. .. code-block:: python @@ -1102,7 +1117,8 @@ def sample_import_completion_suggestions(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.ImportCompletionSuggestionsRequest, dict]): The request object. Request message for - [CompletionService.ImportCompletionSuggestions][google.cloud.discoveryengine.v1alpha.CompletionService.ImportCompletionSuggestions] + `CompletionService.ImportCompletionSuggestions + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1114,14 +1130,18 @@ def sample_import_completion_suggestions(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1alpha.types.ImportCompletionSuggestionsResponse` Response of the - [CompletionService.ImportCompletionSuggestions][google.cloud.discoveryengine.v1alpha.CompletionService.ImportCompletionSuggestions] - method. If the long running operation is done, this - message is returned by the - google.longrunning.Operations.response field if the - operation is successful. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1alpha.types.ImportCompletionSuggestionsResponse` + Response of the + `CompletionService.ImportCompletionSuggestions + `__ + method. If the long running operation is + done, this message is returned by the + google.longrunning.Operations.response + field if the operation is successful. """ # Create or coerce a protobuf request object. @@ -1175,7 +1195,8 @@ def purge_completion_suggestions( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: r"""Permanently deletes all - [CompletionSuggestion][google.cloud.discoveryengine.v1alpha.CompletionSuggestion]s + `CompletionSuggestion + `__s for a DataStore. .. code-block:: python @@ -1211,7 +1232,8 @@ def sample_purge_completion_suggestions(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.PurgeCompletionSuggestionsRequest, dict]): The request object. Request message for - [CompletionService.PurgeCompletionSuggestions][google.cloud.discoveryengine.v1alpha.CompletionService.PurgeCompletionSuggestions] + `CompletionService.PurgeCompletionSuggestions + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1223,11 +1245,15 @@ def sample_purge_completion_suggestions(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1alpha.types.PurgeCompletionSuggestionsResponse` Response message for - [CompletionService.PurgeCompletionSuggestions][google.cloud.discoveryengine.v1alpha.CompletionService.PurgeCompletionSuggestions] - method. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1alpha.types.PurgeCompletionSuggestionsResponse` + Response message for + `CompletionService.PurgeCompletionSuggestions + `__ + method. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/completion_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/completion_service/transports/base.py index 85753e9da351..338a6ae926ab 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/completion_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/completion_service/transports/base.py @@ -88,8 +88,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -104,11 +102,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/completion_service/transports/grpc.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/completion_service/transports/grpc.py index e45e1cf97665..3b479c708e57 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/completion_service/transports/grpc.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/completion_service/transports/grpc.py @@ -384,7 +384,8 @@ def import_suggestion_deny_list_entries( entries method over gRPC. Imports all - [SuggestionDenyListEntry][google.cloud.discoveryengine.v1alpha.SuggestionDenyListEntry] + `SuggestionDenyListEntry + `__ for a DataStore. Returns: @@ -417,7 +418,8 @@ def purge_suggestion_deny_list_entries( entries method over gRPC. Permanently deletes all - [SuggestionDenyListEntry][google.cloud.discoveryengine.v1alpha.SuggestionDenyListEntry] + `SuggestionDenyListEntry + `__ for a DataStore. Returns: @@ -449,7 +451,8 @@ def import_completion_suggestions( r"""Return a callable for the import completion suggestions method over gRPC. Imports - [CompletionSuggestion][google.cloud.discoveryengine.v1alpha.CompletionSuggestion]s + `CompletionSuggestion + `__s for a DataStore. Returns: @@ -481,7 +484,8 @@ def purge_completion_suggestions( r"""Return a callable for the purge completion suggestions method over gRPC. Permanently deletes all - [CompletionSuggestion][google.cloud.discoveryengine.v1alpha.CompletionSuggestion]s + `CompletionSuggestion + `__s for a DataStore. Returns: diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/completion_service/transports/grpc_asyncio.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/completion_service/transports/grpc_asyncio.py index 7959c031d026..868cc81b5f4f 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/completion_service/transports/grpc_asyncio.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/completion_service/transports/grpc_asyncio.py @@ -393,7 +393,8 @@ def import_suggestion_deny_list_entries( entries method over gRPC. Imports all - [SuggestionDenyListEntry][google.cloud.discoveryengine.v1alpha.SuggestionDenyListEntry] + `SuggestionDenyListEntry + `__ for a DataStore. Returns: @@ -427,7 +428,8 @@ def purge_suggestion_deny_list_entries( entries method over gRPC. Permanently deletes all - [SuggestionDenyListEntry][google.cloud.discoveryengine.v1alpha.SuggestionDenyListEntry] + `SuggestionDenyListEntry + `__ for a DataStore. Returns: @@ -460,7 +462,8 @@ def import_completion_suggestions( r"""Return a callable for the import completion suggestions method over gRPC. Imports - [CompletionSuggestion][google.cloud.discoveryengine.v1alpha.CompletionSuggestion]s + `CompletionSuggestion + `__s for a DataStore. Returns: @@ -493,7 +496,8 @@ def purge_completion_suggestions( r"""Return a callable for the purge completion suggestions method over gRPC. Permanently deletes all - [CompletionSuggestion][google.cloud.discoveryengine.v1alpha.CompletionSuggestion]s + `CompletionSuggestion + `__s for a DataStore. Returns: diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/completion_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/completion_service/transports/rest.py index da9b8ec81c86..1a5b9669b3f1 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/completion_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/completion_service/transports/rest.py @@ -747,7 +747,8 @@ def __call__( Args: request (~.completion_service.CompleteQueryRequest): The request object. Request message for - [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1alpha.CompletionService.CompleteQuery] + `CompletionService.CompleteQuery + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -760,7 +761,8 @@ def __call__( Returns: ~.completion_service.CompleteQueryResponse: Response message for - [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1alpha.CompletionService.CompleteQuery] + `CompletionService.CompleteQuery + `__ method. """ @@ -901,7 +903,8 @@ def __call__( Args: request (~.import_config.ImportCompletionSuggestionsRequest): The request object. Request message for - [CompletionService.ImportCompletionSuggestions][google.cloud.discoveryengine.v1alpha.CompletionService.ImportCompletionSuggestions] + `CompletionService.ImportCompletionSuggestions + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1063,7 +1066,8 @@ def __call__( Args: request (~.import_config.ImportSuggestionDenyListEntriesRequest): The request object. Request message for - [CompletionService.ImportSuggestionDenyListEntries][google.cloud.discoveryengine.v1alpha.CompletionService.ImportSuggestionDenyListEntries] + `CompletionService.ImportSuggestionDenyListEntries + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1226,7 +1230,8 @@ def __call__( Args: request (~.purge_config.PurgeCompletionSuggestionsRequest): The request object. Request message for - [CompletionService.PurgeCompletionSuggestions][google.cloud.discoveryengine.v1alpha.CompletionService.PurgeCompletionSuggestions] + `CompletionService.PurgeCompletionSuggestions + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1383,7 +1388,8 @@ def __call__( Args: request (~.purge_config.PurgeSuggestionDenyListEntriesRequest): The request object. Request message for - [CompletionService.PurgeSuggestionDenyListEntries][google.cloud.discoveryengine.v1alpha.CompletionService.PurgeSuggestionDenyListEntries] + `CompletionService.PurgeSuggestionDenyListEntries + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/control_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/control_service/async_client.py index e207dc52b9f7..5ab396583e53 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/control_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/control_service/async_client.py @@ -313,10 +313,12 @@ async def create_control( ) -> gcd_control.Control: r"""Creates a Control. - By default 1000 controls are allowed for a data store. A request - can be submitted to adjust this limit. If the - [Control][google.cloud.discoveryengine.v1alpha.Control] to - create already exists, an ALREADY_EXISTS error is returned. + By default 1000 controls are allowed for a data store. A + request can be submitted to adjust this limit. If the + `Control + `__ to + create already exists, an ALREADY_EXISTS error is + returned. .. code-block:: python @@ -357,8 +359,8 @@ async def sample_create_control(): request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.CreateControlRequest, dict]]): The request object. Request for CreateControl method. parent (:class:`str`): - Required. Full resource name of parent data store. - Format: + Required. Full resource name of parent + data store. Format: ``projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}`` or ``projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}``. @@ -372,12 +374,13 @@ async def sample_create_control(): on the ``request`` instance; if ``request`` is provided, this should not be set. control_id (:class:`str`): - Required. The ID to use for the Control, which will - become the final component of the Control's resource - name. + Required. The ID to use for the Control, + which will become the final component of + the Control's resource name. - This value must be within 1-63 characters. Valid - characters are /[a-z][0-9]-\_/. + This value must be within 1-63 + characters. Valid characters are /`a-z + <0-9>`__-_/. This corresponds to the ``control_id`` field on the ``request`` instance; if ``request`` is provided, this @@ -392,11 +395,13 @@ async def sample_create_control(): Returns: google.cloud.discoveryengine_v1alpha.types.Control: - Defines a conditioned behavior to employ during serving. - Must be attached to a - [ServingConfig][google.cloud.discoveryengine.v1alpha.ServingConfig] - to be considered at serving time. Permitted actions - dependent on SolutionType. + Defines a conditioned behavior to employ + during serving. Must be attached to a + `ServingConfig + `__ + to be considered at serving time. + Permitted actions dependent on + ``SolutionType``. """ # Create or coerce a protobuf request object. @@ -463,8 +468,9 @@ async def delete_control( ) -> None: r"""Deletes a Control. - If the [Control][google.cloud.discoveryengine.v1alpha.Control] - to delete does not exist, a NOT_FOUND error is returned. + If the `Control + `__ to + delete does not exist, a NOT_FOUND error is returned. .. code-block:: python @@ -493,8 +499,8 @@ async def sample_delete_control(): request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.DeleteControlRequest, dict]]): The request object. Request for DeleteControl method. name (:class:`str`): - Required. The resource name of the Control to delete. - Format: + Required. The resource name of the + Control to delete. Format: ``projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`` This corresponds to the ``name`` field @@ -566,9 +572,10 @@ async def update_control( ) -> gcd_control.Control: r"""Updates a Control. - [Control][google.cloud.discoveryengine.v1alpha.Control] action - type cannot be changed. If the - [Control][google.cloud.discoveryengine.v1alpha.Control] to + `Control + `__ action + type cannot be changed. If the `Control + `__ to update does not exist, a NOT_FOUND error is returned. .. code-block:: python @@ -613,14 +620,19 @@ async def sample_update_control(): on the ``request`` instance; if ``request`` is provided, this should not be set. update_mask (:class:`google.protobuf.field_mask_pb2.FieldMask`): - Optional. Indicates which fields in the provided - [Control][google.cloud.discoveryengine.v1alpha.Control] - to update. The following are NOT supported: + Optional. Indicates which fields in the + provided `Control + `__ + to update. The following are NOT + supported: - - [Control.name][google.cloud.discoveryengine.v1alpha.Control.name] - - [Control.solution_type][google.cloud.discoveryengine.v1alpha.Control.solution_type] + * `Control.name + `__ + * `Control.solution_type + `__ - If not set or empty, all supported fields are updated. + If not set or empty, all supported + fields are updated. This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this @@ -635,11 +647,13 @@ async def sample_update_control(): Returns: google.cloud.discoveryengine_v1alpha.types.Control: - Defines a conditioned behavior to employ during serving. - Must be attached to a - [ServingConfig][google.cloud.discoveryengine.v1alpha.ServingConfig] - to be considered at serving time. Permitted actions - dependent on SolutionType. + Defines a conditioned behavior to employ + during serving. Must be attached to a + `ServingConfig + `__ + to be considered at serving time. + Permitted actions dependent on + ``SolutionType``. """ # Create or coerce a protobuf request object. @@ -736,8 +750,8 @@ async def sample_get_control(): request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.GetControlRequest, dict]]): The request object. Request for GetControl method. name (:class:`str`): - Required. The resource name of the Control to get. - Format: + Required. The resource name of the + Control to get. Format: ``projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`` This corresponds to the ``name`` field @@ -753,11 +767,13 @@ async def sample_get_control(): Returns: google.cloud.discoveryengine_v1alpha.types.Control: - Defines a conditioned behavior to employ during serving. - Must be attached to a - [ServingConfig][google.cloud.discoveryengine.v1alpha.ServingConfig] - to be considered at serving time. Permitted actions - dependent on SolutionType. + Defines a conditioned behavior to employ + during serving. Must be attached to a + `ServingConfig + `__ + to be considered at serving time. + Permitted actions dependent on + ``SolutionType``. """ # Create or coerce a protobuf request object. @@ -819,7 +835,8 @@ async def list_controls( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListControlsAsyncPager: r"""Lists all Controls by their parent - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]. + `DataStore + `__. .. code-block:: python @@ -852,7 +869,8 @@ async def sample_list_controls(): request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.ListControlsRequest, dict]]): The request object. Request for ListControls method. parent (:class:`str`): - Required. The data store resource name. Format: + Required. The data store resource name. + Format: ``projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}`` or ``projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}``. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/control_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/control_service/client.py index 74ee3d6aac73..2294871fc0f2 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/control_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/control_service/client.py @@ -776,10 +776,12 @@ def create_control( ) -> gcd_control.Control: r"""Creates a Control. - By default 1000 controls are allowed for a data store. A request - can be submitted to adjust this limit. If the - [Control][google.cloud.discoveryengine.v1alpha.Control] to - create already exists, an ALREADY_EXISTS error is returned. + By default 1000 controls are allowed for a data store. A + request can be submitted to adjust this limit. If the + `Control + `__ to + create already exists, an ALREADY_EXISTS error is + returned. .. code-block:: python @@ -820,8 +822,8 @@ def sample_create_control(): request (Union[google.cloud.discoveryengine_v1alpha.types.CreateControlRequest, dict]): The request object. Request for CreateControl method. parent (str): - Required. Full resource name of parent data store. - Format: + Required. Full resource name of parent + data store. Format: ``projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}`` or ``projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}``. @@ -835,12 +837,13 @@ def sample_create_control(): on the ``request`` instance; if ``request`` is provided, this should not be set. control_id (str): - Required. The ID to use for the Control, which will - become the final component of the Control's resource - name. + Required. The ID to use for the Control, + which will become the final component of + the Control's resource name. - This value must be within 1-63 characters. Valid - characters are /[a-z][0-9]-\_/. + This value must be within 1-63 + characters. Valid characters are /`a-z + <0-9>`__-_/. This corresponds to the ``control_id`` field on the ``request`` instance; if ``request`` is provided, this @@ -855,11 +858,13 @@ def sample_create_control(): Returns: google.cloud.discoveryengine_v1alpha.types.Control: - Defines a conditioned behavior to employ during serving. - Must be attached to a - [ServingConfig][google.cloud.discoveryengine.v1alpha.ServingConfig] - to be considered at serving time. Permitted actions - dependent on SolutionType. + Defines a conditioned behavior to employ + during serving. Must be attached to a + `ServingConfig + `__ + to be considered at serving time. + Permitted actions dependent on + ``SolutionType``. """ # Create or coerce a protobuf request object. @@ -923,8 +928,9 @@ def delete_control( ) -> None: r"""Deletes a Control. - If the [Control][google.cloud.discoveryengine.v1alpha.Control] - to delete does not exist, a NOT_FOUND error is returned. + If the `Control + `__ to + delete does not exist, a NOT_FOUND error is returned. .. code-block:: python @@ -953,8 +959,8 @@ def sample_delete_control(): request (Union[google.cloud.discoveryengine_v1alpha.types.DeleteControlRequest, dict]): The request object. Request for DeleteControl method. name (str): - Required. The resource name of the Control to delete. - Format: + Required. The resource name of the + Control to delete. Format: ``projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`` This corresponds to the ``name`` field @@ -1023,9 +1029,10 @@ def update_control( ) -> gcd_control.Control: r"""Updates a Control. - [Control][google.cloud.discoveryengine.v1alpha.Control] action - type cannot be changed. If the - [Control][google.cloud.discoveryengine.v1alpha.Control] to + `Control + `__ action + type cannot be changed. If the `Control + `__ to update does not exist, a NOT_FOUND error is returned. .. code-block:: python @@ -1070,14 +1077,19 @@ def sample_update_control(): on the ``request`` instance; if ``request`` is provided, this should not be set. update_mask (google.protobuf.field_mask_pb2.FieldMask): - Optional. Indicates which fields in the provided - [Control][google.cloud.discoveryengine.v1alpha.Control] - to update. The following are NOT supported: + Optional. Indicates which fields in the + provided `Control + `__ + to update. The following are NOT + supported: - - [Control.name][google.cloud.discoveryengine.v1alpha.Control.name] - - [Control.solution_type][google.cloud.discoveryengine.v1alpha.Control.solution_type] + * `Control.name + `__ + * `Control.solution_type + `__ - If not set or empty, all supported fields are updated. + If not set or empty, all supported + fields are updated. This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this @@ -1092,11 +1104,13 @@ def sample_update_control(): Returns: google.cloud.discoveryengine_v1alpha.types.Control: - Defines a conditioned behavior to employ during serving. - Must be attached to a - [ServingConfig][google.cloud.discoveryengine.v1alpha.ServingConfig] - to be considered at serving time. Permitted actions - dependent on SolutionType. + Defines a conditioned behavior to employ + during serving. Must be attached to a + `ServingConfig + `__ + to be considered at serving time. + Permitted actions dependent on + ``SolutionType``. """ # Create or coerce a protobuf request object. @@ -1190,8 +1204,8 @@ def sample_get_control(): request (Union[google.cloud.discoveryengine_v1alpha.types.GetControlRequest, dict]): The request object. Request for GetControl method. name (str): - Required. The resource name of the Control to get. - Format: + Required. The resource name of the + Control to get. Format: ``projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`` This corresponds to the ``name`` field @@ -1207,11 +1221,13 @@ def sample_get_control(): Returns: google.cloud.discoveryengine_v1alpha.types.Control: - Defines a conditioned behavior to employ during serving. - Must be attached to a - [ServingConfig][google.cloud.discoveryengine.v1alpha.ServingConfig] - to be considered at serving time. Permitted actions - dependent on SolutionType. + Defines a conditioned behavior to employ + during serving. Must be attached to a + `ServingConfig + `__ + to be considered at serving time. + Permitted actions dependent on + ``SolutionType``. """ # Create or coerce a protobuf request object. @@ -1270,7 +1286,8 @@ def list_controls( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListControlsPager: r"""Lists all Controls by their parent - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]. + `DataStore + `__. .. code-block:: python @@ -1303,7 +1320,8 @@ def sample_list_controls(): request (Union[google.cloud.discoveryengine_v1alpha.types.ListControlsRequest, dict]): The request object. Request for ListControls method. parent (str): - Required. The data store resource name. Format: + Required. The data store resource name. + Format: ``projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}`` or ``projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}``. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/control_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/control_service/transports/base.py index f14cb0b0db9b..da513a8acb35 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/control_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/control_service/transports/base.py @@ -87,8 +87,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -103,11 +101,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/control_service/transports/grpc.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/control_service/transports/grpc.py index 62991007eaaa..edd78df49981 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/control_service/transports/grpc.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/control_service/transports/grpc.py @@ -337,10 +337,12 @@ def create_control( Creates a Control. - By default 1000 controls are allowed for a data store. A request - can be submitted to adjust this limit. If the - [Control][google.cloud.discoveryengine.v1alpha.Control] to - create already exists, an ALREADY_EXISTS error is returned. + By default 1000 controls are allowed for a data store. A + request can be submitted to adjust this limit. If the + `Control + `__ to + create already exists, an ALREADY_EXISTS error is + returned. Returns: Callable[[~.CreateControlRequest], @@ -368,8 +370,9 @@ def delete_control( Deletes a Control. - If the [Control][google.cloud.discoveryengine.v1alpha.Control] - to delete does not exist, a NOT_FOUND error is returned. + If the `Control + `__ to + delete does not exist, a NOT_FOUND error is returned. Returns: Callable[[~.DeleteControlRequest], @@ -397,9 +400,10 @@ def update_control( Updates a Control. - [Control][google.cloud.discoveryengine.v1alpha.Control] action - type cannot be changed. If the - [Control][google.cloud.discoveryengine.v1alpha.Control] to + `Control + `__ action + type cannot be changed. If the `Control + `__ to update does not exist, a NOT_FOUND error is returned. Returns: @@ -455,7 +459,8 @@ def list_controls( r"""Return a callable for the list controls method over gRPC. Lists all Controls by their parent - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]. + `DataStore + `__. Returns: Callable[[~.ListControlsRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/control_service/transports/grpc_asyncio.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/control_service/transports/grpc_asyncio.py index d7c20e6d8b90..a9db0023ee78 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/control_service/transports/grpc_asyncio.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/control_service/transports/grpc_asyncio.py @@ -347,10 +347,12 @@ def create_control( Creates a Control. - By default 1000 controls are allowed for a data store. A request - can be submitted to adjust this limit. If the - [Control][google.cloud.discoveryengine.v1alpha.Control] to - create already exists, an ALREADY_EXISTS error is returned. + By default 1000 controls are allowed for a data store. A + request can be submitted to adjust this limit. If the + `Control + `__ to + create already exists, an ALREADY_EXISTS error is + returned. Returns: Callable[[~.CreateControlRequest], @@ -378,8 +380,9 @@ def delete_control( Deletes a Control. - If the [Control][google.cloud.discoveryengine.v1alpha.Control] - to delete does not exist, a NOT_FOUND error is returned. + If the `Control + `__ to + delete does not exist, a NOT_FOUND error is returned. Returns: Callable[[~.DeleteControlRequest], @@ -409,9 +412,10 @@ def update_control( Updates a Control. - [Control][google.cloud.discoveryengine.v1alpha.Control] action - type cannot be changed. If the - [Control][google.cloud.discoveryengine.v1alpha.Control] to + `Control + `__ action + type cannot be changed. If the `Control + `__ to update does not exist, a NOT_FOUND error is returned. Returns: @@ -468,7 +472,8 @@ def list_controls( r"""Return a callable for the list controls method over gRPC. Lists all Controls by their parent - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]. + `DataStore + `__. Returns: Callable[[~.ListControlsRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/control_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/control_service/transports/rest.py index 11b7c06ce997..d05046932f2f 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/control_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/control_service/transports/rest.py @@ -537,11 +537,13 @@ def __call__( Returns: ~.gcd_control.Control: - Defines a conditioned behavior to employ during serving. - Must be attached to a - [ServingConfig][google.cloud.discoveryengine.v1alpha.ServingConfig] - to be considered at serving time. Permitted actions - dependent on ``SolutionType``. + Defines a conditioned behavior to employ + during serving. Must be attached to a + `ServingConfig + `__ + to be considered at serving time. + Permitted actions dependent on + ``SolutionType``. """ @@ -797,11 +799,13 @@ def __call__( Returns: ~.control.Control: - Defines a conditioned behavior to employ during serving. - Must be attached to a - [ServingConfig][google.cloud.discoveryengine.v1alpha.ServingConfig] - to be considered at serving time. Permitted actions - dependent on ``SolutionType``. + Defines a conditioned behavior to employ + during serving. Must be attached to a + `ServingConfig + `__ + to be considered at serving time. + Permitted actions dependent on + ``SolutionType``. """ @@ -1095,11 +1099,13 @@ def __call__( Returns: ~.gcd_control.Control: - Defines a conditioned behavior to employ during serving. - Must be attached to a - [ServingConfig][google.cloud.discoveryengine.v1alpha.ServingConfig] - to be considered at serving time. Permitted actions - dependent on ``SolutionType``. + Defines a conditioned behavior to employ + during serving. Must be attached to a + `ServingConfig + `__ + to be considered at serving time. + Permitted actions dependent on + ``SolutionType``. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/conversational_search_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/conversational_search_service/async_client.py index 5a0ed037092d..60a74006d7f1 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/conversational_search_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/conversational_search_service/async_client.py @@ -385,17 +385,18 @@ async def sample_converse_conversation(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.ConverseConversationRequest, dict]]): The request object. Request message for - [ConversationalSearchService.ConverseConversation][google.cloud.discoveryengine.v1alpha.ConversationalSearchService.ConverseConversation] + `ConversationalSearchService.ConverseConversation + `__ method. name (:class:`str`): - Required. The resource name of the Conversation to get. - Format: + Required. The resource name of the + Conversation to get. Format: ``projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}``. Use ``projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-`` - to activate auto session mode, which automatically - creates a new conversation inside a ConverseConversation - session. + to activate auto session mode, which + automatically creates a new conversation + inside a ConverseConversation session. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -416,8 +417,9 @@ async def sample_converse_conversation(): Returns: google.cloud.discoveryengine_v1alpha.types.ConverseConversationResponse: Response message for - [ConversationalSearchService.ConverseConversation][google.cloud.discoveryengine.v1alpha.ConversationalSearchService.ConverseConversation] - method. + `ConversationalSearchService.ConverseConversation + `__ + method. """ # Create or coerce a protobuf request object. @@ -487,9 +489,10 @@ async def create_conversation( ) -> gcd_conversation.Conversation: r"""Creates a Conversation. - If the - [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] - to create already exists, an ALREADY_EXISTS error is returned. + If the `Conversation + `__ + to create already exists, an ALREADY_EXISTS error is + returned. .. code-block:: python @@ -522,8 +525,8 @@ async def sample_create_conversation(): The request object. Request for CreateConversation method. parent (:class:`str`): - Required. Full resource name of parent data store. - Format: + Required. Full resource name of parent + data store. Format: ``projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`` This corresponds to the ``parent`` field @@ -614,8 +617,8 @@ async def delete_conversation( ) -> None: r"""Deletes a Conversation. - If the - [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] + If the `Conversation + `__ to delete does not exist, a NOT_FOUND error is returned. .. code-block:: python @@ -646,8 +649,8 @@ async def sample_delete_conversation(): The request object. Request for DeleteConversation method. name (:class:`str`): - Required. The resource name of the Conversation to - delete. Format: + Required. The resource name of the + Conversation to delete. Format: ``projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`` This corresponds to the ``name`` field @@ -723,9 +726,11 @@ async def update_conversation( ) -> gcd_conversation.Conversation: r"""Updates a Conversation. - [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] + `Conversation + `__ action type cannot be changed. If the - [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] + `Conversation + `__ to update does not exist, a NOT_FOUND error is returned. .. code-block:: python @@ -764,12 +769,16 @@ async def sample_update_conversation(): should not be set. update_mask (:class:`google.protobuf.field_mask_pb2.FieldMask`): Indicates which fields in the provided - [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] - to update. The following are NOT supported: + `Conversation + `__ + to update. The following are NOT + supported: - - [Conversation.name][google.cloud.discoveryengine.v1alpha.Conversation.name] + * `Conversation.name + `__ - If not set or empty, all supported fields are updated. + If not set or empty, all supported + fields are updated. This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this @@ -886,8 +895,8 @@ async def sample_get_conversation(): request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.GetConversationRequest, dict]]): The request object. Request for GetConversation method. name (:class:`str`): - Required. The resource name of the Conversation to get. - Format: + Required. The resource name of the + Conversation to get. Format: ``projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`` This corresponds to the ``name`` field @@ -970,7 +979,8 @@ async def list_conversations( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListConversationsAsyncPager: r"""Lists all Conversations by their parent - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]. + `DataStore + `__. .. code-block:: python @@ -1003,7 +1013,8 @@ async def sample_list_conversations(): request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.ListConversationsRequest, dict]]): The request object. Request for ListConversations method. parent (:class:`str`): - Required. The data store resource name. Format: + Required. The data store resource name. + Format: ``projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`` This corresponds to the ``parent`` field @@ -1133,7 +1144,8 @@ async def sample_answer_query(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.AnswerQueryRequest, dict]]): The request object. Request message for - [ConversationalSearchService.AnswerQuery][google.cloud.discoveryengine.v1alpha.ConversationalSearchService.AnswerQuery] + `ConversationalSearchService.AnswerQuery + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -1146,8 +1158,9 @@ async def sample_answer_query(): Returns: google.cloud.discoveryengine_v1alpha.types.AnswerQueryResponse: Response message for - [ConversationalSearchService.AnswerQuery][google.cloud.discoveryengine.v1alpha.ConversationalSearchService.AnswerQuery] - method. + `ConversationalSearchService.AnswerQuery + `__ + method. """ # Create or coerce a protobuf request object. @@ -1227,8 +1240,8 @@ async def sample_get_answer(): request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.GetAnswerRequest, dict]]): The request object. Request for GetAnswer method. name (:class:`str`): - Required. The resource name of the Answer to get. - Format: + Required. The resource name of the + Answer to get. Format: ``projects/{project_number}/locations/{location_id}/collections/{collection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`` This corresponds to the ``name`` field @@ -1309,8 +1322,10 @@ async def create_session( ) -> gcd_session.Session: r"""Creates a Session. - If the [Session][google.cloud.discoveryengine.v1alpha.Session] - to create already exists, an ALREADY_EXISTS error is returned. + If the `Session + `__ to + create already exists, an ALREADY_EXISTS error is + returned. .. code-block:: python @@ -1342,8 +1357,8 @@ async def sample_create_session(): request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.CreateSessionRequest, dict]]): The request object. Request for CreateSession method. parent (:class:`str`): - Required. Full resource name of parent data store. - Format: + Required. Full resource name of parent + data store. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`` This corresponds to the ``parent`` field @@ -1430,8 +1445,9 @@ async def delete_session( ) -> None: r"""Deletes a Session. - If the [Session][google.cloud.discoveryengine.v1alpha.Session] - to delete does not exist, a NOT_FOUND error is returned. + If the `Session + `__ to + delete does not exist, a NOT_FOUND error is returned. .. code-block:: python @@ -1460,8 +1476,8 @@ async def sample_delete_session(): request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.DeleteSessionRequest, dict]]): The request object. Request for DeleteSession method. name (:class:`str`): - Required. The resource name of the Session to delete. - Format: + Required. The resource name of the + Session to delete. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`` This corresponds to the ``name`` field @@ -1535,9 +1551,10 @@ async def update_session( ) -> gcd_session.Session: r"""Updates a Session. - [Session][google.cloud.discoveryengine.v1alpha.Session] action - type cannot be changed. If the - [Session][google.cloud.discoveryengine.v1alpha.Session] to + `Session + `__ action + type cannot be changed. If the `Session + `__ to update does not exist, a NOT_FOUND error is returned. .. code-block:: python @@ -1575,12 +1592,16 @@ async def sample_update_session(): should not be set. update_mask (:class:`google.protobuf.field_mask_pb2.FieldMask`): Indicates which fields in the provided - [Session][google.cloud.discoveryengine.v1alpha.Session] - to update. The following are NOT supported: + `Session + `__ + to update. The following are NOT + supported: - - [Session.name][google.cloud.discoveryengine.v1alpha.Session.name] + * `Session.name + `__ - If not set or empty, all supported fields are updated. + If not set or empty, all supported + fields are updated. This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this @@ -1693,8 +1714,8 @@ async def sample_get_session(): request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.GetSessionRequest, dict]]): The request object. Request for GetSession method. name (:class:`str`): - Required. The resource name of the Session to get. - Format: + Required. The resource name of the + Session to get. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`` This corresponds to the ``name`` field @@ -1773,7 +1794,8 @@ async def list_sessions( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListSessionsAsyncPager: r"""Lists all Sessions by their parent - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]. + `DataStore + `__. .. code-block:: python @@ -1806,7 +1828,8 @@ async def sample_list_sessions(): request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.ListSessionsRequest, dict]]): The request object. Request for ListSessions method. parent (:class:`str`): - Required. The data store resource name. Format: + Required. The data store resource name. + Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`` This corresponds to the ``parent`` field diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/conversational_search_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/conversational_search_service/client.py index 6ad1bfdc1f76..bb8a1a101c30 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/conversational_search_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/conversational_search_service/client.py @@ -953,17 +953,18 @@ def sample_converse_conversation(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.ConverseConversationRequest, dict]): The request object. Request message for - [ConversationalSearchService.ConverseConversation][google.cloud.discoveryengine.v1alpha.ConversationalSearchService.ConverseConversation] + `ConversationalSearchService.ConverseConversation + `__ method. name (str): - Required. The resource name of the Conversation to get. - Format: + Required. The resource name of the + Conversation to get. Format: ``projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}``. Use ``projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-`` - to activate auto session mode, which automatically - creates a new conversation inside a ConverseConversation - session. + to activate auto session mode, which + automatically creates a new conversation + inside a ConverseConversation session. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -984,8 +985,9 @@ def sample_converse_conversation(): Returns: google.cloud.discoveryengine_v1alpha.types.ConverseConversationResponse: Response message for - [ConversationalSearchService.ConverseConversation][google.cloud.discoveryengine.v1alpha.ConversationalSearchService.ConverseConversation] - method. + `ConversationalSearchService.ConverseConversation + `__ + method. """ # Create or coerce a protobuf request object. @@ -1052,9 +1054,10 @@ def create_conversation( ) -> gcd_conversation.Conversation: r"""Creates a Conversation. - If the - [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] - to create already exists, an ALREADY_EXISTS error is returned. + If the `Conversation + `__ + to create already exists, an ALREADY_EXISTS error is + returned. .. code-block:: python @@ -1087,8 +1090,8 @@ def sample_create_conversation(): The request object. Request for CreateConversation method. parent (str): - Required. Full resource name of parent data store. - Format: + Required. Full resource name of parent + data store. Format: ``projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`` This corresponds to the ``parent`` field @@ -1176,8 +1179,8 @@ def delete_conversation( ) -> None: r"""Deletes a Conversation. - If the - [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] + If the `Conversation + `__ to delete does not exist, a NOT_FOUND error is returned. .. code-block:: python @@ -1208,8 +1211,8 @@ def sample_delete_conversation(): The request object. Request for DeleteConversation method. name (str): - Required. The resource name of the Conversation to - delete. Format: + Required. The resource name of the + Conversation to delete. Format: ``projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`` This corresponds to the ``name`` field @@ -1282,9 +1285,11 @@ def update_conversation( ) -> gcd_conversation.Conversation: r"""Updates a Conversation. - [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] + `Conversation + `__ action type cannot be changed. If the - [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] + `Conversation + `__ to update does not exist, a NOT_FOUND error is returned. .. code-block:: python @@ -1323,12 +1328,16 @@ def sample_update_conversation(): should not be set. update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided - [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] - to update. The following are NOT supported: + `Conversation + `__ + to update. The following are NOT + supported: - - [Conversation.name][google.cloud.discoveryengine.v1alpha.Conversation.name] + * `Conversation.name + `__ - If not set or empty, all supported fields are updated. + If not set or empty, all supported + fields are updated. This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this @@ -1442,8 +1451,8 @@ def sample_get_conversation(): request (Union[google.cloud.discoveryengine_v1alpha.types.GetConversationRequest, dict]): The request object. Request for GetConversation method. name (str): - Required. The resource name of the Conversation to get. - Format: + Required. The resource name of the + Conversation to get. Format: ``projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`` This corresponds to the ``name`` field @@ -1523,7 +1532,8 @@ def list_conversations( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListConversationsPager: r"""Lists all Conversations by their parent - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]. + `DataStore + `__. .. code-block:: python @@ -1556,7 +1566,8 @@ def sample_list_conversations(): request (Union[google.cloud.discoveryengine_v1alpha.types.ListConversationsRequest, dict]): The request object. Request for ListConversations method. parent (str): - Required. The data store resource name. Format: + Required. The data store resource name. + Format: ``projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`` This corresponds to the ``parent`` field @@ -1683,7 +1694,8 @@ def sample_answer_query(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.AnswerQueryRequest, dict]): The request object. Request message for - [ConversationalSearchService.AnswerQuery][google.cloud.discoveryengine.v1alpha.ConversationalSearchService.AnswerQuery] + `ConversationalSearchService.AnswerQuery + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1696,8 +1708,9 @@ def sample_answer_query(): Returns: google.cloud.discoveryengine_v1alpha.types.AnswerQueryResponse: Response message for - [ConversationalSearchService.AnswerQuery][google.cloud.discoveryengine.v1alpha.ConversationalSearchService.AnswerQuery] - method. + `ConversationalSearchService.AnswerQuery + `__ + method. """ # Create or coerce a protobuf request object. @@ -1775,8 +1788,8 @@ def sample_get_answer(): request (Union[google.cloud.discoveryengine_v1alpha.types.GetAnswerRequest, dict]): The request object. Request for GetAnswer method. name (str): - Required. The resource name of the Answer to get. - Format: + Required. The resource name of the + Answer to get. Format: ``projects/{project_number}/locations/{location_id}/collections/{collection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`` This corresponds to the ``name`` field @@ -1854,8 +1867,10 @@ def create_session( ) -> gcd_session.Session: r"""Creates a Session. - If the [Session][google.cloud.discoveryengine.v1alpha.Session] - to create already exists, an ALREADY_EXISTS error is returned. + If the `Session + `__ to + create already exists, an ALREADY_EXISTS error is + returned. .. code-block:: python @@ -1887,8 +1902,8 @@ def sample_create_session(): request (Union[google.cloud.discoveryengine_v1alpha.types.CreateSessionRequest, dict]): The request object. Request for CreateSession method. parent (str): - Required. Full resource name of parent data store. - Format: + Required. Full resource name of parent + data store. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`` This corresponds to the ``parent`` field @@ -1972,8 +1987,9 @@ def delete_session( ) -> None: r"""Deletes a Session. - If the [Session][google.cloud.discoveryengine.v1alpha.Session] - to delete does not exist, a NOT_FOUND error is returned. + If the `Session + `__ to + delete does not exist, a NOT_FOUND error is returned. .. code-block:: python @@ -2002,8 +2018,8 @@ def sample_delete_session(): request (Union[google.cloud.discoveryengine_v1alpha.types.DeleteSessionRequest, dict]): The request object. Request for DeleteSession method. name (str): - Required. The resource name of the Session to delete. - Format: + Required. The resource name of the + Session to delete. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`` This corresponds to the ``name`` field @@ -2074,9 +2090,10 @@ def update_session( ) -> gcd_session.Session: r"""Updates a Session. - [Session][google.cloud.discoveryengine.v1alpha.Session] action - type cannot be changed. If the - [Session][google.cloud.discoveryengine.v1alpha.Session] to + `Session + `__ action + type cannot be changed. If the `Session + `__ to update does not exist, a NOT_FOUND error is returned. .. code-block:: python @@ -2114,12 +2131,16 @@ def sample_update_session(): should not be set. update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided - [Session][google.cloud.discoveryengine.v1alpha.Session] - to update. The following are NOT supported: + `Session + `__ + to update. The following are NOT + supported: - - [Session.name][google.cloud.discoveryengine.v1alpha.Session.name] + * `Session.name + `__ - If not set or empty, all supported fields are updated. + If not set or empty, all supported + fields are updated. This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this @@ -2229,8 +2250,8 @@ def sample_get_session(): request (Union[google.cloud.discoveryengine_v1alpha.types.GetSessionRequest, dict]): The request object. Request for GetSession method. name (str): - Required. The resource name of the Session to get. - Format: + Required. The resource name of the + Session to get. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`` This corresponds to the ``name`` field @@ -2306,7 +2327,8 @@ def list_sessions( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListSessionsPager: r"""Lists all Sessions by their parent - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]. + `DataStore + `__. .. code-block:: python @@ -2339,7 +2361,8 @@ def sample_list_sessions(): request (Union[google.cloud.discoveryengine_v1alpha.types.ListSessionsRequest, dict]): The request object. Request for ListSessions method. parent (str): - Required. The data store resource name. Format: + Required. The data store resource name. + Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`` This corresponds to the ``parent`` field diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/conversational_search_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/conversational_search_service/transports/base.py index ceac47d07e18..5387dac62136 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/conversational_search_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/conversational_search_service/transports/base.py @@ -90,8 +90,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -106,11 +104,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/conversational_search_service/transports/grpc.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/conversational_search_service/transports/grpc.py index dfef0082e569..78ecdffdbcb6 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/conversational_search_service/transports/grpc.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/conversational_search_service/transports/grpc.py @@ -369,9 +369,10 @@ def create_conversation( Creates a Conversation. - If the - [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] - to create already exists, an ALREADY_EXISTS error is returned. + If the `Conversation + `__ + to create already exists, an ALREADY_EXISTS error is + returned. Returns: Callable[[~.CreateConversationRequest], @@ -401,8 +402,8 @@ def delete_conversation( Deletes a Conversation. - If the - [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] + If the `Conversation + `__ to delete does not exist, a NOT_FOUND error is returned. Returns: @@ -434,9 +435,11 @@ def update_conversation( Updates a Conversation. - [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] + `Conversation + `__ action type cannot be changed. If the - [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] + `Conversation + `__ to update does not exist, a NOT_FOUND error is returned. Returns: @@ -496,7 +499,8 @@ def list_conversations( r"""Return a callable for the list conversations method over gRPC. Lists all Conversations by their parent - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]. + `DataStore + `__. Returns: Callable[[~.ListConversationsRequest], @@ -581,8 +585,10 @@ def create_session( Creates a Session. - If the [Session][google.cloud.discoveryengine.v1alpha.Session] - to create already exists, an ALREADY_EXISTS error is returned. + If the `Session + `__ to + create already exists, an ALREADY_EXISTS error is + returned. Returns: Callable[[~.CreateSessionRequest], @@ -612,8 +618,9 @@ def delete_session( Deletes a Session. - If the [Session][google.cloud.discoveryengine.v1alpha.Session] - to delete does not exist, a NOT_FOUND error is returned. + If the `Session + `__ to + delete does not exist, a NOT_FOUND error is returned. Returns: Callable[[~.DeleteSessionRequest], @@ -643,9 +650,10 @@ def update_session( Updates a Session. - [Session][google.cloud.discoveryengine.v1alpha.Session] action - type cannot be changed. If the - [Session][google.cloud.discoveryengine.v1alpha.Session] to + `Session + `__ action + type cannot be changed. If the `Session + `__ to update does not exist, a NOT_FOUND error is returned. Returns: @@ -702,7 +710,8 @@ def list_sessions( r"""Return a callable for the list sessions method over gRPC. Lists all Sessions by their parent - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]. + `DataStore + `__. Returns: Callable[[~.ListSessionsRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/conversational_search_service/transports/grpc_asyncio.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/conversational_search_service/transports/grpc_asyncio.py index d7ce30c63f09..bd8c728684db 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/conversational_search_service/transports/grpc_asyncio.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/conversational_search_service/transports/grpc_asyncio.py @@ -379,9 +379,10 @@ def create_conversation( Creates a Conversation. - If the - [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] - to create already exists, an ALREADY_EXISTS error is returned. + If the `Conversation + `__ + to create already exists, an ALREADY_EXISTS error is + returned. Returns: Callable[[~.CreateConversationRequest], @@ -412,8 +413,8 @@ def delete_conversation( Deletes a Conversation. - If the - [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] + If the `Conversation + `__ to delete does not exist, a NOT_FOUND error is returned. Returns: @@ -445,9 +446,11 @@ def update_conversation( Updates a Conversation. - [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] + `Conversation + `__ action type cannot be changed. If the - [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] + `Conversation + `__ to update does not exist, a NOT_FOUND error is returned. Returns: @@ -507,7 +510,8 @@ def list_conversations( r"""Return a callable for the list conversations method over gRPC. Lists all Conversations by their parent - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]. + `DataStore + `__. Returns: Callable[[~.ListConversationsRequest], @@ -595,8 +599,10 @@ def create_session( Creates a Session. - If the [Session][google.cloud.discoveryengine.v1alpha.Session] - to create already exists, an ALREADY_EXISTS error is returned. + If the `Session + `__ to + create already exists, an ALREADY_EXISTS error is + returned. Returns: Callable[[~.CreateSessionRequest], @@ -626,8 +632,9 @@ def delete_session( Deletes a Session. - If the [Session][google.cloud.discoveryengine.v1alpha.Session] - to delete does not exist, a NOT_FOUND error is returned. + If the `Session + `__ to + delete does not exist, a NOT_FOUND error is returned. Returns: Callable[[~.DeleteSessionRequest], @@ -658,9 +665,10 @@ def update_session( Updates a Session. - [Session][google.cloud.discoveryengine.v1alpha.Session] action - type cannot be changed. If the - [Session][google.cloud.discoveryengine.v1alpha.Session] to + `Session + `__ action + type cannot be changed. If the `Session + `__ to update does not exist, a NOT_FOUND error is returned. Returns: @@ -719,7 +727,8 @@ def list_sessions( r"""Return a callable for the list sessions method over gRPC. Lists all Sessions by their parent - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]. + `DataStore + `__. Returns: Callable[[~.ListSessionsRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/conversational_search_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/conversational_search_service/transports/rest.py index 95bdbd1bbd07..6ebe8a665dfb 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/conversational_search_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/conversational_search_service/transports/rest.py @@ -959,7 +959,8 @@ def __call__( Args: request (~.conversational_search_service.AnswerQueryRequest): The request object. Request message for - [ConversationalSearchService.AnswerQuery][google.cloud.discoveryengine.v1alpha.ConversationalSearchService.AnswerQuery] + `ConversationalSearchService.AnswerQuery + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -972,7 +973,8 @@ def __call__( Returns: ~.conversational_search_service.AnswerQueryResponse: Response message for - [ConversationalSearchService.AnswerQuery][google.cloud.discoveryengine.v1alpha.ConversationalSearchService.AnswerQuery] + `ConversationalSearchService.AnswerQuery + `__ method. """ @@ -1121,7 +1123,8 @@ def __call__( Args: request (~.conversational_search_service.ConverseConversationRequest): The request object. Request message for - [ConversationalSearchService.ConverseConversation][google.cloud.discoveryengine.v1alpha.ConversationalSearchService.ConverseConversation] + `ConversationalSearchService.ConverseConversation + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1134,7 +1137,8 @@ def __call__( Returns: ~.conversational_search_service.ConverseConversationResponse: Response message for - [ConversationalSearchService.ConverseConversation][google.cloud.discoveryengine.v1alpha.ConversationalSearchService.ConverseConversation] + `ConversationalSearchService.ConverseConversation + `__ method. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/data_store_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/data_store_service/async_client.py index f7fe424c9fb2..f154c2fafd34 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/data_store_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/data_store_service/async_client.py @@ -79,7 +79,7 @@ class DataStoreServiceAsyncClient: """Service for managing - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] + `DataStore `__ configuration. """ @@ -331,14 +331,15 @@ async def create_data_store( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: - r"""Creates a - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]. - + r"""Creates a `DataStore + `__. DataStore is for storing - [Documents][google.cloud.discoveryengine.v1alpha.Document]. To - serve these documents for Search, or Recommendation use case, an - [Engine][google.cloud.discoveryengine.v1alpha.Engine] needs to - be created separately. + `Documents + `__. To + serve these documents for Search, or Recommendation use + case, an `Engine + `__ needs + to be created separately. .. code-block:: python @@ -378,18 +379,20 @@ async def sample_create_data_store(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.CreateDataStoreRequest, dict]]): The request object. Request for - [DataStoreService.CreateDataStore][google.cloud.discoveryengine.v1alpha.DataStoreService.CreateDataStore] + `DataStoreService.CreateDataStore + `__ method. parent (:class:`str`): - Required. The parent resource name, such as + Required. The parent resource name, such + as ``projects/{project}/locations/{location}/collections/{collection}``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. data_store (:class:`google.cloud.discoveryengine_v1alpha.types.DataStore`): - Required. The - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] + Required. The `DataStore + `__ to create. This corresponds to the ``data_store`` field @@ -397,15 +400,19 @@ async def sample_create_data_store(): should not be set. data_store_id (:class:`str`): Required. The ID to use for the - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore], - which will become the final component of the - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]'s + `DataStore + `__, + which will become the final component of + the + `DataStore + `__'s resource name. - This field must conform to - `RFC-1034 `__ - standard with a length limit of 63 characters. - Otherwise, an INVALID_ARGUMENT error is returned. + This field must conform to `RFC-1034 + `__ + standard with a length limit of 63 + characters. Otherwise, an + INVALID_ARGUMENT error is returned. This corresponds to the ``data_store_id`` field on the ``request`` instance; if ``request`` is provided, this @@ -420,12 +427,13 @@ async def sample_create_data_store(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be + An object representing a long-running + operation. + The result type for the operation will + be :class:`google.cloud.discoveryengine_v1alpha.types.DataStore` - DataStore captures global settings and configs at the - DataStore level. + DataStore captures global settings and + configs at the DataStore level. """ # Create or coerce a protobuf request object. @@ -498,8 +506,8 @@ async def get_data_store( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> data_store.DataStore: - r"""Gets a - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]. + r"""Gets a `DataStore + `__. .. code-block:: python @@ -530,22 +538,27 @@ async def sample_get_data_store(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.GetDataStoreRequest, dict]]): The request object. Request message for - [DataStoreService.GetDataStore][google.cloud.discoveryengine.v1alpha.DataStoreService.GetDataStore] + `DataStoreService.GetDataStore + `__ method. name (:class:`str`): Required. Full resource name of - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore], + `DataStore + `__, such as ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}``. - If the caller does not have permission to access the - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to access the `DataStore + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. If the requested - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] - does not exist, a NOT_FOUND error is returned. + `DataStore + `__ + does not exist, a NOT_FOUND error is + returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -622,8 +635,8 @@ async def list_data_stores( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListDataStoresAsyncPager: - r"""Lists all the - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]s + r"""Lists all the `DataStore + `__s associated with the project. .. code-block:: python @@ -656,17 +669,20 @@ async def sample_list_data_stores(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.ListDataStoresRequest, dict]]): The request object. Request message for - [DataStoreService.ListDataStores][google.cloud.discoveryengine.v1alpha.DataStoreService.ListDataStores] + `DataStoreService.ListDataStores + `__ method. parent (:class:`str`): - Required. The parent branch resource name, such as + Required. The parent branch resource + name, such as ``projects/{project}/locations/{location}/collections/{collection_id}``. - If the caller does not have permission to list - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]s - under this location, regardless of whether or not this - data store exists, a PERMISSION_DENIED error is - returned. + If the caller does not have permission + to list `DataStore + `__s + under this location, regardless of + whether or not this data store exists, a + PERMISSION_DENIED error is returned. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -682,11 +698,13 @@ async def sample_list_data_stores(): Returns: google.cloud.discoveryengine_v1alpha.services.data_store_service.pagers.ListDataStoresAsyncPager: Response message for - [DataStoreService.ListDataStores][google.cloud.discoveryengine.v1alpha.DataStoreService.ListDataStores] - method. + `DataStoreService.ListDataStores + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -760,8 +778,8 @@ async def delete_data_store( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: - r"""Deletes a - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]. + r"""Deletes a `DataStore + `__. .. code-block:: python @@ -796,22 +814,26 @@ async def sample_delete_data_store(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.DeleteDataStoreRequest, dict]]): The request object. Request message for - [DataStoreService.DeleteDataStore][google.cloud.discoveryengine.v1alpha.DataStoreService.DeleteDataStore] + `DataStoreService.DeleteDataStore + `__ method. name (:class:`str`): Required. Full resource name of - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore], + `DataStore + `__, such as ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}``. - If the caller does not have permission to delete the - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to delete the `DataStore + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. - If the - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] - to delete does not exist, a NOT_FOUND error is returned. + If the `DataStore + `__ + to delete does not exist, a NOT_FOUND + error is returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -826,18 +848,21 @@ async def sample_delete_data_store(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.protobuf.empty_pb2.Empty` A generic empty message that you can re-use to avoid defining duplicated - empty messages in your APIs. A typical example is to - use it as the request or the response type of an API - method. For instance: - - service Foo { - rpc Bar(google.protobuf.Empty) returns - (google.protobuf.Empty); - - } + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.protobuf.empty_pb2.Empty` + A generic empty message that you can + re-use to avoid defining duplicated + empty messages in your APIs. A typical + example is to use it as the request or + the response type of an API method. For + instance: + + service Foo { + rpc Bar(google.protobuf.Empty) + returns (google.protobuf.Empty); } """ # Create or coerce a protobuf request object. @@ -909,8 +934,8 @@ async def update_data_store( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> gcd_data_store.DataStore: - r"""Updates a - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] + r"""Updates a `DataStore + `__ .. code-block:: python @@ -944,32 +969,37 @@ async def sample_update_data_store(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.UpdateDataStoreRequest, dict]]): The request object. Request message for - [DataStoreService.UpdateDataStore][google.cloud.discoveryengine.v1alpha.DataStoreService.UpdateDataStore] + `DataStoreService.UpdateDataStore + `__ method. data_store (:class:`google.cloud.discoveryengine_v1alpha.types.DataStore`): - Required. The - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] + Required. The `DataStore + `__ to update. - If the caller does not have permission to update the - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to update the `DataStore + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. - If the - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] - to update does not exist, a NOT_FOUND error is returned. + If the `DataStore + `__ + to update does not exist, a NOT_FOUND + error is returned. This corresponds to the ``data_store`` field on the ``request`` instance; if ``request`` is provided, this should not be set. update_mask (:class:`google.protobuf.field_mask_pb2.FieldMask`): Indicates which fields in the provided - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] + `DataStore + `__ to update. - If an unsupported or unknown field is provided, an - INVALID_ARGUMENT error is returned. + If an unsupported or unknown field is + provided, an INVALID_ARGUMENT error is + returned. This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this @@ -1053,7 +1083,8 @@ async def get_document_processing_config( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> document_processing_config.DocumentProcessingConfig: r"""Gets a - [DocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DocumentProcessingConfig]. + `DocumentProcessingConfig + `__. .. code-block:: python @@ -1084,11 +1115,12 @@ async def sample_get_document_processing_config(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.GetDocumentProcessingConfigRequest, dict]]): The request object. Request for - [DataStoreService.GetDocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DataStoreService.GetDocumentProcessingConfig] + `DataStoreService.GetDocumentProcessingConfig + `__ method. name (:class:`str`): - Required. Full DocumentProcessingConfig resource name. - Format: + Required. Full DocumentProcessingConfig + resource name. Format: ``projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/documentProcessingConfig`` This corresponds to the ``name`` field @@ -1105,13 +1137,15 @@ async def sample_get_document_processing_config(): Returns: google.cloud.discoveryengine_v1alpha.types.DocumentProcessingConfig: A singleton resource of - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]. - It's empty when - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] - is created, which defaults to digital parser. The - first call to - [DataStoreService.UpdateDocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DataStoreService.UpdateDocumentProcessingConfig] - method will initialize the config. + `DataStore + `__. + It's empty when `DataStore + `__ + is created, which defaults to digital + parser. The first call to + `DataStoreService.UpdateDocumentProcessingConfig + `__ + method will initialize the config. """ # Create or coerce a protobuf request object. @@ -1180,14 +1214,18 @@ async def update_document_processing_config( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> gcd_document_processing_config.DocumentProcessingConfig: r"""Updates the - [DocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DocumentProcessingConfig]. - [DocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DocumentProcessingConfig] + `DocumentProcessingConfig + `__. + `DocumentProcessingConfig + `__ is a singleon resource of - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]. - It's empty when - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] is + `DataStore + `__. + It's empty when `DataStore + `__ is created. The first call to this method will set up - [DocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DocumentProcessingConfig]. + `DocumentProcessingConfig + `__. .. code-block:: python @@ -1217,32 +1255,42 @@ async def sample_update_document_processing_config(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.UpdateDocumentProcessingConfigRequest, dict]]): The request object. Request for - [DataStoreService.UpdateDocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DataStoreService.UpdateDocumentProcessingConfig] + `DataStoreService.UpdateDocumentProcessingConfig + `__ method. document_processing_config (:class:`google.cloud.discoveryengine_v1alpha.types.DocumentProcessingConfig`): Required. The - [DocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DocumentProcessingConfig] + `DocumentProcessingConfig + `__ to update. - If the caller does not have permission to update the - [DocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DocumentProcessingConfig], - then a PERMISSION_DENIED error is returned. + If the caller does not have permission + to update the `DocumentProcessingConfig + `__, + then a PERMISSION_DENIED error is + returned. If the - [DocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DocumentProcessingConfig] - to update does not exist, a NOT_FOUND error is returned. + `DocumentProcessingConfig + `__ + to update does not exist, a NOT_FOUND + error is returned. This corresponds to the ``document_processing_config`` field on the ``request`` instance; if ``request`` is provided, this should not be set. update_mask (:class:`google.protobuf.field_mask_pb2.FieldMask`): Indicates which fields in the provided - [DocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DocumentProcessingConfig] - to update. The following are the only supported fields: + `DocumentProcessingConfig + `__ + to update. The following are the only + supported fields: - - [DocumentProcessingConfig.ocr_config][google.cloud.discoveryengine.v1alpha.DocumentProcessingConfig.ocr_config] + * `DocumentProcessingConfig.ocr_config + `__ - If not set, all supported fields are updated. + If not set, all supported fields are + updated. This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this @@ -1258,13 +1306,15 @@ async def sample_update_document_processing_config(): Returns: google.cloud.discoveryengine_v1alpha.types.DocumentProcessingConfig: A singleton resource of - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]. - It's empty when - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] - is created, which defaults to digital parser. The - first call to - [DataStoreService.UpdateDocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DataStoreService.UpdateDocumentProcessingConfig] - method will initialize the config. + `DataStore + `__. + It's empty when `DataStore + `__ + is created, which defaults to digital + parser. The first call to + `DataStoreService.UpdateDocumentProcessingConfig + `__ + method will initialize the config. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/data_store_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/data_store_service/client.py index 8db83849250f..bdba9c70fb13 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/data_store_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/data_store_service/client.py @@ -125,7 +125,7 @@ def get_transport_class( class DataStoreServiceClient(metaclass=DataStoreServiceClientMeta): """Service for managing - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] + `DataStore `__ configuration. """ @@ -833,14 +833,15 @@ def create_data_store( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: - r"""Creates a - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]. - + r"""Creates a `DataStore + `__. DataStore is for storing - [Documents][google.cloud.discoveryengine.v1alpha.Document]. To - serve these documents for Search, or Recommendation use case, an - [Engine][google.cloud.discoveryengine.v1alpha.Engine] needs to - be created separately. + `Documents + `__. To + serve these documents for Search, or Recommendation use + case, an `Engine + `__ needs + to be created separately. .. code-block:: python @@ -880,18 +881,20 @@ def sample_create_data_store(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.CreateDataStoreRequest, dict]): The request object. Request for - [DataStoreService.CreateDataStore][google.cloud.discoveryengine.v1alpha.DataStoreService.CreateDataStore] + `DataStoreService.CreateDataStore + `__ method. parent (str): - Required. The parent resource name, such as + Required. The parent resource name, such + as ``projects/{project}/locations/{location}/collections/{collection}``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. data_store (google.cloud.discoveryengine_v1alpha.types.DataStore): - Required. The - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] + Required. The `DataStore + `__ to create. This corresponds to the ``data_store`` field @@ -899,15 +902,19 @@ def sample_create_data_store(): should not be set. data_store_id (str): Required. The ID to use for the - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore], - which will become the final component of the - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]'s + `DataStore + `__, + which will become the final component of + the + `DataStore + `__'s resource name. - This field must conform to - `RFC-1034 `__ - standard with a length limit of 63 characters. - Otherwise, an INVALID_ARGUMENT error is returned. + This field must conform to `RFC-1034 + `__ + standard with a length limit of 63 + characters. Otherwise, an + INVALID_ARGUMENT error is returned. This corresponds to the ``data_store_id`` field on the ``request`` instance; if ``request`` is provided, this @@ -922,12 +929,13 @@ def sample_create_data_store(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be + An object representing a long-running + operation. + The result type for the operation will + be :class:`google.cloud.discoveryengine_v1alpha.types.DataStore` - DataStore captures global settings and configs at the - DataStore level. + DataStore captures global settings and + configs at the DataStore level. """ # Create or coerce a protobuf request object. @@ -997,8 +1005,8 @@ def get_data_store( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> data_store.DataStore: - r"""Gets a - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]. + r"""Gets a `DataStore + `__. .. code-block:: python @@ -1029,22 +1037,27 @@ def sample_get_data_store(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.GetDataStoreRequest, dict]): The request object. Request message for - [DataStoreService.GetDataStore][google.cloud.discoveryengine.v1alpha.DataStoreService.GetDataStore] + `DataStoreService.GetDataStore + `__ method. name (str): Required. Full resource name of - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore], + `DataStore + `__, such as ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}``. - If the caller does not have permission to access the - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to access the `DataStore + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. If the requested - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] - does not exist, a NOT_FOUND error is returned. + `DataStore + `__ + does not exist, a NOT_FOUND error is + returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1118,8 +1131,8 @@ def list_data_stores( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListDataStoresPager: - r"""Lists all the - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]s + r"""Lists all the `DataStore + `__s associated with the project. .. code-block:: python @@ -1152,17 +1165,20 @@ def sample_list_data_stores(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.ListDataStoresRequest, dict]): The request object. Request message for - [DataStoreService.ListDataStores][google.cloud.discoveryengine.v1alpha.DataStoreService.ListDataStores] + `DataStoreService.ListDataStores + `__ method. parent (str): - Required. The parent branch resource name, such as + Required. The parent branch resource + name, such as ``projects/{project}/locations/{location}/collections/{collection_id}``. - If the caller does not have permission to list - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]s - under this location, regardless of whether or not this - data store exists, a PERMISSION_DENIED error is - returned. + If the caller does not have permission + to list `DataStore + `__s + under this location, regardless of + whether or not this data store exists, a + PERMISSION_DENIED error is returned. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -1178,11 +1194,13 @@ def sample_list_data_stores(): Returns: google.cloud.discoveryengine_v1alpha.services.data_store_service.pagers.ListDataStoresPager: Response message for - [DataStoreService.ListDataStores][google.cloud.discoveryengine.v1alpha.DataStoreService.ListDataStores] - method. + `DataStoreService.ListDataStores + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -1253,8 +1271,8 @@ def delete_data_store( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: - r"""Deletes a - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]. + r"""Deletes a `DataStore + `__. .. code-block:: python @@ -1289,22 +1307,26 @@ def sample_delete_data_store(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.DeleteDataStoreRequest, dict]): The request object. Request message for - [DataStoreService.DeleteDataStore][google.cloud.discoveryengine.v1alpha.DataStoreService.DeleteDataStore] + `DataStoreService.DeleteDataStore + `__ method. name (str): Required. Full resource name of - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore], + `DataStore + `__, such as ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}``. - If the caller does not have permission to delete the - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to delete the `DataStore + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. - If the - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] - to delete does not exist, a NOT_FOUND error is returned. + If the `DataStore + `__ + to delete does not exist, a NOT_FOUND + error is returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1319,18 +1341,21 @@ def sample_delete_data_store(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.protobuf.empty_pb2.Empty` A generic empty message that you can re-use to avoid defining duplicated - empty messages in your APIs. A typical example is to - use it as the request or the response type of an API - method. For instance: - - service Foo { - rpc Bar(google.protobuf.Empty) returns - (google.protobuf.Empty); - - } + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.protobuf.empty_pb2.Empty` + A generic empty message that you can + re-use to avoid defining duplicated + empty messages in your APIs. A typical + example is to use it as the request or + the response type of an API method. For + instance: + + service Foo { + rpc Bar(google.protobuf.Empty) + returns (google.protobuf.Empty); } """ # Create or coerce a protobuf request object. @@ -1399,8 +1424,8 @@ def update_data_store( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> gcd_data_store.DataStore: - r"""Updates a - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] + r"""Updates a `DataStore + `__ .. code-block:: python @@ -1434,32 +1459,37 @@ def sample_update_data_store(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.UpdateDataStoreRequest, dict]): The request object. Request message for - [DataStoreService.UpdateDataStore][google.cloud.discoveryengine.v1alpha.DataStoreService.UpdateDataStore] + `DataStoreService.UpdateDataStore + `__ method. data_store (google.cloud.discoveryengine_v1alpha.types.DataStore): - Required. The - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] + Required. The `DataStore + `__ to update. - If the caller does not have permission to update the - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to update the `DataStore + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. - If the - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] - to update does not exist, a NOT_FOUND error is returned. + If the `DataStore + `__ + to update does not exist, a NOT_FOUND + error is returned. This corresponds to the ``data_store`` field on the ``request`` instance; if ``request`` is provided, this should not be set. update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] + `DataStore + `__ to update. - If an unsupported or unknown field is provided, an - INVALID_ARGUMENT error is returned. + If an unsupported or unknown field is + provided, an INVALID_ARGUMENT error is + returned. This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this @@ -1540,7 +1570,8 @@ def get_document_processing_config( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> document_processing_config.DocumentProcessingConfig: r"""Gets a - [DocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DocumentProcessingConfig]. + `DocumentProcessingConfig + `__. .. code-block:: python @@ -1571,11 +1602,12 @@ def sample_get_document_processing_config(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.GetDocumentProcessingConfigRequest, dict]): The request object. Request for - [DataStoreService.GetDocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DataStoreService.GetDocumentProcessingConfig] + `DataStoreService.GetDocumentProcessingConfig + `__ method. name (str): - Required. Full DocumentProcessingConfig resource name. - Format: + Required. Full DocumentProcessingConfig + resource name. Format: ``projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/documentProcessingConfig`` This corresponds to the ``name`` field @@ -1592,13 +1624,15 @@ def sample_get_document_processing_config(): Returns: google.cloud.discoveryengine_v1alpha.types.DocumentProcessingConfig: A singleton resource of - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]. - It's empty when - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] - is created, which defaults to digital parser. The - first call to - [DataStoreService.UpdateDocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DataStoreService.UpdateDocumentProcessingConfig] - method will initialize the config. + `DataStore + `__. + It's empty when `DataStore + `__ + is created, which defaults to digital + parser. The first call to + `DataStoreService.UpdateDocumentProcessingConfig + `__ + method will initialize the config. """ # Create or coerce a protobuf request object. @@ -1666,14 +1700,18 @@ def update_document_processing_config( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> gcd_document_processing_config.DocumentProcessingConfig: r"""Updates the - [DocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DocumentProcessingConfig]. - [DocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DocumentProcessingConfig] + `DocumentProcessingConfig + `__. + `DocumentProcessingConfig + `__ is a singleon resource of - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]. - It's empty when - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] is + `DataStore + `__. + It's empty when `DataStore + `__ is created. The first call to this method will set up - [DocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DocumentProcessingConfig]. + `DocumentProcessingConfig + `__. .. code-block:: python @@ -1703,32 +1741,42 @@ def sample_update_document_processing_config(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.UpdateDocumentProcessingConfigRequest, dict]): The request object. Request for - [DataStoreService.UpdateDocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DataStoreService.UpdateDocumentProcessingConfig] + `DataStoreService.UpdateDocumentProcessingConfig + `__ method. document_processing_config (google.cloud.discoveryengine_v1alpha.types.DocumentProcessingConfig): Required. The - [DocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DocumentProcessingConfig] + `DocumentProcessingConfig + `__ to update. - If the caller does not have permission to update the - [DocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DocumentProcessingConfig], - then a PERMISSION_DENIED error is returned. + If the caller does not have permission + to update the `DocumentProcessingConfig + `__, + then a PERMISSION_DENIED error is + returned. If the - [DocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DocumentProcessingConfig] - to update does not exist, a NOT_FOUND error is returned. + `DocumentProcessingConfig + `__ + to update does not exist, a NOT_FOUND + error is returned. This corresponds to the ``document_processing_config`` field on the ``request`` instance; if ``request`` is provided, this should not be set. update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided - [DocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DocumentProcessingConfig] - to update. The following are the only supported fields: + `DocumentProcessingConfig + `__ + to update. The following are the only + supported fields: - - [DocumentProcessingConfig.ocr_config][google.cloud.discoveryengine.v1alpha.DocumentProcessingConfig.ocr_config] + * `DocumentProcessingConfig.ocr_config + `__ - If not set, all supported fields are updated. + If not set, all supported fields are + updated. This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this @@ -1744,13 +1792,15 @@ def sample_update_document_processing_config(): Returns: google.cloud.discoveryengine_v1alpha.types.DocumentProcessingConfig: A singleton resource of - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]. - It's empty when - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] - is created, which defaults to digital parser. The - first call to - [DataStoreService.UpdateDocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DataStoreService.UpdateDocumentProcessingConfig] - method will initialize the config. + `DataStore + `__. + It's empty when `DataStore + `__ + is created, which defaults to digital + parser. The first call to + `DataStoreService.UpdateDocumentProcessingConfig + `__ + method will initialize the config. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/data_store_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/data_store_service/transports/base.py index 1ef1fbe7031d..388a7b6830d8 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/data_store_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/data_store_service/transports/base.py @@ -90,8 +90,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -106,11 +104,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/data_store_service/transports/grpc.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/data_store_service/transports/grpc.py index 6b4a0fe42fa0..03746e258e9c 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/data_store_service/transports/grpc.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/data_store_service/transports/grpc.py @@ -119,7 +119,7 @@ class DataStoreServiceGrpcTransport(DataStoreServiceTransport): """gRPC backend transport for DataStoreService. Service for managing - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] + `DataStore `__ configuration. This class defines the same methods as the primary client, so the @@ -356,14 +356,15 @@ def create_data_store( ]: r"""Return a callable for the create data store method over gRPC. - Creates a - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]. - + Creates a `DataStore + `__. DataStore is for storing - [Documents][google.cloud.discoveryengine.v1alpha.Document]. To - serve these documents for Search, or Recommendation use case, an - [Engine][google.cloud.discoveryengine.v1alpha.Engine] needs to - be created separately. + `Documents + `__. To + serve these documents for Search, or Recommendation use + case, an `Engine + `__ needs + to be created separately. Returns: Callable[[~.CreateDataStoreRequest], @@ -389,8 +390,8 @@ def get_data_store( ) -> Callable[[data_store_service.GetDataStoreRequest], data_store.DataStore]: r"""Return a callable for the get data store method over gRPC. - Gets a - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]. + Gets a `DataStore + `__. Returns: Callable[[~.GetDataStoreRequest], @@ -419,8 +420,8 @@ def list_data_stores( ]: r"""Return a callable for the list data stores method over gRPC. - Lists all the - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]s + Lists all the `DataStore + `__s associated with the project. Returns: @@ -449,8 +450,8 @@ def delete_data_store( ]: r"""Return a callable for the delete data store method over gRPC. - Deletes a - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]. + Deletes a `DataStore + `__. Returns: Callable[[~.DeleteDataStoreRequest], @@ -478,8 +479,8 @@ def update_data_store( ]: r"""Return a callable for the update data store method over gRPC. - Updates a - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] + Updates a `DataStore + `__ Returns: Callable[[~.UpdateDataStoreRequest], @@ -509,7 +510,8 @@ def get_document_processing_config( r"""Return a callable for the get document processing config method over gRPC. Gets a - [DocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DocumentProcessingConfig]. + `DocumentProcessingConfig + `__. Returns: Callable[[~.GetDocumentProcessingConfigRequest], @@ -542,14 +544,18 @@ def update_document_processing_config( config method over gRPC. Updates the - [DocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DocumentProcessingConfig]. - [DocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DocumentProcessingConfig] + `DocumentProcessingConfig + `__. + `DocumentProcessingConfig + `__ is a singleon resource of - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]. - It's empty when - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] is + `DataStore + `__. + It's empty when `DataStore + `__ is created. The first call to this method will set up - [DocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DocumentProcessingConfig]. + `DocumentProcessingConfig + `__. Returns: Callable[[~.UpdateDocumentProcessingConfigRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/data_store_service/transports/grpc_asyncio.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/data_store_service/transports/grpc_asyncio.py index be0a75a2844a..f705aa6f6cec 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/data_store_service/transports/grpc_asyncio.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/data_store_service/transports/grpc_asyncio.py @@ -125,7 +125,7 @@ class DataStoreServiceGrpcAsyncIOTransport(DataStoreServiceTransport): """gRPC AsyncIO backend transport for DataStoreService. Service for managing - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] + `DataStore `__ configuration. This class defines the same methods as the primary client, so the @@ -364,14 +364,15 @@ def create_data_store( ]: r"""Return a callable for the create data store method over gRPC. - Creates a - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]. - + Creates a `DataStore + `__. DataStore is for storing - [Documents][google.cloud.discoveryengine.v1alpha.Document]. To - serve these documents for Search, or Recommendation use case, an - [Engine][google.cloud.discoveryengine.v1alpha.Engine] needs to - be created separately. + `Documents + `__. To + serve these documents for Search, or Recommendation use + case, an `Engine + `__ needs + to be created separately. Returns: Callable[[~.CreateDataStoreRequest], @@ -399,8 +400,8 @@ def get_data_store( ]: r"""Return a callable for the get data store method over gRPC. - Gets a - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]. + Gets a `DataStore + `__. Returns: Callable[[~.GetDataStoreRequest], @@ -429,8 +430,8 @@ def list_data_stores( ]: r"""Return a callable for the list data stores method over gRPC. - Lists all the - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]s + Lists all the `DataStore + `__s associated with the project. Returns: @@ -459,8 +460,8 @@ def delete_data_store( ]: r"""Return a callable for the delete data store method over gRPC. - Deletes a - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]. + Deletes a `DataStore + `__. Returns: Callable[[~.DeleteDataStoreRequest], @@ -488,8 +489,8 @@ def update_data_store( ]: r"""Return a callable for the update data store method over gRPC. - Updates a - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] + Updates a `DataStore + `__ Returns: Callable[[~.UpdateDataStoreRequest], @@ -519,7 +520,8 @@ def get_document_processing_config( r"""Return a callable for the get document processing config method over gRPC. Gets a - [DocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DocumentProcessingConfig]. + `DocumentProcessingConfig + `__. Returns: Callable[[~.GetDocumentProcessingConfigRequest], @@ -552,14 +554,18 @@ def update_document_processing_config( config method over gRPC. Updates the - [DocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DocumentProcessingConfig]. - [DocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DocumentProcessingConfig] + `DocumentProcessingConfig + `__. + `DocumentProcessingConfig + `__ is a singleon resource of - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]. - It's empty when - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] is + `DataStore + `__. + It's empty when `DataStore + `__ is created. The first call to this method will set up - [DocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DocumentProcessingConfig]. + `DocumentProcessingConfig + `__. Returns: Callable[[~.UpdateDocumentProcessingConfigRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/data_store_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/data_store_service/transports/rest.py index 3c5e0577ef4b..5d6b742ef407 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/data_store_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/data_store_service/transports/rest.py @@ -578,7 +578,7 @@ class DataStoreServiceRestTransport(_BaseDataStoreServiceRestTransport): """REST backend synchronous transport for DataStoreService. Service for managing - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] + `DataStore `__ configuration. This class defines the same methods as the primary client, so the @@ -872,7 +872,8 @@ def __call__( Args: request (~.data_store_service.CreateDataStoreRequest): The request object. Request for - [DataStoreService.CreateDataStore][google.cloud.discoveryengine.v1alpha.DataStoreService.CreateDataStore] + `DataStoreService.CreateDataStore + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1027,7 +1028,8 @@ def __call__( Args: request (~.data_store_service.DeleteDataStoreRequest): The request object. Request message for - [DataStoreService.DeleteDataStore][google.cloud.discoveryengine.v1alpha.DataStoreService.DeleteDataStore] + `DataStoreService.DeleteDataStore + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1176,7 +1178,8 @@ def __call__( Args: request (~.data_store_service.GetDataStoreRequest): The request object. Request message for - [DataStoreService.GetDataStore][google.cloud.discoveryengine.v1alpha.DataStoreService.GetDataStore] + `DataStoreService.GetDataStore + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1326,7 +1329,8 @@ def __call__( Args: request (~.data_store_service.GetDocumentProcessingConfigRequest): The request object. Request for - [DataStoreService.GetDocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DataStoreService.GetDocumentProcessingConfig] + `DataStoreService.GetDocumentProcessingConfig + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1339,12 +1343,14 @@ def __call__( Returns: ~.document_processing_config.DocumentProcessingConfig: A singleton resource of - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]. - It's empty when - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] - is created, which defaults to digital parser. The first - call to - [DataStoreService.UpdateDocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DataStoreService.UpdateDocumentProcessingConfig] + `DataStore + `__. + It's empty when `DataStore + `__ + is created, which defaults to digital + parser. The first call to + `DataStoreService.UpdateDocumentProcessingConfig + `__ method will initialize the config. """ @@ -1489,7 +1495,8 @@ def __call__( Args: request (~.data_store_service.ListDataStoresRequest): The request object. Request message for - [DataStoreService.ListDataStores][google.cloud.discoveryengine.v1alpha.DataStoreService.ListDataStores] + `DataStoreService.ListDataStores + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1502,7 +1509,8 @@ def __call__( Returns: ~.data_store_service.ListDataStoresResponse: Response message for - [DataStoreService.ListDataStores][google.cloud.discoveryengine.v1alpha.DataStoreService.ListDataStores] + `DataStoreService.ListDataStores + `__ method. """ @@ -1644,7 +1652,8 @@ def __call__( Args: request (~.data_store_service.UpdateDataStoreRequest): The request object. Request message for - [DataStoreService.UpdateDataStore][google.cloud.discoveryengine.v1alpha.DataStoreService.UpdateDataStore] + `DataStoreService.UpdateDataStore + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1802,7 +1811,8 @@ def __call__( Args: request (~.data_store_service.UpdateDocumentProcessingConfigRequest): The request object. Request for - [DataStoreService.UpdateDocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DataStoreService.UpdateDocumentProcessingConfig] + `DataStoreService.UpdateDocumentProcessingConfig + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1815,12 +1825,14 @@ def __call__( Returns: ~.gcd_document_processing_config.DocumentProcessingConfig: A singleton resource of - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]. - It's empty when - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] - is created, which defaults to digital parser. The first - call to - [DataStoreService.UpdateDocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DataStoreService.UpdateDocumentProcessingConfig] + `DataStore + `__. + It's empty when `DataStore + `__ + is created, which defaults to digital + parser. The first call to + `DataStoreService.UpdateDocumentProcessingConfig + `__ method will initialize the config. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/document_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/document_service/async_client.py index 967e825c1fc6..1487102b75d4 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/document_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/document_service/async_client.py @@ -77,7 +77,7 @@ class DocumentServiceAsyncClient: """Service for ingesting - [Document][google.cloud.discoveryengine.v1alpha.Document] + `Document `__ information of the customer's website. """ @@ -319,8 +319,8 @@ async def get_document( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> document.Document: - r"""Gets a - [Document][google.cloud.discoveryengine.v1alpha.Document]. + r"""Gets a `Document + `__. .. code-block:: python @@ -351,22 +351,27 @@ async def sample_get_document(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.GetDocumentRequest, dict]]): The request object. Request message for - [DocumentService.GetDocument][google.cloud.discoveryengine.v1alpha.DocumentService.GetDocument] + `DocumentService.GetDocument + `__ method. name (:class:`str`): Required. Full resource name of - [Document][google.cloud.discoveryengine.v1alpha.Document], + `Document + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}``. - If the caller does not have permission to access the - [Document][google.cloud.discoveryengine.v1alpha.Document], - regardless of whether or not it exists, a - ``PERMISSION_DENIED`` error is returned. + If the caller does not have permission + to access the `Document + `__, + regardless of whether or not it exists, + a ``PERMISSION_DENIED`` error is + returned. - If the requested - [Document][google.cloud.discoveryengine.v1alpha.Document] - does not exist, a ``NOT_FOUND`` error is returned. + If the requested `Document + `__ + does not exist, a ``NOT_FOUND`` error is + returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -444,8 +449,8 @@ async def list_documents( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListDocumentsAsyncPager: - r"""Gets a list of - [Document][google.cloud.discoveryengine.v1alpha.Document]s. + r"""Gets a list of `Document + `__s. .. code-block:: python @@ -477,19 +482,23 @@ async def sample_list_documents(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.ListDocumentsRequest, dict]]): The request object. Request message for - [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments] + `DocumentService.ListDocuments + `__ method. parent (:class:`str`): - Required. The parent branch resource name, such as + Required. The parent branch resource + name, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}``. - Use ``default_branch`` as the branch ID, to list - documents under the default branch. - - If the caller does not have permission to list - [Document][google.cloud.discoveryengine.v1alpha.Document]s - under this branch, regardless of whether or not this - branch exists, a ``PERMISSION_DENIED`` error is - returned. + Use ``default_branch`` as the branch ID, + to list documents under the default + branch. + + If the caller does not have permission + to list `Document + `__s + under this branch, regardless of whether + or not this branch exists, a + ``PERMISSION_DENIED`` error is returned. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -505,11 +514,13 @@ async def sample_list_documents(): Returns: google.cloud.discoveryengine_v1alpha.services.document_service.pagers.ListDocumentsAsyncPager: Response message for - [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments] - method. + `DocumentService.ListDocuments + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -583,8 +594,8 @@ async def create_document( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> gcd_document.Document: - r"""Creates a - [Document][google.cloud.discoveryengine.v1alpha.Document]. + r"""Creates a `Document + `__. .. code-block:: python @@ -616,18 +627,20 @@ async def sample_create_document(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.CreateDocumentRequest, dict]]): The request object. Request message for - [DocumentService.CreateDocument][google.cloud.discoveryengine.v1alpha.DocumentService.CreateDocument] + `DocumentService.CreateDocument + `__ method. parent (:class:`str`): - Required. The parent resource name, such as + Required. The parent resource name, such + as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. document (:class:`google.cloud.discoveryengine_v1alpha.types.Document`): - Required. The - [Document][google.cloud.discoveryengine.v1alpha.Document] + Required. The `Document + `__ to create. This corresponds to the ``document`` field @@ -635,25 +648,32 @@ async def sample_create_document(): should not be set. document_id (:class:`str`): Required. The ID to use for the - [Document][google.cloud.discoveryengine.v1alpha.Document], + `Document + `__, which becomes the final component of the - [Document.name][google.cloud.discoveryengine.v1alpha.Document.name]. - - If the caller does not have permission to create the - [Document][google.cloud.discoveryengine.v1alpha.Document], - regardless of whether or not it exists, a - ``PERMISSION_DENIED`` error is returned. + `Document.name + `__. + + If the caller does not have permission + to create the `Document + `__, + regardless of whether or not it exists, + a ``PERMISSION_DENIED`` error is + returned. This field must be unique among all - [Document][google.cloud.discoveryengine.v1alpha.Document]s - with the same - [parent][google.cloud.discoveryengine.v1alpha.CreateDocumentRequest.parent]. - Otherwise, an ``ALREADY_EXISTS`` error is returned. - - This field must conform to - `RFC-1034 `__ - standard with a length limit of 63 characters. - Otherwise, an ``INVALID_ARGUMENT`` error is returned. + `Document + `__s + with the same `parent + `__. + Otherwise, an ``ALREADY_EXISTS`` error + is returned. + + This field must conform to `RFC-1034 + `__ + standard with a length limit of 63 + characters. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. This corresponds to the ``document_id`` field on the ``request`` instance; if ``request`` is provided, this @@ -736,8 +756,8 @@ async def update_document( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> gcd_document.Document: - r"""Updates a - [Document][google.cloud.discoveryengine.v1alpha.Document]. + r"""Updates a `Document + `__. .. code-block:: python @@ -767,21 +787,26 @@ async def sample_update_document(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.UpdateDocumentRequest, dict]]): The request object. Request message for - [DocumentService.UpdateDocument][google.cloud.discoveryengine.v1alpha.DocumentService.UpdateDocument] + `DocumentService.UpdateDocument + `__ method. document (:class:`google.cloud.discoveryengine_v1alpha.types.Document`): Required. The document to update/create. - If the caller does not have permission to update the - [Document][google.cloud.discoveryengine.v1alpha.Document], - regardless of whether or not it exists, a - ``PERMISSION_DENIED`` error is returned. + If the caller does not have permission + to update the `Document + `__, + regardless of whether or not it exists, + a ``PERMISSION_DENIED`` error is + returned. - If the - [Document][google.cloud.discoveryengine.v1alpha.Document] + If the `Document + `__ to update does not exist and - [allow_missing][google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest.allow_missing] - is not set, a ``NOT_FOUND`` error is returned. + `allow_missing + `__ + is not set, a ``NOT_FOUND`` error is + returned. This corresponds to the ``document`` field on the ``request`` instance; if ``request`` is provided, this @@ -872,8 +897,8 @@ async def delete_document( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> None: - r"""Deletes a - [Document][google.cloud.discoveryengine.v1alpha.Document]. + r"""Deletes a `Document + `__. .. code-block:: python @@ -901,24 +926,28 @@ async def sample_delete_document(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.DeleteDocumentRequest, dict]]): The request object. Request message for - [DocumentService.DeleteDocument][google.cloud.discoveryengine.v1alpha.DocumentService.DeleteDocument] + `DocumentService.DeleteDocument + `__ method. name (:class:`str`): Required. Full resource name of - [Document][google.cloud.discoveryengine.v1alpha.Document], + `Document + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}``. - If the caller does not have permission to delete the - [Document][google.cloud.discoveryengine.v1alpha.Document], - regardless of whether or not it exists, a - ``PERMISSION_DENIED`` error is returned. - - If the - [Document][google.cloud.discoveryengine.v1alpha.Document] - to delete does not exist, a ``NOT_FOUND`` error is + If the caller does not have permission + to delete the `Document + `__, + regardless of whether or not it exists, + a ``PERMISSION_DENIED`` error is returned. + If the `Document + `__ + to delete does not exist, a + ``NOT_FOUND`` error is returned. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -985,13 +1014,15 @@ async def import_documents( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: r"""Bulk import of multiple - [Document][google.cloud.discoveryengine.v1alpha.Document]s. - Request processing may be synchronous. Non-existing items are - created. + `Document + `__s. + Request processing may be synchronous. Non-existing + items are created. Note: It is possible for a subset of the - [Document][google.cloud.discoveryengine.v1alpha.Document]s to be - successfully updated. + `Document + `__s to + be successfully updated. .. code-block:: python @@ -1036,14 +1067,17 @@ async def sample_import_documents(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1alpha.types.ImportDocumentsResponse` Response of the - [ImportDocumentsRequest][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest]. - If the long running operation is done, then this - message is returned by the - google.longrunning.Operations.response field if the - operation was successful. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1alpha.types.ImportDocumentsResponse` + Response of the `ImportDocumentsRequest + `__. + If the long running operation is done, + then this message is returned by the + google.longrunning.Operations.response + field if the operation was successful. """ # Create or coerce a protobuf request object. @@ -1095,23 +1129,29 @@ async def purge_documents( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: r"""Permanently deletes all selected - [Document][google.cloud.discoveryengine.v1alpha.Document]s in a + `Document + `__s in a branch. This process is asynchronous. Depending on the number of - [Document][google.cloud.discoveryengine.v1alpha.Document]s to be - deleted, this operation can take hours to complete. Before the - delete operation completes, some - [Document][google.cloud.discoveryengine.v1alpha.Document]s might - still be returned by - [DocumentService.GetDocument][google.cloud.discoveryengine.v1alpha.DocumentService.GetDocument] + `Document + `__s to + be deleted, this operation can take hours to complete. + Before the delete operation completes, some `Document + `__s + might still be returned by + `DocumentService.GetDocument + `__ or - [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments]. + `DocumentService.ListDocuments + `__. To get a list of the - [Document][google.cloud.discoveryengine.v1alpha.Document]s to be - deleted, set - [PurgeDocumentsRequest.force][google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest.force] + `Document + `__s to + be deleted, set + `PurgeDocumentsRequest.force + `__ to false. .. code-block:: python @@ -1152,7 +1192,8 @@ async def sample_purge_documents(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.PurgeDocumentsRequest, dict]]): The request object. Request message for - [DocumentService.PurgeDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.PurgeDocuments] + `DocumentService.PurgeDocuments + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -1164,13 +1205,19 @@ async def sample_purge_documents(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1alpha.types.PurgeDocumentsResponse` Response message for - [DocumentService.PurgeDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.PurgeDocuments] - method. If the long running operation is successfully - done, then this message is returned by the - google.longrunning.Operations.response field. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1alpha.types.PurgeDocumentsResponse` + Response message for + `DocumentService.PurgeDocuments + `__ + method. If the long running operation is + successfully done, then this message is + returned by the + google.longrunning.Operations.response + field. """ # Create or coerce a protobuf request object. @@ -1225,7 +1272,8 @@ async def get_processed_document( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> document.ProcessedDocument: r"""Gets the parsed layout information for a - [Document][google.cloud.discoveryengine.v1alpha.Document]. + `Document + `__. .. code-block:: python @@ -1257,22 +1305,27 @@ async def sample_get_processed_document(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.GetProcessedDocumentRequest, dict]]): The request object. Request message for - [DocumentService.GetDocument][google.cloud.discoveryengine.v1alpha.DocumentService.GetDocument] + `DocumentService.GetDocument + `__ method. name (:class:`str`): Required. Full resource name of - [Document][google.cloud.discoveryengine.v1alpha.Document], + `Document + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}``. - If the caller does not have permission to access the - [Document][google.cloud.discoveryengine.v1alpha.Document], - regardless of whether or not it exists, a - ``PERMISSION_DENIED`` error is returned. + If the caller does not have permission + to access the `Document + `__, + regardless of whether or not it exists, + a ``PERMISSION_DENIED`` error is + returned. - If the requested - [Document][google.cloud.discoveryengine.v1alpha.Document] - does not exist, a ``NOT_FOUND`` error is returned. + If the requested `Document + `__ + does not exist, a ``NOT_FOUND`` error is + returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1353,7 +1406,8 @@ async def batch_get_documents_metadata( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> document_service.BatchGetDocumentsMetadataResponse: r"""Gets index freshness metadata for - [Document][google.cloud.discoveryengine.v1alpha.Document]s. + `Document + `__s. Supported for website search only. .. code-block:: python @@ -1385,10 +1439,12 @@ async def sample_batch_get_documents_metadata(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.BatchGetDocumentsMetadataRequest, dict]]): The request object. Request message for - [DocumentService.BatchGetDocumentsMetadata][google.cloud.discoveryengine.v1alpha.DocumentService.BatchGetDocumentsMetadata] + `DocumentService.BatchGetDocumentsMetadata + `__ method. parent (:class:`str`): - Required. The parent branch resource name, such as + Required. The parent branch resource + name, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}``. This corresponds to the ``parent`` field @@ -1405,8 +1461,9 @@ async def sample_batch_get_documents_metadata(): Returns: google.cloud.discoveryengine_v1alpha.types.BatchGetDocumentsMetadataResponse: Response message for - [DocumentService.BatchGetDocumentsMetadata][google.cloud.discoveryengine.v1alpha.DocumentService.BatchGetDocumentsMetadata] - method. + `DocumentService.BatchGetDocumentsMetadata + `__ + method. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/document_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/document_service/client.py index 827f343950db..0d5fe300550e 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/document_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/document_service/client.py @@ -123,7 +123,7 @@ def get_transport_class( class DocumentServiceClient(metaclass=DocumentServiceClientMeta): """Service for ingesting - [Document][google.cloud.discoveryengine.v1alpha.Document] + `Document `__ information of the customer's website. """ @@ -808,8 +808,8 @@ def get_document( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> document.Document: - r"""Gets a - [Document][google.cloud.discoveryengine.v1alpha.Document]. + r"""Gets a `Document + `__. .. code-block:: python @@ -840,22 +840,27 @@ def sample_get_document(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.GetDocumentRequest, dict]): The request object. Request message for - [DocumentService.GetDocument][google.cloud.discoveryengine.v1alpha.DocumentService.GetDocument] + `DocumentService.GetDocument + `__ method. name (str): Required. Full resource name of - [Document][google.cloud.discoveryengine.v1alpha.Document], + `Document + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}``. - If the caller does not have permission to access the - [Document][google.cloud.discoveryengine.v1alpha.Document], - regardless of whether or not it exists, a - ``PERMISSION_DENIED`` error is returned. + If the caller does not have permission + to access the `Document + `__, + regardless of whether or not it exists, + a ``PERMISSION_DENIED`` error is + returned. - If the requested - [Document][google.cloud.discoveryengine.v1alpha.Document] - does not exist, a ``NOT_FOUND`` error is returned. + If the requested `Document + `__ + does not exist, a ``NOT_FOUND`` error is + returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -930,8 +935,8 @@ def list_documents( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListDocumentsPager: - r"""Gets a list of - [Document][google.cloud.discoveryengine.v1alpha.Document]s. + r"""Gets a list of `Document + `__s. .. code-block:: python @@ -963,19 +968,23 @@ def sample_list_documents(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.ListDocumentsRequest, dict]): The request object. Request message for - [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments] + `DocumentService.ListDocuments + `__ method. parent (str): - Required. The parent branch resource name, such as + Required. The parent branch resource + name, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}``. - Use ``default_branch`` as the branch ID, to list - documents under the default branch. - - If the caller does not have permission to list - [Document][google.cloud.discoveryengine.v1alpha.Document]s - under this branch, regardless of whether or not this - branch exists, a ``PERMISSION_DENIED`` error is - returned. + Use ``default_branch`` as the branch ID, + to list documents under the default + branch. + + If the caller does not have permission + to list `Document + `__s + under this branch, regardless of whether + or not this branch exists, a + ``PERMISSION_DENIED`` error is returned. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -991,11 +1000,13 @@ def sample_list_documents(): Returns: google.cloud.discoveryengine_v1alpha.services.document_service.pagers.ListDocumentsPager: Response message for - [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments] - method. + `DocumentService.ListDocuments + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -1066,8 +1077,8 @@ def create_document( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> gcd_document.Document: - r"""Creates a - [Document][google.cloud.discoveryengine.v1alpha.Document]. + r"""Creates a `Document + `__. .. code-block:: python @@ -1099,18 +1110,20 @@ def sample_create_document(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.CreateDocumentRequest, dict]): The request object. Request message for - [DocumentService.CreateDocument][google.cloud.discoveryengine.v1alpha.DocumentService.CreateDocument] + `DocumentService.CreateDocument + `__ method. parent (str): - Required. The parent resource name, such as + Required. The parent resource name, such + as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. document (google.cloud.discoveryengine_v1alpha.types.Document): - Required. The - [Document][google.cloud.discoveryengine.v1alpha.Document] + Required. The `Document + `__ to create. This corresponds to the ``document`` field @@ -1118,25 +1131,32 @@ def sample_create_document(): should not be set. document_id (str): Required. The ID to use for the - [Document][google.cloud.discoveryengine.v1alpha.Document], + `Document + `__, which becomes the final component of the - [Document.name][google.cloud.discoveryengine.v1alpha.Document.name]. - - If the caller does not have permission to create the - [Document][google.cloud.discoveryengine.v1alpha.Document], - regardless of whether or not it exists, a - ``PERMISSION_DENIED`` error is returned. + `Document.name + `__. + + If the caller does not have permission + to create the `Document + `__, + regardless of whether or not it exists, + a ``PERMISSION_DENIED`` error is + returned. This field must be unique among all - [Document][google.cloud.discoveryengine.v1alpha.Document]s - with the same - [parent][google.cloud.discoveryengine.v1alpha.CreateDocumentRequest.parent]. - Otherwise, an ``ALREADY_EXISTS`` error is returned. - - This field must conform to - `RFC-1034 `__ - standard with a length limit of 63 characters. - Otherwise, an ``INVALID_ARGUMENT`` error is returned. + `Document + `__s + with the same `parent + `__. + Otherwise, an ``ALREADY_EXISTS`` error + is returned. + + This field must conform to `RFC-1034 + `__ + standard with a length limit of 63 + characters. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. This corresponds to the ``document_id`` field on the ``request`` instance; if ``request`` is provided, this @@ -1216,8 +1236,8 @@ def update_document( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> gcd_document.Document: - r"""Updates a - [Document][google.cloud.discoveryengine.v1alpha.Document]. + r"""Updates a `Document + `__. .. code-block:: python @@ -1247,21 +1267,26 @@ def sample_update_document(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.UpdateDocumentRequest, dict]): The request object. Request message for - [DocumentService.UpdateDocument][google.cloud.discoveryengine.v1alpha.DocumentService.UpdateDocument] + `DocumentService.UpdateDocument + `__ method. document (google.cloud.discoveryengine_v1alpha.types.Document): Required. The document to update/create. - If the caller does not have permission to update the - [Document][google.cloud.discoveryengine.v1alpha.Document], - regardless of whether or not it exists, a - ``PERMISSION_DENIED`` error is returned. + If the caller does not have permission + to update the `Document + `__, + regardless of whether or not it exists, + a ``PERMISSION_DENIED`` error is + returned. - If the - [Document][google.cloud.discoveryengine.v1alpha.Document] + If the `Document + `__ to update does not exist and - [allow_missing][google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest.allow_missing] - is not set, a ``NOT_FOUND`` error is returned. + `allow_missing + `__ + is not set, a ``NOT_FOUND`` error is + returned. This corresponds to the ``document`` field on the ``request`` instance; if ``request`` is provided, this @@ -1349,8 +1374,8 @@ def delete_document( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> None: - r"""Deletes a - [Document][google.cloud.discoveryengine.v1alpha.Document]. + r"""Deletes a `Document + `__. .. code-block:: python @@ -1378,24 +1403,28 @@ def sample_delete_document(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.DeleteDocumentRequest, dict]): The request object. Request message for - [DocumentService.DeleteDocument][google.cloud.discoveryengine.v1alpha.DocumentService.DeleteDocument] + `DocumentService.DeleteDocument + `__ method. name (str): Required. Full resource name of - [Document][google.cloud.discoveryengine.v1alpha.Document], + `Document + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}``. - If the caller does not have permission to delete the - [Document][google.cloud.discoveryengine.v1alpha.Document], - regardless of whether or not it exists, a - ``PERMISSION_DENIED`` error is returned. - - If the - [Document][google.cloud.discoveryengine.v1alpha.Document] - to delete does not exist, a ``NOT_FOUND`` error is + If the caller does not have permission + to delete the `Document + `__, + regardless of whether or not it exists, + a ``PERMISSION_DENIED`` error is returned. + If the `Document + `__ + to delete does not exist, a + ``NOT_FOUND`` error is returned. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1459,13 +1488,15 @@ def import_documents( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: r"""Bulk import of multiple - [Document][google.cloud.discoveryengine.v1alpha.Document]s. - Request processing may be synchronous. Non-existing items are - created. + `Document + `__s. + Request processing may be synchronous. Non-existing + items are created. Note: It is possible for a subset of the - [Document][google.cloud.discoveryengine.v1alpha.Document]s to be - successfully updated. + `Document + `__s to + be successfully updated. .. code-block:: python @@ -1510,14 +1541,17 @@ def sample_import_documents(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1alpha.types.ImportDocumentsResponse` Response of the - [ImportDocumentsRequest][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest]. - If the long running operation is done, then this - message is returned by the - google.longrunning.Operations.response field if the - operation was successful. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1alpha.types.ImportDocumentsResponse` + Response of the `ImportDocumentsRequest + `__. + If the long running operation is done, + then this message is returned by the + google.longrunning.Operations.response + field if the operation was successful. """ # Create or coerce a protobuf request object. @@ -1567,23 +1601,29 @@ def purge_documents( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: r"""Permanently deletes all selected - [Document][google.cloud.discoveryengine.v1alpha.Document]s in a + `Document + `__s in a branch. This process is asynchronous. Depending on the number of - [Document][google.cloud.discoveryengine.v1alpha.Document]s to be - deleted, this operation can take hours to complete. Before the - delete operation completes, some - [Document][google.cloud.discoveryengine.v1alpha.Document]s might - still be returned by - [DocumentService.GetDocument][google.cloud.discoveryengine.v1alpha.DocumentService.GetDocument] + `Document + `__s to + be deleted, this operation can take hours to complete. + Before the delete operation completes, some `Document + `__s + might still be returned by + `DocumentService.GetDocument + `__ or - [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments]. + `DocumentService.ListDocuments + `__. To get a list of the - [Document][google.cloud.discoveryengine.v1alpha.Document]s to be - deleted, set - [PurgeDocumentsRequest.force][google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest.force] + `Document + `__s to + be deleted, set + `PurgeDocumentsRequest.force + `__ to false. .. code-block:: python @@ -1624,7 +1664,8 @@ def sample_purge_documents(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.PurgeDocumentsRequest, dict]): The request object. Request message for - [DocumentService.PurgeDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.PurgeDocuments] + `DocumentService.PurgeDocuments + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1636,13 +1677,19 @@ def sample_purge_documents(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1alpha.types.PurgeDocumentsResponse` Response message for - [DocumentService.PurgeDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.PurgeDocuments] - method. If the long running operation is successfully - done, then this message is returned by the - google.longrunning.Operations.response field. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1alpha.types.PurgeDocumentsResponse` + Response message for + `DocumentService.PurgeDocuments + `__ + method. If the long running operation is + successfully done, then this message is + returned by the + google.longrunning.Operations.response + field. """ # Create or coerce a protobuf request object. @@ -1695,7 +1742,8 @@ def get_processed_document( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> document.ProcessedDocument: r"""Gets the parsed layout information for a - [Document][google.cloud.discoveryengine.v1alpha.Document]. + `Document + `__. .. code-block:: python @@ -1727,22 +1775,27 @@ def sample_get_processed_document(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.GetProcessedDocumentRequest, dict]): The request object. Request message for - [DocumentService.GetDocument][google.cloud.discoveryengine.v1alpha.DocumentService.GetDocument] + `DocumentService.GetDocument + `__ method. name (str): Required. Full resource name of - [Document][google.cloud.discoveryengine.v1alpha.Document], + `Document + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}``. - If the caller does not have permission to access the - [Document][google.cloud.discoveryengine.v1alpha.Document], - regardless of whether or not it exists, a - ``PERMISSION_DENIED`` error is returned. + If the caller does not have permission + to access the `Document + `__, + regardless of whether or not it exists, + a ``PERMISSION_DENIED`` error is + returned. - If the requested - [Document][google.cloud.discoveryengine.v1alpha.Document] - does not exist, a ``NOT_FOUND`` error is returned. + If the requested `Document + `__ + does not exist, a ``NOT_FOUND`` error is + returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1820,7 +1873,8 @@ def batch_get_documents_metadata( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> document_service.BatchGetDocumentsMetadataResponse: r"""Gets index freshness metadata for - [Document][google.cloud.discoveryengine.v1alpha.Document]s. + `Document + `__s. Supported for website search only. .. code-block:: python @@ -1852,10 +1906,12 @@ def sample_batch_get_documents_metadata(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.BatchGetDocumentsMetadataRequest, dict]): The request object. Request message for - [DocumentService.BatchGetDocumentsMetadata][google.cloud.discoveryengine.v1alpha.DocumentService.BatchGetDocumentsMetadata] + `DocumentService.BatchGetDocumentsMetadata + `__ method. parent (str): - Required. The parent branch resource name, such as + Required. The parent branch resource + name, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}``. This corresponds to the ``parent`` field @@ -1872,8 +1928,9 @@ def sample_batch_get_documents_metadata(): Returns: google.cloud.discoveryengine_v1alpha.types.BatchGetDocumentsMetadataResponse: Response message for - [DocumentService.BatchGetDocumentsMetadata][google.cloud.discoveryengine.v1alpha.DocumentService.BatchGetDocumentsMetadata] - method. + `DocumentService.BatchGetDocumentsMetadata + `__ + method. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/document_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/document_service/transports/base.py index 0ff60c3c5f1d..0bc6c56050c2 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/document_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/document_service/transports/base.py @@ -91,8 +91,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -107,11 +105,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/document_service/transports/grpc.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/document_service/transports/grpc.py index 5e7fa066e5ff..4854cd95ee52 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/document_service/transports/grpc.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/document_service/transports/grpc.py @@ -120,7 +120,7 @@ class DocumentServiceGrpcTransport(DocumentServiceTransport): """gRPC backend transport for DocumentService. Service for ingesting - [Document][google.cloud.discoveryengine.v1alpha.Document] + `Document `__ information of the customer's website. This class defines the same methods as the primary client, so the @@ -355,8 +355,8 @@ def get_document( ) -> Callable[[document_service.GetDocumentRequest], document.Document]: r"""Return a callable for the get document method over gRPC. - Gets a - [Document][google.cloud.discoveryengine.v1alpha.Document]. + Gets a `Document + `__. Returns: Callable[[~.GetDocumentRequest], @@ -384,8 +384,8 @@ def list_documents( ]: r"""Return a callable for the list documents method over gRPC. - Gets a list of - [Document][google.cloud.discoveryengine.v1alpha.Document]s. + Gets a list of `Document + `__s. Returns: Callable[[~.ListDocumentsRequest], @@ -411,8 +411,8 @@ def create_document( ) -> Callable[[document_service.CreateDocumentRequest], gcd_document.Document]: r"""Return a callable for the create document method over gRPC. - Creates a - [Document][google.cloud.discoveryengine.v1alpha.Document]. + Creates a `Document + `__. Returns: Callable[[~.CreateDocumentRequest], @@ -438,8 +438,8 @@ def update_document( ) -> Callable[[document_service.UpdateDocumentRequest], gcd_document.Document]: r"""Return a callable for the update document method over gRPC. - Updates a - [Document][google.cloud.discoveryengine.v1alpha.Document]. + Updates a `Document + `__. Returns: Callable[[~.UpdateDocumentRequest], @@ -465,8 +465,8 @@ def delete_document( ) -> Callable[[document_service.DeleteDocumentRequest], empty_pb2.Empty]: r"""Return a callable for the delete document method over gRPC. - Deletes a - [Document][google.cloud.discoveryengine.v1alpha.Document]. + Deletes a `Document + `__. Returns: Callable[[~.DeleteDocumentRequest], @@ -493,13 +493,15 @@ def import_documents( r"""Return a callable for the import documents method over gRPC. Bulk import of multiple - [Document][google.cloud.discoveryengine.v1alpha.Document]s. - Request processing may be synchronous. Non-existing items are - created. + `Document + `__s. + Request processing may be synchronous. Non-existing + items are created. Note: It is possible for a subset of the - [Document][google.cloud.discoveryengine.v1alpha.Document]s to be - successfully updated. + `Document + `__s to + be successfully updated. Returns: Callable[[~.ImportDocumentsRequest], @@ -526,23 +528,29 @@ def purge_documents( r"""Return a callable for the purge documents method over gRPC. Permanently deletes all selected - [Document][google.cloud.discoveryengine.v1alpha.Document]s in a + `Document + `__s in a branch. This process is asynchronous. Depending on the number of - [Document][google.cloud.discoveryengine.v1alpha.Document]s to be - deleted, this operation can take hours to complete. Before the - delete operation completes, some - [Document][google.cloud.discoveryengine.v1alpha.Document]s might - still be returned by - [DocumentService.GetDocument][google.cloud.discoveryengine.v1alpha.DocumentService.GetDocument] + `Document + `__s to + be deleted, this operation can take hours to complete. + Before the delete operation completes, some `Document + `__s + might still be returned by + `DocumentService.GetDocument + `__ or - [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments]. + `DocumentService.ListDocuments + `__. To get a list of the - [Document][google.cloud.discoveryengine.v1alpha.Document]s to be - deleted, set - [PurgeDocumentsRequest.force][google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest.force] + `Document + `__s to + be deleted, set + `PurgeDocumentsRequest.force + `__ to false. Returns: @@ -572,7 +580,8 @@ def get_processed_document( r"""Return a callable for the get processed document method over gRPC. Gets the parsed layout information for a - [Document][google.cloud.discoveryengine.v1alpha.Document]. + `Document + `__. Returns: Callable[[~.GetProcessedDocumentRequest], @@ -602,7 +611,8 @@ def batch_get_documents_metadata( r"""Return a callable for the batch get documents metadata method over gRPC. Gets index freshness metadata for - [Document][google.cloud.discoveryengine.v1alpha.Document]s. + `Document + `__s. Supported for website search only. Returns: diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/document_service/transports/grpc_asyncio.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/document_service/transports/grpc_asyncio.py index d9ac56379040..a3be5aa8c1a3 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/document_service/transports/grpc_asyncio.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/document_service/transports/grpc_asyncio.py @@ -126,7 +126,7 @@ class DocumentServiceGrpcAsyncIOTransport(DocumentServiceTransport): """gRPC AsyncIO backend transport for DocumentService. Service for ingesting - [Document][google.cloud.discoveryengine.v1alpha.Document] + `Document `__ information of the customer's website. This class defines the same methods as the primary client, so the @@ -363,8 +363,8 @@ def get_document( ) -> Callable[[document_service.GetDocumentRequest], Awaitable[document.Document]]: r"""Return a callable for the get document method over gRPC. - Gets a - [Document][google.cloud.discoveryengine.v1alpha.Document]. + Gets a `Document + `__. Returns: Callable[[~.GetDocumentRequest], @@ -393,8 +393,8 @@ def list_documents( ]: r"""Return a callable for the list documents method over gRPC. - Gets a list of - [Document][google.cloud.discoveryengine.v1alpha.Document]s. + Gets a list of `Document + `__s. Returns: Callable[[~.ListDocumentsRequest], @@ -422,8 +422,8 @@ def create_document( ]: r"""Return a callable for the create document method over gRPC. - Creates a - [Document][google.cloud.discoveryengine.v1alpha.Document]. + Creates a `Document + `__. Returns: Callable[[~.CreateDocumentRequest], @@ -451,8 +451,8 @@ def update_document( ]: r"""Return a callable for the update document method over gRPC. - Updates a - [Document][google.cloud.discoveryengine.v1alpha.Document]. + Updates a `Document + `__. Returns: Callable[[~.UpdateDocumentRequest], @@ -478,8 +478,8 @@ def delete_document( ) -> Callable[[document_service.DeleteDocumentRequest], Awaitable[empty_pb2.Empty]]: r"""Return a callable for the delete document method over gRPC. - Deletes a - [Document][google.cloud.discoveryengine.v1alpha.Document]. + Deletes a `Document + `__. Returns: Callable[[~.DeleteDocumentRequest], @@ -508,13 +508,15 @@ def import_documents( r"""Return a callable for the import documents method over gRPC. Bulk import of multiple - [Document][google.cloud.discoveryengine.v1alpha.Document]s. - Request processing may be synchronous. Non-existing items are - created. + `Document + `__s. + Request processing may be synchronous. Non-existing + items are created. Note: It is possible for a subset of the - [Document][google.cloud.discoveryengine.v1alpha.Document]s to be - successfully updated. + `Document + `__s to + be successfully updated. Returns: Callable[[~.ImportDocumentsRequest], @@ -543,23 +545,29 @@ def purge_documents( r"""Return a callable for the purge documents method over gRPC. Permanently deletes all selected - [Document][google.cloud.discoveryengine.v1alpha.Document]s in a + `Document + `__s in a branch. This process is asynchronous. Depending on the number of - [Document][google.cloud.discoveryengine.v1alpha.Document]s to be - deleted, this operation can take hours to complete. Before the - delete operation completes, some - [Document][google.cloud.discoveryengine.v1alpha.Document]s might - still be returned by - [DocumentService.GetDocument][google.cloud.discoveryengine.v1alpha.DocumentService.GetDocument] + `Document + `__s to + be deleted, this operation can take hours to complete. + Before the delete operation completes, some `Document + `__s + might still be returned by + `DocumentService.GetDocument + `__ or - [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments]. + `DocumentService.ListDocuments + `__. To get a list of the - [Document][google.cloud.discoveryengine.v1alpha.Document]s to be - deleted, set - [PurgeDocumentsRequest.force][google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest.force] + `Document + `__s to + be deleted, set + `PurgeDocumentsRequest.force + `__ to false. Returns: @@ -590,7 +598,8 @@ def get_processed_document( r"""Return a callable for the get processed document method over gRPC. Gets the parsed layout information for a - [Document][google.cloud.discoveryengine.v1alpha.Document]. + `Document + `__. Returns: Callable[[~.GetProcessedDocumentRequest], @@ -620,7 +629,8 @@ def batch_get_documents_metadata( r"""Return a callable for the batch get documents metadata method over gRPC. Gets index freshness metadata for - [Document][google.cloud.discoveryengine.v1alpha.Document]s. + `Document + `__s. Supported for website search only. Returns: diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/document_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/document_service/transports/rest.py index c91818db2d7f..db4e6b75c112 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/document_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/document_service/transports/rest.py @@ -643,7 +643,7 @@ class DocumentServiceRestTransport(_BaseDocumentServiceRestTransport): """REST backend synchronous transport for DocumentService. Service for ingesting - [Document][google.cloud.discoveryengine.v1alpha.Document] + `Document `__ information of the customer's website. This class defines the same methods as the primary client, so the @@ -937,7 +937,8 @@ def __call__( Args: request (~.document_service.BatchGetDocumentsMetadataRequest): The request object. Request message for - [DocumentService.BatchGetDocumentsMetadata][google.cloud.discoveryengine.v1alpha.DocumentService.BatchGetDocumentsMetadata] + `DocumentService.BatchGetDocumentsMetadata + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -950,7 +951,8 @@ def __call__( Returns: ~.document_service.BatchGetDocumentsMetadataResponse: Response message for - [DocumentService.BatchGetDocumentsMetadata][google.cloud.discoveryengine.v1alpha.DocumentService.BatchGetDocumentsMetadata] + `DocumentService.BatchGetDocumentsMetadata + `__ method. """ @@ -1095,7 +1097,8 @@ def __call__( Args: request (~.document_service.CreateDocumentRequest): The request object. Request message for - [DocumentService.CreateDocument][google.cloud.discoveryengine.v1alpha.DocumentService.CreateDocument] + `DocumentService.CreateDocument + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1249,7 +1252,8 @@ def __call__( Args: request (~.document_service.DeleteDocumentRequest): The request object. Request message for - [DocumentService.DeleteDocument][google.cloud.discoveryengine.v1alpha.DocumentService.DeleteDocument] + `DocumentService.DeleteDocument + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1357,7 +1361,8 @@ def __call__( Args: request (~.document_service.GetDocumentRequest): The request object. Request message for - [DocumentService.GetDocument][google.cloud.discoveryengine.v1alpha.DocumentService.GetDocument] + `DocumentService.GetDocument + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1507,7 +1512,8 @@ def __call__( Args: request (~.document_service.GetProcessedDocumentRequest): The request object. Request message for - [DocumentService.GetDocument][google.cloud.discoveryengine.v1alpha.DocumentService.GetDocument] + `DocumentService.GetDocument + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1811,7 +1817,8 @@ def __call__( Args: request (~.document_service.ListDocumentsRequest): The request object. Request message for - [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments] + `DocumentService.ListDocuments + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1824,7 +1831,8 @@ def __call__( Returns: ~.document_service.ListDocumentsResponse: Response message for - [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments] + `DocumentService.ListDocuments + `__ method. """ @@ -1963,7 +1971,8 @@ def __call__( Args: request (~.purge_config.PurgeDocumentsRequest): The request object. Request message for - [DocumentService.PurgeDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.PurgeDocuments] + `DocumentService.PurgeDocuments + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -2116,7 +2125,8 @@ def __call__( Args: request (~.document_service.UpdateDocumentRequest): The request object. Request message for - [DocumentService.UpdateDocument][google.cloud.discoveryengine.v1alpha.DocumentService.UpdateDocument] + `DocumentService.UpdateDocument + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/engine_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/engine_service/async_client.py index 6c654fc9e890..0650c7c3a825 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/engine_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/engine_service/async_client.py @@ -73,8 +73,8 @@ class EngineServiceAsyncClient: - """Service for managing - [Engine][google.cloud.discoveryengine.v1alpha.Engine] configuration. + """Service for managing `Engine + `__ configuration. """ _client: EngineServiceClient @@ -313,7 +313,8 @@ async def create_engine( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: - r"""Creates a [Engine][google.cloud.discoveryengine.v1alpha.Engine]. + r"""Creates a `Engine + `__. .. code-block:: python @@ -354,34 +355,40 @@ async def sample_create_engine(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.CreateEngineRequest, dict]]): The request object. Request for - [EngineService.CreateEngine][google.cloud.discoveryengine.v1alpha.EngineService.CreateEngine] + `EngineService.CreateEngine + `__ method. parent (:class:`str`): - Required. The parent resource name, such as + Required. The parent resource name, such + as ``projects/{project}/locations/{location}/collections/{collection}``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. engine (:class:`google.cloud.discoveryengine_v1alpha.types.Engine`): - Required. The - [Engine][google.cloud.discoveryengine.v1alpha.Engine] to - create. + Required. The `Engine + `__ + to create. This corresponds to the ``engine`` field on the ``request`` instance; if ``request`` is provided, this should not be set. engine_id (:class:`str`): Required. The ID to use for the - [Engine][google.cloud.discoveryengine.v1alpha.Engine], - which will become the final component of the - [Engine][google.cloud.discoveryengine.v1alpha.Engine]'s + `Engine + `__, + which will become the final component of + the + `Engine + `__'s resource name. - This field must conform to - `RFC-1034 `__ - standard with a length limit of 63 characters. - Otherwise, an INVALID_ARGUMENT error is returned. + This field must conform to `RFC-1034 + `__ + standard with a length limit of 63 + characters. Otherwise, an + INVALID_ARGUMENT error is returned. This corresponds to the ``engine_id`` field on the ``request`` instance; if ``request`` is provided, this @@ -396,10 +403,14 @@ async def sample_create_engine(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1alpha.types.Engine` Metadata that describes the training and serving parameters of an - [Engine][google.cloud.discoveryengine.v1alpha.Engine]. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1alpha.types.Engine` + Metadata that describes the training and + serving parameters of an `Engine + `__. """ # Create or coerce a protobuf request object. @@ -472,7 +483,8 @@ async def delete_engine( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: - r"""Deletes a [Engine][google.cloud.discoveryengine.v1alpha.Engine]. + r"""Deletes a `Engine + `__. .. code-block:: python @@ -507,22 +519,26 @@ async def sample_delete_engine(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.DeleteEngineRequest, dict]]): The request object. Request message for - [EngineService.DeleteEngine][google.cloud.discoveryengine.v1alpha.EngineService.DeleteEngine] + `EngineService.DeleteEngine + `__ method. name (:class:`str`): Required. Full resource name of - [Engine][google.cloud.discoveryengine.v1alpha.Engine], + `Engine + `__, such as ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}``. - If the caller does not have permission to delete the - [Engine][google.cloud.discoveryengine.v1alpha.Engine], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to delete the `Engine + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. - If the - [Engine][google.cloud.discoveryengine.v1alpha.Engine] to - delete does not exist, a NOT_FOUND error is returned. + If the `Engine + `__ + to delete does not exist, a NOT_FOUND + error is returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -537,18 +553,21 @@ async def sample_delete_engine(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.protobuf.empty_pb2.Empty` A generic empty message that you can re-use to avoid defining duplicated - empty messages in your APIs. A typical example is to - use it as the request or the response type of an API - method. For instance: - - service Foo { - rpc Bar(google.protobuf.Empty) returns - (google.protobuf.Empty); - - } + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.protobuf.empty_pb2.Empty` + A generic empty message that you can + re-use to avoid defining duplicated + empty messages in your APIs. A typical + example is to use it as the request or + the response type of an API method. For + instance: + + service Foo { + rpc Bar(google.protobuf.Empty) + returns (google.protobuf.Empty); } """ # Create or coerce a protobuf request object. @@ -618,7 +637,8 @@ async def update_engine( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> gcd_engine.Engine: - r"""Updates an [Engine][google.cloud.discoveryengine.v1alpha.Engine] + r"""Updates an `Engine + `__ .. code-block:: python @@ -653,32 +673,37 @@ async def sample_update_engine(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.UpdateEngineRequest, dict]]): The request object. Request message for - [EngineService.UpdateEngine][google.cloud.discoveryengine.v1alpha.EngineService.UpdateEngine] + `EngineService.UpdateEngine + `__ method. engine (:class:`google.cloud.discoveryengine_v1alpha.types.Engine`): - Required. The - [Engine][google.cloud.discoveryengine.v1alpha.Engine] to - update. + Required. The `Engine + `__ + to update. - If the caller does not have permission to update the - [Engine][google.cloud.discoveryengine.v1alpha.Engine], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to update the `Engine + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. - If the - [Engine][google.cloud.discoveryengine.v1alpha.Engine] to - update does not exist, a NOT_FOUND error is returned. + If the `Engine + `__ + to update does not exist, a NOT_FOUND + error is returned. This corresponds to the ``engine`` field on the ``request`` instance; if ``request`` is provided, this should not be set. update_mask (:class:`google.protobuf.field_mask_pb2.FieldMask`): Indicates which fields in the provided - [Engine][google.cloud.discoveryengine.v1alpha.Engine] to - update. + `Engine + `__ + to update. - If an unsupported or unknown field is provided, an - INVALID_ARGUMENT error is returned. + If an unsupported or unknown field is + provided, an INVALID_ARGUMENT error is + returned. This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this @@ -693,8 +718,9 @@ async def sample_update_engine(): Returns: google.cloud.discoveryengine_v1alpha.types.Engine: - Metadata that describes the training and serving parameters of an - [Engine][google.cloud.discoveryengine.v1alpha.Engine]. + Metadata that describes the training and + serving parameters of an `Engine + `__. """ # Create or coerce a protobuf request object. @@ -759,7 +785,8 @@ async def get_engine( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> engine.Engine: - r"""Gets a [Engine][google.cloud.discoveryengine.v1alpha.Engine]. + r"""Gets a `Engine + `__. .. code-block:: python @@ -790,11 +817,13 @@ async def sample_get_engine(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.GetEngineRequest, dict]]): The request object. Request message for - [EngineService.GetEngine][google.cloud.discoveryengine.v1alpha.EngineService.GetEngine] + `EngineService.GetEngine + `__ method. name (:class:`str`): Required. Full resource name of - [Engine][google.cloud.discoveryengine.v1alpha.Engine], + `Engine + `__, such as ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}``. @@ -811,8 +840,9 @@ async def sample_get_engine(): Returns: google.cloud.discoveryengine_v1alpha.types.Engine: - Metadata that describes the training and serving parameters of an - [Engine][google.cloud.discoveryengine.v1alpha.Engine]. + Metadata that describes the training and + serving parameters of an `Engine + `__. """ # Create or coerce a protobuf request object. @@ -873,8 +903,8 @@ async def list_engines( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListEnginesAsyncPager: - r"""Lists all the - [Engine][google.cloud.discoveryengine.v1alpha.Engine]s + r"""Lists all the `Engine + `__s associated with the project. .. code-block:: python @@ -907,10 +937,12 @@ async def sample_list_engines(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.ListEnginesRequest, dict]]): The request object. Request message for - [EngineService.ListEngines][google.cloud.discoveryengine.v1alpha.EngineService.ListEngines] + `EngineService.ListEngines + `__ method. parent (:class:`str`): - Required. The parent resource name, such as + Required. The parent resource name, such + as ``projects/{project}/locations/{location}/collections/{collection_id}``. This corresponds to the ``parent`` field @@ -927,11 +959,13 @@ async def sample_list_engines(): Returns: google.cloud.discoveryengine_v1alpha.services.engine_service.pagers.ListEnginesAsyncPager: Response message for - [EngineService.ListEngines][google.cloud.discoveryengine.v1alpha.EngineService.ListEngines] - method. + `EngineService.ListEngines + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -1003,10 +1037,11 @@ async def pause_engine( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> engine.Engine: - r"""Pauses the training of an existing engine. Only applicable if - [SolutionType][google.cloud.discoveryengine.v1alpha.SolutionType] - is - [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. + r"""Pauses the training of an existing engine. Only + applicable if `SolutionType + `__ + is `SOLUTION_TYPE_RECOMMENDATION + `__. .. code-block:: python @@ -1039,7 +1074,9 @@ async def sample_pause_engine(): The request object. Request for pausing training of an engine. name (:class:`str`): - Required. The name of the engine to pause. Format: + Required. The name of the engine to + pause. Format: + ``projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`` This corresponds to the ``name`` field @@ -1055,8 +1092,9 @@ async def sample_pause_engine(): Returns: google.cloud.discoveryengine_v1alpha.types.Engine: - Metadata that describes the training and serving parameters of an - [Engine][google.cloud.discoveryengine.v1alpha.Engine]. + Metadata that describes the training and + serving parameters of an `Engine + `__. """ # Create or coerce a protobuf request object. @@ -1117,10 +1155,11 @@ async def resume_engine( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> engine.Engine: - r"""Resumes the training of an existing engine. Only applicable if - [SolutionType][google.cloud.discoveryengine.v1alpha.SolutionType] - is - [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. + r"""Resumes the training of an existing engine. Only + applicable if `SolutionType + `__ + is `SOLUTION_TYPE_RECOMMENDATION + `__. .. code-block:: python @@ -1153,7 +1192,9 @@ async def sample_resume_engine(): The request object. Request for resuming training of an engine. name (:class:`str`): - Required. The name of the engine to resume. Format: + Required. The name of the engine to + resume. Format: + ``projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`` This corresponds to the ``name`` field @@ -1169,8 +1210,9 @@ async def sample_resume_engine(): Returns: google.cloud.discoveryengine_v1alpha.types.Engine: - Metadata that describes the training and serving parameters of an - [Engine][google.cloud.discoveryengine.v1alpha.Engine]. + Metadata that describes the training and + serving parameters of an `Engine + `__. """ # Create or coerce a protobuf request object. @@ -1232,9 +1274,10 @@ async def tune_engine( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: r"""Tunes an existing engine. Only applicable if - [SolutionType][google.cloud.discoveryengine.v1alpha.SolutionType] - is - [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. + `SolutionType + `__ + is `SOLUTION_TYPE_RECOMMENDATION + `__. .. code-block:: python @@ -1273,8 +1316,9 @@ async def sample_tune_engine(): periodically scheduled tuning to happen). name (:class:`str`): - Required. The resource name of the engine to tune. - Format: + Required. The resource name of the + engine to tune. Format: + ``projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`` This corresponds to the ``name`` field @@ -1290,11 +1334,13 @@ async def sample_tune_engine(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be + An object representing a long-running + operation. + The result type for the operation will + be :class:`google.cloud.discoveryengine_v1alpha.types.TuneEngineResponse` - Response associated with a tune operation. + Response associated with a tune + operation. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/engine_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/engine_service/client.py index 17e5127261d5..d88538f24bc1 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/engine_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/engine_service/client.py @@ -117,8 +117,8 @@ def get_transport_class( class EngineServiceClient(metaclass=EngineServiceClientMeta): - """Service for managing - [Engine][google.cloud.discoveryengine.v1alpha.Engine] configuration. + """Service for managing `Engine + `__ configuration. """ @staticmethod @@ -776,7 +776,8 @@ def create_engine( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: - r"""Creates a [Engine][google.cloud.discoveryengine.v1alpha.Engine]. + r"""Creates a `Engine + `__. .. code-block:: python @@ -817,34 +818,40 @@ def sample_create_engine(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.CreateEngineRequest, dict]): The request object. Request for - [EngineService.CreateEngine][google.cloud.discoveryengine.v1alpha.EngineService.CreateEngine] + `EngineService.CreateEngine + `__ method. parent (str): - Required. The parent resource name, such as + Required. The parent resource name, such + as ``projects/{project}/locations/{location}/collections/{collection}``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. engine (google.cloud.discoveryengine_v1alpha.types.Engine): - Required. The - [Engine][google.cloud.discoveryengine.v1alpha.Engine] to - create. + Required. The `Engine + `__ + to create. This corresponds to the ``engine`` field on the ``request`` instance; if ``request`` is provided, this should not be set. engine_id (str): Required. The ID to use for the - [Engine][google.cloud.discoveryengine.v1alpha.Engine], - which will become the final component of the - [Engine][google.cloud.discoveryengine.v1alpha.Engine]'s + `Engine + `__, + which will become the final component of + the + `Engine + `__'s resource name. - This field must conform to - `RFC-1034 `__ - standard with a length limit of 63 characters. - Otherwise, an INVALID_ARGUMENT error is returned. + This field must conform to `RFC-1034 + `__ + standard with a length limit of 63 + characters. Otherwise, an + INVALID_ARGUMENT error is returned. This corresponds to the ``engine_id`` field on the ``request`` instance; if ``request`` is provided, this @@ -859,10 +866,14 @@ def sample_create_engine(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1alpha.types.Engine` Metadata that describes the training and serving parameters of an - [Engine][google.cloud.discoveryengine.v1alpha.Engine]. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1alpha.types.Engine` + Metadata that describes the training and + serving parameters of an `Engine + `__. """ # Create or coerce a protobuf request object. @@ -932,7 +943,8 @@ def delete_engine( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: - r"""Deletes a [Engine][google.cloud.discoveryengine.v1alpha.Engine]. + r"""Deletes a `Engine + `__. .. code-block:: python @@ -967,22 +979,26 @@ def sample_delete_engine(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.DeleteEngineRequest, dict]): The request object. Request message for - [EngineService.DeleteEngine][google.cloud.discoveryengine.v1alpha.EngineService.DeleteEngine] + `EngineService.DeleteEngine + `__ method. name (str): Required. Full resource name of - [Engine][google.cloud.discoveryengine.v1alpha.Engine], + `Engine + `__, such as ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}``. - If the caller does not have permission to delete the - [Engine][google.cloud.discoveryengine.v1alpha.Engine], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to delete the `Engine + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. - If the - [Engine][google.cloud.discoveryengine.v1alpha.Engine] to - delete does not exist, a NOT_FOUND error is returned. + If the `Engine + `__ + to delete does not exist, a NOT_FOUND + error is returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -997,18 +1013,21 @@ def sample_delete_engine(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.protobuf.empty_pb2.Empty` A generic empty message that you can re-use to avoid defining duplicated - empty messages in your APIs. A typical example is to - use it as the request or the response type of an API - method. For instance: - - service Foo { - rpc Bar(google.protobuf.Empty) returns - (google.protobuf.Empty); - - } + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.protobuf.empty_pb2.Empty` + A generic empty message that you can + re-use to avoid defining duplicated + empty messages in your APIs. A typical + example is to use it as the request or + the response type of an API method. For + instance: + + service Foo { + rpc Bar(google.protobuf.Empty) + returns (google.protobuf.Empty); } """ # Create or coerce a protobuf request object. @@ -1075,7 +1094,8 @@ def update_engine( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> gcd_engine.Engine: - r"""Updates an [Engine][google.cloud.discoveryengine.v1alpha.Engine] + r"""Updates an `Engine + `__ .. code-block:: python @@ -1110,32 +1130,37 @@ def sample_update_engine(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.UpdateEngineRequest, dict]): The request object. Request message for - [EngineService.UpdateEngine][google.cloud.discoveryengine.v1alpha.EngineService.UpdateEngine] + `EngineService.UpdateEngine + `__ method. engine (google.cloud.discoveryengine_v1alpha.types.Engine): - Required. The - [Engine][google.cloud.discoveryengine.v1alpha.Engine] to - update. + Required. The `Engine + `__ + to update. - If the caller does not have permission to update the - [Engine][google.cloud.discoveryengine.v1alpha.Engine], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to update the `Engine + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. - If the - [Engine][google.cloud.discoveryengine.v1alpha.Engine] to - update does not exist, a NOT_FOUND error is returned. + If the `Engine + `__ + to update does not exist, a NOT_FOUND + error is returned. This corresponds to the ``engine`` field on the ``request`` instance; if ``request`` is provided, this should not be set. update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided - [Engine][google.cloud.discoveryengine.v1alpha.Engine] to - update. + `Engine + `__ + to update. - If an unsupported or unknown field is provided, an - INVALID_ARGUMENT error is returned. + If an unsupported or unknown field is + provided, an INVALID_ARGUMENT error is + returned. This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this @@ -1150,8 +1175,9 @@ def sample_update_engine(): Returns: google.cloud.discoveryengine_v1alpha.types.Engine: - Metadata that describes the training and serving parameters of an - [Engine][google.cloud.discoveryengine.v1alpha.Engine]. + Metadata that describes the training and + serving parameters of an `Engine + `__. """ # Create or coerce a protobuf request object. @@ -1213,7 +1239,8 @@ def get_engine( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> engine.Engine: - r"""Gets a [Engine][google.cloud.discoveryengine.v1alpha.Engine]. + r"""Gets a `Engine + `__. .. code-block:: python @@ -1244,11 +1271,13 @@ def sample_get_engine(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.GetEngineRequest, dict]): The request object. Request message for - [EngineService.GetEngine][google.cloud.discoveryengine.v1alpha.EngineService.GetEngine] + `EngineService.GetEngine + `__ method. name (str): Required. Full resource name of - [Engine][google.cloud.discoveryengine.v1alpha.Engine], + `Engine + `__, such as ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}``. @@ -1265,8 +1294,9 @@ def sample_get_engine(): Returns: google.cloud.discoveryengine_v1alpha.types.Engine: - Metadata that describes the training and serving parameters of an - [Engine][google.cloud.discoveryengine.v1alpha.Engine]. + Metadata that describes the training and + serving parameters of an `Engine + `__. """ # Create or coerce a protobuf request object. @@ -1324,8 +1354,8 @@ def list_engines( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListEnginesPager: - r"""Lists all the - [Engine][google.cloud.discoveryengine.v1alpha.Engine]s + r"""Lists all the `Engine + `__s associated with the project. .. code-block:: python @@ -1358,10 +1388,12 @@ def sample_list_engines(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.ListEnginesRequest, dict]): The request object. Request message for - [EngineService.ListEngines][google.cloud.discoveryengine.v1alpha.EngineService.ListEngines] + `EngineService.ListEngines + `__ method. parent (str): - Required. The parent resource name, such as + Required. The parent resource name, such + as ``projects/{project}/locations/{location}/collections/{collection_id}``. This corresponds to the ``parent`` field @@ -1378,11 +1410,13 @@ def sample_list_engines(): Returns: google.cloud.discoveryengine_v1alpha.services.engine_service.pagers.ListEnginesPager: Response message for - [EngineService.ListEngines][google.cloud.discoveryengine.v1alpha.EngineService.ListEngines] - method. + `EngineService.ListEngines + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -1451,10 +1485,11 @@ def pause_engine( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> engine.Engine: - r"""Pauses the training of an existing engine. Only applicable if - [SolutionType][google.cloud.discoveryengine.v1alpha.SolutionType] - is - [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. + r"""Pauses the training of an existing engine. Only + applicable if `SolutionType + `__ + is `SOLUTION_TYPE_RECOMMENDATION + `__. .. code-block:: python @@ -1487,7 +1522,9 @@ def sample_pause_engine(): The request object. Request for pausing training of an engine. name (str): - Required. The name of the engine to pause. Format: + Required. The name of the engine to + pause. Format: + ``projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`` This corresponds to the ``name`` field @@ -1503,8 +1540,9 @@ def sample_pause_engine(): Returns: google.cloud.discoveryengine_v1alpha.types.Engine: - Metadata that describes the training and serving parameters of an - [Engine][google.cloud.discoveryengine.v1alpha.Engine]. + Metadata that describes the training and + serving parameters of an `Engine + `__. """ # Create or coerce a protobuf request object. @@ -1562,10 +1600,11 @@ def resume_engine( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> engine.Engine: - r"""Resumes the training of an existing engine. Only applicable if - [SolutionType][google.cloud.discoveryengine.v1alpha.SolutionType] - is - [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. + r"""Resumes the training of an existing engine. Only + applicable if `SolutionType + `__ + is `SOLUTION_TYPE_RECOMMENDATION + `__. .. code-block:: python @@ -1598,7 +1637,9 @@ def sample_resume_engine(): The request object. Request for resuming training of an engine. name (str): - Required. The name of the engine to resume. Format: + Required. The name of the engine to + resume. Format: + ``projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`` This corresponds to the ``name`` field @@ -1614,8 +1655,9 @@ def sample_resume_engine(): Returns: google.cloud.discoveryengine_v1alpha.types.Engine: - Metadata that describes the training and serving parameters of an - [Engine][google.cloud.discoveryengine.v1alpha.Engine]. + Metadata that describes the training and + serving parameters of an `Engine + `__. """ # Create or coerce a protobuf request object. @@ -1674,9 +1716,10 @@ def tune_engine( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: r"""Tunes an existing engine. Only applicable if - [SolutionType][google.cloud.discoveryengine.v1alpha.SolutionType] - is - [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. + `SolutionType + `__ + is `SOLUTION_TYPE_RECOMMENDATION + `__. .. code-block:: python @@ -1715,8 +1758,9 @@ def sample_tune_engine(): periodically scheduled tuning to happen). name (str): - Required. The resource name of the engine to tune. - Format: + Required. The resource name of the + engine to tune. Format: + ``projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`` This corresponds to the ``name`` field @@ -1732,11 +1776,13 @@ def sample_tune_engine(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be + An object representing a long-running + operation. + The result type for the operation will + be :class:`google.cloud.discoveryengine_v1alpha.types.TuneEngineResponse` - Response associated with a tune operation. + Response associated with a tune + operation. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/engine_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/engine_service/transports/base.py index 3150765e8df8..b67a19088c40 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/engine_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/engine_service/transports/base.py @@ -86,8 +86,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -102,11 +100,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/engine_service/transports/grpc.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/engine_service/transports/grpc.py index 804660e8de71..1161ed72317a 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/engine_service/transports/grpc.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/engine_service/transports/grpc.py @@ -114,8 +114,8 @@ def intercept_unary_unary(self, continuation, client_call_details, request): class EngineServiceGrpcTransport(EngineServiceTransport): """gRPC backend transport for EngineService. - Service for managing - [Engine][google.cloud.discoveryengine.v1alpha.Engine] configuration. + Service for managing `Engine + `__ configuration. This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -349,7 +349,8 @@ def create_engine( ) -> Callable[[engine_service.CreateEngineRequest], operations_pb2.Operation]: r"""Return a callable for the create engine method over gRPC. - Creates a [Engine][google.cloud.discoveryengine.v1alpha.Engine]. + Creates a `Engine + `__. Returns: Callable[[~.CreateEngineRequest], @@ -375,7 +376,8 @@ def delete_engine( ) -> Callable[[engine_service.DeleteEngineRequest], operations_pb2.Operation]: r"""Return a callable for the delete engine method over gRPC. - Deletes a [Engine][google.cloud.discoveryengine.v1alpha.Engine]. + Deletes a `Engine + `__. Returns: Callable[[~.DeleteEngineRequest], @@ -401,7 +403,8 @@ def update_engine( ) -> Callable[[engine_service.UpdateEngineRequest], gcd_engine.Engine]: r"""Return a callable for the update engine method over gRPC. - Updates an [Engine][google.cloud.discoveryengine.v1alpha.Engine] + Updates an `Engine + `__ Returns: Callable[[~.UpdateEngineRequest], @@ -425,7 +428,8 @@ def update_engine( def get_engine(self) -> Callable[[engine_service.GetEngineRequest], engine.Engine]: r"""Return a callable for the get engine method over gRPC. - Gets a [Engine][google.cloud.discoveryengine.v1alpha.Engine]. + Gets a `Engine + `__. Returns: Callable[[~.GetEngineRequest], @@ -453,8 +457,8 @@ def list_engines( ]: r"""Return a callable for the list engines method over gRPC. - Lists all the - [Engine][google.cloud.discoveryengine.v1alpha.Engine]s + Lists all the `Engine + `__s associated with the project. Returns: @@ -481,10 +485,11 @@ def pause_engine( ) -> Callable[[engine_service.PauseEngineRequest], engine.Engine]: r"""Return a callable for the pause engine method over gRPC. - Pauses the training of an existing engine. Only applicable if - [SolutionType][google.cloud.discoveryengine.v1alpha.SolutionType] - is - [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. + Pauses the training of an existing engine. Only + applicable if `SolutionType + `__ + is `SOLUTION_TYPE_RECOMMENDATION + `__. Returns: Callable[[~.PauseEngineRequest], @@ -510,10 +515,11 @@ def resume_engine( ) -> Callable[[engine_service.ResumeEngineRequest], engine.Engine]: r"""Return a callable for the resume engine method over gRPC. - Resumes the training of an existing engine. Only applicable if - [SolutionType][google.cloud.discoveryengine.v1alpha.SolutionType] - is - [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. + Resumes the training of an existing engine. Only + applicable if `SolutionType + `__ + is `SOLUTION_TYPE_RECOMMENDATION + `__. Returns: Callable[[~.ResumeEngineRequest], @@ -540,9 +546,10 @@ def tune_engine( r"""Return a callable for the tune engine method over gRPC. Tunes an existing engine. Only applicable if - [SolutionType][google.cloud.discoveryengine.v1alpha.SolutionType] - is - [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. + `SolutionType + `__ + is `SOLUTION_TYPE_RECOMMENDATION + `__. Returns: Callable[[~.TuneEngineRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/engine_service/transports/grpc_asyncio.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/engine_service/transports/grpc_asyncio.py index e31cf83803e6..4a792da829de 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/engine_service/transports/grpc_asyncio.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/engine_service/transports/grpc_asyncio.py @@ -120,8 +120,8 @@ async def intercept_unary_unary(self, continuation, client_call_details, request class EngineServiceGrpcAsyncIOTransport(EngineServiceTransport): """gRPC AsyncIO backend transport for EngineService. - Service for managing - [Engine][google.cloud.discoveryengine.v1alpha.Engine] configuration. + Service for managing `Engine + `__ configuration. This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -359,7 +359,8 @@ def create_engine( ]: r"""Return a callable for the create engine method over gRPC. - Creates a [Engine][google.cloud.discoveryengine.v1alpha.Engine]. + Creates a `Engine + `__. Returns: Callable[[~.CreateEngineRequest], @@ -387,7 +388,8 @@ def delete_engine( ]: r"""Return a callable for the delete engine method over gRPC. - Deletes a [Engine][google.cloud.discoveryengine.v1alpha.Engine]. + Deletes a `Engine + `__. Returns: Callable[[~.DeleteEngineRequest], @@ -413,7 +415,8 @@ def update_engine( ) -> Callable[[engine_service.UpdateEngineRequest], Awaitable[gcd_engine.Engine]]: r"""Return a callable for the update engine method over gRPC. - Updates an [Engine][google.cloud.discoveryengine.v1alpha.Engine] + Updates an `Engine + `__ Returns: Callable[[~.UpdateEngineRequest], @@ -439,7 +442,8 @@ def get_engine( ) -> Callable[[engine_service.GetEngineRequest], Awaitable[engine.Engine]]: r"""Return a callable for the get engine method over gRPC. - Gets a [Engine][google.cloud.discoveryengine.v1alpha.Engine]. + Gets a `Engine + `__. Returns: Callable[[~.GetEngineRequest], @@ -468,8 +472,8 @@ def list_engines( ]: r"""Return a callable for the list engines method over gRPC. - Lists all the - [Engine][google.cloud.discoveryengine.v1alpha.Engine]s + Lists all the `Engine + `__s associated with the project. Returns: @@ -496,10 +500,11 @@ def pause_engine( ) -> Callable[[engine_service.PauseEngineRequest], Awaitable[engine.Engine]]: r"""Return a callable for the pause engine method over gRPC. - Pauses the training of an existing engine. Only applicable if - [SolutionType][google.cloud.discoveryengine.v1alpha.SolutionType] - is - [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. + Pauses the training of an existing engine. Only + applicable if `SolutionType + `__ + is `SOLUTION_TYPE_RECOMMENDATION + `__. Returns: Callable[[~.PauseEngineRequest], @@ -525,10 +530,11 @@ def resume_engine( ) -> Callable[[engine_service.ResumeEngineRequest], Awaitable[engine.Engine]]: r"""Return a callable for the resume engine method over gRPC. - Resumes the training of an existing engine. Only applicable if - [SolutionType][google.cloud.discoveryengine.v1alpha.SolutionType] - is - [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. + Resumes the training of an existing engine. Only + applicable if `SolutionType + `__ + is `SOLUTION_TYPE_RECOMMENDATION + `__. Returns: Callable[[~.ResumeEngineRequest], @@ -557,9 +563,10 @@ def tune_engine( r"""Return a callable for the tune engine method over gRPC. Tunes an existing engine. Only applicable if - [SolutionType][google.cloud.discoveryengine.v1alpha.SolutionType] - is - [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. + `SolutionType + `__ + is `SOLUTION_TYPE_RECOMMENDATION + `__. Returns: Callable[[~.TuneEngineRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/engine_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/engine_service/transports/rest.py index ebf00ce3ec1e..8cadaca0a949 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/engine_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/engine_service/transports/rest.py @@ -602,8 +602,8 @@ class EngineServiceRestStub: class EngineServiceRestTransport(_BaseEngineServiceRestTransport): """REST backend synchronous transport for EngineService. - Service for managing - [Engine][google.cloud.discoveryengine.v1alpha.Engine] configuration. + Service for managing `Engine + `__ configuration. This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -895,7 +895,8 @@ def __call__( Args: request (~.engine_service.CreateEngineRequest): The request object. Request for - [EngineService.CreateEngine][google.cloud.discoveryengine.v1alpha.EngineService.CreateEngine] + `EngineService.CreateEngine + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1047,7 +1048,8 @@ def __call__( Args: request (~.engine_service.DeleteEngineRequest): The request object. Request message for - [EngineService.DeleteEngine][google.cloud.discoveryengine.v1alpha.EngineService.DeleteEngine] + `EngineService.DeleteEngine + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1194,7 +1196,8 @@ def __call__( Args: request (~.engine_service.GetEngineRequest): The request object. Request message for - [EngineService.GetEngine][google.cloud.discoveryengine.v1alpha.EngineService.GetEngine] + `EngineService.GetEngine + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1206,9 +1209,9 @@ def __call__( Returns: ~.engine.Engine: - Metadata that describes the training and serving - parameters of an - [Engine][google.cloud.discoveryengine.v1alpha.Engine]. + Metadata that describes the training and + serving parameters of an `Engine + `__. """ @@ -1347,7 +1350,8 @@ def __call__( Args: request (~.engine_service.ListEnginesRequest): The request object. Request message for - [EngineService.ListEngines][google.cloud.discoveryengine.v1alpha.EngineService.ListEngines] + `EngineService.ListEngines + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1360,7 +1364,8 @@ def __call__( Returns: ~.engine_service.ListEnginesResponse: Response message for - [EngineService.ListEngines][google.cloud.discoveryengine.v1alpha.EngineService.ListEngines] + `EngineService.ListEngines + `__ method. """ @@ -1512,9 +1517,9 @@ def __call__( Returns: ~.engine.Engine: - Metadata that describes the training and serving - parameters of an - [Engine][google.cloud.discoveryengine.v1alpha.Engine]. + Metadata that describes the training and + serving parameters of an `Engine + `__. """ @@ -1670,9 +1675,9 @@ def __call__( Returns: ~.engine.Engine: - Metadata that describes the training and serving - parameters of an - [Engine][google.cloud.discoveryengine.v1alpha.Engine]. + Metadata that describes the training and + serving parameters of an `Engine + `__. """ @@ -1973,7 +1978,8 @@ def __call__( Args: request (~.engine_service.UpdateEngineRequest): The request object. Request message for - [EngineService.UpdateEngine][google.cloud.discoveryengine.v1alpha.EngineService.UpdateEngine] + `EngineService.UpdateEngine + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1985,9 +1991,9 @@ def __call__( Returns: ~.gcd_engine.Engine: - Metadata that describes the training and serving - parameters of an - [Engine][google.cloud.discoveryengine.v1alpha.Engine]. + Metadata that describes the training and + serving parameters of an `Engine + `__. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/estimate_billing_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/estimate_billing_service/async_client.py index 55863e8bcacd..a02790682e5a 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/estimate_billing_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/estimate_billing_service/async_client.py @@ -342,7 +342,8 @@ async def sample_estimate_data_size(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.EstimateDataSizeRequest, dict]]): The request object. Request message for - [EstimateBillingService.EstimateDataSize][google.cloud.discoveryengine.v1alpha.EstimateBillingService.EstimateDataSize] + `EstimateBillingService.EstimateDataSize + `__ method retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -354,13 +355,17 @@ async def sample_estimate_data_size(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1alpha.types.EstimateDataSizeResponse` Response of the EstimateDataSize request. If the long running - operation was successful, then this message is - returned by the - google.longrunning.Operations.response field if the - operation was successful. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1alpha.types.EstimateDataSizeResponse` + Response of the EstimateDataSize + request. If the long running operation + was successful, then this message is + returned by the + google.longrunning.Operations.response + field if the operation was successful. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/estimate_billing_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/estimate_billing_service/client.py index 6ba450291b1b..7a8b65f0976d 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/estimate_billing_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/estimate_billing_service/client.py @@ -779,7 +779,8 @@ def sample_estimate_data_size(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.EstimateDataSizeRequest, dict]): The request object. Request message for - [EstimateBillingService.EstimateDataSize][google.cloud.discoveryengine.v1alpha.EstimateBillingService.EstimateDataSize] + `EstimateBillingService.EstimateDataSize + `__ method retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -791,13 +792,17 @@ def sample_estimate_data_size(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1alpha.types.EstimateDataSizeResponse` Response of the EstimateDataSize request. If the long running - operation was successful, then this message is - returned by the - google.longrunning.Operations.response field if the - operation was successful. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1alpha.types.EstimateDataSizeResponse` + Response of the EstimateDataSize + request. If the long running operation + was successful, then this message is + returned by the + google.longrunning.Operations.response + field if the operation was successful. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/estimate_billing_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/estimate_billing_service/transports/base.py index db8681250764..af03ce1f2ae2 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/estimate_billing_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/estimate_billing_service/transports/base.py @@ -84,8 +84,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -100,11 +98,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/estimate_billing_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/estimate_billing_service/transports/rest.py index 399c5d25dd0d..cc5cf9161298 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/estimate_billing_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/estimate_billing_service/transports/rest.py @@ -514,7 +514,8 @@ def __call__( Args: request (~.estimate_billing_service.EstimateDataSizeRequest): The request object. Request message for - [EstimateBillingService.EstimateDataSize][google.cloud.discoveryengine.v1alpha.EstimateBillingService.EstimateDataSize] + `EstimateBillingService.EstimateDataSize + `__ method retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/evaluation_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/evaluation_service/async_client.py index 27c72b9a272a..54174e68e70c 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/evaluation_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/evaluation_service/async_client.py @@ -72,7 +72,8 @@ class EvaluationServiceAsyncClient: """Service for managing - [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation]s, + `Evaluation + `__s, """ _client: EvaluationServiceClient @@ -331,8 +332,8 @@ async def get_evaluation( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> evaluation.Evaluation: - r"""Gets a - [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation]. + r"""Gets a `Evaluation + `__. .. code-block:: python @@ -363,22 +364,27 @@ async def sample_get_evaluation(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.GetEvaluationRequest, dict]]): The request object. Request message for - [EvaluationService.GetEvaluation][google.cloud.discoveryengine.v1alpha.EvaluationService.GetEvaluation] + `EvaluationService.GetEvaluation + `__ method. name (:class:`str`): Required. Full resource name of - [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation], + `Evaluation + `__, such as ``projects/{project}/locations/{location}/evaluations/{evaluation}``. - If the caller does not have permission to access the - [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to access the `Evaluation + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. If the requested - [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation] - does not exist, a NOT_FOUND error is returned. + `Evaluation + `__ + does not exist, a NOT_FOUND error is + returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -460,7 +466,8 @@ async def list_evaluations( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListEvaluationsAsyncPager: r"""Gets a list of - [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation]s. + `Evaluation + `__s. .. code-block:: python @@ -492,17 +499,20 @@ async def sample_list_evaluations(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.ListEvaluationsRequest, dict]]): The request object. Request message for - [EvaluationService.ListEvaluations][google.cloud.discoveryengine.v1alpha.EvaluationService.ListEvaluations] + `EvaluationService.ListEvaluations + `__ method. parent (:class:`str`): - Required. The parent location resource name, such as + Required. The parent location resource + name, such as ``projects/{project}/locations/{location}``. - If the caller does not have permission to list - [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation]s - under this location, regardless of whether or not this - location exists, a ``PERMISSION_DENIED`` error is - returned. + If the caller does not have permission + to list `Evaluation + `__s + under this location, regardless of + whether or not this location exists, a + ``PERMISSION_DENIED`` error is returned. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -518,11 +528,13 @@ async def sample_list_evaluations(): Returns: google.cloud.discoveryengine_v1alpha.services.evaluation_service.pagers.ListEvaluationsAsyncPager: Response message for - [EvaluationService.ListEvaluations][google.cloud.discoveryengine.v1alpha.EvaluationService.ListEvaluations] - method. + `EvaluationService.ListEvaluations + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -597,11 +609,10 @@ async def create_evaluation( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: - r"""Creates a - [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation]. - - Upon creation, the evaluation will be automatically triggered - and begin execution. + r"""Creates a `Evaluation + `__. + Upon creation, the evaluation will be automatically + triggered and begin execution. .. code-block:: python @@ -641,18 +652,20 @@ async def sample_create_evaluation(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.CreateEvaluationRequest, dict]]): The request object. Request message for - [EvaluationService.CreateEvaluation][google.cloud.discoveryengine.v1alpha.EvaluationService.CreateEvaluation] + `EvaluationService.CreateEvaluation + `__ method. parent (:class:`str`): - Required. The parent resource name, such as + Required. The parent resource name, such + as ``projects/{project}/locations/{location}``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. evaluation (:class:`google.cloud.discoveryengine_v1alpha.types.Evaluation`): - Required. The - [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation] + Required. The `Evaluation + `__ to create. This corresponds to the ``evaluation`` field @@ -668,11 +681,15 @@ async def sample_create_evaluation(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1alpha.types.Evaluation` An evaluation is a single execution (or run) of an evaluation process. It - encapsulates the state of the evaluation and the - resulting data. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1alpha.types.Evaluation` + An evaluation is a single execution (or + run) of an evaluation process. It + encapsulates the state of the evaluation + and the resulting data. """ # Create or coerce a protobuf request object. @@ -746,7 +763,8 @@ async def list_evaluation_results( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListEvaluationResultsAsyncPager: r"""Gets a list of results for a given a - [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation]. + `Evaluation + `__. .. code-block:: python @@ -778,15 +796,18 @@ async def sample_list_evaluation_results(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.ListEvaluationResultsRequest, dict]]): The request object. Request message for - [EvaluationService.ListEvaluationResults][google.cloud.discoveryengine.v1alpha.EvaluationService.ListEvaluationResults] + `EvaluationService.ListEvaluationResults + `__ method. evaluation (:class:`str`): - Required. The evaluation resource name, such as + Required. The evaluation resource name, + such as ``projects/{project}/locations/{location}/evaluations/{evaluation}``. - If the caller does not have permission to list - [EvaluationResult][] under this evaluation, regardless - of whether or not this evaluation set exists, a + If the caller does not have permission + to list [EvaluationResult][] under this + evaluation, regardless of whether or not + this evaluation set exists, a ``PERMISSION_DENIED`` error is returned. This corresponds to the ``evaluation`` field @@ -803,11 +824,13 @@ async def sample_list_evaluation_results(): Returns: google.cloud.discoveryengine_v1alpha.services.evaluation_service.pagers.ListEvaluationResultsAsyncPager: Response message for - [EvaluationService.ListEvaluationResults][google.cloud.discoveryengine.v1alpha.EvaluationService.ListEvaluationResults] - method. + `EvaluationService.ListEvaluationResults + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/evaluation_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/evaluation_service/client.py index 4c4f7733e6f6..006a3c4eba87 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/evaluation_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/evaluation_service/client.py @@ -118,7 +118,8 @@ def get_transport_class( class EvaluationServiceClient(metaclass=EvaluationServiceClientMeta): """Service for managing - [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation]s, + `Evaluation + `__s, """ @staticmethod @@ -912,8 +913,8 @@ def get_evaluation( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> evaluation.Evaluation: - r"""Gets a - [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation]. + r"""Gets a `Evaluation + `__. .. code-block:: python @@ -944,22 +945,27 @@ def sample_get_evaluation(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.GetEvaluationRequest, dict]): The request object. Request message for - [EvaluationService.GetEvaluation][google.cloud.discoveryengine.v1alpha.EvaluationService.GetEvaluation] + `EvaluationService.GetEvaluation + `__ method. name (str): Required. Full resource name of - [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation], + `Evaluation + `__, such as ``projects/{project}/locations/{location}/evaluations/{evaluation}``. - If the caller does not have permission to access the - [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to access the `Evaluation + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. If the requested - [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation] - does not exist, a NOT_FOUND error is returned. + `Evaluation + `__ + does not exist, a NOT_FOUND error is + returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1038,7 +1044,8 @@ def list_evaluations( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListEvaluationsPager: r"""Gets a list of - [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation]s. + `Evaluation + `__s. .. code-block:: python @@ -1070,17 +1077,20 @@ def sample_list_evaluations(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.ListEvaluationsRequest, dict]): The request object. Request message for - [EvaluationService.ListEvaluations][google.cloud.discoveryengine.v1alpha.EvaluationService.ListEvaluations] + `EvaluationService.ListEvaluations + `__ method. parent (str): - Required. The parent location resource name, such as + Required. The parent location resource + name, such as ``projects/{project}/locations/{location}``. - If the caller does not have permission to list - [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation]s - under this location, regardless of whether or not this - location exists, a ``PERMISSION_DENIED`` error is - returned. + If the caller does not have permission + to list `Evaluation + `__s + under this location, regardless of + whether or not this location exists, a + ``PERMISSION_DENIED`` error is returned. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -1096,11 +1106,13 @@ def sample_list_evaluations(): Returns: google.cloud.discoveryengine_v1alpha.services.evaluation_service.pagers.ListEvaluationsPager: Response message for - [EvaluationService.ListEvaluations][google.cloud.discoveryengine.v1alpha.EvaluationService.ListEvaluations] - method. + `EvaluationService.ListEvaluations + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -1172,11 +1184,10 @@ def create_evaluation( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: - r"""Creates a - [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation]. - - Upon creation, the evaluation will be automatically triggered - and begin execution. + r"""Creates a `Evaluation + `__. + Upon creation, the evaluation will be automatically + triggered and begin execution. .. code-block:: python @@ -1216,18 +1227,20 @@ def sample_create_evaluation(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.CreateEvaluationRequest, dict]): The request object. Request message for - [EvaluationService.CreateEvaluation][google.cloud.discoveryengine.v1alpha.EvaluationService.CreateEvaluation] + `EvaluationService.CreateEvaluation + `__ method. parent (str): - Required. The parent resource name, such as + Required. The parent resource name, such + as ``projects/{project}/locations/{location}``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. evaluation (google.cloud.discoveryengine_v1alpha.types.Evaluation): - Required. The - [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation] + Required. The `Evaluation + `__ to create. This corresponds to the ``evaluation`` field @@ -1243,11 +1256,15 @@ def sample_create_evaluation(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1alpha.types.Evaluation` An evaluation is a single execution (or run) of an evaluation process. It - encapsulates the state of the evaluation and the - resulting data. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1alpha.types.Evaluation` + An evaluation is a single execution (or + run) of an evaluation process. It + encapsulates the state of the evaluation + and the resulting data. """ # Create or coerce a protobuf request object. @@ -1318,7 +1335,8 @@ def list_evaluation_results( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListEvaluationResultsPager: r"""Gets a list of results for a given a - [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation]. + `Evaluation + `__. .. code-block:: python @@ -1350,15 +1368,18 @@ def sample_list_evaluation_results(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.ListEvaluationResultsRequest, dict]): The request object. Request message for - [EvaluationService.ListEvaluationResults][google.cloud.discoveryengine.v1alpha.EvaluationService.ListEvaluationResults] + `EvaluationService.ListEvaluationResults + `__ method. evaluation (str): - Required. The evaluation resource name, such as + Required. The evaluation resource name, + such as ``projects/{project}/locations/{location}/evaluations/{evaluation}``. - If the caller does not have permission to list - [EvaluationResult][] under this evaluation, regardless - of whether or not this evaluation set exists, a + If the caller does not have permission + to list [EvaluationResult][] under this + evaluation, regardless of whether or not + this evaluation set exists, a ``PERMISSION_DENIED`` error is returned. This corresponds to the ``evaluation`` field @@ -1375,11 +1396,13 @@ def sample_list_evaluation_results(): Returns: google.cloud.discoveryengine_v1alpha.services.evaluation_service.pagers.ListEvaluationResultsPager: Response message for - [EvaluationService.ListEvaluationResults][google.cloud.discoveryengine.v1alpha.EvaluationService.ListEvaluationResults] - method. + `EvaluationService.ListEvaluationResults + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/evaluation_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/evaluation_service/transports/base.py index 7bcef19ee806..ab3f4c82ed02 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/evaluation_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/evaluation_service/transports/base.py @@ -84,8 +84,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -100,11 +98,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/evaluation_service/transports/grpc.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/evaluation_service/transports/grpc.py index 344488b60937..24f43ffa9dc3 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/evaluation_service/transports/grpc.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/evaluation_service/transports/grpc.py @@ -113,7 +113,8 @@ class EvaluationServiceGrpcTransport(EvaluationServiceTransport): """gRPC backend transport for EvaluationService. Service for managing - [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation]s, + `Evaluation + `__s, This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -347,8 +348,8 @@ def get_evaluation( ) -> Callable[[evaluation_service.GetEvaluationRequest], evaluation.Evaluation]: r"""Return a callable for the get evaluation method over gRPC. - Gets a - [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation]. + Gets a `Evaluation + `__. Returns: Callable[[~.GetEvaluationRequest], @@ -378,7 +379,8 @@ def list_evaluations( r"""Return a callable for the list evaluations method over gRPC. Gets a list of - [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation]s. + `Evaluation + `__s. Returns: Callable[[~.ListEvaluationsRequest], @@ -406,11 +408,10 @@ def create_evaluation( ]: r"""Return a callable for the create evaluation method over gRPC. - Creates a - [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation]. - - Upon creation, the evaluation will be automatically triggered - and begin execution. + Creates a `Evaluation + `__. + Upon creation, the evaluation will be automatically + triggered and begin execution. Returns: Callable[[~.CreateEvaluationRequest], @@ -440,7 +441,8 @@ def list_evaluation_results( r"""Return a callable for the list evaluation results method over gRPC. Gets a list of results for a given a - [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation]. + `Evaluation + `__. Returns: Callable[[~.ListEvaluationResultsRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/evaluation_service/transports/grpc_asyncio.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/evaluation_service/transports/grpc_asyncio.py index b35d2cf49836..5ababe0da753 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/evaluation_service/transports/grpc_asyncio.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/evaluation_service/transports/grpc_asyncio.py @@ -119,7 +119,8 @@ class EvaluationServiceGrpcAsyncIOTransport(EvaluationServiceTransport): """gRPC AsyncIO backend transport for EvaluationService. Service for managing - [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation]s, + `Evaluation + `__s, This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -357,8 +358,8 @@ def get_evaluation( ]: r"""Return a callable for the get evaluation method over gRPC. - Gets a - [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation]. + Gets a `Evaluation + `__. Returns: Callable[[~.GetEvaluationRequest], @@ -388,7 +389,8 @@ def list_evaluations( r"""Return a callable for the list evaluations method over gRPC. Gets a list of - [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation]s. + `Evaluation + `__s. Returns: Callable[[~.ListEvaluationsRequest], @@ -417,11 +419,10 @@ def create_evaluation( ]: r"""Return a callable for the create evaluation method over gRPC. - Creates a - [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation]. - - Upon creation, the evaluation will be automatically triggered - and begin execution. + Creates a `Evaluation + `__. + Upon creation, the evaluation will be automatically + triggered and begin execution. Returns: Callable[[~.CreateEvaluationRequest], @@ -451,7 +452,8 @@ def list_evaluation_results( r"""Return a callable for the list evaluation results method over gRPC. Gets a list of results for a given a - [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation]. + `Evaluation + `__. Returns: Callable[[~.ListEvaluationResultsRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/evaluation_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/evaluation_service/transports/rest.py index ac044da80ed0..a7cfe17ab4ca 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/evaluation_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/evaluation_service/transports/rest.py @@ -398,7 +398,8 @@ class EvaluationServiceRestTransport(_BaseEvaluationServiceRestTransport): """REST backend synchronous transport for EvaluationService. Service for managing - [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation]s, + `Evaluation + `__s, This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -691,7 +692,8 @@ def __call__( Args: request (~.evaluation_service.CreateEvaluationRequest): The request object. Request message for - [EvaluationService.CreateEvaluation][google.cloud.discoveryengine.v1alpha.EvaluationService.CreateEvaluation] + `EvaluationService.CreateEvaluation + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -846,7 +848,8 @@ def __call__( Args: request (~.evaluation_service.GetEvaluationRequest): The request object. Request message for - [EvaluationService.GetEvaluation][google.cloud.discoveryengine.v1alpha.EvaluationService.GetEvaluation] + `EvaluationService.GetEvaluation + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -997,7 +1000,8 @@ def __call__( Args: request (~.evaluation_service.ListEvaluationResultsRequest): The request object. Request message for - [EvaluationService.ListEvaluationResults][google.cloud.discoveryengine.v1alpha.EvaluationService.ListEvaluationResults] + `EvaluationService.ListEvaluationResults + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1010,7 +1014,8 @@ def __call__( Returns: ~.evaluation_service.ListEvaluationResultsResponse: Response message for - [EvaluationService.ListEvaluationResults][google.cloud.discoveryengine.v1alpha.EvaluationService.ListEvaluationResults] + `EvaluationService.ListEvaluationResults + `__ method. """ @@ -1155,7 +1160,8 @@ def __call__( Args: request (~.evaluation_service.ListEvaluationsRequest): The request object. Request message for - [EvaluationService.ListEvaluations][google.cloud.discoveryengine.v1alpha.EvaluationService.ListEvaluations] + `EvaluationService.ListEvaluations + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1168,7 +1174,8 @@ def __call__( Returns: ~.evaluation_service.ListEvaluationsResponse: Response message for - [EvaluationService.ListEvaluations][google.cloud.discoveryengine.v1alpha.EvaluationService.ListEvaluations] + `EvaluationService.ListEvaluations + `__ method. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/grounded_generation_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/grounded_generation_service/async_client.py index 0612b2bb6a49..11a7a4426e01 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/grounded_generation_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/grounded_generation_service/async_client.py @@ -349,7 +349,8 @@ async def sample_check_grounding(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.CheckGroundingRequest, dict]]): The request object. Request message for - [GroundedGenerationService.CheckGrounding][google.cloud.discoveryengine.v1alpha.GroundedGenerationService.CheckGrounding] + `GroundedGenerationService.CheckGrounding + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -362,8 +363,9 @@ async def sample_check_grounding(): Returns: google.cloud.discoveryengine_v1alpha.types.CheckGroundingResponse: Response message for the - [GroundedGenerationService.CheckGrounding][google.cloud.discoveryengine.v1alpha.GroundedGenerationService.CheckGrounding] - method. + `GroundedGenerationService.CheckGrounding + `__ + method. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/grounded_generation_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/grounded_generation_service/client.py index 933f8ea0ca3a..ecff8742c07e 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/grounded_generation_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/grounded_generation_service/client.py @@ -783,7 +783,8 @@ def sample_check_grounding(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.CheckGroundingRequest, dict]): The request object. Request message for - [GroundedGenerationService.CheckGrounding][google.cloud.discoveryengine.v1alpha.GroundedGenerationService.CheckGrounding] + `GroundedGenerationService.CheckGrounding + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -796,8 +797,9 @@ def sample_check_grounding(): Returns: google.cloud.discoveryengine_v1alpha.types.CheckGroundingResponse: Response message for the - [GroundedGenerationService.CheckGrounding][google.cloud.discoveryengine.v1alpha.GroundedGenerationService.CheckGrounding] - method. + `GroundedGenerationService.CheckGrounding + `__ + method. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/grounded_generation_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/grounded_generation_service/transports/base.py index a34b495acd5a..75f2969807a6 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/grounded_generation_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/grounded_generation_service/transports/base.py @@ -84,8 +84,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -100,11 +98,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/grounded_generation_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/grounded_generation_service/transports/rest.py index a13211031044..7ed8392314cb 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/grounded_generation_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/grounded_generation_service/transports/rest.py @@ -346,7 +346,8 @@ def __call__( Args: request (~.grounded_generation_service.CheckGroundingRequest): The request object. Request message for - [GroundedGenerationService.CheckGrounding][google.cloud.discoveryengine.v1alpha.GroundedGenerationService.CheckGrounding] + `GroundedGenerationService.CheckGrounding + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -359,7 +360,8 @@ def __call__( Returns: ~.grounded_generation_service.CheckGroundingResponse: Response message for the - [GroundedGenerationService.CheckGrounding][google.cloud.discoveryengine.v1alpha.GroundedGenerationService.CheckGrounding] + `GroundedGenerationService.CheckGrounding + `__ method. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/project_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/project_service/async_client.py index 2a7ea2e10abc..36ec76c88094 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/project_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/project_service/async_client.py @@ -70,7 +70,7 @@ class ProjectServiceAsyncClient: """Service for operations on the - [Project][google.cloud.discoveryengine.v1alpha.Project]. + `Project `__. """ _client: ProjectServiceClient @@ -305,7 +305,8 @@ async def get_project( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> project.Project: - r"""Gets a [Project][google.cloud.discoveryengine.v1alpha.Project]. + r"""Gets a `Project + `__. Returns NOT_FOUND when the project is not yet created. .. code-block:: python @@ -337,12 +338,15 @@ async def sample_get_project(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.GetProjectRequest, dict]]): The request object. Request message for - [ProjectService.GetProject][google.cloud.discoveryengine.v1alpha.ProjectService.GetProject] + `ProjectService.GetProject + `__ method. name (:class:`str`): Required. Full resource name of a - [Project][google.cloud.discoveryengine.v1alpha.Project], - such as ``projects/{project_id_or_number}``. + `Project + `__, + such as + ``projects/{project_id_or_number}``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -419,13 +423,14 @@ async def provision_project( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: - r"""Provisions the project resource. During the process, related - systems will get prepared and initialized. + r"""Provisions the project resource. During the + process, related systems will get prepared and + initialized. Caller must read the `Terms for data - use `__, and - optionally specify in request to provide consent to that service - terms. + use `__, + and optionally specify in request to provide consent to + that service terms. .. code-block:: python @@ -462,12 +467,15 @@ async def sample_provision_project(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.ProvisionProjectRequest, dict]]): The request object. Request for - [ProjectService.ProvisionProject][google.cloud.discoveryengine.v1alpha.ProjectService.ProvisionProject] + `ProjectService.ProvisionProject + `__ method. name (:class:`str`): Required. Full resource name of a - [Project][google.cloud.discoveryengine.v1alpha.Project], - such as ``projects/{project_id_or_number}``. + `Project + `__, + such as + ``projects/{project_id_or_number}``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -482,12 +490,13 @@ async def sample_provision_project(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be + An object representing a long-running + operation. + The result type for the operation will + be :class:`google.cloud.discoveryengine_v1alpha.types.Project` - Metadata and configurations for a Google Cloud project - in the service. + Metadata and configurations for a Google + Cloud project in the service. """ # Create or coerce a protobuf request object. @@ -565,13 +574,13 @@ async def report_consent_change( ) -> gcd_project.Project: r"""Updates service terms for this project. - This method can be used to retroactively accept the latest - terms. + This method can be used to retroactively accept the + latest terms. Terms available for update: - - `Terms for data - use `__ + * `Terms for data use + `__ .. code-block:: python @@ -617,21 +626,27 @@ async def sample_report_consent_change(): should not be set. project (:class:`str`): Required. Full resource name of a - [Project][google.cloud.discoveryengine.v1alpha.Project], - such as ``projects/{project_id_or_number}``. + `Project + `__, + such as + ``projects/{project_id_or_number}``. This corresponds to the ``project`` field on the ``request`` instance; if ``request`` is provided, this should not be set. service_term_id (:class:`str`): - Required. The unique identifier of the terms of service - to update. Available term ids: - - - ``GA_DATA_USE_TERMS``: `Terms for data - use `__. - When using this service term id, the acceptable - [service_term_version][google.cloud.discoveryengine.v1alpha.ReportConsentChangeRequest.service_term_version] - to provide is ``2022-11-23``. + Required. The unique identifier of the + terms of service to update. Available + term ids: + + * ``GA_DATA_USE_TERMS``: `Terms for data + use + `__. + When using this service term id, the + acceptable + `service_term_version + `__ + to provide is ``2022-11-23``. This corresponds to the ``service_term_id`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/project_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/project_service/client.py index e9158205635a..d4fc057930e9 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/project_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/project_service/client.py @@ -116,7 +116,7 @@ def get_transport_class( class ProjectServiceClient(metaclass=ProjectServiceClientMeta): """Service for operations on the - [Project][google.cloud.discoveryengine.v1alpha.Project]. + `Project `__. """ @staticmethod @@ -739,7 +739,8 @@ def get_project( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> project.Project: - r"""Gets a [Project][google.cloud.discoveryengine.v1alpha.Project]. + r"""Gets a `Project + `__. Returns NOT_FOUND when the project is not yet created. .. code-block:: python @@ -771,12 +772,15 @@ def sample_get_project(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.GetProjectRequest, dict]): The request object. Request message for - [ProjectService.GetProject][google.cloud.discoveryengine.v1alpha.ProjectService.GetProject] + `ProjectService.GetProject + `__ method. name (str): Required. Full resource name of a - [Project][google.cloud.discoveryengine.v1alpha.Project], - such as ``projects/{project_id_or_number}``. + `Project + `__, + such as + ``projects/{project_id_or_number}``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -850,13 +854,14 @@ def provision_project( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: - r"""Provisions the project resource. During the process, related - systems will get prepared and initialized. + r"""Provisions the project resource. During the + process, related systems will get prepared and + initialized. Caller must read the `Terms for data - use `__, and - optionally specify in request to provide consent to that service - terms. + use `__, + and optionally specify in request to provide consent to + that service terms. .. code-block:: python @@ -893,12 +898,15 @@ def sample_provision_project(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.ProvisionProjectRequest, dict]): The request object. Request for - [ProjectService.ProvisionProject][google.cloud.discoveryengine.v1alpha.ProjectService.ProvisionProject] + `ProjectService.ProvisionProject + `__ method. name (str): Required. Full resource name of a - [Project][google.cloud.discoveryengine.v1alpha.Project], - such as ``projects/{project_id_or_number}``. + `Project + `__, + such as + ``projects/{project_id_or_number}``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -913,12 +921,13 @@ def sample_provision_project(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be + An object representing a long-running + operation. + The result type for the operation will + be :class:`google.cloud.discoveryengine_v1alpha.types.Project` - Metadata and configurations for a Google Cloud project - in the service. + Metadata and configurations for a Google + Cloud project in the service. """ # Create or coerce a protobuf request object. @@ -993,13 +1002,13 @@ def report_consent_change( ) -> gcd_project.Project: r"""Updates service terms for this project. - This method can be used to retroactively accept the latest - terms. + This method can be used to retroactively accept the + latest terms. Terms available for update: - - `Terms for data - use `__ + * `Terms for data use + `__ .. code-block:: python @@ -1045,21 +1054,27 @@ def sample_report_consent_change(): should not be set. project (str): Required. Full resource name of a - [Project][google.cloud.discoveryengine.v1alpha.Project], - such as ``projects/{project_id_or_number}``. + `Project + `__, + such as + ``projects/{project_id_or_number}``. This corresponds to the ``project`` field on the ``request`` instance; if ``request`` is provided, this should not be set. service_term_id (str): - Required. The unique identifier of the terms of service - to update. Available term ids: - - - ``GA_DATA_USE_TERMS``: `Terms for data - use `__. - When using this service term id, the acceptable - [service_term_version][google.cloud.discoveryengine.v1alpha.ReportConsentChangeRequest.service_term_version] - to provide is ``2022-11-23``. + Required. The unique identifier of the + terms of service to update. Available + term ids: + + * ``GA_DATA_USE_TERMS``: `Terms for data + use + `__. + When using this service term id, the + acceptable + `service_term_version + `__ + to provide is ``2022-11-23``. This corresponds to the ``service_term_id`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/project_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/project_service/transports/base.py index 16e21b126b76..b618d29ff4c7 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/project_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/project_service/transports/base.py @@ -86,8 +86,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -102,11 +100,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/project_service/transports/grpc.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/project_service/transports/grpc.py index 08f815e86000..018a65ec3424 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/project_service/transports/grpc.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/project_service/transports/grpc.py @@ -115,7 +115,7 @@ class ProjectServiceGrpcTransport(ProjectServiceTransport): """gRPC backend transport for ProjectService. Service for operations on the - [Project][google.cloud.discoveryengine.v1alpha.Project]. + `Project `__. This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -349,7 +349,8 @@ def get_project( ) -> Callable[[project_service.GetProjectRequest], project.Project]: r"""Return a callable for the get project method over gRPC. - Gets a [Project][google.cloud.discoveryengine.v1alpha.Project]. + Gets a `Project + `__. Returns NOT_FOUND when the project is not yet created. Returns: @@ -376,13 +377,14 @@ def provision_project( ) -> Callable[[project_service.ProvisionProjectRequest], operations_pb2.Operation]: r"""Return a callable for the provision project method over gRPC. - Provisions the project resource. During the process, related - systems will get prepared and initialized. + Provisions the project resource. During the + process, related systems will get prepared and + initialized. Caller must read the `Terms for data - use `__, and - optionally specify in request to provide consent to that service - terms. + use `__, + and optionally specify in request to provide consent to + that service terms. Returns: Callable[[~.ProvisionProjectRequest], @@ -410,13 +412,13 @@ def report_consent_change( Updates service terms for this project. - This method can be used to retroactively accept the latest - terms. + This method can be used to retroactively accept the + latest terms. Terms available for update: - - `Terms for data - use `__ + * `Terms for data use + `__ Returns: Callable[[~.ReportConsentChangeRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/project_service/transports/grpc_asyncio.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/project_service/transports/grpc_asyncio.py index 4589504386c2..7f3817a83600 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/project_service/transports/grpc_asyncio.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/project_service/transports/grpc_asyncio.py @@ -121,7 +121,7 @@ class ProjectServiceGrpcAsyncIOTransport(ProjectServiceTransport): """gRPC AsyncIO backend transport for ProjectService. Service for operations on the - [Project][google.cloud.discoveryengine.v1alpha.Project]. + `Project `__. This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -357,7 +357,8 @@ def get_project( ) -> Callable[[project_service.GetProjectRequest], Awaitable[project.Project]]: r"""Return a callable for the get project method over gRPC. - Gets a [Project][google.cloud.discoveryengine.v1alpha.Project]. + Gets a `Project + `__. Returns NOT_FOUND when the project is not yet created. Returns: @@ -386,13 +387,14 @@ def provision_project( ]: r"""Return a callable for the provision project method over gRPC. - Provisions the project resource. During the process, related - systems will get prepared and initialized. + Provisions the project resource. During the + process, related systems will get prepared and + initialized. Caller must read the `Terms for data - use `__, and - optionally specify in request to provide consent to that service - terms. + use `__, + and optionally specify in request to provide consent to + that service terms. Returns: Callable[[~.ProvisionProjectRequest], @@ -422,13 +424,13 @@ def report_consent_change( Updates service terms for this project. - This method can be used to retroactively accept the latest - terms. + This method can be used to retroactively accept the + latest terms. Terms available for update: - - `Terms for data - use `__ + * `Terms for data use + `__ Returns: Callable[[~.ReportConsentChangeRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/project_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/project_service/transports/rest.py index 238189fe25fe..1eda3b3407a8 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/project_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/project_service/transports/rest.py @@ -334,7 +334,7 @@ class ProjectServiceRestTransport(_BaseProjectServiceRestTransport): """REST backend synchronous transport for ProjectService. Service for operations on the - [Project][google.cloud.discoveryengine.v1alpha.Project]. + `Project `__. This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -625,7 +625,8 @@ def __call__( Args: request (~.project_service.GetProjectRequest): The request object. Request message for - [ProjectService.GetProject][google.cloud.discoveryengine.v1alpha.ProjectService.GetProject] + `ProjectService.GetProject + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -776,7 +777,8 @@ def __call__( Args: request (~.project_service.ProvisionProjectRequest): The request object. Request for - [ProjectService.ProvisionProject][google.cloud.discoveryengine.v1alpha.ProjectService.ProvisionProject] + `ProjectService.ProvisionProject + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/rank_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/rank_service/async_client.py index 477f0ce1aec9..437317bd5c0d 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/rank_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/rank_service/async_client.py @@ -327,7 +327,8 @@ async def sample_rank(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.RankRequest, dict]]): The request object. Request message for - [RankService.Rank][google.cloud.discoveryengine.v1alpha.RankService.Rank] + `RankService.Rank + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -340,8 +341,9 @@ async def sample_rank(): Returns: google.cloud.discoveryengine_v1alpha.types.RankResponse: Response message for - [RankService.Rank][google.cloud.discoveryengine.v1alpha.RankService.Rank] - method. + `RankService.Rank + `__ + method. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/rank_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/rank_service/client.py index 51eff83719fe..28ceb0b56b4e 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/rank_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/rank_service/client.py @@ -765,7 +765,8 @@ def sample_rank(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.RankRequest, dict]): The request object. Request message for - [RankService.Rank][google.cloud.discoveryengine.v1alpha.RankService.Rank] + `RankService.Rank + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -778,8 +779,9 @@ def sample_rank(): Returns: google.cloud.discoveryengine_v1alpha.types.RankResponse: Response message for - [RankService.Rank][google.cloud.discoveryengine.v1alpha.RankService.Rank] - method. + `RankService.Rank + `__ + method. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/rank_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/rank_service/transports/base.py index 3a5cb693529a..08c2e2d31db4 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/rank_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/rank_service/transports/base.py @@ -84,8 +84,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -100,11 +98,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/rank_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/rank_service/transports/rest.py index 5addf747c92e..2ee2f97ecd1d 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/rank_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/rank_service/transports/rest.py @@ -335,7 +335,8 @@ def __call__( Args: request (~.rank_service.RankRequest): The request object. Request message for - [RankService.Rank][google.cloud.discoveryengine.v1alpha.RankService.Rank] + `RankService.Rank + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -348,7 +349,8 @@ def __call__( Returns: ~.rank_service.RankResponse: Response message for - [RankService.Rank][google.cloud.discoveryengine.v1alpha.RankService.Rank] + `RankService.Rank + `__ method. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/recommendation_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/recommendation_service/transports/base.py index 669c9ae115a6..6f8d6fbda49e 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/recommendation_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/recommendation_service/transports/base.py @@ -84,8 +84,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -100,11 +98,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/sample_query_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/sample_query_service/async_client.py index ccc37228b156..119c794659aa 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/sample_query_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/sample_query_service/async_client.py @@ -73,7 +73,8 @@ class SampleQueryServiceAsyncClient: """Service for managing - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]s, + `SampleQuery + `__s, """ _client: SampleQueryServiceClient @@ -320,8 +321,8 @@ async def get_sample_query( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> sample_query.SampleQuery: - r"""Gets a - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]. + r"""Gets a `SampleQuery + `__. .. code-block:: python @@ -352,22 +353,27 @@ async def sample_get_sample_query(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.GetSampleQueryRequest, dict]]): The request object. Request message for - [SampleQueryService.GetSampleQuery][google.cloud.discoveryengine.v1alpha.SampleQueryService.GetSampleQuery] + `SampleQueryService.GetSampleQuery + `__ method. name (:class:`str`): Required. Full resource name of - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery], + `SampleQuery + `__, such as ``projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}/sampleQueries/{sample_query}``. - If the caller does not have permission to access the - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to access the `SampleQuery + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. If the requested - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery] - does not exist, a NOT_FOUND error is returned. + `SampleQuery + `__ + does not exist, a NOT_FOUND error is + returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -447,7 +453,8 @@ async def list_sample_queries( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListSampleQueriesAsyncPager: r"""Gets a list of - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]s. + `SampleQuery + `__s. .. code-block:: python @@ -479,18 +486,21 @@ async def sample_list_sample_queries(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.ListSampleQueriesRequest, dict]]): The request object. Request message for - [SampleQueryService.ListSampleQueries][google.cloud.discoveryengine.v1alpha.SampleQueryService.ListSampleQueries] + `SampleQueryService.ListSampleQueries + `__ method. parent (:class:`str`): - Required. The parent sample query set resource name, - such as + Required. The parent sample query set + resource name, such as ``projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}``. - If the caller does not have permission to list - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]s - under this sample query set, regardless of whether or - not this sample query set exists, a - ``PERMISSION_DENIED`` error is returned. + If the caller does not have permission + to list `SampleQuery + `__s + under this sample query set, regardless + of whether or not this sample query set + exists, a ``PERMISSION_DENIED`` error is + returned. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -506,11 +516,13 @@ async def sample_list_sample_queries(): Returns: google.cloud.discoveryengine_v1alpha.services.sample_query_service.pagers.ListSampleQueriesAsyncPager: Response message for - [SampleQueryService.ListSampleQueries][google.cloud.discoveryengine.v1alpha.SampleQueryService.ListSampleQueries] - method. + `SampleQueryService.ListSampleQueries + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -586,8 +598,8 @@ async def create_sample_query( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> gcd_sample_query.SampleQuery: - r"""Creates a - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery] + r"""Creates a `SampleQuery + `__ .. code-block:: python @@ -623,10 +635,12 @@ async def sample_create_sample_query(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.CreateSampleQueryRequest, dict]]): The request object. Request message for - [SampleQueryService.CreateSampleQuery][google.cloud.discoveryengine.v1alpha.SampleQueryService.CreateSampleQuery] + `SampleQueryService.CreateSampleQuery + `__ method. parent (:class:`str`): - Required. The parent resource name, such as + Required. The parent resource name, such + as ``projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}``. This corresponds to the ``parent`` field @@ -634,7 +648,8 @@ async def sample_create_sample_query(): should not be set. sample_query (:class:`google.cloud.discoveryengine_v1alpha.types.SampleQuery`): Required. The - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery] + `SampleQuery + `__ to create. This corresponds to the ``sample_query`` field @@ -642,25 +657,34 @@ async def sample_create_sample_query(): should not be set. sample_query_id (:class:`str`): Required. The ID to use for the - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery], - which will become the final component of the - [SampleQuery.name][google.cloud.discoveryengine.v1alpha.SampleQuery.name]. - - If the caller does not have permission to create the - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery], - regardless of whether or not it exists, a - ``PERMISSION_DENIED`` error is returned. + `SampleQuery + `__, + which will become the final component of + the + `SampleQuery.name + `__. + + If the caller does not have permission + to create the `SampleQuery + `__, + regardless of whether or not it exists, + a ``PERMISSION_DENIED`` error is + returned. This field must be unique among all - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]s + `SampleQuery + `__s with the same - [parent][google.cloud.discoveryengine.v1alpha.CreateSampleQueryRequest.parent]. - Otherwise, an ``ALREADY_EXISTS`` error is returned. + `parent + `__. + Otherwise, an ``ALREADY_EXISTS`` error + is returned. - This field must conform to - `RFC-1034 `__ - standard with a length limit of 63 characters. - Otherwise, an ``INVALID_ARGUMENT`` error is returned. + This field must conform to `RFC-1034 + `__ + standard with a length limit of 63 + characters. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. This corresponds to the ``sample_query_id`` field on the ``request`` instance; if ``request`` is provided, this @@ -744,8 +768,8 @@ async def update_sample_query( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> gcd_sample_query.SampleQuery: - r"""Updates a - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]. + r"""Updates a `SampleQuery + `__. .. code-block:: python @@ -779,21 +803,24 @@ async def sample_update_sample_query(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.UpdateSampleQueryRequest, dict]]): The request object. Request message for - [SampleQueryService.UpdateSampleQuery][google.cloud.discoveryengine.v1alpha.SampleQueryService.UpdateSampleQuery] + `SampleQueryService.UpdateSampleQuery + `__ method. sample_query (:class:`google.cloud.discoveryengine_v1alpha.types.SampleQuery`): Required. The simple query to update. - If the caller does not have permission to update the - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery], - regardless of whether or not it exists, a - ``PERMISSION_DENIED`` error is returned. - - If the - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery] - to update does not exist a ``NOT_FOUND`` error is + If the caller does not have permission + to update the `SampleQuery + `__, + regardless of whether or not it exists, + a ``PERMISSION_DENIED`` error is returned. + If the `SampleQuery + `__ + to update does not exist a ``NOT_FOUND`` + error is returned. + This corresponds to the ``sample_query`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -884,8 +911,8 @@ async def delete_sample_query( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> None: - r"""Deletes a - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]. + r"""Deletes a `SampleQuery + `__. .. code-block:: python @@ -913,24 +940,28 @@ async def sample_delete_sample_query(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.DeleteSampleQueryRequest, dict]]): The request object. Request message for - [SampleQueryService.DeleteSampleQuery][google.cloud.discoveryengine.v1alpha.SampleQueryService.DeleteSampleQuery] + `SampleQueryService.DeleteSampleQuery + `__ method. name (:class:`str`): Required. Full resource name of - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery], + `SampleQuery + `__, such as ``projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}/sampleQueries/{sample_query}``. - If the caller does not have permission to delete the - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery], - regardless of whether or not it exists, a - ``PERMISSION_DENIED`` error is returned. - - If the - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery] - to delete does not exist, a ``NOT_FOUND`` error is + If the caller does not have permission + to delete the `SampleQuery + `__, + regardless of whether or not it exists, + a ``PERMISSION_DENIED`` error is returned. + If the `SampleQuery + `__ + to delete does not exist, a + ``NOT_FOUND`` error is returned. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -997,11 +1028,13 @@ async def import_sample_queries( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: r"""Bulk import of multiple - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]s. + `SampleQuery + `__s. Sample queries that already exist may be deleted. Note: It is possible for a subset of the - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]s + `SampleQuery + `__s to be successfully imported. .. code-block:: python @@ -1041,7 +1074,8 @@ async def sample_import_sample_queries(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.ImportSampleQueriesRequest, dict]]): The request object. Request message for - [SampleQueryService.ImportSampleQueries][google.cloud.discoveryengine.v1alpha.SampleQueryService.ImportSampleQueries] + `SampleQueryService.ImportSampleQueries + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -1053,14 +1087,18 @@ async def sample_import_sample_queries(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1alpha.types.ImportSampleQueriesResponse` Response of the - [SampleQueryService.ImportSampleQueries][google.cloud.discoveryengine.v1alpha.SampleQueryService.ImportSampleQueries] - method. If the long running operation is done, this - message is returned by the - google.longrunning.Operations.response field if the - operation is successful. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1alpha.types.ImportSampleQueriesResponse` + Response of the + `SampleQueryService.ImportSampleQueries + `__ + method. If the long running operation is + done, this message is returned by the + google.longrunning.Operations.response + field if the operation is successful. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/sample_query_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/sample_query_service/client.py index 0e2c2fcf5cce..f1e1e2d8456d 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/sample_query_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/sample_query_service/client.py @@ -119,7 +119,8 @@ def get_transport_class( class SampleQueryServiceClient(metaclass=SampleQueryServiceClientMeta): """Service for managing - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]s, + `SampleQuery + `__s, """ @staticmethod @@ -780,8 +781,8 @@ def get_sample_query( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> sample_query.SampleQuery: - r"""Gets a - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]. + r"""Gets a `SampleQuery + `__. .. code-block:: python @@ -812,22 +813,27 @@ def sample_get_sample_query(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.GetSampleQueryRequest, dict]): The request object. Request message for - [SampleQueryService.GetSampleQuery][google.cloud.discoveryengine.v1alpha.SampleQueryService.GetSampleQuery] + `SampleQueryService.GetSampleQuery + `__ method. name (str): Required. Full resource name of - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery], + `SampleQuery + `__, such as ``projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}/sampleQueries/{sample_query}``. - If the caller does not have permission to access the - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to access the `SampleQuery + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. If the requested - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery] - does not exist, a NOT_FOUND error is returned. + `SampleQuery + `__ + does not exist, a NOT_FOUND error is + returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -904,7 +910,8 @@ def list_sample_queries( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListSampleQueriesPager: r"""Gets a list of - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]s. + `SampleQuery + `__s. .. code-block:: python @@ -936,18 +943,21 @@ def sample_list_sample_queries(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.ListSampleQueriesRequest, dict]): The request object. Request message for - [SampleQueryService.ListSampleQueries][google.cloud.discoveryengine.v1alpha.SampleQueryService.ListSampleQueries] + `SampleQueryService.ListSampleQueries + `__ method. parent (str): - Required. The parent sample query set resource name, - such as + Required. The parent sample query set + resource name, such as ``projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}``. - If the caller does not have permission to list - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]s - under this sample query set, regardless of whether or - not this sample query set exists, a - ``PERMISSION_DENIED`` error is returned. + If the caller does not have permission + to list `SampleQuery + `__s + under this sample query set, regardless + of whether or not this sample query set + exists, a ``PERMISSION_DENIED`` error is + returned. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -963,11 +973,13 @@ def sample_list_sample_queries(): Returns: google.cloud.discoveryengine_v1alpha.services.sample_query_service.pagers.ListSampleQueriesPager: Response message for - [SampleQueryService.ListSampleQueries][google.cloud.discoveryengine.v1alpha.SampleQueryService.ListSampleQueries] - method. + `SampleQueryService.ListSampleQueries + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -1040,8 +1052,8 @@ def create_sample_query( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> gcd_sample_query.SampleQuery: - r"""Creates a - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery] + r"""Creates a `SampleQuery + `__ .. code-block:: python @@ -1077,10 +1089,12 @@ def sample_create_sample_query(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.CreateSampleQueryRequest, dict]): The request object. Request message for - [SampleQueryService.CreateSampleQuery][google.cloud.discoveryengine.v1alpha.SampleQueryService.CreateSampleQuery] + `SampleQueryService.CreateSampleQuery + `__ method. parent (str): - Required. The parent resource name, such as + Required. The parent resource name, such + as ``projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}``. This corresponds to the ``parent`` field @@ -1088,7 +1102,8 @@ def sample_create_sample_query(): should not be set. sample_query (google.cloud.discoveryengine_v1alpha.types.SampleQuery): Required. The - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery] + `SampleQuery + `__ to create. This corresponds to the ``sample_query`` field @@ -1096,25 +1111,34 @@ def sample_create_sample_query(): should not be set. sample_query_id (str): Required. The ID to use for the - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery], - which will become the final component of the - [SampleQuery.name][google.cloud.discoveryengine.v1alpha.SampleQuery.name]. - - If the caller does not have permission to create the - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery], - regardless of whether or not it exists, a - ``PERMISSION_DENIED`` error is returned. + `SampleQuery + `__, + which will become the final component of + the + `SampleQuery.name + `__. + + If the caller does not have permission + to create the `SampleQuery + `__, + regardless of whether or not it exists, + a ``PERMISSION_DENIED`` error is + returned. This field must be unique among all - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]s + `SampleQuery + `__s with the same - [parent][google.cloud.discoveryengine.v1alpha.CreateSampleQueryRequest.parent]. - Otherwise, an ``ALREADY_EXISTS`` error is returned. + `parent + `__. + Otherwise, an ``ALREADY_EXISTS`` error + is returned. - This field must conform to - `RFC-1034 `__ - standard with a length limit of 63 characters. - Otherwise, an ``INVALID_ARGUMENT`` error is returned. + This field must conform to `RFC-1034 + `__ + standard with a length limit of 63 + characters. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. This corresponds to the ``sample_query_id`` field on the ``request`` instance; if ``request`` is provided, this @@ -1195,8 +1219,8 @@ def update_sample_query( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> gcd_sample_query.SampleQuery: - r"""Updates a - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]. + r"""Updates a `SampleQuery + `__. .. code-block:: python @@ -1230,21 +1254,24 @@ def sample_update_sample_query(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.UpdateSampleQueryRequest, dict]): The request object. Request message for - [SampleQueryService.UpdateSampleQuery][google.cloud.discoveryengine.v1alpha.SampleQueryService.UpdateSampleQuery] + `SampleQueryService.UpdateSampleQuery + `__ method. sample_query (google.cloud.discoveryengine_v1alpha.types.SampleQuery): Required. The simple query to update. - If the caller does not have permission to update the - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery], - regardless of whether or not it exists, a - ``PERMISSION_DENIED`` error is returned. - - If the - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery] - to update does not exist a ``NOT_FOUND`` error is + If the caller does not have permission + to update the `SampleQuery + `__, + regardless of whether or not it exists, + a ``PERMISSION_DENIED`` error is returned. + If the `SampleQuery + `__ + to update does not exist a ``NOT_FOUND`` + error is returned. + This corresponds to the ``sample_query`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1332,8 +1359,8 @@ def delete_sample_query( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> None: - r"""Deletes a - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]. + r"""Deletes a `SampleQuery + `__. .. code-block:: python @@ -1361,24 +1388,28 @@ def sample_delete_sample_query(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.DeleteSampleQueryRequest, dict]): The request object. Request message for - [SampleQueryService.DeleteSampleQuery][google.cloud.discoveryengine.v1alpha.SampleQueryService.DeleteSampleQuery] + `SampleQueryService.DeleteSampleQuery + `__ method. name (str): Required. Full resource name of - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery], + `SampleQuery + `__, such as ``projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}/sampleQueries/{sample_query}``. - If the caller does not have permission to delete the - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery], - regardless of whether or not it exists, a - ``PERMISSION_DENIED`` error is returned. - - If the - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery] - to delete does not exist, a ``NOT_FOUND`` error is + If the caller does not have permission + to delete the `SampleQuery + `__, + regardless of whether or not it exists, + a ``PERMISSION_DENIED`` error is returned. + If the `SampleQuery + `__ + to delete does not exist, a + ``NOT_FOUND`` error is returned. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1442,11 +1473,13 @@ def import_sample_queries( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: r"""Bulk import of multiple - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]s. + `SampleQuery + `__s. Sample queries that already exist may be deleted. Note: It is possible for a subset of the - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]s + `SampleQuery + `__s to be successfully imported. .. code-block:: python @@ -1486,7 +1519,8 @@ def sample_import_sample_queries(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.ImportSampleQueriesRequest, dict]): The request object. Request message for - [SampleQueryService.ImportSampleQueries][google.cloud.discoveryengine.v1alpha.SampleQueryService.ImportSampleQueries] + `SampleQueryService.ImportSampleQueries + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1498,14 +1532,18 @@ def sample_import_sample_queries(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1alpha.types.ImportSampleQueriesResponse` Response of the - [SampleQueryService.ImportSampleQueries][google.cloud.discoveryengine.v1alpha.SampleQueryService.ImportSampleQueries] - method. If the long running operation is done, this - message is returned by the - google.longrunning.Operations.response field if the - operation is successful. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1alpha.types.ImportSampleQueriesResponse` + Response of the + `SampleQueryService.ImportSampleQueries + `__ + method. If the long running operation is + done, this message is returned by the + google.longrunning.Operations.response + field if the operation is successful. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/sample_query_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/sample_query_service/transports/base.py index 4377fb6335eb..90ff824241df 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/sample_query_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/sample_query_service/transports/base.py @@ -88,8 +88,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -104,11 +102,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/sample_query_service/transports/grpc.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/sample_query_service/transports/grpc.py index 202aedb811be..5ee7c8aaf6c9 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/sample_query_service/transports/grpc.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/sample_query_service/transports/grpc.py @@ -117,7 +117,8 @@ class SampleQueryServiceGrpcTransport(SampleQueryServiceTransport): """gRPC backend transport for SampleQueryService. Service for managing - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]s, + `SampleQuery + `__s, This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -353,8 +354,8 @@ def get_sample_query( ]: r"""Return a callable for the get sample query method over gRPC. - Gets a - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]. + Gets a `SampleQuery + `__. Returns: Callable[[~.GetSampleQueryRequest], @@ -384,7 +385,8 @@ def list_sample_queries( r"""Return a callable for the list sample queries method over gRPC. Gets a list of - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]s. + `SampleQuery + `__s. Returns: Callable[[~.ListSampleQueriesRequest], @@ -412,8 +414,8 @@ def create_sample_query( ]: r"""Return a callable for the create sample query method over gRPC. - Creates a - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery] + Creates a `SampleQuery + `__ Returns: Callable[[~.CreateSampleQueryRequest], @@ -441,8 +443,8 @@ def update_sample_query( ]: r"""Return a callable for the update sample query method over gRPC. - Updates a - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]. + Updates a `SampleQuery + `__. Returns: Callable[[~.UpdateSampleQueryRequest], @@ -468,8 +470,8 @@ def delete_sample_query( ) -> Callable[[sample_query_service.DeleteSampleQueryRequest], empty_pb2.Empty]: r"""Return a callable for the delete sample query method over gRPC. - Deletes a - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]. + Deletes a `SampleQuery + `__. Returns: Callable[[~.DeleteSampleQueryRequest], @@ -496,11 +498,13 @@ def import_sample_queries( r"""Return a callable for the import sample queries method over gRPC. Bulk import of multiple - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]s. + `SampleQuery + `__s. Sample queries that already exist may be deleted. Note: It is possible for a subset of the - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]s + `SampleQuery + `__s to be successfully imported. Returns: diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/sample_query_service/transports/grpc_asyncio.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/sample_query_service/transports/grpc_asyncio.py index 2f3997e05593..4f450a905c12 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/sample_query_service/transports/grpc_asyncio.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/sample_query_service/transports/grpc_asyncio.py @@ -123,7 +123,8 @@ class SampleQueryServiceGrpcAsyncIOTransport(SampleQueryServiceTransport): """gRPC AsyncIO backend transport for SampleQueryService. Service for managing - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]s, + `SampleQuery + `__s, This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -362,8 +363,8 @@ def get_sample_query( ]: r"""Return a callable for the get sample query method over gRPC. - Gets a - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]. + Gets a `SampleQuery + `__. Returns: Callable[[~.GetSampleQueryRequest], @@ -393,7 +394,8 @@ def list_sample_queries( r"""Return a callable for the list sample queries method over gRPC. Gets a list of - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]s. + `SampleQuery + `__s. Returns: Callable[[~.ListSampleQueriesRequest], @@ -422,8 +424,8 @@ def create_sample_query( ]: r"""Return a callable for the create sample query method over gRPC. - Creates a - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery] + Creates a `SampleQuery + `__ Returns: Callable[[~.CreateSampleQueryRequest], @@ -452,8 +454,8 @@ def update_sample_query( ]: r"""Return a callable for the update sample query method over gRPC. - Updates a - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]. + Updates a `SampleQuery + `__. Returns: Callable[[~.UpdateSampleQueryRequest], @@ -481,8 +483,8 @@ def delete_sample_query( ]: r"""Return a callable for the delete sample query method over gRPC. - Deletes a - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]. + Deletes a `SampleQuery + `__. Returns: Callable[[~.DeleteSampleQueryRequest], @@ -511,11 +513,13 @@ def import_sample_queries( r"""Return a callable for the import sample queries method over gRPC. Bulk import of multiple - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]s. + `SampleQuery + `__s. Sample queries that already exist may be deleted. Note: It is possible for a subset of the - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]s + `SampleQuery + `__s to be successfully imported. Returns: diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/sample_query_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/sample_query_service/transports/rest.py index 3a42f477f338..2b547a83a22f 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/sample_query_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/sample_query_service/transports/rest.py @@ -476,7 +476,8 @@ class SampleQueryServiceRestTransport(_BaseSampleQueryServiceRestTransport): """REST backend synchronous transport for SampleQueryService. Service for managing - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]s, + `SampleQuery + `__s, This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -769,7 +770,8 @@ def __call__( Args: request (~.sample_query_service.CreateSampleQueryRequest): The request object. Request message for - [SampleQueryService.CreateSampleQuery][google.cloud.discoveryengine.v1alpha.SampleQueryService.CreateSampleQuery] + `SampleQueryService.CreateSampleQuery + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -925,7 +927,8 @@ def __call__( Args: request (~.sample_query_service.DeleteSampleQueryRequest): The request object. Request message for - [SampleQueryService.DeleteSampleQuery][google.cloud.discoveryengine.v1alpha.SampleQueryService.DeleteSampleQuery] + `SampleQueryService.DeleteSampleQuery + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1036,7 +1039,8 @@ def __call__( Args: request (~.sample_query_service.GetSampleQueryRequest): The request object. Request message for - [SampleQueryService.GetSampleQuery][google.cloud.discoveryengine.v1alpha.SampleQueryService.GetSampleQuery] + `SampleQueryService.GetSampleQuery + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1188,7 +1192,8 @@ def __call__( Args: request (~.import_config.ImportSampleQueriesRequest): The request object. Request message for - [SampleQueryService.ImportSampleQueries][google.cloud.discoveryengine.v1alpha.SampleQueryService.ImportSampleQueries] + `SampleQueryService.ImportSampleQueries + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1345,7 +1350,8 @@ def __call__( Args: request (~.sample_query_service.ListSampleQueriesRequest): The request object. Request message for - [SampleQueryService.ListSampleQueries][google.cloud.discoveryengine.v1alpha.SampleQueryService.ListSampleQueries] + `SampleQueryService.ListSampleQueries + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1358,7 +1364,8 @@ def __call__( Returns: ~.sample_query_service.ListSampleQueriesResponse: Response message for - [SampleQueryService.ListSampleQueries][google.cloud.discoveryengine.v1alpha.SampleQueryService.ListSampleQueries] + `SampleQueryService.ListSampleQueries + `__ method. """ @@ -1500,7 +1507,8 @@ def __call__( Args: request (~.sample_query_service.UpdateSampleQueryRequest): The request object. Request message for - [SampleQueryService.UpdateSampleQuery][google.cloud.discoveryengine.v1alpha.SampleQueryService.UpdateSampleQuery] + `SampleQueryService.UpdateSampleQuery + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/sample_query_set_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/sample_query_set_service/async_client.py index 77b87387dd9d..a94a57f170fd 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/sample_query_set_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/sample_query_set_service/async_client.py @@ -74,7 +74,8 @@ class SampleQuerySetServiceAsyncClient: """Service for managing - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet]s, + `SampleQuerySet + `__s, """ _client: SampleQuerySetServiceClient @@ -324,7 +325,8 @@ async def get_sample_query_set( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> sample_query_set.SampleQuerySet: r"""Gets a - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet]. + `SampleQuerySet + `__. .. code-block:: python @@ -355,22 +357,27 @@ async def sample_get_sample_query_set(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.GetSampleQuerySetRequest, dict]]): The request object. Request message for - [SampleQuerySetService.GetSampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySetService.GetSampleQuerySet] + `SampleQuerySetService.GetSampleQuerySet + `__ method. name (:class:`str`): Required. Full resource name of - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet], + `SampleQuerySet + `__, such as ``projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}``. - If the caller does not have permission to access the - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to access the `SampleQuerySet + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. If the requested - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet] - does not exist, a NOT_FOUND error is returned. + `SampleQuerySet + `__ + does not exist, a NOT_FOUND error is + returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -452,7 +459,8 @@ async def list_sample_query_sets( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListSampleQuerySetsAsyncPager: r"""Gets a list of - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet]s. + `SampleQuerySet + `__s. .. code-block:: python @@ -484,17 +492,20 @@ async def sample_list_sample_query_sets(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.ListSampleQuerySetsRequest, dict]]): The request object. Request message for - [SampleQuerySetService.ListSampleQuerySets][google.cloud.discoveryengine.v1alpha.SampleQuerySetService.ListSampleQuerySets] + `SampleQuerySetService.ListSampleQuerySets + `__ method. parent (:class:`str`): - Required. The parent location resource name, such as + Required. The parent location resource + name, such as ``projects/{project}/locations/{location}``. - If the caller does not have permission to list - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet]s - under this location, regardless of whether or not this - location exists, a ``PERMISSION_DENIED`` error is - returned. + If the caller does not have permission + to list `SampleQuerySet + `__s + under this location, regardless of + whether or not this location exists, a + ``PERMISSION_DENIED`` error is returned. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -510,11 +521,13 @@ async def sample_list_sample_query_sets(): Returns: google.cloud.discoveryengine_v1alpha.services.sample_query_set_service.pagers.ListSampleQuerySetsAsyncPager: Response message for - [SampleQuerySetService.ListSampleQuerySets][google.cloud.discoveryengine.v1alpha.SampleQuerySetService.ListSampleQuerySets] - method. + `SampleQuerySetService.ListSampleQuerySets + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -591,7 +604,8 @@ async def create_sample_query_set( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> gcd_sample_query_set.SampleQuerySet: r"""Creates a - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet] + `SampleQuerySet + `__ .. code-block:: python @@ -627,10 +641,12 @@ async def sample_create_sample_query_set(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.CreateSampleQuerySetRequest, dict]]): The request object. Request message for - [SampleQuerySetService.CreateSampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySetService.CreateSampleQuerySet] + `SampleQuerySetService.CreateSampleQuerySet + `__ method. parent (:class:`str`): - Required. The parent resource name, such as + Required. The parent resource name, such + as ``projects/{project}/locations/{location}``. This corresponds to the ``parent`` field @@ -638,7 +654,8 @@ async def sample_create_sample_query_set(): should not be set. sample_query_set (:class:`google.cloud.discoveryengine_v1alpha.types.SampleQuerySet`): Required. The - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet] + `SampleQuerySet + `__ to create. This corresponds to the ``sample_query_set`` field @@ -646,25 +663,33 @@ async def sample_create_sample_query_set(): should not be set. sample_query_set_id (:class:`str`): Required. The ID to use for the - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet], - which will become the final component of the - [SampleQuerySet.name][google.cloud.discoveryengine.v1alpha.SampleQuerySet.name]. - - If the caller does not have permission to create the - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet], - regardless of whether or not it exists, a - ``PERMISSION_DENIED`` error is returned. + `SampleQuerySet + `__, + which will become the final component of + the `SampleQuerySet.name + `__. + + If the caller does not have permission + to create the `SampleQuerySet + `__, + regardless of whether or not it exists, + a ``PERMISSION_DENIED`` error is + returned. This field must be unique among all - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet]s + `SampleQuerySet + `__s with the same - [parent][google.cloud.discoveryengine.v1alpha.CreateSampleQuerySetRequest.parent]. - Otherwise, an ``ALREADY_EXISTS`` error is returned. + `parent + `__. + Otherwise, an ``ALREADY_EXISTS`` error + is returned. - This field must conform to - `RFC-1034 `__ - standard with a length limit of 63 characters. - Otherwise, an ``INVALID_ARGUMENT`` error is returned. + This field must conform to `RFC-1034 + `__ + standard with a length limit of 63 + characters. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. This corresponds to the ``sample_query_set_id`` field on the ``request`` instance; if ``request`` is provided, this @@ -753,7 +778,8 @@ async def update_sample_query_set( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> gcd_sample_query_set.SampleQuerySet: r"""Updates a - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet]. + `SampleQuerySet + `__. .. code-block:: python @@ -787,20 +813,24 @@ async def sample_update_sample_query_set(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.UpdateSampleQuerySetRequest, dict]]): The request object. Request message for - [SampleQuerySetService.UpdateSampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySetService.UpdateSampleQuerySet] + `SampleQuerySetService.UpdateSampleQuerySet + `__ method. sample_query_set (:class:`google.cloud.discoveryengine_v1alpha.types.SampleQuerySet`): - Required. The sample query set to update. - - If the caller does not have permission to update the - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet], - regardless of whether or not it exists, a - ``PERMISSION_DENIED`` error is returned. + Required. The sample query set to + update. + If the caller does not have permission + to update the `SampleQuerySet + `__, + regardless of whether or not it exists, + a ``PERMISSION_DENIED`` error is + returned. If the - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet] - to update does not exist a ``NOT_FOUND`` error is - returned. + `SampleQuerySet + `__ + to update does not exist a ``NOT_FOUND`` + error is returned. This corresponds to the ``sample_query_set`` field on the ``request`` instance; if ``request`` is provided, this @@ -897,7 +927,8 @@ async def delete_sample_query_set( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> None: r"""Deletes a - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet]. + `SampleQuerySet + `__. .. code-block:: python @@ -925,23 +956,28 @@ async def sample_delete_sample_query_set(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.DeleteSampleQuerySetRequest, dict]]): The request object. Request message for - [SampleQuerySetService.DeleteSampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySetService.DeleteSampleQuerySet] + `SampleQuerySetService.DeleteSampleQuerySet + `__ method. name (:class:`str`): Required. Full resource name of - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet], + `SampleQuerySet + `__, such as ``projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}``. - If the caller does not have permission to delete the - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet], - regardless of whether or not it exists, a - ``PERMISSION_DENIED`` error is returned. + If the caller does not have permission + to delete the `SampleQuerySet + `__, + regardless of whether or not it exists, + a ``PERMISSION_DENIED`` error is + returned. If the - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet] - to delete does not exist, a ``NOT_FOUND`` error is - returned. + `SampleQuerySet + `__ + to delete does not exist, a + ``NOT_FOUND`` error is returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/sample_query_set_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/sample_query_set_service/client.py index c9572b7a68a7..09cedcea064d 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/sample_query_set_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/sample_query_set_service/client.py @@ -120,7 +120,8 @@ def get_transport_class( class SampleQuerySetServiceClient(metaclass=SampleQuerySetServiceClientMeta): """Service for managing - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet]s, + `SampleQuerySet + `__s, """ @staticmethod @@ -777,7 +778,8 @@ def get_sample_query_set( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> sample_query_set.SampleQuerySet: r"""Gets a - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet]. + `SampleQuerySet + `__. .. code-block:: python @@ -808,22 +810,27 @@ def sample_get_sample_query_set(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.GetSampleQuerySetRequest, dict]): The request object. Request message for - [SampleQuerySetService.GetSampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySetService.GetSampleQuerySet] + `SampleQuerySetService.GetSampleQuerySet + `__ method. name (str): Required. Full resource name of - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet], + `SampleQuerySet + `__, such as ``projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}``. - If the caller does not have permission to access the - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to access the `SampleQuerySet + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. If the requested - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet] - does not exist, a NOT_FOUND error is returned. + `SampleQuerySet + `__ + does not exist, a NOT_FOUND error is + returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -902,7 +909,8 @@ def list_sample_query_sets( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListSampleQuerySetsPager: r"""Gets a list of - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet]s. + `SampleQuerySet + `__s. .. code-block:: python @@ -934,17 +942,20 @@ def sample_list_sample_query_sets(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.ListSampleQuerySetsRequest, dict]): The request object. Request message for - [SampleQuerySetService.ListSampleQuerySets][google.cloud.discoveryengine.v1alpha.SampleQuerySetService.ListSampleQuerySets] + `SampleQuerySetService.ListSampleQuerySets + `__ method. parent (str): - Required. The parent location resource name, such as + Required. The parent location resource + name, such as ``projects/{project}/locations/{location}``. - If the caller does not have permission to list - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet]s - under this location, regardless of whether or not this - location exists, a ``PERMISSION_DENIED`` error is - returned. + If the caller does not have permission + to list `SampleQuerySet + `__s + under this location, regardless of + whether or not this location exists, a + ``PERMISSION_DENIED`` error is returned. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -960,11 +971,13 @@ def sample_list_sample_query_sets(): Returns: google.cloud.discoveryengine_v1alpha.services.sample_query_set_service.pagers.ListSampleQuerySetsPager: Response message for - [SampleQuerySetService.ListSampleQuerySets][google.cloud.discoveryengine.v1alpha.SampleQuerySetService.ListSampleQuerySets] - method. + `SampleQuerySetService.ListSampleQuerySets + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -1038,7 +1051,8 @@ def create_sample_query_set( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> gcd_sample_query_set.SampleQuerySet: r"""Creates a - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet] + `SampleQuerySet + `__ .. code-block:: python @@ -1074,10 +1088,12 @@ def sample_create_sample_query_set(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.CreateSampleQuerySetRequest, dict]): The request object. Request message for - [SampleQuerySetService.CreateSampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySetService.CreateSampleQuerySet] + `SampleQuerySetService.CreateSampleQuerySet + `__ method. parent (str): - Required. The parent resource name, such as + Required. The parent resource name, such + as ``projects/{project}/locations/{location}``. This corresponds to the ``parent`` field @@ -1085,7 +1101,8 @@ def sample_create_sample_query_set(): should not be set. sample_query_set (google.cloud.discoveryengine_v1alpha.types.SampleQuerySet): Required. The - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet] + `SampleQuerySet + `__ to create. This corresponds to the ``sample_query_set`` field @@ -1093,25 +1110,33 @@ def sample_create_sample_query_set(): should not be set. sample_query_set_id (str): Required. The ID to use for the - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet], - which will become the final component of the - [SampleQuerySet.name][google.cloud.discoveryengine.v1alpha.SampleQuerySet.name]. - - If the caller does not have permission to create the - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet], - regardless of whether or not it exists, a - ``PERMISSION_DENIED`` error is returned. + `SampleQuerySet + `__, + which will become the final component of + the `SampleQuerySet.name + `__. + + If the caller does not have permission + to create the `SampleQuerySet + `__, + regardless of whether or not it exists, + a ``PERMISSION_DENIED`` error is + returned. This field must be unique among all - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet]s + `SampleQuerySet + `__s with the same - [parent][google.cloud.discoveryengine.v1alpha.CreateSampleQuerySetRequest.parent]. - Otherwise, an ``ALREADY_EXISTS`` error is returned. + `parent + `__. + Otherwise, an ``ALREADY_EXISTS`` error + is returned. - This field must conform to - `RFC-1034 `__ - standard with a length limit of 63 characters. - Otherwise, an ``INVALID_ARGUMENT`` error is returned. + This field must conform to `RFC-1034 + `__ + standard with a length limit of 63 + characters. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. This corresponds to the ``sample_query_set_id`` field on the ``request`` instance; if ``request`` is provided, this @@ -1197,7 +1222,8 @@ def update_sample_query_set( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> gcd_sample_query_set.SampleQuerySet: r"""Updates a - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet]. + `SampleQuerySet + `__. .. code-block:: python @@ -1231,20 +1257,24 @@ def sample_update_sample_query_set(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.UpdateSampleQuerySetRequest, dict]): The request object. Request message for - [SampleQuerySetService.UpdateSampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySetService.UpdateSampleQuerySet] + `SampleQuerySetService.UpdateSampleQuerySet + `__ method. sample_query_set (google.cloud.discoveryengine_v1alpha.types.SampleQuerySet): - Required. The sample query set to update. - - If the caller does not have permission to update the - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet], - regardless of whether or not it exists, a - ``PERMISSION_DENIED`` error is returned. + Required. The sample query set to + update. + If the caller does not have permission + to update the `SampleQuerySet + `__, + regardless of whether or not it exists, + a ``PERMISSION_DENIED`` error is + returned. If the - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet] - to update does not exist a ``NOT_FOUND`` error is - returned. + `SampleQuerySet + `__ + to update does not exist a ``NOT_FOUND`` + error is returned. This corresponds to the ``sample_query_set`` field on the ``request`` instance; if ``request`` is provided, this @@ -1338,7 +1368,8 @@ def delete_sample_query_set( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> None: r"""Deletes a - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet]. + `SampleQuerySet + `__. .. code-block:: python @@ -1366,23 +1397,28 @@ def sample_delete_sample_query_set(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.DeleteSampleQuerySetRequest, dict]): The request object. Request message for - [SampleQuerySetService.DeleteSampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySetService.DeleteSampleQuerySet] + `SampleQuerySetService.DeleteSampleQuerySet + `__ method. name (str): Required. Full resource name of - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet], + `SampleQuerySet + `__, such as ``projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}``. - If the caller does not have permission to delete the - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet], - regardless of whether or not it exists, a - ``PERMISSION_DENIED`` error is returned. + If the caller does not have permission + to delete the `SampleQuerySet + `__, + regardless of whether or not it exists, + a ``PERMISSION_DENIED`` error is + returned. If the - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet] - to delete does not exist, a ``NOT_FOUND`` error is - returned. + `SampleQuerySet + `__ + to delete does not exist, a + ``NOT_FOUND`` error is returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/sample_query_set_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/sample_query_set_service/transports/base.py index 7c4b91572279..449d0092b972 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/sample_query_set_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/sample_query_set_service/transports/base.py @@ -89,8 +89,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -105,11 +103,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/sample_query_set_service/transports/grpc.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/sample_query_set_service/transports/grpc.py index e7e5954eaba8..b6ed415e6a2d 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/sample_query_set_service/transports/grpc.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/sample_query_set_service/transports/grpc.py @@ -118,7 +118,8 @@ class SampleQuerySetServiceGrpcTransport(SampleQuerySetServiceTransport): """gRPC backend transport for SampleQuerySetService. Service for managing - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet]s, + `SampleQuerySet + `__s, This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -339,7 +340,8 @@ def get_sample_query_set( r"""Return a callable for the get sample query set method over gRPC. Gets a - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet]. + `SampleQuerySet + `__. Returns: Callable[[~.GetSampleQuerySetRequest], @@ -369,7 +371,8 @@ def list_sample_query_sets( r"""Return a callable for the list sample query sets method over gRPC. Gets a list of - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet]s. + `SampleQuerySet + `__s. Returns: Callable[[~.ListSampleQuerySetsRequest], @@ -399,7 +402,8 @@ def create_sample_query_set( r"""Return a callable for the create sample query set method over gRPC. Creates a - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet] + `SampleQuerySet + `__ Returns: Callable[[~.CreateSampleQuerySetRequest], @@ -429,7 +433,8 @@ def update_sample_query_set( r"""Return a callable for the update sample query set method over gRPC. Updates a - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet]. + `SampleQuerySet + `__. Returns: Callable[[~.UpdateSampleQuerySetRequest], @@ -458,7 +463,8 @@ def delete_sample_query_set( r"""Return a callable for the delete sample query set method over gRPC. Deletes a - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet]. + `SampleQuerySet + `__. Returns: Callable[[~.DeleteSampleQuerySetRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/sample_query_set_service/transports/grpc_asyncio.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/sample_query_set_service/transports/grpc_asyncio.py index 77cfd63d9821..d71afb78cf3f 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/sample_query_set_service/transports/grpc_asyncio.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/sample_query_set_service/transports/grpc_asyncio.py @@ -124,7 +124,8 @@ class SampleQuerySetServiceGrpcAsyncIOTransport(SampleQuerySetServiceTransport): """gRPC AsyncIO backend transport for SampleQuerySetService. Service for managing - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet]s, + `SampleQuerySet + `__s, This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -347,7 +348,8 @@ def get_sample_query_set( r"""Return a callable for the get sample query set method over gRPC. Gets a - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet]. + `SampleQuerySet + `__. Returns: Callable[[~.GetSampleQuerySetRequest], @@ -377,7 +379,8 @@ def list_sample_query_sets( r"""Return a callable for the list sample query sets method over gRPC. Gets a list of - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet]s. + `SampleQuerySet + `__s. Returns: Callable[[~.ListSampleQuerySetsRequest], @@ -407,7 +410,8 @@ def create_sample_query_set( r"""Return a callable for the create sample query set method over gRPC. Creates a - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet] + `SampleQuerySet + `__ Returns: Callable[[~.CreateSampleQuerySetRequest], @@ -437,7 +441,8 @@ def update_sample_query_set( r"""Return a callable for the update sample query set method over gRPC. Updates a - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet]. + `SampleQuerySet + `__. Returns: Callable[[~.UpdateSampleQuerySetRequest], @@ -467,7 +472,8 @@ def delete_sample_query_set( r"""Return a callable for the delete sample query set method over gRPC. Deletes a - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet]. + `SampleQuerySet + `__. Returns: Callable[[~.DeleteSampleQuerySetRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/sample_query_set_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/sample_query_set_service/transports/rest.py index 66b4dee48653..35d99a081a02 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/sample_query_set_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/sample_query_set_service/transports/rest.py @@ -426,7 +426,8 @@ class SampleQuerySetServiceRestTransport(_BaseSampleQuerySetServiceRestTransport """REST backend synchronous transport for SampleQuerySetService. Service for managing - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet]s, + `SampleQuerySet + `__s, This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -546,7 +547,8 @@ def __call__( Args: request (~.sample_query_set_service.CreateSampleQuerySetRequest): The request object. Request message for - [SampleQuerySetService.CreateSampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySetService.CreateSampleQuerySet] + `SampleQuerySetService.CreateSampleQuerySet + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -708,7 +710,8 @@ def __call__( Args: request (~.sample_query_set_service.DeleteSampleQuerySetRequest): The request object. Request message for - [SampleQuerySetService.DeleteSampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySetService.DeleteSampleQuerySet] + `SampleQuerySetService.DeleteSampleQuerySet + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -821,7 +824,8 @@ def __call__( Args: request (~.sample_query_set_service.GetSampleQuerySetRequest): The request object. Request message for - [SampleQuerySetService.GetSampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySetService.GetSampleQuerySet] + `SampleQuerySetService.GetSampleQuerySet + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -976,7 +980,8 @@ def __call__( Args: request (~.sample_query_set_service.ListSampleQuerySetsRequest): The request object. Request message for - [SampleQuerySetService.ListSampleQuerySets][google.cloud.discoveryengine.v1alpha.SampleQuerySetService.ListSampleQuerySets] + `SampleQuerySetService.ListSampleQuerySets + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -989,7 +994,8 @@ def __call__( Returns: ~.sample_query_set_service.ListSampleQuerySetsResponse: Response message for - [SampleQuerySetService.ListSampleQuerySets][google.cloud.discoveryengine.v1alpha.SampleQuerySetService.ListSampleQuerySets] + `SampleQuerySetService.ListSampleQuerySets + `__ method. """ @@ -1135,7 +1141,8 @@ def __call__( Args: request (~.sample_query_set_service.UpdateSampleQuerySetRequest): The request object. Request message for - [SampleQuerySetService.UpdateSampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySetService.UpdateSampleQuerySet] + `SampleQuerySetService.UpdateSampleQuerySet + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/schema_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/schema_service/async_client.py index e23c5e46c72b..0c96f797e60b 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/schema_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/schema_service/async_client.py @@ -71,8 +71,8 @@ class SchemaServiceAsyncClient: - """Service for managing - [Schema][google.cloud.discoveryengine.v1alpha.Schema]s. + """Service for managing `Schema + `__s. """ _client: SchemaServiceClient @@ -309,7 +309,8 @@ async def get_schema( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> schema.Schema: - r"""Gets a [Schema][google.cloud.discoveryengine.v1alpha.Schema]. + r"""Gets a `Schema + `__. .. code-block:: python @@ -340,11 +341,12 @@ async def sample_get_schema(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.GetSchemaRequest, dict]]): The request object. Request message for - [SchemaService.GetSchema][google.cloud.discoveryengine.v1alpha.SchemaService.GetSchema] + `SchemaService.GetSchema + `__ method. name (:class:`str`): - Required. The full resource name of the schema, in the - format of + Required. The full resource name of the + schema, in the format of ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}``. This corresponds to the ``name`` field @@ -422,8 +424,8 @@ async def list_schemas( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListSchemasAsyncPager: - r"""Gets a list of - [Schema][google.cloud.discoveryengine.v1alpha.Schema]s. + r"""Gets a list of `Schema + `__s. .. code-block:: python @@ -455,11 +457,12 @@ async def sample_list_schemas(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.ListSchemasRequest, dict]]): The request object. Request message for - [SchemaService.ListSchemas][google.cloud.discoveryengine.v1alpha.SchemaService.ListSchemas] + `SchemaService.ListSchemas + `__ method. parent (:class:`str`): - Required. The parent data store resource name, in the - format of + Required. The parent data store resource + name, in the format of ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}``. This corresponds to the ``parent`` field @@ -476,11 +479,13 @@ async def sample_list_schemas(): Returns: google.cloud.discoveryengine_v1alpha.services.schema_service.pagers.ListSchemasAsyncPager: Response message for - [SchemaService.ListSchemas][google.cloud.discoveryengine.v1alpha.SchemaService.ListSchemas] - method. + `SchemaService.ListSchemas + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -554,7 +559,8 @@ async def create_schema( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: - r"""Creates a [Schema][google.cloud.discoveryengine.v1alpha.Schema]. + r"""Creates a `Schema + `__. .. code-block:: python @@ -590,33 +596,38 @@ async def sample_create_schema(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.CreateSchemaRequest, dict]]): The request object. Request message for - [SchemaService.CreateSchema][google.cloud.discoveryengine.v1alpha.SchemaService.CreateSchema] + `SchemaService.CreateSchema + `__ method. parent (:class:`str`): - Required. The parent data store resource name, in the - format of + Required. The parent data store resource + name, in the format of ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. schema (:class:`google.cloud.discoveryengine_v1alpha.types.Schema`): - Required. The - [Schema][google.cloud.discoveryengine.v1alpha.Schema] to - create. + Required. The `Schema + `__ + to create. This corresponds to the ``schema`` field on the ``request`` instance; if ``request`` is provided, this should not be set. schema_id (:class:`str`): Required. The ID to use for the - [Schema][google.cloud.discoveryengine.v1alpha.Schema], + `Schema + `__, which becomes the final component of the - [Schema.name][google.cloud.discoveryengine.v1alpha.Schema.name]. + `Schema.name + `__. This field should conform to - `RFC-1034 `__ - standard with a length limit of 63 characters. + `RFC-1034 + `__ + standard with a length limit of 63 + characters. This corresponds to the ``schema_id`` field on the ``request`` instance; if ``request`` is provided, this @@ -631,12 +642,13 @@ async def sample_create_schema(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be + An object representing a long-running + operation. + The result type for the operation will + be :class:`google.cloud.discoveryengine_v1alpha.types.Schema` - Defines the structure and layout of a type of document - data. + Defines the structure and layout of a + type of document data. """ # Create or coerce a protobuf request object. @@ -708,7 +720,8 @@ async def update_schema( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: - r"""Updates a [Schema][google.cloud.discoveryengine.v1alpha.Schema]. + r"""Updates a `Schema + `__. .. code-block:: python @@ -742,7 +755,8 @@ async def sample_update_schema(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.UpdateSchemaRequest, dict]]): The request object. Request message for - [SchemaService.UpdateSchema][google.cloud.discoveryengine.v1alpha.SchemaService.UpdateSchema] + `SchemaService.UpdateSchema + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -754,12 +768,13 @@ async def sample_update_schema(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be + An object representing a long-running + operation. + The result type for the operation will + be :class:`google.cloud.discoveryengine_v1alpha.types.Schema` - Defines the structure and layout of a type of document - data. + Defines the structure and layout of a + type of document data. """ # Create or coerce a protobuf request object. @@ -813,7 +828,8 @@ async def delete_schema( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: - r"""Deletes a [Schema][google.cloud.discoveryengine.v1alpha.Schema]. + r"""Deletes a `Schema + `__. .. code-block:: python @@ -848,11 +864,12 @@ async def sample_delete_schema(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.DeleteSchemaRequest, dict]]): The request object. Request message for - [SchemaService.DeleteSchema][google.cloud.discoveryengine.v1alpha.SchemaService.DeleteSchema] + `SchemaService.DeleteSchema + `__ method. name (:class:`str`): - Required. The full resource name of the schema, in the - format of + Required. The full resource name of the + schema, in the format of ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}``. This corresponds to the ``name`` field @@ -868,18 +885,21 @@ async def sample_delete_schema(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.protobuf.empty_pb2.Empty` A generic empty message that you can re-use to avoid defining duplicated - empty messages in your APIs. A typical example is to - use it as the request or the response type of an API - method. For instance: - - service Foo { - rpc Bar(google.protobuf.Empty) returns - (google.protobuf.Empty); - - } + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.protobuf.empty_pb2.Empty` + A generic empty message that you can + re-use to avoid defining duplicated + empty messages in your APIs. A typical + example is to use it as the request or + the response type of an API method. For + instance: + + service Foo { + rpc Bar(google.protobuf.Empty) + returns (google.protobuf.Empty); } """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/schema_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/schema_service/client.py index 994674f793a6..206988b12d17 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/schema_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/schema_service/client.py @@ -115,8 +115,8 @@ def get_transport_class( class SchemaServiceClient(metaclass=SchemaServiceClientMeta): - """Service for managing - [Schema][google.cloud.discoveryengine.v1alpha.Schema]s. + """Service for managing `Schema + `__s. """ @staticmethod @@ -770,7 +770,8 @@ def get_schema( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> schema.Schema: - r"""Gets a [Schema][google.cloud.discoveryengine.v1alpha.Schema]. + r"""Gets a `Schema + `__. .. code-block:: python @@ -801,11 +802,12 @@ def sample_get_schema(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.GetSchemaRequest, dict]): The request object. Request message for - [SchemaService.GetSchema][google.cloud.discoveryengine.v1alpha.SchemaService.GetSchema] + `SchemaService.GetSchema + `__ method. name (str): - Required. The full resource name of the schema, in the - format of + Required. The full resource name of the + schema, in the format of ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}``. This corresponds to the ``name`` field @@ -880,8 +882,8 @@ def list_schemas( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListSchemasPager: - r"""Gets a list of - [Schema][google.cloud.discoveryengine.v1alpha.Schema]s. + r"""Gets a list of `Schema + `__s. .. code-block:: python @@ -913,11 +915,12 @@ def sample_list_schemas(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.ListSchemasRequest, dict]): The request object. Request message for - [SchemaService.ListSchemas][google.cloud.discoveryengine.v1alpha.SchemaService.ListSchemas] + `SchemaService.ListSchemas + `__ method. parent (str): - Required. The parent data store resource name, in the - format of + Required. The parent data store resource + name, in the format of ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}``. This corresponds to the ``parent`` field @@ -934,11 +937,13 @@ def sample_list_schemas(): Returns: google.cloud.discoveryengine_v1alpha.services.schema_service.pagers.ListSchemasPager: Response message for - [SchemaService.ListSchemas][google.cloud.discoveryengine.v1alpha.SchemaService.ListSchemas] - method. + `SchemaService.ListSchemas + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -1009,7 +1014,8 @@ def create_schema( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: - r"""Creates a [Schema][google.cloud.discoveryengine.v1alpha.Schema]. + r"""Creates a `Schema + `__. .. code-block:: python @@ -1045,33 +1051,38 @@ def sample_create_schema(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.CreateSchemaRequest, dict]): The request object. Request message for - [SchemaService.CreateSchema][google.cloud.discoveryengine.v1alpha.SchemaService.CreateSchema] + `SchemaService.CreateSchema + `__ method. parent (str): - Required. The parent data store resource name, in the - format of + Required. The parent data store resource + name, in the format of ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. schema (google.cloud.discoveryengine_v1alpha.types.Schema): - Required. The - [Schema][google.cloud.discoveryengine.v1alpha.Schema] to - create. + Required. The `Schema + `__ + to create. This corresponds to the ``schema`` field on the ``request`` instance; if ``request`` is provided, this should not be set. schema_id (str): Required. The ID to use for the - [Schema][google.cloud.discoveryengine.v1alpha.Schema], + `Schema + `__, which becomes the final component of the - [Schema.name][google.cloud.discoveryengine.v1alpha.Schema.name]. + `Schema.name + `__. This field should conform to - `RFC-1034 `__ - standard with a length limit of 63 characters. + `RFC-1034 + `__ + standard with a length limit of 63 + characters. This corresponds to the ``schema_id`` field on the ``request`` instance; if ``request`` is provided, this @@ -1086,12 +1097,13 @@ def sample_create_schema(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be + An object representing a long-running + operation. + The result type for the operation will + be :class:`google.cloud.discoveryengine_v1alpha.types.Schema` - Defines the structure and layout of a type of document - data. + Defines the structure and layout of a + type of document data. """ # Create or coerce a protobuf request object. @@ -1160,7 +1172,8 @@ def update_schema( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: - r"""Updates a [Schema][google.cloud.discoveryengine.v1alpha.Schema]. + r"""Updates a `Schema + `__. .. code-block:: python @@ -1194,7 +1207,8 @@ def sample_update_schema(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.UpdateSchemaRequest, dict]): The request object. Request message for - [SchemaService.UpdateSchema][google.cloud.discoveryengine.v1alpha.SchemaService.UpdateSchema] + `SchemaService.UpdateSchema + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1206,12 +1220,13 @@ def sample_update_schema(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be + An object representing a long-running + operation. + The result type for the operation will + be :class:`google.cloud.discoveryengine_v1alpha.types.Schema` - Defines the structure and layout of a type of document - data. + Defines the structure and layout of a + type of document data. """ # Create or coerce a protobuf request object. @@ -1263,7 +1278,8 @@ def delete_schema( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: - r"""Deletes a [Schema][google.cloud.discoveryengine.v1alpha.Schema]. + r"""Deletes a `Schema + `__. .. code-block:: python @@ -1298,11 +1314,12 @@ def sample_delete_schema(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.DeleteSchemaRequest, dict]): The request object. Request message for - [SchemaService.DeleteSchema][google.cloud.discoveryengine.v1alpha.SchemaService.DeleteSchema] + `SchemaService.DeleteSchema + `__ method. name (str): - Required. The full resource name of the schema, in the - format of + Required. The full resource name of the + schema, in the format of ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}``. This corresponds to the ``name`` field @@ -1318,18 +1335,21 @@ def sample_delete_schema(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.protobuf.empty_pb2.Empty` A generic empty message that you can re-use to avoid defining duplicated - empty messages in your APIs. A typical example is to - use it as the request or the response type of an API - method. For instance: - - service Foo { - rpc Bar(google.protobuf.Empty) returns - (google.protobuf.Empty); - - } + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.protobuf.empty_pb2.Empty` + A generic empty message that you can + re-use to avoid defining duplicated + empty messages in your APIs. A typical + example is to use it as the request or + the response type of an API method. For + instance: + + service Foo { + rpc Bar(google.protobuf.Empty) + returns (google.protobuf.Empty); } """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/schema_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/schema_service/transports/base.py index c895288d24e9..8cf873d2f1ca 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/schema_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/schema_service/transports/base.py @@ -84,8 +84,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -100,11 +98,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/schema_service/transports/grpc.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/schema_service/transports/grpc.py index 4e7f33fbe9ff..779b62f38314 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/schema_service/transports/grpc.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/schema_service/transports/grpc.py @@ -112,8 +112,8 @@ def intercept_unary_unary(self, continuation, client_call_details, request): class SchemaServiceGrpcTransport(SchemaServiceTransport): """gRPC backend transport for SchemaService. - Service for managing - [Schema][google.cloud.discoveryengine.v1alpha.Schema]s. + Service for managing `Schema + `__s. This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -345,7 +345,8 @@ def operations_client(self) -> operations_v1.OperationsClient: def get_schema(self) -> Callable[[schema_service.GetSchemaRequest], schema.Schema]: r"""Return a callable for the get schema method over gRPC. - Gets a [Schema][google.cloud.discoveryengine.v1alpha.Schema]. + Gets a `Schema + `__. Returns: Callable[[~.GetSchemaRequest], @@ -373,8 +374,8 @@ def list_schemas( ]: r"""Return a callable for the list schemas method over gRPC. - Gets a list of - [Schema][google.cloud.discoveryengine.v1alpha.Schema]s. + Gets a list of `Schema + `__s. Returns: Callable[[~.ListSchemasRequest], @@ -400,7 +401,8 @@ def create_schema( ) -> Callable[[schema_service.CreateSchemaRequest], operations_pb2.Operation]: r"""Return a callable for the create schema method over gRPC. - Creates a [Schema][google.cloud.discoveryengine.v1alpha.Schema]. + Creates a `Schema + `__. Returns: Callable[[~.CreateSchemaRequest], @@ -426,7 +428,8 @@ def update_schema( ) -> Callable[[schema_service.UpdateSchemaRequest], operations_pb2.Operation]: r"""Return a callable for the update schema method over gRPC. - Updates a [Schema][google.cloud.discoveryengine.v1alpha.Schema]. + Updates a `Schema + `__. Returns: Callable[[~.UpdateSchemaRequest], @@ -452,7 +455,8 @@ def delete_schema( ) -> Callable[[schema_service.DeleteSchemaRequest], operations_pb2.Operation]: r"""Return a callable for the delete schema method over gRPC. - Deletes a [Schema][google.cloud.discoveryengine.v1alpha.Schema]. + Deletes a `Schema + `__. Returns: Callable[[~.DeleteSchemaRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/schema_service/transports/grpc_asyncio.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/schema_service/transports/grpc_asyncio.py index 2e7b5673ea53..d27afe463431 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/schema_service/transports/grpc_asyncio.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/schema_service/transports/grpc_asyncio.py @@ -118,8 +118,8 @@ async def intercept_unary_unary(self, continuation, client_call_details, request class SchemaServiceGrpcAsyncIOTransport(SchemaServiceTransport): """gRPC AsyncIO backend transport for SchemaService. - Service for managing - [Schema][google.cloud.discoveryengine.v1alpha.Schema]s. + Service for managing `Schema + `__s. This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -355,7 +355,8 @@ def get_schema( ) -> Callable[[schema_service.GetSchemaRequest], Awaitable[schema.Schema]]: r"""Return a callable for the get schema method over gRPC. - Gets a [Schema][google.cloud.discoveryengine.v1alpha.Schema]. + Gets a `Schema + `__. Returns: Callable[[~.GetSchemaRequest], @@ -384,8 +385,8 @@ def list_schemas( ]: r"""Return a callable for the list schemas method over gRPC. - Gets a list of - [Schema][google.cloud.discoveryengine.v1alpha.Schema]s. + Gets a list of `Schema + `__s. Returns: Callable[[~.ListSchemasRequest], @@ -413,7 +414,8 @@ def create_schema( ]: r"""Return a callable for the create schema method over gRPC. - Creates a [Schema][google.cloud.discoveryengine.v1alpha.Schema]. + Creates a `Schema + `__. Returns: Callable[[~.CreateSchemaRequest], @@ -441,7 +443,8 @@ def update_schema( ]: r"""Return a callable for the update schema method over gRPC. - Updates a [Schema][google.cloud.discoveryengine.v1alpha.Schema]. + Updates a `Schema + `__. Returns: Callable[[~.UpdateSchemaRequest], @@ -469,7 +472,8 @@ def delete_schema( ]: r"""Return a callable for the delete schema method over gRPC. - Deletes a [Schema][google.cloud.discoveryengine.v1alpha.Schema]. + Deletes a `Schema + `__. Returns: Callable[[~.DeleteSchemaRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/schema_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/schema_service/transports/rest.py index 7eade9324da8..edb0a5bad3f0 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/schema_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/schema_service/transports/rest.py @@ -442,8 +442,8 @@ class SchemaServiceRestStub: class SchemaServiceRestTransport(_BaseSchemaServiceRestTransport): """REST backend synchronous transport for SchemaService. - Service for managing - [Schema][google.cloud.discoveryengine.v1alpha.Schema]s. + Service for managing `Schema + `__s. This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -735,7 +735,8 @@ def __call__( Args: request (~.schema_service.CreateSchemaRequest): The request object. Request message for - [SchemaService.CreateSchema][google.cloud.discoveryengine.v1alpha.SchemaService.CreateSchema] + `SchemaService.CreateSchema + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -887,7 +888,8 @@ def __call__( Args: request (~.schema_service.DeleteSchemaRequest): The request object. Request message for - [SchemaService.DeleteSchema][google.cloud.discoveryengine.v1alpha.SchemaService.DeleteSchema] + `SchemaService.DeleteSchema + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1034,7 +1036,8 @@ def __call__( Args: request (~.schema_service.GetSchemaRequest): The request object. Request message for - [SchemaService.GetSchema][google.cloud.discoveryengine.v1alpha.SchemaService.GetSchema] + `SchemaService.GetSchema + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1186,7 +1189,8 @@ def __call__( Args: request (~.schema_service.ListSchemasRequest): The request object. Request message for - [SchemaService.ListSchemas][google.cloud.discoveryengine.v1alpha.SchemaService.ListSchemas] + `SchemaService.ListSchemas + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1199,7 +1203,8 @@ def __call__( Returns: ~.schema_service.ListSchemasResponse: Response message for - [SchemaService.ListSchemas][google.cloud.discoveryengine.v1alpha.SchemaService.ListSchemas] + `SchemaService.ListSchemas + `__ method. """ @@ -1340,7 +1345,8 @@ def __call__( Args: request (~.schema_service.UpdateSchemaRequest): The request object. Request message for - [SchemaService.UpdateSchema][google.cloud.discoveryengine.v1alpha.SchemaService.UpdateSchema] + `SchemaService.UpdateSchema + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/search_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/search_service/async_client.py index f18a4ef0ba91..426bf7957806 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/search_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/search_service/async_client.py @@ -342,7 +342,8 @@ async def sample_search(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.SearchRequest, dict]]): The request object. Request message for - [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search] + `SearchService.Search + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -355,11 +356,13 @@ async def sample_search(): Returns: google.cloud.discoveryengine_v1alpha.services.search_service.pagers.SearchAsyncPager: Response message for - [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search] - method. + `SearchService.Search + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/search_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/search_service/client.py index 4210b449ccaa..d19816e4e097 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/search_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/search_service/client.py @@ -895,7 +895,8 @@ def sample_search(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.SearchRequest, dict]): The request object. Request message for - [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search] + `SearchService.Search + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -908,11 +909,13 @@ def sample_search(): Returns: google.cloud.discoveryengine_v1alpha.services.search_service.pagers.SearchPager: Response message for - [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search] - method. + `SearchService.Search + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/search_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/search_service/transports/base.py index c10ee30846ef..d239671add7e 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/search_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/search_service/transports/base.py @@ -84,8 +84,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -100,11 +98,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/search_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/search_service/transports/rest.py index d4feaa473f18..657d4780fa70 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/search_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/search_service/transports/rest.py @@ -335,7 +335,8 @@ def __call__( Args: request (~.search_service.SearchRequest): The request object. Request message for - [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search] + `SearchService.Search + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -348,7 +349,8 @@ def __call__( Returns: ~.search_service.SearchResponse: Response message for - [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search] + `SearchService.Search + `__ method. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/search_tuning_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/search_tuning_service/async_client.py index e689cffa1d7c..8d3cabbbdb81 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/search_tuning_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/search_tuning_service/async_client.py @@ -351,7 +351,8 @@ async def sample_train_custom_model(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.TrainCustomModelRequest, dict]]): The request object. Request message for - [SearchTuningService.TrainCustomModel][google.cloud.discoveryengine.v1alpha.SearchTuningService.TrainCustomModel] + `SearchTuningService.TrainCustomModel + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -363,12 +364,16 @@ async def sample_train_custom_model(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1alpha.types.TrainCustomModelResponse` Response of the - [TrainCustomModelRequest][google.cloud.discoveryengine.v1alpha.TrainCustomModelRequest]. - This message is returned by the - google.longrunning.Operations.response field. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1alpha.types.TrainCustomModelResponse` + Response of the `TrainCustomModelRequest + `__. + This message is returned by the + google.longrunning.Operations.response + field. """ # Create or coerce a protobuf request object. @@ -454,7 +459,8 @@ async def sample_list_custom_models(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.ListCustomModelsRequest, dict]]): The request object. Request message for - [SearchTuningService.ListCustomModels][google.cloud.discoveryengine.v1alpha.SearchTuningService.ListCustomModels] + `SearchTuningService.ListCustomModels + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -467,8 +473,9 @@ async def sample_list_custom_models(): Returns: google.cloud.discoveryengine_v1alpha.types.ListCustomModelsResponse: Response message for - [SearchTuningService.ListCustomModels][google.cloud.discoveryengine.v1alpha.SearchTuningService.ListCustomModels] - method. + `SearchTuningService.ListCustomModels + `__ + method. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/search_tuning_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/search_tuning_service/client.py index cdecbe836177..a466da994875 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/search_tuning_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/search_tuning_service/client.py @@ -809,7 +809,8 @@ def sample_train_custom_model(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.TrainCustomModelRequest, dict]): The request object. Request message for - [SearchTuningService.TrainCustomModel][google.cloud.discoveryengine.v1alpha.SearchTuningService.TrainCustomModel] + `SearchTuningService.TrainCustomModel + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -821,12 +822,16 @@ def sample_train_custom_model(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1alpha.types.TrainCustomModelResponse` Response of the - [TrainCustomModelRequest][google.cloud.discoveryengine.v1alpha.TrainCustomModelRequest]. - This message is returned by the - google.longrunning.Operations.response field. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1alpha.types.TrainCustomModelResponse` + Response of the `TrainCustomModelRequest + `__. + This message is returned by the + google.longrunning.Operations.response + field. """ # Create or coerce a protobuf request object. @@ -910,7 +915,8 @@ def sample_list_custom_models(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.ListCustomModelsRequest, dict]): The request object. Request message for - [SearchTuningService.ListCustomModels][google.cloud.discoveryengine.v1alpha.SearchTuningService.ListCustomModels] + `SearchTuningService.ListCustomModels + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -923,8 +929,9 @@ def sample_list_custom_models(): Returns: google.cloud.discoveryengine_v1alpha.types.ListCustomModelsResponse: Response message for - [SearchTuningService.ListCustomModels][google.cloud.discoveryengine.v1alpha.SearchTuningService.ListCustomModels] - method. + `SearchTuningService.ListCustomModels + `__ + method. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/search_tuning_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/search_tuning_service/transports/base.py index b4d2acd32a88..51cc4c7ce83f 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/search_tuning_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/search_tuning_service/transports/base.py @@ -84,8 +84,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -100,11 +98,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/search_tuning_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/search_tuning_service/transports/rest.py index c90fd763bfb7..4df2f12eda9f 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/search_tuning_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/search_tuning_service/transports/rest.py @@ -573,7 +573,8 @@ def __call__( Args: request (~.search_tuning_service.ListCustomModelsRequest): The request object. Request message for - [SearchTuningService.ListCustomModels][google.cloud.discoveryengine.v1alpha.SearchTuningService.ListCustomModels] + `SearchTuningService.ListCustomModels + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -586,7 +587,8 @@ def __call__( Returns: ~.search_tuning_service.ListCustomModelsResponse: Response message for - [SearchTuningService.ListCustomModels][google.cloud.discoveryengine.v1alpha.SearchTuningService.ListCustomModels] + `SearchTuningService.ListCustomModels + `__ method. """ @@ -728,7 +730,8 @@ def __call__( Args: request (~.search_tuning_service.TrainCustomModelRequest): The request object. Request message for - [SearchTuningService.TrainCustomModel][google.cloud.discoveryengine.v1alpha.SearchTuningService.TrainCustomModel] + `SearchTuningService.TrainCustomModel + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/serving_config_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/serving_config_service/async_client.py index 1447f23f774d..2bb8f80dedf9 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/serving_config_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/serving_config_service/async_client.py @@ -73,7 +73,8 @@ class ServingConfigServiceAsyncClient: """Service for operations related to - [ServingConfig][google.cloud.discoveryengine.v1alpha.ServingConfig]. + `ServingConfig + `__. """ _client: ServingConfigServiceClient @@ -319,7 +320,8 @@ async def update_serving_config( ) -> gcd_serving_config.ServingConfig: r"""Updates a ServingConfig. - Returns a NOT_FOUND error if the ServingConfig does not exist. + Returns a NOT_FOUND error if the ServingConfig does not + exist. .. code-block:: python @@ -365,12 +367,16 @@ async def sample_update_serving_config(): should not be set. update_mask (:class:`google.protobuf.field_mask_pb2.FieldMask`): Indicates which fields in the provided - [ServingConfig][google.cloud.discoveryengine.v1alpha.ServingConfig] - to update. The following are NOT supported: + `ServingConfig + `__ + to update. The following are NOT + supported: - - [ServingConfig.name][google.cloud.discoveryengine.v1alpha.ServingConfig.name] + * `ServingConfig.name + `__ - If not set, all supported fields are updated. + If not set, all supported fields are + updated. This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this @@ -492,8 +498,8 @@ async def sample_get_serving_config(): request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.GetServingConfigRequest, dict]]): The request object. Request for GetServingConfig method. name (:class:`str`): - Required. The resource name of the ServingConfig to get. - Format: + Required. The resource name of the + ServingConfig to get. Format: ``projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config_id}`` This corresponds to the ``name`` field @@ -611,8 +617,8 @@ async def sample_list_serving_configs(): The request object. Request for ListServingConfigs method. parent (:class:`str`): - Required. Full resource name of the parent resource. - Format: + Required. Full resource name of the + parent resource. Format: ``projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}`` This corresponds to the ``parent`` field diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/serving_config_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/serving_config_service/client.py index 30e9f02b87dd..1d50e19a532f 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/serving_config_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/serving_config_service/client.py @@ -119,7 +119,8 @@ def get_transport_class( class ServingConfigServiceClient(metaclass=ServingConfigServiceClientMeta): """Service for operations related to - [ServingConfig][google.cloud.discoveryengine.v1alpha.ServingConfig]. + `ServingConfig + `__. """ @staticmethod @@ -761,7 +762,8 @@ def update_serving_config( ) -> gcd_serving_config.ServingConfig: r"""Updates a ServingConfig. - Returns a NOT_FOUND error if the ServingConfig does not exist. + Returns a NOT_FOUND error if the ServingConfig does not + exist. .. code-block:: python @@ -807,12 +809,16 @@ def sample_update_serving_config(): should not be set. update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided - [ServingConfig][google.cloud.discoveryengine.v1alpha.ServingConfig] - to update. The following are NOT supported: + `ServingConfig + `__ + to update. The following are NOT + supported: - - [ServingConfig.name][google.cloud.discoveryengine.v1alpha.ServingConfig.name] + * `ServingConfig.name + `__ - If not set, all supported fields are updated. + If not set, all supported fields are + updated. This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this @@ -931,8 +937,8 @@ def sample_get_serving_config(): request (Union[google.cloud.discoveryengine_v1alpha.types.GetServingConfigRequest, dict]): The request object. Request for GetServingConfig method. name (str): - Required. The resource name of the ServingConfig to get. - Format: + Required. The resource name of the + ServingConfig to get. Format: ``projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config_id}`` This corresponds to the ``name`` field @@ -1047,8 +1053,8 @@ def sample_list_serving_configs(): The request object. Request for ListServingConfigs method. parent (str): - Required. Full resource name of the parent resource. - Format: + Required. Full resource name of the + parent resource. Format: ``projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}`` This corresponds to the ``parent`` field diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/serving_config_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/serving_config_service/transports/base.py index 29664d1552ba..a0afef2ea85a 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/serving_config_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/serving_config_service/transports/base.py @@ -88,8 +88,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -104,11 +102,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/serving_config_service/transports/grpc.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/serving_config_service/transports/grpc.py index a05f1bdc3f4f..b16b73bceb4b 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/serving_config_service/transports/grpc.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/serving_config_service/transports/grpc.py @@ -117,7 +117,8 @@ class ServingConfigServiceGrpcTransport(ServingConfigServiceTransport): """gRPC backend transport for ServingConfigService. Service for operations related to - [ServingConfig][google.cloud.discoveryengine.v1alpha.ServingConfig]. + `ServingConfig + `__. This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -339,7 +340,8 @@ def update_serving_config( Updates a ServingConfig. - Returns a NOT_FOUND error if the ServingConfig does not exist. + Returns a NOT_FOUND error if the ServingConfig does not + exist. Returns: Callable[[~.UpdateServingConfigRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/serving_config_service/transports/grpc_asyncio.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/serving_config_service/transports/grpc_asyncio.py index 3f137c837306..e8c26d63497b 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/serving_config_service/transports/grpc_asyncio.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/serving_config_service/transports/grpc_asyncio.py @@ -123,7 +123,8 @@ class ServingConfigServiceGrpcAsyncIOTransport(ServingConfigServiceTransport): """gRPC AsyncIO backend transport for ServingConfigService. Service for operations related to - [ServingConfig][google.cloud.discoveryengine.v1alpha.ServingConfig]. + `ServingConfig + `__. This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -347,7 +348,8 @@ def update_serving_config( Updates a ServingConfig. - Returns a NOT_FOUND error if the ServingConfig does not exist. + Returns a NOT_FOUND error if the ServingConfig does not + exist. Returns: Callable[[~.UpdateServingConfigRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/serving_config_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/serving_config_service/transports/rest.py index e475ede325f4..8f1c8a45bcc1 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/serving_config_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/serving_config_service/transports/rest.py @@ -345,7 +345,8 @@ class ServingConfigServiceRestTransport(_BaseServingConfigServiceRestTransport): """REST backend synchronous transport for ServingConfigService. Service for operations related to - [ServingConfig][google.cloud.discoveryengine.v1alpha.ServingConfig]. + `ServingConfig + `__. This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/session_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/session_service/async_client.py index 214877f6d77a..53ed7efacead 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/session_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/session_service/async_client.py @@ -317,8 +317,10 @@ async def create_session( ) -> gcd_session.Session: r"""Creates a Session. - If the [Session][google.cloud.discoveryengine.v1alpha.Session] - to create already exists, an ALREADY_EXISTS error is returned. + If the `Session + `__ to + create already exists, an ALREADY_EXISTS error is + returned. .. code-block:: python @@ -350,8 +352,8 @@ async def sample_create_session(): request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.CreateSessionRequest, dict]]): The request object. Request for CreateSession method. parent (:class:`str`): - Required. Full resource name of parent data store. - Format: + Required. Full resource name of parent + data store. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`` This corresponds to the ``parent`` field @@ -438,8 +440,9 @@ async def delete_session( ) -> None: r"""Deletes a Session. - If the [Session][google.cloud.discoveryengine.v1alpha.Session] - to delete does not exist, a NOT_FOUND error is returned. + If the `Session + `__ to + delete does not exist, a NOT_FOUND error is returned. .. code-block:: python @@ -468,8 +471,8 @@ async def sample_delete_session(): request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.DeleteSessionRequest, dict]]): The request object. Request for DeleteSession method. name (:class:`str`): - Required. The resource name of the Session to delete. - Format: + Required. The resource name of the + Session to delete. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`` This corresponds to the ``name`` field @@ -543,9 +546,10 @@ async def update_session( ) -> gcd_session.Session: r"""Updates a Session. - [Session][google.cloud.discoveryengine.v1alpha.Session] action - type cannot be changed. If the - [Session][google.cloud.discoveryengine.v1alpha.Session] to + `Session + `__ action + type cannot be changed. If the `Session + `__ to update does not exist, a NOT_FOUND error is returned. .. code-block:: python @@ -583,12 +587,16 @@ async def sample_update_session(): should not be set. update_mask (:class:`google.protobuf.field_mask_pb2.FieldMask`): Indicates which fields in the provided - [Session][google.cloud.discoveryengine.v1alpha.Session] - to update. The following are NOT supported: + `Session + `__ + to update. The following are NOT + supported: - - [Session.name][google.cloud.discoveryengine.v1alpha.Session.name] + * `Session.name + `__ - If not set or empty, all supported fields are updated. + If not set or empty, all supported + fields are updated. This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this @@ -701,8 +709,8 @@ async def sample_get_session(): request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.GetSessionRequest, dict]]): The request object. Request for GetSession method. name (:class:`str`): - Required. The resource name of the Session to get. - Format: + Required. The resource name of the + Session to get. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`` This corresponds to the ``name`` field @@ -781,7 +789,8 @@ async def list_sessions( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListSessionsAsyncPager: r"""Lists all Sessions by their parent - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]. + `DataStore + `__. .. code-block:: python @@ -814,7 +823,8 @@ async def sample_list_sessions(): request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.ListSessionsRequest, dict]]): The request object. Request for ListSessions method. parent (:class:`str`): - Required. The data store resource name. Format: + Required. The data store resource name. + Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`` This corresponds to the ``parent`` field @@ -938,12 +948,16 @@ async def sample_list_files(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.ListFilesRequest, dict]]): The request object. Request message for - [SessionService.ListFiles][google.cloud.discoveryengine.v1alpha.SessionService.ListFiles] + `SessionService.ListFiles + `__ method. parent (:class:`str`): - Required. The resource name of the Session. Format: + Required. The resource name of the + Session. Format: + ``projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}`` - Name of the session resource to which the file belong. + Name of the session resource to which + the file belong. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -959,11 +973,13 @@ async def sample_list_files(): Returns: google.cloud.discoveryengine_v1alpha.services.session_service.pagers.ListFilesAsyncPager: Response message for - [SessionService.ListFiles][google.cloud.discoveryengine.v1alpha.SessionService.ListFiles] - method. + `SessionService.ListFiles + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/session_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/session_service/client.py index 019b650c2ddf..fcf5f4dbdea3 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/session_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/session_service/client.py @@ -854,8 +854,10 @@ def create_session( ) -> gcd_session.Session: r"""Creates a Session. - If the [Session][google.cloud.discoveryengine.v1alpha.Session] - to create already exists, an ALREADY_EXISTS error is returned. + If the `Session + `__ to + create already exists, an ALREADY_EXISTS error is + returned. .. code-block:: python @@ -887,8 +889,8 @@ def sample_create_session(): request (Union[google.cloud.discoveryengine_v1alpha.types.CreateSessionRequest, dict]): The request object. Request for CreateSession method. parent (str): - Required. Full resource name of parent data store. - Format: + Required. Full resource name of parent + data store. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`` This corresponds to the ``parent`` field @@ -972,8 +974,9 @@ def delete_session( ) -> None: r"""Deletes a Session. - If the [Session][google.cloud.discoveryengine.v1alpha.Session] - to delete does not exist, a NOT_FOUND error is returned. + If the `Session + `__ to + delete does not exist, a NOT_FOUND error is returned. .. code-block:: python @@ -1002,8 +1005,8 @@ def sample_delete_session(): request (Union[google.cloud.discoveryengine_v1alpha.types.DeleteSessionRequest, dict]): The request object. Request for DeleteSession method. name (str): - Required. The resource name of the Session to delete. - Format: + Required. The resource name of the + Session to delete. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`` This corresponds to the ``name`` field @@ -1074,9 +1077,10 @@ def update_session( ) -> gcd_session.Session: r"""Updates a Session. - [Session][google.cloud.discoveryengine.v1alpha.Session] action - type cannot be changed. If the - [Session][google.cloud.discoveryengine.v1alpha.Session] to + `Session + `__ action + type cannot be changed. If the `Session + `__ to update does not exist, a NOT_FOUND error is returned. .. code-block:: python @@ -1114,12 +1118,16 @@ def sample_update_session(): should not be set. update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided - [Session][google.cloud.discoveryengine.v1alpha.Session] - to update. The following are NOT supported: + `Session + `__ + to update. The following are NOT + supported: - - [Session.name][google.cloud.discoveryengine.v1alpha.Session.name] + * `Session.name + `__ - If not set or empty, all supported fields are updated. + If not set or empty, all supported + fields are updated. This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this @@ -1229,8 +1237,8 @@ def sample_get_session(): request (Union[google.cloud.discoveryengine_v1alpha.types.GetSessionRequest, dict]): The request object. Request for GetSession method. name (str): - Required. The resource name of the Session to get. - Format: + Required. The resource name of the + Session to get. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`` This corresponds to the ``name`` field @@ -1306,7 +1314,8 @@ def list_sessions( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListSessionsPager: r"""Lists all Sessions by their parent - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]. + `DataStore + `__. .. code-block:: python @@ -1339,7 +1348,8 @@ def sample_list_sessions(): request (Union[google.cloud.discoveryengine_v1alpha.types.ListSessionsRequest, dict]): The request object. Request for ListSessions method. parent (str): - Required. The data store resource name. Format: + Required. The data store resource name. + Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`` This corresponds to the ``parent`` field @@ -1460,12 +1470,16 @@ def sample_list_files(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.ListFilesRequest, dict]): The request object. Request message for - [SessionService.ListFiles][google.cloud.discoveryengine.v1alpha.SessionService.ListFiles] + `SessionService.ListFiles + `__ method. parent (str): - Required. The resource name of the Session. Format: + Required. The resource name of the + Session. Format: + ``projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}`` - Name of the session resource to which the file belong. + Name of the session resource to which + the file belong. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -1481,11 +1495,13 @@ def sample_list_files(): Returns: google.cloud.discoveryengine_v1alpha.services.session_service.pagers.ListFilesPager: Response message for - [SessionService.ListFiles][google.cloud.discoveryengine.v1alpha.SessionService.ListFiles] - method. + `SessionService.ListFiles + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/session_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/session_service/transports/base.py index 7e8ee45fd992..d66aafff8521 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/session_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/session_service/transports/base.py @@ -88,8 +88,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -104,11 +102,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/session_service/transports/grpc.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/session_service/transports/grpc.py index b337438a531f..e2ae2285de71 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/session_service/transports/grpc.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/session_service/transports/grpc.py @@ -337,8 +337,10 @@ def create_session( Creates a Session. - If the [Session][google.cloud.discoveryengine.v1alpha.Session] - to create already exists, an ALREADY_EXISTS error is returned. + If the `Session + `__ to + create already exists, an ALREADY_EXISTS error is + returned. Returns: Callable[[~.CreateSessionRequest], @@ -368,8 +370,9 @@ def delete_session( Deletes a Session. - If the [Session][google.cloud.discoveryengine.v1alpha.Session] - to delete does not exist, a NOT_FOUND error is returned. + If the `Session + `__ to + delete does not exist, a NOT_FOUND error is returned. Returns: Callable[[~.DeleteSessionRequest], @@ -399,9 +402,10 @@ def update_session( Updates a Session. - [Session][google.cloud.discoveryengine.v1alpha.Session] action - type cannot be changed. If the - [Session][google.cloud.discoveryengine.v1alpha.Session] to + `Session + `__ action + type cannot be changed. If the `Session + `__ to update does not exist, a NOT_FOUND error is returned. Returns: @@ -458,7 +462,8 @@ def list_sessions( r"""Return a callable for the list sessions method over gRPC. Lists all Sessions by their parent - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]. + `DataStore + `__. Returns: Callable[[~.ListSessionsRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/session_service/transports/grpc_asyncio.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/session_service/transports/grpc_asyncio.py index 2674071048ef..b9ed74914f66 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/session_service/transports/grpc_asyncio.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/session_service/transports/grpc_asyncio.py @@ -346,8 +346,10 @@ def create_session( Creates a Session. - If the [Session][google.cloud.discoveryengine.v1alpha.Session] - to create already exists, an ALREADY_EXISTS error is returned. + If the `Session + `__ to + create already exists, an ALREADY_EXISTS error is + returned. Returns: Callable[[~.CreateSessionRequest], @@ -377,8 +379,9 @@ def delete_session( Deletes a Session. - If the [Session][google.cloud.discoveryengine.v1alpha.Session] - to delete does not exist, a NOT_FOUND error is returned. + If the `Session + `__ to + delete does not exist, a NOT_FOUND error is returned. Returns: Callable[[~.DeleteSessionRequest], @@ -409,9 +412,10 @@ def update_session( Updates a Session. - [Session][google.cloud.discoveryengine.v1alpha.Session] action - type cannot be changed. If the - [Session][google.cloud.discoveryengine.v1alpha.Session] to + `Session + `__ action + type cannot be changed. If the `Session + `__ to update does not exist, a NOT_FOUND error is returned. Returns: @@ -470,7 +474,8 @@ def list_sessions( r"""Return a callable for the list sessions method over gRPC. Lists all Sessions by their parent - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]. + `DataStore + `__. Returns: Callable[[~.ListSessionsRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/session_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/session_service/transports/rest.py index bfc68a801c15..c2fa2ce2df07 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/session_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/session_service/transports/rest.py @@ -990,7 +990,8 @@ def __call__( Args: request (~.session_service.ListFilesRequest): The request object. Request message for - [SessionService.ListFiles][google.cloud.discoveryengine.v1alpha.SessionService.ListFiles] + `SessionService.ListFiles + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1003,7 +1004,8 @@ def __call__( Returns: ~.session_service.ListFilesResponse: Response message for - [SessionService.ListFiles][google.cloud.discoveryengine.v1alpha.SessionService.ListFiles] + `SessionService.ListFiles + `__ method. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/site_search_engine_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/site_search_engine_service/async_client.py index e7afd8396e21..21364a486697 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/site_search_engine_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/site_search_engine_service/async_client.py @@ -329,7 +329,8 @@ async def get_site_search_engine( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> site_search_engine.SiteSearchEngine: r"""Gets the - [SiteSearchEngine][google.cloud.discoveryengine.v1alpha.SiteSearchEngine]. + `SiteSearchEngine + `__. .. code-block:: python @@ -360,17 +361,20 @@ async def sample_get_site_search_engine(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.GetSiteSearchEngineRequest, dict]]): The request object. Request message for - [SiteSearchEngineService.GetSiteSearchEngine][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.GetSiteSearchEngine] + `SiteSearchEngineService.GetSiteSearchEngine + `__ method. name (:class:`str`): Required. Resource name of - [SiteSearchEngine][google.cloud.discoveryengine.v1alpha.SiteSearchEngine], + `SiteSearchEngine + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine``. - If the caller does not have permission to access the - [SiteSearchEngine], regardless of whether or not it - exists, a PERMISSION_DENIED error is returned. + If the caller does not have permission + to access the [SiteSearchEngine], + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -454,8 +458,8 @@ async def create_target_site( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: - r"""Creates a - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite]. + r"""Creates a `TargetSite + `__. .. code-block:: python @@ -494,11 +498,13 @@ async def sample_create_target_site(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.CreateTargetSiteRequest, dict]]): The request object. Request message for - [SiteSearchEngineService.CreateTargetSite][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.CreateTargetSite] + `SiteSearchEngineService.CreateTargetSite + `__ method. parent (:class:`str`): Required. Parent resource name of - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite], + `TargetSite + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine``. @@ -506,8 +512,8 @@ async def sample_create_target_site(): on the ``request`` instance; if ``request`` is provided, this should not be set. target_site (:class:`google.cloud.discoveryengine_v1alpha.types.TargetSite`): - Required. The - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite] + Required. The `TargetSite + `__ to create. This corresponds to the ``target_site`` field @@ -523,9 +529,10 @@ async def sample_create_target_site(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be + An object representing a long-running + operation. + The result type for the operation will + be :class:`google.cloud.discoveryengine_v1alpha.types.TargetSite` A target site for the SiteSearchEngine. @@ -599,8 +606,8 @@ async def batch_create_target_sites( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: - r"""Creates - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite] in + r"""Creates `TargetSite + `__ in a batch. .. code-block:: python @@ -641,7 +648,8 @@ async def sample_batch_create_target_sites(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.BatchCreateTargetSitesRequest, dict]]): The request object. Request message for - [SiteSearchEngineService.BatchCreateTargetSites][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.BatchCreateTargetSites] + `SiteSearchEngineService.BatchCreateTargetSites + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -653,11 +661,15 @@ async def sample_batch_create_target_sites(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1alpha.types.BatchCreateTargetSitesResponse` Response message for - [SiteSearchEngineService.BatchCreateTargetSites][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.BatchCreateTargetSites] - method. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1alpha.types.BatchCreateTargetSitesResponse` + Response message for + `SiteSearchEngineService.BatchCreateTargetSites + `__ + method. """ # Create or coerce a protobuf request object. @@ -713,8 +725,8 @@ async def get_target_site( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> site_search_engine.TargetSite: - r"""Gets a - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite]. + r"""Gets a `TargetSite + `__. .. code-block:: python @@ -745,22 +757,27 @@ async def sample_get_target_site(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.GetTargetSiteRequest, dict]]): The request object. Request message for - [SiteSearchEngineService.GetTargetSite][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.GetTargetSite] + `SiteSearchEngineService.GetTargetSite + `__ method. name (:class:`str`): Required. Full resource name of - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite], + `TargetSite + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}``. - If the caller does not have permission to access the - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to access the `TargetSite + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. If the requested - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite] - does not exist, a NOT_FOUND error is returned. + `TargetSite + `__ + does not exist, a NOT_FOUND error is + returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -839,8 +856,8 @@ async def update_target_site( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: - r"""Updates a - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite]. + r"""Updates a `TargetSite + `__. .. code-block:: python @@ -878,18 +895,21 @@ async def sample_update_target_site(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.UpdateTargetSiteRequest, dict]]): The request object. Request message for - [SiteSearchEngineService.UpdateTargetSite][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.UpdateTargetSite] + `SiteSearchEngineService.UpdateTargetSite + `__ method. target_site (:class:`google.cloud.discoveryengine_v1alpha.types.TargetSite`): - Required. The target site to update. If the caller does - not have permission to update the - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. - - If the - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite] - to update does not exist, a NOT_FOUND error is returned. + Required. The target site to update. + If the caller does not have permission + to update the `TargetSite + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. + + If the `TargetSite + `__ + to update does not exist, a NOT_FOUND + error is returned. This corresponds to the ``target_site`` field on the ``request`` instance; if ``request`` is provided, this @@ -904,9 +924,10 @@ async def sample_update_target_site(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be + An object representing a long-running + operation. + The result type for the operation will + be :class:`google.cloud.discoveryengine_v1alpha.types.TargetSite` A target site for the SiteSearchEngine. @@ -981,8 +1002,8 @@ async def delete_target_site( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: - r"""Deletes a - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite]. + r"""Deletes a `TargetSite + `__. .. code-block:: python @@ -1017,22 +1038,27 @@ async def sample_delete_target_site(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.DeleteTargetSiteRequest, dict]]): The request object. Request message for - [SiteSearchEngineService.DeleteTargetSite][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.DeleteTargetSite] + `SiteSearchEngineService.DeleteTargetSite + `__ method. name (:class:`str`): Required. Full resource name of - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite], + `TargetSite + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}``. - If the caller does not have permission to access the - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to access the `TargetSite + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. If the requested - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite] - does not exist, a NOT_FOUND error is returned. + `TargetSite + `__ + does not exist, a NOT_FOUND error is + returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1047,18 +1073,21 @@ async def sample_delete_target_site(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.protobuf.empty_pb2.Empty` A generic empty message that you can re-use to avoid defining duplicated - empty messages in your APIs. A typical example is to - use it as the request or the response type of an API - method. For instance: - - service Foo { - rpc Bar(google.protobuf.Empty) returns - (google.protobuf.Empty); - - } + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.protobuf.empty_pb2.Empty` + A generic empty message that you can + re-use to avoid defining duplicated + empty messages in your APIs. A typical + example is to use it as the request or + the response type of an API method. For + instance: + + service Foo { + rpc Bar(google.protobuf.Empty) + returns (google.protobuf.Empty); } """ # Create or coerce a protobuf request object. @@ -1130,7 +1159,8 @@ async def list_target_sites( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListTargetSitesAsyncPager: r"""Gets a list of - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite]s. + `TargetSite + `__s. .. code-block:: python @@ -1162,17 +1192,20 @@ async def sample_list_target_sites(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.ListTargetSitesRequest, dict]]): The request object. Request message for - [SiteSearchEngineService.ListTargetSites][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.ListTargetSites] + `SiteSearchEngineService.ListTargetSites + `__ method. parent (:class:`str`): - Required. The parent site search engine resource name, - such as + Required. The parent site search engine + resource name, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine``. - If the caller does not have permission to list - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite]s - under this site search engine, regardless of whether or - not this branch exists, a PERMISSION_DENIED error is + If the caller does not have permission + to list `TargetSite + `__s + under this site search engine, + regardless of whether or not this branch + exists, a PERMISSION_DENIED error is returned. This corresponds to the ``parent`` field @@ -1189,11 +1222,13 @@ async def sample_list_target_sites(): Returns: google.cloud.discoveryengine_v1alpha.services.site_search_engine_service.pagers.ListTargetSitesAsyncPager: Response message for - [SiteSearchEngineService.ListTargetSites][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.ListTargetSites] - method. + `SiteSearchEngineService.ListTargetSites + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -1302,7 +1337,8 @@ async def sample_enable_advanced_site_search(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.EnableAdvancedSiteSearchRequest, dict]]): The request object. Request message for - [SiteSearchEngineService.EnableAdvancedSiteSearch][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.EnableAdvancedSiteSearch] + `SiteSearchEngineService.EnableAdvancedSiteSearch + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -1314,11 +1350,15 @@ async def sample_enable_advanced_site_search(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1alpha.types.EnableAdvancedSiteSearchResponse` Response message for - [SiteSearchEngineService.EnableAdvancedSiteSearch][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.EnableAdvancedSiteSearch] - method. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1alpha.types.EnableAdvancedSiteSearchResponse` + Response message for + `SiteSearchEngineService.EnableAdvancedSiteSearch + `__ + method. """ # Create or coerce a protobuf request object. @@ -1413,7 +1453,8 @@ async def sample_disable_advanced_site_search(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.DisableAdvancedSiteSearchRequest, dict]]): The request object. Request message for - [SiteSearchEngineService.DisableAdvancedSiteSearch][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.DisableAdvancedSiteSearch] + `SiteSearchEngineService.DisableAdvancedSiteSearch + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -1425,11 +1466,15 @@ async def sample_disable_advanced_site_search(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1alpha.types.DisableAdvancedSiteSearchResponse` Response message for - [SiteSearchEngineService.DisableAdvancedSiteSearch][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.DisableAdvancedSiteSearch] - method. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1alpha.types.DisableAdvancedSiteSearchResponse` + Response message for + `SiteSearchEngineService.DisableAdvancedSiteSearch + `__ + method. """ # Create or coerce a protobuf request object. @@ -1524,7 +1569,8 @@ async def sample_recrawl_uris(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.RecrawlUrisRequest, dict]]): The request object. Request message for - [SiteSearchEngineService.RecrawlUris][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.RecrawlUris] + `SiteSearchEngineService.RecrawlUris + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -1536,11 +1582,15 @@ async def sample_recrawl_uris(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1alpha.types.RecrawlUrisResponse` Response message for - [SiteSearchEngineService.RecrawlUris][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.RecrawlUris] - method. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1alpha.types.RecrawlUrisResponse` + Response message for + `SiteSearchEngineService.RecrawlUris + `__ + method. """ # Create or coerce a protobuf request object. @@ -1632,7 +1682,8 @@ async def sample_batch_verify_target_sites(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.BatchVerifyTargetSitesRequest, dict]]): The request object. Request message for - [SiteSearchEngineService.BatchVerifyTargetSites][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.BatchVerifyTargetSites] + `SiteSearchEngineService.BatchVerifyTargetSites + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -1644,11 +1695,15 @@ async def sample_batch_verify_target_sites(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1alpha.types.BatchVerifyTargetSitesResponse` Response message for - [SiteSearchEngineService.BatchVerifyTargetSites][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.BatchVerifyTargetSites] - method. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1alpha.types.BatchVerifyTargetSitesResponse` + Response message for + `SiteSearchEngineService.BatchVerifyTargetSites + `__ + method. """ # Create or coerce a protobuf request object. @@ -1703,9 +1758,10 @@ async def fetch_domain_verification_status( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.FetchDomainVerificationStatusAsyncPager: - r"""Returns list of target sites with its domain verification - status. This method can only be called under data store with - BASIC_SITE_SEARCH state at the moment. + r"""Returns list of target sites with its domain + verification status. This method can only be called + under data store with BASIC_SITE_SEARCH state at the + moment. .. code-block:: python @@ -1737,7 +1793,8 @@ async def sample_fetch_domain_verification_status(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.FetchDomainVerificationStatusRequest, dict]]): The request object. Request message for - [SiteSearchEngineService.FetchDomainVerificationStatus][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.FetchDomainVerificationStatus] + `SiteSearchEngineService.FetchDomainVerificationStatus + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -1750,11 +1807,13 @@ async def sample_fetch_domain_verification_status(): Returns: google.cloud.discoveryengine_v1alpha.services.site_search_engine_service.pagers.FetchDomainVerificationStatusAsyncPager: Response message for - [SiteSearchEngineService.FetchDomainVerificationStatus][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.FetchDomainVerificationStatus] - method. + `SiteSearchEngineService.FetchDomainVerificationStatus + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -1852,7 +1911,8 @@ async def sample_set_uri_pattern_document_data(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.SetUriPatternDocumentDataRequest, dict]]): The request object. Request message for - [SiteSearchEngineService.SetUriPatternDocumentData][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.SetUriPatternDocumentData] + `SiteSearchEngineService.SetUriPatternDocumentData + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -1864,11 +1924,15 @@ async def sample_set_uri_pattern_document_data(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1alpha.types.SetUriPatternDocumentDataResponse` Response message for - [SiteSearchEngineService.SetUriPatternDocumentData][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.SetUriPatternDocumentData] - method. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1alpha.types.SetUriPatternDocumentDataResponse` + Response message for + `SiteSearchEngineService.SetUriPatternDocumentData + `__ + method. """ # Create or coerce a protobuf request object. @@ -1959,7 +2023,8 @@ async def sample_get_uri_pattern_document_data(): Args: request (Optional[Union[google.cloud.discoveryengine_v1alpha.types.GetUriPatternDocumentDataRequest, dict]]): The request object. Request message for - [SiteSearchEngineService.GetUriPatternDocumentData][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.GetUriPatternDocumentData] + `SiteSearchEngineService.GetUriPatternDocumentData + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -1972,8 +2037,9 @@ async def sample_get_uri_pattern_document_data(): Returns: google.cloud.discoveryengine_v1alpha.types.GetUriPatternDocumentDataResponse: Response message for - [SiteSearchEngineService.GetUriPatternDocumentData][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.GetUriPatternDocumentData] - method. + `SiteSearchEngineService.GetUriPatternDocumentData + `__ + method. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/site_search_engine_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/site_search_engine_service/client.py index 6c294d3ea8e0..1a0d8101d9cd 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/site_search_engine_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/site_search_engine_service/client.py @@ -785,7 +785,8 @@ def get_site_search_engine( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> site_search_engine.SiteSearchEngine: r"""Gets the - [SiteSearchEngine][google.cloud.discoveryengine.v1alpha.SiteSearchEngine]. + `SiteSearchEngine + `__. .. code-block:: python @@ -816,17 +817,20 @@ def sample_get_site_search_engine(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.GetSiteSearchEngineRequest, dict]): The request object. Request message for - [SiteSearchEngineService.GetSiteSearchEngine][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.GetSiteSearchEngine] + `SiteSearchEngineService.GetSiteSearchEngine + `__ method. name (str): Required. Resource name of - [SiteSearchEngine][google.cloud.discoveryengine.v1alpha.SiteSearchEngine], + `SiteSearchEngine + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine``. - If the caller does not have permission to access the - [SiteSearchEngine], regardless of whether or not it - exists, a PERMISSION_DENIED error is returned. + If the caller does not have permission + to access the [SiteSearchEngine], + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -907,8 +911,8 @@ def create_target_site( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: - r"""Creates a - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite]. + r"""Creates a `TargetSite + `__. .. code-block:: python @@ -947,11 +951,13 @@ def sample_create_target_site(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.CreateTargetSiteRequest, dict]): The request object. Request message for - [SiteSearchEngineService.CreateTargetSite][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.CreateTargetSite] + `SiteSearchEngineService.CreateTargetSite + `__ method. parent (str): Required. Parent resource name of - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite], + `TargetSite + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine``. @@ -959,8 +965,8 @@ def sample_create_target_site(): on the ``request`` instance; if ``request`` is provided, this should not be set. target_site (google.cloud.discoveryengine_v1alpha.types.TargetSite): - Required. The - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite] + Required. The `TargetSite + `__ to create. This corresponds to the ``target_site`` field @@ -976,9 +982,10 @@ def sample_create_target_site(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be + An object representing a long-running + operation. + The result type for the operation will + be :class:`google.cloud.discoveryengine_v1alpha.types.TargetSite` A target site for the SiteSearchEngine. @@ -1049,8 +1056,8 @@ def batch_create_target_sites( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: - r"""Creates - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite] in + r"""Creates `TargetSite + `__ in a batch. .. code-block:: python @@ -1091,7 +1098,8 @@ def sample_batch_create_target_sites(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.BatchCreateTargetSitesRequest, dict]): The request object. Request message for - [SiteSearchEngineService.BatchCreateTargetSites][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.BatchCreateTargetSites] + `SiteSearchEngineService.BatchCreateTargetSites + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1103,11 +1111,15 @@ def sample_batch_create_target_sites(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1alpha.types.BatchCreateTargetSitesResponse` Response message for - [SiteSearchEngineService.BatchCreateTargetSites][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.BatchCreateTargetSites] - method. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1alpha.types.BatchCreateTargetSitesResponse` + Response message for + `SiteSearchEngineService.BatchCreateTargetSites + `__ + method. """ # Create or coerce a protobuf request object. @@ -1163,8 +1175,8 @@ def get_target_site( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> site_search_engine.TargetSite: - r"""Gets a - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite]. + r"""Gets a `TargetSite + `__. .. code-block:: python @@ -1195,22 +1207,27 @@ def sample_get_target_site(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.GetTargetSiteRequest, dict]): The request object. Request message for - [SiteSearchEngineService.GetTargetSite][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.GetTargetSite] + `SiteSearchEngineService.GetTargetSite + `__ method. name (str): Required. Full resource name of - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite], + `TargetSite + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}``. - If the caller does not have permission to access the - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to access the `TargetSite + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. If the requested - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite] - does not exist, a NOT_FOUND error is returned. + `TargetSite + `__ + does not exist, a NOT_FOUND error is + returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1286,8 +1303,8 @@ def update_target_site( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: - r"""Updates a - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite]. + r"""Updates a `TargetSite + `__. .. code-block:: python @@ -1325,18 +1342,21 @@ def sample_update_target_site(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.UpdateTargetSiteRequest, dict]): The request object. Request message for - [SiteSearchEngineService.UpdateTargetSite][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.UpdateTargetSite] + `SiteSearchEngineService.UpdateTargetSite + `__ method. target_site (google.cloud.discoveryengine_v1alpha.types.TargetSite): - Required. The target site to update. If the caller does - not have permission to update the - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. - - If the - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite] - to update does not exist, a NOT_FOUND error is returned. + Required. The target site to update. + If the caller does not have permission + to update the `TargetSite + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. + + If the `TargetSite + `__ + to update does not exist, a NOT_FOUND + error is returned. This corresponds to the ``target_site`` field on the ``request`` instance; if ``request`` is provided, this @@ -1351,9 +1371,10 @@ def sample_update_target_site(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be + An object representing a long-running + operation. + The result type for the operation will + be :class:`google.cloud.discoveryengine_v1alpha.types.TargetSite` A target site for the SiteSearchEngine. @@ -1425,8 +1446,8 @@ def delete_target_site( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: - r"""Deletes a - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite]. + r"""Deletes a `TargetSite + `__. .. code-block:: python @@ -1461,22 +1482,27 @@ def sample_delete_target_site(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.DeleteTargetSiteRequest, dict]): The request object. Request message for - [SiteSearchEngineService.DeleteTargetSite][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.DeleteTargetSite] + `SiteSearchEngineService.DeleteTargetSite + `__ method. name (str): Required. Full resource name of - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite], + `TargetSite + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}``. - If the caller does not have permission to access the - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to access the `TargetSite + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. If the requested - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite] - does not exist, a NOT_FOUND error is returned. + `TargetSite + `__ + does not exist, a NOT_FOUND error is + returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1491,18 +1517,21 @@ def sample_delete_target_site(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.protobuf.empty_pb2.Empty` A generic empty message that you can re-use to avoid defining duplicated - empty messages in your APIs. A typical example is to - use it as the request or the response type of an API - method. For instance: - - service Foo { - rpc Bar(google.protobuf.Empty) returns - (google.protobuf.Empty); - - } + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.protobuf.empty_pb2.Empty` + A generic empty message that you can + re-use to avoid defining duplicated + empty messages in your APIs. A typical + example is to use it as the request or + the response type of an API method. For + instance: + + service Foo { + rpc Bar(google.protobuf.Empty) + returns (google.protobuf.Empty); } """ # Create or coerce a protobuf request object. @@ -1571,7 +1600,8 @@ def list_target_sites( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListTargetSitesPager: r"""Gets a list of - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite]s. + `TargetSite + `__s. .. code-block:: python @@ -1603,17 +1633,20 @@ def sample_list_target_sites(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.ListTargetSitesRequest, dict]): The request object. Request message for - [SiteSearchEngineService.ListTargetSites][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.ListTargetSites] + `SiteSearchEngineService.ListTargetSites + `__ method. parent (str): - Required. The parent site search engine resource name, - such as + Required. The parent site search engine + resource name, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine``. - If the caller does not have permission to list - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite]s - under this site search engine, regardless of whether or - not this branch exists, a PERMISSION_DENIED error is + If the caller does not have permission + to list `TargetSite + `__s + under this site search engine, + regardless of whether or not this branch + exists, a PERMISSION_DENIED error is returned. This corresponds to the ``parent`` field @@ -1630,11 +1663,13 @@ def sample_list_target_sites(): Returns: google.cloud.discoveryengine_v1alpha.services.site_search_engine_service.pagers.ListTargetSitesPager: Response message for - [SiteSearchEngineService.ListTargetSites][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.ListTargetSites] - method. + `SiteSearchEngineService.ListTargetSites + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -1740,7 +1775,8 @@ def sample_enable_advanced_site_search(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.EnableAdvancedSiteSearchRequest, dict]): The request object. Request message for - [SiteSearchEngineService.EnableAdvancedSiteSearch][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.EnableAdvancedSiteSearch] + `SiteSearchEngineService.EnableAdvancedSiteSearch + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1752,11 +1788,15 @@ def sample_enable_advanced_site_search(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1alpha.types.EnableAdvancedSiteSearchResponse` Response message for - [SiteSearchEngineService.EnableAdvancedSiteSearch][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.EnableAdvancedSiteSearch] - method. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1alpha.types.EnableAdvancedSiteSearchResponse` + Response message for + `SiteSearchEngineService.EnableAdvancedSiteSearch + `__ + method. """ # Create or coerce a protobuf request object. @@ -1851,7 +1891,8 @@ def sample_disable_advanced_site_search(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.DisableAdvancedSiteSearchRequest, dict]): The request object. Request message for - [SiteSearchEngineService.DisableAdvancedSiteSearch][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.DisableAdvancedSiteSearch] + `SiteSearchEngineService.DisableAdvancedSiteSearch + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1863,11 +1904,15 @@ def sample_disable_advanced_site_search(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1alpha.types.DisableAdvancedSiteSearchResponse` Response message for - [SiteSearchEngineService.DisableAdvancedSiteSearch][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.DisableAdvancedSiteSearch] - method. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1alpha.types.DisableAdvancedSiteSearchResponse` + Response message for + `SiteSearchEngineService.DisableAdvancedSiteSearch + `__ + method. """ # Create or coerce a protobuf request object. @@ -1962,7 +2007,8 @@ def sample_recrawl_uris(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.RecrawlUrisRequest, dict]): The request object. Request message for - [SiteSearchEngineService.RecrawlUris][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.RecrawlUris] + `SiteSearchEngineService.RecrawlUris + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1974,11 +2020,15 @@ def sample_recrawl_uris(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1alpha.types.RecrawlUrisResponse` Response message for - [SiteSearchEngineService.RecrawlUris][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.RecrawlUris] - method. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1alpha.types.RecrawlUrisResponse` + Response message for + `SiteSearchEngineService.RecrawlUris + `__ + method. """ # Create or coerce a protobuf request object. @@ -2068,7 +2118,8 @@ def sample_batch_verify_target_sites(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.BatchVerifyTargetSitesRequest, dict]): The request object. Request message for - [SiteSearchEngineService.BatchVerifyTargetSites][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.BatchVerifyTargetSites] + `SiteSearchEngineService.BatchVerifyTargetSites + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -2080,11 +2131,15 @@ def sample_batch_verify_target_sites(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1alpha.types.BatchVerifyTargetSitesResponse` Response message for - [SiteSearchEngineService.BatchVerifyTargetSites][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.BatchVerifyTargetSites] - method. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1alpha.types.BatchVerifyTargetSitesResponse` + Response message for + `SiteSearchEngineService.BatchVerifyTargetSites + `__ + method. """ # Create or coerce a protobuf request object. @@ -2139,9 +2194,10 @@ def fetch_domain_verification_status( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.FetchDomainVerificationStatusPager: - r"""Returns list of target sites with its domain verification - status. This method can only be called under data store with - BASIC_SITE_SEARCH state at the moment. + r"""Returns list of target sites with its domain + verification status. This method can only be called + under data store with BASIC_SITE_SEARCH state at the + moment. .. code-block:: python @@ -2173,7 +2229,8 @@ def sample_fetch_domain_verification_status(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.FetchDomainVerificationStatusRequest, dict]): The request object. Request message for - [SiteSearchEngineService.FetchDomainVerificationStatus][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.FetchDomainVerificationStatus] + `SiteSearchEngineService.FetchDomainVerificationStatus + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -2186,11 +2243,13 @@ def sample_fetch_domain_verification_status(): Returns: google.cloud.discoveryengine_v1alpha.services.site_search_engine_service.pagers.FetchDomainVerificationStatusPager: Response message for - [SiteSearchEngineService.FetchDomainVerificationStatus][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.FetchDomainVerificationStatus] - method. + `SiteSearchEngineService.FetchDomainVerificationStatus + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -2288,7 +2347,8 @@ def sample_set_uri_pattern_document_data(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.SetUriPatternDocumentDataRequest, dict]): The request object. Request message for - [SiteSearchEngineService.SetUriPatternDocumentData][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.SetUriPatternDocumentData] + `SiteSearchEngineService.SetUriPatternDocumentData + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -2300,11 +2360,15 @@ def sample_set_uri_pattern_document_data(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1alpha.types.SetUriPatternDocumentDataResponse` Response message for - [SiteSearchEngineService.SetUriPatternDocumentData][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.SetUriPatternDocumentData] - method. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1alpha.types.SetUriPatternDocumentDataResponse` + Response message for + `SiteSearchEngineService.SetUriPatternDocumentData + `__ + method. """ # Create or coerce a protobuf request object. @@ -2395,7 +2459,8 @@ def sample_get_uri_pattern_document_data(): Args: request (Union[google.cloud.discoveryengine_v1alpha.types.GetUriPatternDocumentDataRequest, dict]): The request object. Request message for - [SiteSearchEngineService.GetUriPatternDocumentData][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.GetUriPatternDocumentData] + `SiteSearchEngineService.GetUriPatternDocumentData + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -2408,8 +2473,9 @@ def sample_get_uri_pattern_document_data(): Returns: google.cloud.discoveryengine_v1alpha.types.GetUriPatternDocumentDataResponse: Response message for - [SiteSearchEngineService.GetUriPatternDocumentData][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.GetUriPatternDocumentData] - method. + `SiteSearchEngineService.GetUriPatternDocumentData + `__ + method. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/site_search_engine_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/site_search_engine_service/transports/base.py index 35efbc6c11ad..06979ffb4e17 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/site_search_engine_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/site_search_engine_service/transports/base.py @@ -87,8 +87,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -103,11 +101,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/site_search_engine_service/transports/grpc.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/site_search_engine_service/transports/grpc.py index 8f382f491cae..b5e670647b97 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/site_search_engine_service/transports/grpc.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/site_search_engine_service/transports/grpc.py @@ -353,7 +353,8 @@ def get_site_search_engine( r"""Return a callable for the get site search engine method over gRPC. Gets the - [SiteSearchEngine][google.cloud.discoveryengine.v1alpha.SiteSearchEngine]. + `SiteSearchEngine + `__. Returns: Callable[[~.GetSiteSearchEngineRequest], @@ -381,8 +382,8 @@ def create_target_site( ]: r"""Return a callable for the create target site method over gRPC. - Creates a - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite]. + Creates a `TargetSite + `__. Returns: Callable[[~.CreateTargetSiteRequest], @@ -411,8 +412,8 @@ def batch_create_target_sites( ]: r"""Return a callable for the batch create target sites method over gRPC. - Creates - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite] in + Creates `TargetSite + `__ in a batch. Returns: @@ -441,8 +442,8 @@ def get_target_site( ]: r"""Return a callable for the get target site method over gRPC. - Gets a - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite]. + Gets a `TargetSite + `__. Returns: Callable[[~.GetTargetSiteRequest], @@ -470,8 +471,8 @@ def update_target_site( ]: r"""Return a callable for the update target site method over gRPC. - Updates a - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite]. + Updates a `TargetSite + `__. Returns: Callable[[~.UpdateTargetSiteRequest], @@ -499,8 +500,8 @@ def delete_target_site( ]: r"""Return a callable for the delete target site method over gRPC. - Deletes a - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite]. + Deletes a `TargetSite + `__. Returns: Callable[[~.DeleteTargetSiteRequest], @@ -530,7 +531,8 @@ def list_target_sites( r"""Return a callable for the list target sites method over gRPC. Gets a list of - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite]s. + `TargetSite + `__s. Returns: Callable[[~.ListTargetSitesRequest], @@ -683,9 +685,10 @@ def fetch_domain_verification_status( r"""Return a callable for the fetch domain verification status method over gRPC. - Returns list of target sites with its domain verification - status. This method can only be called under data store with - BASIC_SITE_SEARCH state at the moment. + Returns list of target sites with its domain + verification status. This method can only be called + under data store with BASIC_SITE_SEARCH state at the + moment. Returns: Callable[[~.FetchDomainVerificationStatusRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/site_search_engine_service/transports/grpc_asyncio.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/site_search_engine_service/transports/grpc_asyncio.py index 2ed1e259fb54..663443d64a8d 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/site_search_engine_service/transports/grpc_asyncio.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/site_search_engine_service/transports/grpc_asyncio.py @@ -361,7 +361,8 @@ def get_site_search_engine( r"""Return a callable for the get site search engine method over gRPC. Gets the - [SiteSearchEngine][google.cloud.discoveryengine.v1alpha.SiteSearchEngine]. + `SiteSearchEngine + `__. Returns: Callable[[~.GetSiteSearchEngineRequest], @@ -390,8 +391,8 @@ def create_target_site( ]: r"""Return a callable for the create target site method over gRPC. - Creates a - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite]. + Creates a `TargetSite + `__. Returns: Callable[[~.CreateTargetSiteRequest], @@ -420,8 +421,8 @@ def batch_create_target_sites( ]: r"""Return a callable for the batch create target sites method over gRPC. - Creates - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite] in + Creates `TargetSite + `__ in a batch. Returns: @@ -451,8 +452,8 @@ def get_target_site( ]: r"""Return a callable for the get target site method over gRPC. - Gets a - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite]. + Gets a `TargetSite + `__. Returns: Callable[[~.GetTargetSiteRequest], @@ -481,8 +482,8 @@ def update_target_site( ]: r"""Return a callable for the update target site method over gRPC. - Updates a - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite]. + Updates a `TargetSite + `__. Returns: Callable[[~.UpdateTargetSiteRequest], @@ -511,8 +512,8 @@ def delete_target_site( ]: r"""Return a callable for the delete target site method over gRPC. - Deletes a - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite]. + Deletes a `TargetSite + `__. Returns: Callable[[~.DeleteTargetSiteRequest], @@ -542,7 +543,8 @@ def list_target_sites( r"""Return a callable for the list target sites method over gRPC. Gets a list of - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite]s. + `TargetSite + `__s. Returns: Callable[[~.ListTargetSitesRequest], @@ -696,9 +698,10 @@ def fetch_domain_verification_status( r"""Return a callable for the fetch domain verification status method over gRPC. - Returns list of target sites with its domain verification - status. This method can only be called under data store with - BASIC_SITE_SEARCH state at the moment. + Returns list of target sites with its domain + verification status. This method can only be called + under data store with BASIC_SITE_SEARCH state at the + moment. Returns: Callable[[~.FetchDomainVerificationStatusRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/site_search_engine_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/site_search_engine_service/transports/rest.py index 7fc6fb032896..386bc8783b87 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/site_search_engine_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/site_search_engine_service/transports/rest.py @@ -1269,7 +1269,8 @@ def __call__( Args: request (~.site_search_engine_service.BatchCreateTargetSitesRequest): The request object. Request message for - [SiteSearchEngineService.BatchCreateTargetSites][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.BatchCreateTargetSites] + `SiteSearchEngineService.BatchCreateTargetSites + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1425,7 +1426,8 @@ def __call__( Args: request (~.site_search_engine_service.BatchVerifyTargetSitesRequest): The request object. Request message for - [SiteSearchEngineService.BatchVerifyTargetSites][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.BatchVerifyTargetSites] + `SiteSearchEngineService.BatchVerifyTargetSites + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1581,7 +1583,8 @@ def __call__( Args: request (~.site_search_engine_service.CreateTargetSiteRequest): The request object. Request message for - [SiteSearchEngineService.CreateTargetSite][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.CreateTargetSite] + `SiteSearchEngineService.CreateTargetSite + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1738,7 +1741,8 @@ def __call__( Args: request (~.site_search_engine_service.DeleteTargetSiteRequest): The request object. Request message for - [SiteSearchEngineService.DeleteTargetSite][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.DeleteTargetSite] + `SiteSearchEngineService.DeleteTargetSite + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1894,7 +1898,8 @@ def __call__( Args: request (~.site_search_engine_service.DisableAdvancedSiteSearchRequest): The request object. Request message for - [SiteSearchEngineService.DisableAdvancedSiteSearch][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.DisableAdvancedSiteSearch] + `SiteSearchEngineService.DisableAdvancedSiteSearch + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -2051,7 +2056,8 @@ def __call__( Args: request (~.site_search_engine_service.EnableAdvancedSiteSearchRequest): The request object. Request message for - [SiteSearchEngineService.EnableAdvancedSiteSearch][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.EnableAdvancedSiteSearch] + `SiteSearchEngineService.EnableAdvancedSiteSearch + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -2209,7 +2215,8 @@ def __call__( Args: request (~.site_search_engine_service.FetchDomainVerificationStatusRequest): The request object. Request message for - [SiteSearchEngineService.FetchDomainVerificationStatus][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.FetchDomainVerificationStatus] + `SiteSearchEngineService.FetchDomainVerificationStatus + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -2222,7 +2229,8 @@ def __call__( Returns: ~.site_search_engine_service.FetchDomainVerificationStatusResponse: Response message for - [SiteSearchEngineService.FetchDomainVerificationStatus][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.FetchDomainVerificationStatus] + `SiteSearchEngineService.FetchDomainVerificationStatus + `__ method. """ @@ -2370,7 +2378,8 @@ def __call__( Args: request (~.site_search_engine_service.GetSiteSearchEngineRequest): The request object. Request message for - [SiteSearchEngineService.GetSiteSearchEngine][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.GetSiteSearchEngine] + `SiteSearchEngineService.GetSiteSearchEngine + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -2527,7 +2536,8 @@ def __call__( Args: request (~.site_search_engine_service.GetTargetSiteRequest): The request object. Request message for - [SiteSearchEngineService.GetTargetSite][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.GetTargetSite] + `SiteSearchEngineService.GetTargetSite + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -2681,7 +2691,8 @@ def __call__( Args: request (~.site_search_engine_service.GetUriPatternDocumentDataRequest): The request object. Request message for - [SiteSearchEngineService.GetUriPatternDocumentData][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.GetUriPatternDocumentData] + `SiteSearchEngineService.GetUriPatternDocumentData + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -2694,7 +2705,8 @@ def __call__( Returns: ~.site_search_engine_service.GetUriPatternDocumentDataResponse: Response message for - [SiteSearchEngineService.GetUriPatternDocumentData][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.GetUriPatternDocumentData] + `SiteSearchEngineService.GetUriPatternDocumentData + `__ method. """ @@ -2840,7 +2852,8 @@ def __call__( Args: request (~.site_search_engine_service.ListTargetSitesRequest): The request object. Request message for - [SiteSearchEngineService.ListTargetSites][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.ListTargetSites] + `SiteSearchEngineService.ListTargetSites + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -2853,7 +2866,8 @@ def __call__( Returns: ~.site_search_engine_service.ListTargetSitesResponse: Response message for - [SiteSearchEngineService.ListTargetSites][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.ListTargetSites] + `SiteSearchEngineService.ListTargetSites + `__ method. """ @@ -2999,7 +3013,8 @@ def __call__( Args: request (~.site_search_engine_service.RecrawlUrisRequest): The request object. Request message for - [SiteSearchEngineService.RecrawlUris][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.RecrawlUris] + `SiteSearchEngineService.RecrawlUris + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -3156,7 +3171,8 @@ def __call__( Args: request (~.site_search_engine_service.SetUriPatternDocumentDataRequest): The request object. Request message for - [SiteSearchEngineService.SetUriPatternDocumentData][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.SetUriPatternDocumentData] + `SiteSearchEngineService.SetUriPatternDocumentData + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -3315,7 +3331,8 @@ def __call__( Args: request (~.site_search_engine_service.UpdateTargetSiteRequest): The request object. Request message for - [SiteSearchEngineService.UpdateTargetSite][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.UpdateTargetSite] + `SiteSearchEngineService.UpdateTargetSite + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/user_event_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/user_event_service/async_client.py index 1bb360f4083c..c69f3fb5cad9 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/user_event_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/user_event_service/async_client.py @@ -455,52 +455,61 @@ async def sample_collect_user_event(): Returns: google.api.httpbody_pb2.HttpBody: - Message that represents an arbitrary HTTP body. It should only be used for - payload formats that can't be represented as JSON, - such as raw binary or an HTML page. - - This message can be used both in streaming and - non-streaming API methods in the request as well as - the response. - - It can be used as a top-level request field, which is - convenient if one wants to extract parameters from - either the URL or HTTP template into the request - fields and also want access to the raw HTTP body. - - Example: - - message GetResourceRequest { - // A unique request id. string request_id = 1; - - // The raw HTTP body is bound to this field. - google.api.HttpBody http_body = 2; - - } - - service ResourceService { - rpc GetResource(GetResourceRequest) - returns (google.api.HttpBody); - - rpc UpdateResource(google.api.HttpBody) - returns (google.protobuf.Empty); - - } - - Example with streaming methods: - - service CaldavService { - rpc GetCalendar(stream google.api.HttpBody) - returns (stream google.api.HttpBody); - - rpc UpdateCalendar(stream google.api.HttpBody) - returns (stream google.api.HttpBody); - - } - - Use of this type only changes how the request and - response bodies are handled, all other features will - continue to work unchanged. + Message that represents an arbitrary + HTTP body. It should only be used for + payload formats that can't be + represented as JSON, such as raw binary + or an HTML page. + + This message can be used both in + streaming and non-streaming API methods + in the request as well as the response. + + It can be used as a top-level request + field, which is convenient if one wants + to extract parameters from either the + URL or HTTP template into the request + fields and also want access to the raw + HTTP body. + + Example: + + message GetResourceRequest { + // A unique request id. + string request_id = 1; + + // The raw HTTP body is bound to + this field. google.api.HttpBody + http_body = 2; + + } + + service ResourceService { + rpc + GetResource(GetResourceRequest) + returns (google.api.HttpBody); + rpc + UpdateResource(google.api.HttpBody) + returns (google.protobuf.Empty); + + } + + Example with streaming methods: + + service CaldavService { + rpc GetCalendar(stream + google.api.HttpBody) returns + (stream google.api.HttpBody); rpc + UpdateCalendar(stream + google.api.HttpBody) returns + (stream google.api.HttpBody); + + } + + Use of this type only changes how the + request and response bodies are handled, + all other features will continue to work + unchanged. """ # Create or coerce a protobuf request object. @@ -594,11 +603,17 @@ async def sample_purge_user_events(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1alpha.types.PurgeUserEventsResponse` Response of the PurgeUserEventsRequest. If the long running operation is - successfully done, then this message is returned by - the google.longrunning.Operations.response field. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1alpha.types.PurgeUserEventsResponse` + Response of the PurgeUserEventsRequest. + If the long running operation is + successfully done, then this message is + returned by the + google.longrunning.Operations.response + field. """ # Create or coerce a protobuf request object. @@ -707,13 +722,17 @@ async def sample_import_user_events(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1alpha.types.ImportUserEventsResponse` Response of the ImportUserEventsRequest. If the long running - operation was successful, then this message is - returned by the - google.longrunning.Operations.response field if the - operation was successful. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1alpha.types.ImportUserEventsResponse` + Response of the ImportUserEventsRequest. + If the long running operation was + successful, then this message is + returned by the + google.longrunning.Operations.response + field if the operation was successful. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/user_event_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/user_event_service/client.py index 613e55142501..4662f81835d0 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/user_event_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/user_event_service/client.py @@ -941,52 +941,61 @@ def sample_collect_user_event(): Returns: google.api.httpbody_pb2.HttpBody: - Message that represents an arbitrary HTTP body. It should only be used for - payload formats that can't be represented as JSON, - such as raw binary or an HTML page. + Message that represents an arbitrary + HTTP body. It should only be used for + payload formats that can't be + represented as JSON, such as raw binary + or an HTML page. - This message can be used both in streaming and - non-streaming API methods in the request as well as - the response. + This message can be used both in + streaming and non-streaming API methods + in the request as well as the response. - It can be used as a top-level request field, which is - convenient if one wants to extract parameters from - either the URL or HTTP template into the request - fields and also want access to the raw HTTP body. + It can be used as a top-level request + field, which is convenient if one wants + to extract parameters from either the + URL or HTTP template into the request + fields and also want access to the raw + HTTP body. - Example: + Example: - message GetResourceRequest { - // A unique request id. string request_id = 1; + message GetResourceRequest { + // A unique request id. + string request_id = 1; - // The raw HTTP body is bound to this field. - google.api.HttpBody http_body = 2; + // The raw HTTP body is bound to + this field. google.api.HttpBody + http_body = 2; - } - - service ResourceService { - rpc GetResource(GetResourceRequest) - returns (google.api.HttpBody); - - rpc UpdateResource(google.api.HttpBody) - returns (google.protobuf.Empty); + } - } + service ResourceService { + rpc + GetResource(GetResourceRequest) + returns (google.api.HttpBody); + rpc + UpdateResource(google.api.HttpBody) + returns (google.protobuf.Empty); - Example with streaming methods: + } - service CaldavService { - rpc GetCalendar(stream google.api.HttpBody) - returns (stream google.api.HttpBody); + Example with streaming methods: - rpc UpdateCalendar(stream google.api.HttpBody) - returns (stream google.api.HttpBody); + service CaldavService { + rpc GetCalendar(stream + google.api.HttpBody) returns + (stream google.api.HttpBody); rpc + UpdateCalendar(stream + google.api.HttpBody) returns + (stream google.api.HttpBody); - } + } - Use of this type only changes how the request and - response bodies are handled, all other features will - continue to work unchanged. + Use of this type only changes how the + request and response bodies are handled, + all other features will continue to work + unchanged. """ # Create or coerce a protobuf request object. @@ -1078,11 +1087,17 @@ def sample_purge_user_events(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1alpha.types.PurgeUserEventsResponse` Response of the PurgeUserEventsRequest. If the long running operation is - successfully done, then this message is returned by - the google.longrunning.Operations.response field. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1alpha.types.PurgeUserEventsResponse` + Response of the PurgeUserEventsRequest. + If the long running operation is + successfully done, then this message is + returned by the + google.longrunning.Operations.response + field. """ # Create or coerce a protobuf request object. @@ -1189,13 +1204,17 @@ def sample_import_user_events(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1alpha.types.ImportUserEventsResponse` Response of the ImportUserEventsRequest. If the long running - operation was successful, then this message is - returned by the - google.longrunning.Operations.response field if the - operation was successful. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1alpha.types.ImportUserEventsResponse` + Response of the ImportUserEventsRequest. + If the long running operation was + successful, then this message is + returned by the + google.longrunning.Operations.response + field if the operation was successful. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/user_event_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/user_event_service/transports/base.py index f098b01fb546..faaa9245915a 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/user_event_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/user_event_service/transports/base.py @@ -90,8 +90,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -106,11 +104,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/user_event_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/user_event_service/transports/rest.py index f23996dff3db..0f48799fe771 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/user_event_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/services/user_event_service/transports/rest.py @@ -700,55 +700,61 @@ def __call__( Returns: ~.httpbody_pb2.HttpBody: - Message that represents an arbitrary HTTP body. It - should only be used for payload formats that can't be - represented as JSON, such as raw binary or an HTML page. - - This message can be used both in streaming and - non-streaming API methods in the request as well as the - response. - - It can be used as a top-level request field, which is - convenient if one wants to extract parameters from - either the URL or HTTP template into the request fields - and also want access to the raw HTTP body. + Message that represents an arbitrary + HTTP body. It should only be used for + payload formats that can't be + represented as JSON, such as raw binary + or an HTML page. + + This message can be used both in + streaming and non-streaming API methods + in the request as well as the response. + + It can be used as a top-level request + field, which is convenient if one wants + to extract parameters from either the + URL or HTTP template into the request + fields and also want access to the raw + HTTP body. Example: - :: - message GetResourceRequest { // A unique request id. string request_id = 1; - // The raw HTTP body is bound to this field. - google.api.HttpBody http_body = 2; + // The raw HTTP body is bound to + this field. google.api.HttpBody + http_body = 2; } service ResourceService { - rpc GetResource(GetResourceRequest) + rpc + GetResource(GetResourceRequest) returns (google.api.HttpBody); - rpc UpdateResource(google.api.HttpBody) - returns (google.protobuf.Empty); + rpc + UpdateResource(google.api.HttpBody) + returns (google.protobuf.Empty); } Example with streaming methods: - :: - service CaldavService { - rpc GetCalendar(stream google.api.HttpBody) - returns (stream google.api.HttpBody); - rpc UpdateCalendar(stream google.api.HttpBody) - returns (stream google.api.HttpBody); + rpc GetCalendar(stream + google.api.HttpBody) returns + (stream google.api.HttpBody); rpc + UpdateCalendar(stream + google.api.HttpBody) returns + (stream google.api.HttpBody); } - Use of this type only changes how the request and - response bodies are handled, all other features will - continue to work unchanged. + Use of this type only changes how the + request and response bodies are handled, + all other features will continue to work + unchanged. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/acl_config.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/acl_config.py index fb53291781fc..36485abaa7c3 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/acl_config.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/acl_config.py @@ -34,12 +34,13 @@ class AclConfig(proto.Message): Attributes: name (str): - Immutable. The full resource name of the acl configuration. - Format: + Immutable. The full resource name of the acl + configuration. Format: + ``projects/{project}/locations/{location}/aclConfig``. - This field must be a UTF-8 encoded string with a length - limit of 1024 characters. + This field must be a UTF-8 encoded string with a + length limit of 1024 characters. idp_config (google.cloud.discoveryengine_v1alpha.types.IdpConfig): Identity provider config. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/acl_config_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/acl_config_service.py index d3e01127238c..edfd970d39cd 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/acl_config_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/acl_config_service.py @@ -36,13 +36,15 @@ class GetAclConfigRequest(proto.Message): Attributes: name (str): Required. Resource name of - [AclConfig][google.cloud.discoveryengine.v1alpha.AclConfig], + `AclConfig + `__, such as ``projects/*/locations/*/aclConfig``. - If the caller does not have permission to access the - [AclConfig][google.cloud.discoveryengine.v1alpha.AclConfig], - regardless of whether or not it exists, a PERMISSION_DENIED - error is returned. + If the caller does not have permission to access + the `AclConfig + `__, + regardless of whether or not it exists, a + PERMISSION_DENIED error is returned. """ name: str = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/answer.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/answer.py index ae0b7fa763b2..cd29127b3837 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/answer.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/answer.py @@ -478,11 +478,11 @@ class SearchResult(proto.Message): title (str): Title. snippet_info (MutableSequence[google.cloud.discoveryengine_v1alpha.types.Answer.Step.Action.Observation.SearchResult.SnippetInfo]): - If citation_type is DOCUMENT_LEVEL_CITATION, populate - document level snippets. + If citation_type is DOCUMENT_LEVEL_CITATION, + populate document level snippets. chunk_info (MutableSequence[google.cloud.discoveryengine_v1alpha.types.Answer.Step.Action.Observation.SearchResult.ChunkInfo]): - If citation_type is CHUNK_LEVEL_CITATION and chunk mode is - on, populate chunk info. + If citation_type is CHUNK_LEVEL_CITATION and + chunk mode is on, populate chunk info. struct_data (google.protobuf.struct_pb2.Struct): Data representation. The structured JSON data for the document. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/chunk.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/chunk.py index b51af63286be..8cdacc7e8de1 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/chunk.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/chunk.py @@ -37,20 +37,24 @@ class Chunk(proto.Message): Attributes: name (str): - The full resource name of the chunk. Format: + The full resource name of the chunk. + Format: + ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}/chunks/{chunk_id}``. - This field must be a UTF-8 encoded string with a length - limit of 1024 characters. + This field must be a UTF-8 encoded string with a + length limit of 1024 characters. id (str): Unique chunk ID of the current chunk. content (str): Content is a string from a document (parsed content). relevance_score (float): - Output only. Represents the relevance score based on - similarity. Higher score indicates higher chunk relevance. - The score is in range [-1.0, 1.0]. Only populated on + Output only. Represents the relevance score + based on similarity. Higher score indicates + higher chunk relevance. The score is in range + [-1.0, 1.0]. + Only populated on [SearchService.SearchResponse][]. This field is a member of `oneof`_ ``_relevance_score``. @@ -58,8 +62,9 @@ class Chunk(proto.Message): Metadata of the document from the current chunk. derived_struct_data (google.protobuf.struct_pb2.Struct): - Output only. This field is OUTPUT_ONLY. It contains derived - data that are not in the original input document. + Output only. This field is OUTPUT_ONLY. + It contains derived data that are not in the + original input document. page_span (google.cloud.discoveryengine_v1alpha.types.Chunk.PageSpan): Page span of the chunk. chunk_metadata (google.cloud.discoveryengine_v1alpha.types.Chunk.ChunkMetadata): @@ -76,10 +81,11 @@ class DocumentMetadata(proto.Message): title (str): Title of the document. struct_data (google.protobuf.struct_pb2.Struct): - Data representation. The structured JSON data for the - document. It should conform to the registered - [Schema][google.cloud.discoveryengine.v1alpha.Schema] or an - ``INVALID_ARGUMENT`` error is thrown. + Data representation. + The structured JSON data for the document. It + should conform to the registered `Schema + `__ + or an ``INVALID_ARGUMENT`` error is thrown. """ uri: str = proto.Field( @@ -117,23 +123,28 @@ class PageSpan(proto.Message): class ChunkMetadata(proto.Message): r"""Metadata of the current chunk. This field is only populated on - [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search] + `SearchService.Search + `__ API. Attributes: previous_chunks (MutableSequence[google.cloud.discoveryengine_v1alpha.types.Chunk]): - The previous chunks of the current chunk. The number is - controlled by - [SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks]. + The previous chunks of the current chunk. The + number is controlled by + `SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks + `__. This field is only populated on - [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search] + `SearchService.Search + `__ API. next_chunks (MutableSequence[google.cloud.discoveryengine_v1alpha.types.Chunk]): - The next chunks of the current chunk. The number is - controlled by - [SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks]. + The next chunks of the current chunk. The number + is controlled by + `SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks + `__. This field is only populated on - [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search] + `SearchService.Search + `__ API. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/chunk_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/chunk_service.py index f2945939355f..8db00fcb35e2 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/chunk_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/chunk_service.py @@ -33,23 +33,28 @@ class GetChunkRequest(proto.Message): r"""Request message for - [ChunkService.GetChunk][google.cloud.discoveryengine.v1alpha.ChunkService.GetChunk] + `ChunkService.GetChunk + `__ method. Attributes: name (str): Required. Full resource name of - [Chunk][google.cloud.discoveryengine.v1alpha.Chunk], such as + `Chunk + `__, + such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}``. - If the caller does not have permission to access the - [Chunk][google.cloud.discoveryengine.v1alpha.Chunk], + If the caller does not have permission to access + the `Chunk + `__, regardless of whether or not it exists, a ``PERMISSION_DENIED`` error is returned. - If the requested - [Chunk][google.cloud.discoveryengine.v1alpha.Chunk] does not - exist, a ``NOT_FOUND`` error is returned. + If the requested `Chunk + `__ + does not exist, a ``NOT_FOUND`` error is + returned. """ name: str = proto.Field( @@ -60,37 +65,47 @@ class GetChunkRequest(proto.Message): class ListChunksRequest(proto.Message): r"""Request message for - [ChunkService.ListChunks][google.cloud.discoveryengine.v1alpha.ChunkService.ListChunks] + `ChunkService.ListChunks + `__ method. Attributes: parent (str): - Required. The parent document resource name, such as + Required. The parent document resource name, + such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}``. If the caller does not have permission to list - [Chunk][google.cloud.discoveryengine.v1alpha.Chunk]s under - this document, regardless of whether or not this document - exists, a ``PERMISSION_DENIED`` error is returned. + `Chunk + `__s + under this document, regardless of whether or + not this document exists, a + ``PERMISSION_DENIED`` error is returned. page_size (int): - Maximum number of - [Chunk][google.cloud.discoveryengine.v1alpha.Chunk]s to - return. If unspecified, defaults to 100. The maximum allowed - value is 1000. Values above 1000 will be coerced to 1000. - - If this field is negative, an ``INVALID_ARGUMENT`` error is - returned. + Maximum number of `Chunk + `__s + to return. If unspecified, defaults to 100. The + maximum allowed value is 1000. Values above 1000 + will be coerced to 1000. + + If this field is negative, an + ``INVALID_ARGUMENT`` error is returned. page_token (str): A page token - [ListChunksResponse.next_page_token][google.cloud.discoveryengine.v1alpha.ListChunksResponse.next_page_token], + `ListChunksResponse.next_page_token + `__, received from a previous - [ChunkService.ListChunks][google.cloud.discoveryengine.v1alpha.ChunkService.ListChunks] - call. Provide this to retrieve the subsequent page. - - When paginating, all other parameters provided to - [ChunkService.ListChunks][google.cloud.discoveryengine.v1alpha.ChunkService.ListChunks] - must match the call that provided the page token. Otherwise, - an ``INVALID_ARGUMENT`` error is returned. + `ChunkService.ListChunks + `__ + call. Provide this to retrieve the subsequent + page. + + When paginating, all other parameters provided + to `ChunkService.ListChunks + `__ + must match the call that provided the page + token. Otherwise, an ``INVALID_ARGUMENT`` error + is returned. """ parent: str = proto.Field( @@ -109,17 +124,20 @@ class ListChunksRequest(proto.Message): class ListChunksResponse(proto.Message): r"""Response message for - [ChunkService.ListChunks][google.cloud.discoveryengine.v1alpha.ChunkService.ListChunks] + `ChunkService.ListChunks + `__ method. Attributes: chunks (MutableSequence[google.cloud.discoveryengine_v1alpha.types.Chunk]): - The [Chunk][google.cloud.discoveryengine.v1alpha.Chunk]s. + The `Chunk + `__s. next_page_token (str): A token that can be sent as - [ListChunksRequest.page_token][google.cloud.discoveryengine.v1alpha.ListChunksRequest.page_token] - to retrieve the next page. If this field is omitted, there - are no subsequent pages. + `ListChunksRequest.page_token + `__ + to retrieve the next page. If this field is + omitted, there are no subsequent pages. """ @property diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/common.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/common.py index 9419297699e0..b4864d800923 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/common.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/common.py @@ -43,7 +43,7 @@ class IndustryVertical(proto.Enum): r"""The industry vertical associated with the - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]. + `DataStore `__. Values: INDUSTRY_VERTICAL_UNSPECIFIED (0): @@ -76,10 +76,10 @@ class SolutionType(proto.Enum): Used for use cases related to the Generative AI agent. SOLUTION_TYPE_GENERATIVE_CHAT (4): - Used for use cases related to the Generative Chat agent. - It's used for Generative chat engine only, the associated - data stores must enrolled with ``SOLUTION_TYPE_CHAT`` - solution. + Used for use cases related to the Generative + Chat agent. It's used for Generative chat engine + only, the associated data stores must enrolled + with ``SOLUTION_TYPE_CHAT`` solution. """ SOLUTION_TYPE_UNSPECIFIED = 0 SOLUTION_TYPE_RECOMMENDATION = 1 @@ -89,19 +89,22 @@ class SolutionType(proto.Enum): class SearchUseCase(proto.Enum): - r"""Defines a further subdivision of ``SolutionType``. Specifically - applies to - [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_SEARCH]. + r"""Defines a further subdivision of ``SolutionType``. + Specifically applies to + `SOLUTION_TYPE_SEARCH + `__. Values: SEARCH_USE_CASE_UNSPECIFIED (0): Value used when unset. Will not occur in CSS. SEARCH_USE_CASE_SEARCH (1): - Search use case. Expects the traffic has a non-empty - [query][google.cloud.discoveryengine.v1alpha.SearchRequest.query]. + Search use case. Expects the traffic has a + non-empty `query + `__. SEARCH_USE_CASE_BROWSE (2): - Browse use case. Expects the traffic has an empty - [query][google.cloud.discoveryengine.v1alpha.SearchRequest.query]. + Browse use case. Expects the traffic has an + empty `query + `__. """ SEARCH_USE_CASE_UNSPECIFIED = 0 SEARCH_USE_CASE_SEARCH = 1 @@ -214,32 +217,39 @@ class Interval(proto.Message): class CustomAttribute(proto.Message): r"""A custom attribute that is not explicitly modeled in a resource, - e.g. [UserEvent][google.cloud.discoveryengine.v1alpha.UserEvent]. + e.g. `UserEvent + `__. Attributes: text (MutableSequence[str]): - The textual values of this custom attribute. For example, - ``["yellow", "green"]`` when the key is "color". + The textual values of this custom attribute. For + example, ``["yellow", "green"]`` when the key is + "color". Empty string is not allowed. Otherwise, an ``INVALID_ARGUMENT`` error is returned. Exactly one of - [CustomAttribute.text][google.cloud.discoveryengine.v1alpha.CustomAttribute.text] + `CustomAttribute.text + `__ or - [CustomAttribute.numbers][google.cloud.discoveryengine.v1alpha.CustomAttribute.numbers] - should be set. Otherwise, an ``INVALID_ARGUMENT`` error is - returned. + `CustomAttribute.numbers + `__ + should be set. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. numbers (MutableSequence[float]): - The numerical values of this custom attribute. For example, - ``[2.3, 15.4]`` when the key is "lengths_cm". + The numerical values of this custom attribute. + For example, ``[2.3, 15.4]`` when the key is + "lengths_cm". Exactly one of - [CustomAttribute.text][google.cloud.discoveryengine.v1alpha.CustomAttribute.text] + `CustomAttribute.text + `__ or - [CustomAttribute.numbers][google.cloud.discoveryengine.v1alpha.CustomAttribute.numbers] - should be set. Otherwise, an ``INVALID_ARGUMENT`` error is - returned. + `CustomAttribute.numbers + `__ + should be set. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. """ text: MutableSequence[str] = proto.RepeatedField( @@ -257,31 +267,35 @@ class UserInfo(proto.Message): Attributes: user_id (str): - Highly recommended for logged-in users. Unique identifier - for logged-in user, such as a user name. Don't set for - anonymous users. + Highly recommended for logged-in users. Unique + identifier for logged-in user, such as a user + name. Don't set for anonymous users. Always use a hashed value for this ID. - Don't set the field to the same fixed ID for different - users. This mixes the event history of those users together, - which results in degraded model quality. + Don't set the field to the same fixed ID for + different users. This mixes the event history of + those users together, which results in degraded + model quality. - The field must be a UTF-8 encoded string with a length limit - of 128 characters. Otherwise, an ``INVALID_ARGUMENT`` error - is returned. + The field must be a UTF-8 encoded string with a + length limit of 128 characters. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. user_agent (str): User agent as included in the HTTP header. - The field must be a UTF-8 encoded string with a length limit - of 1,000 characters. Otherwise, an ``INVALID_ARGUMENT`` - error is returned. + The field must be a UTF-8 encoded string with a + length limit of 1,000 characters. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. - This should not be set when using the client side event - reporting with GTM or JavaScript tag in - [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1alpha.UserEventService.CollectUserEvent] + This should not be set when using the client + side event reporting with GTM or JavaScript tag + in + `UserEventService.CollectUserEvent + `__ or if - [UserEvent.direct_user_request][google.cloud.discoveryengine.v1alpha.UserEvent.direct_user_request] + `UserEvent.direct_user_request + `__ is set. """ @@ -336,9 +350,10 @@ class GuidedSearchSpec(proto.Message): Whether or not to enable and include related questions in search response. max_related_questions (int): - Max number of related questions to be returned. The valid - range is [1, 5]. If enable_related_questions is true, the - default value is 3. + Max number of related questions to be returned. + The valid range is [1, 5]. If + enable_related_questions is true, the default + value is 3. """ enable_refinement_attributes: bool = proto.Field( @@ -400,7 +415,8 @@ class ExternalIdpConfig(proto.Message): Attributes: workforce_pool_name (str): - Workforce pool name. Example: + Workforce pool name. + Example: "locations/global/workforcePools/pool_id". """ @@ -433,18 +449,21 @@ class Principal(proto.Message): Attributes: user_id (str): - User identifier. For Google Workspace user account, user_id - should be the google workspace user email. For non-google - identity provider user account, user_id is the mapped user - identifier configured during the workforcepool config. + User identifier. + For Google Workspace user account, user_id + should be the google workspace user email. + For non-google identity provider user account, + user_id is the mapped user identifier configured + during the workforcepool config. This field is a member of `oneof`_ ``principal``. group_id (str): - Group identifier. For Google Workspace user account, - group_id should be the google workspace group email. For - non-google identity provider user account, group_id is the - mapped group identifier configured during the workforcepool - config. + Group identifier. + For Google Workspace user account, group_id + should be the google workspace group email. + For non-google identity provider user account, + group_id is the mapped group identifier + configured during the workforcepool config. This field is a member of `oneof`_ ``principal``. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/completion.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/completion.py index db1f8d363f04..2db59e2bc98c 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/completion.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/completion.py @@ -49,10 +49,11 @@ class MatchOperator(proto.Enum): MATCH_OPERATOR_UNSPECIFIED (0): Default value. Should not be used EXACT_MATCH (1): - If the suggestion is an exact match to the block_phrase, - then block it. + If the suggestion is an exact match to the + block_phrase, then block it. CONTAINS (2): - If the suggestion contains the block_phrase, then block it. + If the suggestion contains the block_phrase, + then block it. """ MATCH_OPERATOR_UNSPECIFIED = 0 EXACT_MATCH = 1 diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/completion_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/completion_service.py index 25ce134fadff..3cb8ae3490a1 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/completion_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/completion_service.py @@ -30,58 +30,65 @@ class CompleteQueryRequest(proto.Message): r"""Request message for - [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1alpha.CompletionService.CompleteQuery] + `CompletionService.CompleteQuery + `__ method. Attributes: data_store (str): - Required. The parent data store resource name for which the - completion is performed, such as + Required. The parent data store resource name + for which the completion is performed, such as ``projects/*/locations/global/collections/default_collection/dataStores/default_data_store``. query (str): Required. The typeahead input used to fetch suggestions. Maximum length is 128 characters. query_model (str): - Specifies the autocomplete data model. This overrides any - model specified in the Configuration > Autocomplete section - of the Cloud console. Currently supported values: - - - ``document`` - Using suggestions generated from - user-imported documents. - - ``search-history`` - Using suggestions generated from the - past history of - [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search] - API calls. Do not use it when there is no traffic for - Search API. - - ``user-event`` - Using suggestions generated from - user-imported search events. - - ``document-completable`` - Using suggestions taken - directly from user-imported document fields marked as - completable. + Specifies the autocomplete data model. This + overrides any model specified in the + Configuration > Autocomplete section of the + Cloud console. Currently supported values: + + * ``document`` - Using suggestions generated + from user-imported documents. * + ``search-history`` - Using suggestions generated + from the past history of `SearchService.Search + `__ + API calls. Do not use it when there is no + traffic for Search API. + + * ``user-event`` - Using suggestions generated + from user-imported search events. + + * ``document-completable`` - Using suggestions + taken directly from user-imported document + fields marked as completable. Default values: - - ``document`` is the default model for regular dataStores. - - ``search-history`` is the default model for site search - dataStores. + * ``document`` is the default model for regular + dataStores. * ``search-history`` is the default + model for site search dataStores. user_pseudo_id (str): - A unique identifier for tracking visitors. For example, this - could be implemented with an HTTP cookie, which should be - able to uniquely identify a visitor on a single device. This - unique identifier should not change if the visitor logs in - or out of the website. + A unique identifier for tracking visitors. For + example, this could be implemented with an HTTP + cookie, which should be able to uniquely + identify a visitor on a single device. This + unique identifier should not change if the + visitor logs in or out of the website. This field should NOT have a fixed value such as ``unknown_visitor``. This should be the same identifier as - [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id] + `UserEvent.user_pseudo_id + `__ and - [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1alpha.SearchRequest.user_pseudo_id]. + `SearchRequest.user_pseudo_id + `__. - The field must be a UTF-8 encoded string with a length limit - of 128 characters. Otherwise, an ``INVALID_ARGUMENT`` error - is returned. + The field must be a UTF-8 encoded string with a + length limit of 128 characters. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. include_tail_suggestions (bool): Indicates if tail suggestions should be returned if there are no suggestions that match @@ -115,7 +122,8 @@ class CompleteQueryRequest(proto.Message): class CompleteQueryResponse(proto.Message): r"""Response message for - [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1alpha.CompletionService.CompleteQuery] + `CompletionService.CompleteQuery + `__ method. Attributes: @@ -124,11 +132,12 @@ class CompleteQueryResponse(proto.Message): result list is ordered and the first result is a top suggestion. tail_match_triggered (bool): - True if the returned suggestions are all tail suggestions. - - For tail matching to be triggered, include_tail_suggestions - in the request must be true and there must be no suggestions - that match the full query. + True if the returned suggestions are all tail + suggestions. + For tail matching to be triggered, + include_tail_suggestions in the request must be + true and there must be no suggestions that match + the full query. """ class QuerySuggestion(proto.Message): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/control.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/control.py index 00d7e933146b..2d83fe102ad4 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/control.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/control.py @@ -54,9 +54,10 @@ class QueryTerm(proto.Message): value (str): The specific query value to match against - Must be lowercase, must be UTF-8. Can have at most 3 space - separated terms if full_match is true. Cannot be an empty - string. Maximum length of 5000 characters. + Must be lowercase, must be UTF-8. + Can have at most 3 space separated terms if + full_match is true. Cannot be an empty string. + Maximum length of 5000 characters. full_match (bool): Whether the search query needs to exactly match the query term. @@ -110,10 +111,11 @@ class TimeRange(proto.Message): class Control(proto.Message): - r"""Defines a conditioned behavior to employ during serving. Must be - attached to a - [ServingConfig][google.cloud.discoveryengine.v1alpha.ServingConfig] - to be considered at serving time. Permitted actions dependent on + r"""Defines a conditioned behavior to employ during serving. + Must be attached to a + `ServingConfig + `__ to be + considered at serving time. Permitted actions dependent on ``SolutionType``. This message has `oneof`_ fields (mutually exclusive fields). @@ -153,21 +155,25 @@ class Control(proto.Message): error is thrown. associated_serving_config_ids (MutableSequence[str]): Output only. List of all - [ServingConfig][google.cloud.discoveryengine.v1alpha.ServingConfig] - IDs this control is attached to. May take up to 10 minutes - to update after changes. + `ServingConfig + `__ + IDs this control is attached to. May take up to + 10 minutes to update after changes. solution_type (google.cloud.discoveryengine_v1alpha.types.SolutionType): Required. Immutable. What solution the control belongs to. Must be compatible with vertical of resource. Otherwise an INVALID ARGUMENT error is thrown. use_cases (MutableSequence[google.cloud.discoveryengine_v1alpha.types.SearchUseCase]): - Specifies the use case for the control. Affects what - condition fields can be set. Only applies to - [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_SEARCH]. - Currently only allow one use case per control. Must be set - when solution_type is - [SolutionType.SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_SEARCH]. + Specifies the use case for the control. + Affects what condition fields can be set. + Only applies to + `SOLUTION_TYPE_SEARCH + `__. + Currently only allow one use case per control. + Must be set when solution_type is + `SolutionType.SOLUTION_TYPE_SEARCH + `__. conditions (MutableSequence[google.cloud.discoveryengine_v1alpha.types.Condition]): Determines when the associated action will trigger. @@ -182,8 +188,9 @@ class BoostAction(proto.Message): Attributes: boost (float): - Required. Strength of the boost, which should be in [-1, 1]. - Negative boost means demotion. Default is 0.0 (No-op). + Required. Strength of the boost, which should be + in [-1, 1]. Negative boost means demotion. + Default is 0.0 (No-op). filter (str): Required. Specifies which products to apply the boost to. @@ -194,8 +201,9 @@ class BoostAction(proto.Message): Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown. data_store (str): - Required. Specifies which data store's documents can be - boosted by this control. Full data store name e.g. + Required. Specifies which data store's documents + can be boosted by this control. Full data store + name e.g. projects/123/locations/global/collections/default_collection/dataStores/default_data_store """ @@ -227,8 +235,9 @@ class FilterAction(proto.Message): Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown. data_store (str): - Required. Specifies which data store's documents can be - filtered by this control. Full data store name e.g. + Required. Specifies which data store's documents + can be filtered by this control. Full data store + name e.g. projects/123/locations/global/collections/default_collection/dataStores/default_data_store """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/control_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/control_service.py index bf70951accd8..e4bcbc6c3550 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/control_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/control_service.py @@ -40,18 +40,20 @@ class CreateControlRequest(proto.Message): Attributes: parent (str): - Required. Full resource name of parent data store. Format: + Required. Full resource name of parent data + store. Format: ``projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}`` or ``projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}``. control (google.cloud.discoveryengine_v1alpha.types.Control): Required. The Control to create. control_id (str): - Required. The ID to use for the Control, which will become - the final component of the Control's resource name. + Required. The ID to use for the Control, which + will become the final component of the Control's + resource name. - This value must be within 1-63 characters. Valid characters - are /[a-z][0-9]-\_/. + This value must be within 1-63 characters. + Valid characters are /`a-z <0-9>`__-_/. """ parent: str = proto.Field( @@ -77,13 +79,17 @@ class UpdateControlRequest(proto.Message): Required. The Control to update. update_mask (google.protobuf.field_mask_pb2.FieldMask): Optional. Indicates which fields in the provided - [Control][google.cloud.discoveryengine.v1alpha.Control] to - update. The following are NOT supported: + `Control + `__ + to update. The following are NOT supported: - - [Control.name][google.cloud.discoveryengine.v1alpha.Control.name] - - [Control.solution_type][google.cloud.discoveryengine.v1alpha.Control.solution_type] + * `Control.name + `__ + * `Control.solution_type + `__ - If not set or empty, all supported fields are updated. + If not set or empty, all supported fields are + updated. """ control: gcd_control.Control = proto.Field( @@ -103,8 +109,8 @@ class DeleteControlRequest(proto.Message): Attributes: name (str): - Required. The resource name of the Control to delete. - Format: + Required. The resource name of the Control to + delete. Format: ``projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`` """ @@ -119,7 +125,8 @@ class GetControlRequest(proto.Message): Attributes: name (str): - Required. The resource name of the Control to get. Format: + Required. The resource name of the Control to + get. Format: ``projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`` """ @@ -144,15 +151,15 @@ class ListControlsRequest(proto.Message): allowed value is 1000. page_token (str): Optional. A page token, received from a previous - ``ListControls`` call. Provide this to retrieve the - subsequent page. + ``ListControls`` call. Provide this to retrieve + the subsequent page. filter (str): - Optional. A filter to apply on the list results. Supported - features: - - - List all the products under the parent branch if - [filter][google.cloud.discoveryengine.v1alpha.ListControlsRequest.filter] - is unset. Currently this field is unsupported. + Optional. A filter to apply on the list results. + Supported features: + * List all the products under the parent branch + if `filter + `__ + is unset. Currently this field is unsupported. """ parent: str = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/conversation.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/conversation.py index 363e242f7a1c..d797f3a25d0d 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/conversation.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/conversation.py @@ -107,7 +107,8 @@ class Reply(proto.Message): Attributes: reply (str): - DEPRECATED: use ``summary`` instead. Text reply. + DEPRECATED: use ``summary`` instead. + Text reply. references (MutableSequence[google.cloud.discoveryengine_v1alpha.types.Reply.Reference]): References in the reply. summary (google.cloud.discoveryengine_v1alpha.types.SearchResponse.Summary): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/conversational_search_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/conversational_search_service.py index 03248e2fd0d7..d8b3f8da9257 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/conversational_search_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/conversational_search_service.py @@ -52,24 +52,28 @@ class ConverseConversationRequest(proto.Message): r"""Request message for - [ConversationalSearchService.ConverseConversation][google.cloud.discoveryengine.v1alpha.ConversationalSearchService.ConverseConversation] + `ConversationalSearchService.ConverseConversation + `__ method. Attributes: name (str): - Required. The resource name of the Conversation to get. - Format: + Required. The resource name of the Conversation + to get. Format: ``projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}``. Use ``projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-`` - to activate auto session mode, which automatically creates a - new conversation inside a ConverseConversation session. + to activate auto session mode, which + automatically creates a new conversation inside + a ConverseConversation session. query (google.cloud.discoveryengine_v1alpha.types.TextInput): Required. Current user input. serving_config (str): - The resource name of the Serving Config to use. Format: + The resource name of the Serving Config to use. + Format: ``projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/servingConfigs/{serving_config_id}`` - If this is not set, the default serving config will be used. + If this is not set, the default serving config + will be used. conversation (google.cloud.discoveryengine_v1alpha.types.Conversation): The conversation to be used by auto session only. The name field will be ignored as we @@ -78,55 +82,66 @@ class ConverseConversationRequest(proto.Message): safe_search (bool): Whether to turn on safe search. user_labels (MutableMapping[str, str]): - The user labels applied to a resource must meet the - following requirements: - - - Each resource can have multiple labels, up to a maximum of - 64. - - Each label must be a key-value pair. - - Keys have a minimum length of 1 character and a maximum - length of 63 characters and cannot be empty. Values can be - empty and have a maximum length of 63 characters. - - Keys and values can contain only lowercase letters, - numeric characters, underscores, and dashes. All - characters must use UTF-8 encoding, and international - characters are allowed. - - The key portion of a label must be unique. However, you - can use the same key with multiple resources. - - Keys must start with a lowercase letter or international - character. + The user labels applied to a resource must meet + the following requirements: + * Each resource can have multiple labels, up to + a maximum of 64. + + * Each label must be a key-value pair. + * Keys have a minimum length of 1 character and + a maximum length of 63 characters and cannot + be empty. Values can be empty and have a maximum + length of 63 characters. + + * Keys and values can contain only lowercase + letters, numeric characters, underscores, and + dashes. All characters must use UTF-8 encoding, + and international characters are allowed. + + * The key portion of a label must be unique. + However, you can use the same key with + multiple resources. + + * Keys must start with a lowercase letter or + international character. See `Google Cloud - Document `__ + Document + `__ for more details. summary_spec (google.cloud.discoveryengine_v1alpha.types.SearchRequest.ContentSearchSpec.SummarySpec): A specification for configuring the summary returned in the response. filter (str): - The filter syntax consists of an expression language for - constructing a predicate from one or more fields of the - documents being filtered. Filter expression is - case-sensitive. This will be used to filter search results - which may affect the summary response. - - If this field is unrecognizable, an ``INVALID_ARGUMENT`` is - returned. - - Filtering in Vertex AI Search is done by mapping the LHS - filter key to a key property defined in the Vertex AI Search - backend -- this mapping is defined by the customer in their - schema. For example a media customer might have a field - 'name' in their schema. In this case the filter would look - like this: filter --> name:'ANY("king kong")' - - For more information about filtering including syntax and - filter operators, see - `Filter `__ + The filter syntax consists of an expression + language for constructing a predicate from one + or more fields of the documents being filtered. + Filter expression is case-sensitive. This will + be used to filter search results which may + affect the summary response. + + If this field is unrecognizable, an + ``INVALID_ARGUMENT`` is returned. + + Filtering in Vertex AI Search is done by mapping + the LHS filter key to a key property defined in + the Vertex AI Search backend -- this mapping is + defined by the customer in their schema. For + example a media customer might have a field + 'name' in their schema. In this case the filter + would look like this: filter --> name:'ANY("king + kong")' + + For more information about filtering including + syntax and filter operators, see + `Filter + `__ boost_spec (google.cloud.discoveryengine_v1alpha.types.SearchRequest.BoostSpec): - Boost specification to boost certain documents in search - results which may affect the converse response. For more - information on boosting, see - `Boosting `__ + Boost specification to boost certain documents + in search results which may affect the converse + response. For more information on boosting, see + `Boosting + `__ """ name: str = proto.Field( @@ -176,7 +191,8 @@ class ConverseConversationRequest(proto.Message): class ConverseConversationResponse(proto.Message): r"""Response message for - [ConversationalSearchService.ConverseConversation][google.cloud.discoveryengine.v1alpha.ConversationalSearchService.ConverseConversation] + `ConversationalSearchService.ConverseConversation + `__ method. Attributes: @@ -218,7 +234,8 @@ class CreateConversationRequest(proto.Message): Attributes: parent (str): - Required. Full resource name of parent data store. Format: + Required. Full resource name of parent data + store. Format: ``projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`` conversation (google.cloud.discoveryengine_v1alpha.types.Conversation): Required. The conversation to create. @@ -243,12 +260,15 @@ class UpdateConversationRequest(proto.Message): Required. The Conversation to update. update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided - [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] + `Conversation + `__ to update. The following are NOT supported: - - [Conversation.name][google.cloud.discoveryengine.v1alpha.Conversation.name] + * `Conversation.name + `__ - If not set or empty, all supported fields are updated. + If not set or empty, all supported fields are + updated. """ conversation: gcd_conversation.Conversation = proto.Field( @@ -268,8 +288,8 @@ class DeleteConversationRequest(proto.Message): Attributes: name (str): - Required. The resource name of the Conversation to delete. - Format: + Required. The resource name of the Conversation + to delete. Format: ``projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`` """ @@ -284,8 +304,8 @@ class GetConversationRequest(proto.Message): Attributes: name (str): - Required. The resource name of the Conversation to get. - Format: + Required. The resource name of the Conversation + to get. Format: ``projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`` """ @@ -307,23 +327,30 @@ class ListConversationsRequest(proto.Message): unspecified, defaults to 50. Max allowed value is 1000. page_token (str): - A page token, received from a previous ``ListConversations`` - call. Provide this to retrieve the subsequent page. + A page token, received from a previous + ``ListConversations`` call. Provide this to + retrieve the subsequent page. filter (str): - A filter to apply on the list results. The supported - features are: user_pseudo_id, state. + A filter to apply on the list results. The + supported features are: user_pseudo_id, state. + + Example: - Example: "user_pseudo_id = some_id". + "user_pseudo_id = some_id". order_by (str): - A comma-separated list of fields to order by, sorted in - ascending order. Use "desc" after a field name for - descending. Supported fields: + A comma-separated list of fields to order by, + sorted in ascending order. Use "desc" after a + field name for descending. Supported fields: + + * ``update_time`` + * ``create_time`` - - ``update_time`` - - ``create_time`` - - ``conversation_name`` + * ``conversation_name`` - Example: "update_time desc" "create_time". + Example: + + "update_time desc" + "create_time". """ parent: str = proto.Field( @@ -376,29 +403,31 @@ def raw_page(self): class AnswerQueryRequest(proto.Message): r"""Request message for - [ConversationalSearchService.AnswerQuery][google.cloud.discoveryengine.v1alpha.ConversationalSearchService.AnswerQuery] + `ConversationalSearchService.AnswerQuery + `__ method. Attributes: serving_config (str): - Required. The resource name of the Search serving config, - such as + Required. The resource name of the Search + serving config, such as ``projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config``, or ``projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config``. - This field is used to identify the serving configuration - name, set of models used to make the search. + This field is used to identify the serving + configuration name, set of models used to make + the search. query (google.cloud.discoveryengine_v1alpha.types.Query): Required. Current user query. session (str): The session resource name. Not required. - When session field is not set, the API is in sessionless - mode. + When session field is not set, the API is in + sessionless mode. - We support auto session mode: users can use the wildcard - symbol ``-`` as session ID. A new ID will be automatically - generated and assigned. + We support auto session mode: users can use the + wildcard symbol ``-`` as session ID. A new ID + will be automatically generated and assigned. safety_spec (google.cloud.discoveryengine_v1alpha.types.AnswerQueryRequest.SafetySpec): Model specification. related_questions_spec (google.cloud.discoveryengine_v1alpha.types.AnswerQueryRequest.RelatedQuestionsSpec): @@ -413,47 +442,56 @@ class AnswerQueryRequest(proto.Message): Asynchronous mode control. If enabled, the response will be returned with - answer/session resource name without final answer. The API - users need to do the polling to get the latest status of - answer/session by calling - [ConversationalSearchService.GetAnswer][google.cloud.discoveryengine.v1alpha.ConversationalSearchService.GetAnswer] + answer/session resource name without final + answer. The API users need to do the polling to + get the latest status of answer/session by + calling `ConversationalSearchService.GetAnswer + `__ or - [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1alpha.ConversationalSearchService.GetSession] + `ConversationalSearchService.GetSession + `__ method. user_pseudo_id (str): - A unique identifier for tracking visitors. For example, this - could be implemented with an HTTP cookie, which should be - able to uniquely identify a visitor on a single device. This - unique identifier should not change if the visitor logs in - or out of the website. + A unique identifier for tracking visitors. For + example, this could be implemented with an HTTP + cookie, which should be able to uniquely + identify a visitor on a single device. This + unique identifier should not change if the + visitor logs in or out of the website. This field should NOT have a fixed value such as ``unknown_visitor``. - The field must be a UTF-8 encoded string with a length limit - of 128 characters. Otherwise, an ``INVALID_ARGUMENT`` error - is returned. + The field must be a UTF-8 encoded string with a + length limit of 128 characters. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. user_labels (MutableMapping[str, str]): - The user labels applied to a resource must meet the - following requirements: - - - Each resource can have multiple labels, up to a maximum of - 64. - - Each label must be a key-value pair. - - Keys have a minimum length of 1 character and a maximum - length of 63 characters and cannot be empty. Values can be - empty and have a maximum length of 63 characters. - - Keys and values can contain only lowercase letters, - numeric characters, underscores, and dashes. All - characters must use UTF-8 encoding, and international - characters are allowed. - - The key portion of a label must be unique. However, you - can use the same key with multiple resources. - - Keys must start with a lowercase letter or international - character. + The user labels applied to a resource must meet + the following requirements: + * Each resource can have multiple labels, up to + a maximum of 64. + + * Each label must be a key-value pair. + * Keys have a minimum length of 1 character and + a maximum length of 63 characters and cannot + be empty. Values can be empty and have a maximum + length of 63 characters. + + * Keys and values can contain only lowercase + letters, numeric characters, underscores, and + dashes. All characters must use UTF-8 encoding, + and international characters are allowed. + + * The key portion of a label must be unique. + However, you can use the same key with + multiple resources. + + * Keys must start with a lowercase letter or + international character. See `Google Cloud - Document `__ + Document + `__ for more details. """ @@ -495,42 +533,47 @@ class AnswerGenerationSpec(proto.Message): prompt_spec (google.cloud.discoveryengine_v1alpha.types.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec): Answer generation prompt specification. include_citations (bool): - Specifies whether to include citation metadata in the - answer. The default value is ``false``. + Specifies whether to include citation metadata + in the answer. The default value is ``false``. answer_language_code (str): - Language code for Answer. Use language tags defined by - `BCP47 `__. + Language code for Answer. Use language tags + defined by `BCP47 + `__. Note: This is an experimental feature. ignore_adversarial_query (bool): - Specifies whether to filter out adversarial queries. The - default value is ``false``. - - Google employs search-query classification to detect - adversarial queries. No answer is returned if the search - query is classified as an adversarial query. For example, a - user might ask a question regarding negative comments about - the company or submit a query designed to generate unsafe, - policy-violating output. If this field is set to ``true``, - we skip generating answers for adversarial queries and - return fallback messages instead. + Specifies whether to filter out adversarial + queries. The default value is ``false``. + + Google employs search-query classification to + detect adversarial queries. No answer is + returned if the search query is classified as an + adversarial query. For example, a user might ask + a question regarding negative comments about the + company or submit a query designed to generate + unsafe, policy-violating output. If this field + is set to ``true``, we skip generating answers + for adversarial queries and return fallback + messages instead. ignore_non_answer_seeking_query (bool): - Specifies whether to filter out queries that are not - answer-seeking. The default value is ``false``. - - Google employs search-query classification to detect - answer-seeking queries. No answer is returned if the search - query is classified as a non-answer seeking query. If this - field is set to ``true``, we skip generating answers for - non-answer seeking queries and return fallback messages - instead. + Specifies whether to filter out queries that are + not answer-seeking. The default value is + ``false``. + + Google employs search-query classification to + detect answer-seeking queries. No answer is + returned if the search query is classified as a + non-answer seeking query. If this field is set + to ``true``, we skip generating answers for + non-answer seeking queries and return fallback + messages instead. ignore_low_relevant_content (bool): - Specifies whether to filter out queries that have low - relevance. - - If this field is set to ``false``, all search results are - used regardless of relevance to generate answers. If set to - ``true`` or unset, the behavior will be determined - automatically by the service. + Specifies whether to filter out queries that + have low relevance. + If this field is set to ``false``, all search + results are used regardless of relevance to + generate answers. If set to ``true`` or unset, + the behavior will be determined automatically by + the service. This field is a member of `oneof`_ ``_ignore_low_relevant_content``. """ @@ -624,45 +667,53 @@ class SearchParams(proto.Message): Number of search results to return. The default value is 10. filter (str): - The filter syntax consists of an expression language for - constructing a predicate from one or more fields of the - documents being filtered. Filter expression is - case-sensitive. This will be used to filter search results - which may affect the Answer response. - - If this field is unrecognizable, an ``INVALID_ARGUMENT`` is - returned. - - Filtering in Vertex AI Search is done by mapping the LHS - filter key to a key property defined in the Vertex AI Search - backend -- this mapping is defined by the customer in their - schema. For example a media customers might have a field - 'name' in their schema. In this case the filter would look - like this: filter --> name:'ANY("king kong")' - - For more information about filtering including syntax and - filter operators, see - `Filter `__ + The filter syntax consists of an expression + language for constructing a predicate from one + or more fields of the documents being filtered. + Filter expression is case-sensitive. This will + be used to filter search results which may + affect the Answer response. + + If this field is unrecognizable, an + ``INVALID_ARGUMENT`` is returned. + + Filtering in Vertex AI Search is done by mapping + the LHS filter key to a key property defined in + the Vertex AI Search backend -- this mapping is + defined by the customer in their schema. For + example a media customers might have a field + 'name' in their schema. In this case the filter + would look like this: filter --> name:'ANY("king + kong")' + + For more information about filtering including + syntax and filter operators, see + `Filter + `__ boost_spec (google.cloud.discoveryengine_v1alpha.types.SearchRequest.BoostSpec): - Boost specification to boost certain documents in search - results which may affect the answer query response. For more - information on boosting, see - `Boosting `__ + Boost specification to boost certain documents + in search results which may affect the answer + query response. For more information on + boosting, see `Boosting + `__ order_by (str): - The order in which documents are returned. Documents can be - ordered by a field in an - [Document][google.cloud.discoveryengine.v1alpha.Document] - object. Leave it unset if ordered by relevance. ``order_by`` - expression is case-sensitive. For more information on - ordering, see - `Ordering `__ - - If this field is unrecognizable, an ``INVALID_ARGUMENT`` is - returned. + The order in which documents are returned. + Documents can be ordered by a field in an + `Document + `__ + object. Leave it unset if ordered by relevance. + ``order_by`` expression is case-sensitive. For + more information on ordering, see `Ordering + `__ + + If this field is unrecognizable, an + ``INVALID_ARGUMENT`` is returned. search_result_mode (google.cloud.discoveryengine_v1alpha.types.SearchRequest.ContentSearchSpec.SearchResultMode): - Specifies the search result mode. If unspecified, the search - result mode defaults to ``DOCUMENTS``. See `parse and chunk - documents `__ + Specifies the search result mode. If + unspecified, the search result mode defaults to + ``DOCUMENTS``. See `parse and chunk + documents + `__ custom_fine_tuning_spec (google.cloud.discoveryengine_v1alpha.types.CustomFineTuningSpec): Custom fine tuning configs. data_store_specs (MutableSequence[google.cloud.discoveryengine_v1alpha.types.SearchRequest.DataStoreSpec]): @@ -777,7 +828,8 @@ class DocumentContext(proto.Message): class ExtractiveSegment(proto.Message): r"""Extractive segment. - `Guide `__ + `Guide + `__ Attributes: page_identifier (str): @@ -797,7 +849,8 @@ class ExtractiveSegment(proto.Message): class ExtractiveAnswer(proto.Message): r"""Extractive answer. - `Guide `__ + `Guide + `__ Attributes: page_identifier (str): @@ -1036,22 +1089,28 @@ class QueryRephraserSpec(proto.Message): class AnswerQueryResponse(proto.Message): r"""Response message for - [ConversationalSearchService.AnswerQuery][google.cloud.discoveryengine.v1alpha.ConversationalSearchService.AnswerQuery] + `ConversationalSearchService.AnswerQuery + `__ method. Attributes: answer (google.cloud.discoveryengine_v1alpha.types.Answer): - Answer resource object. If - [AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.max_rephrase_steps][google.cloud.discoveryengine.v1alpha.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.max_rephrase_steps] + Answer resource object. + If + `AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.max_rephrase_steps + `__ is greater than 1, use - [Answer.name][google.cloud.discoveryengine.v1alpha.Answer.name] + `Answer.name + `__ to fetch answer information using - [ConversationalSearchService.GetAnswer][google.cloud.discoveryengine.v1alpha.ConversationalSearchService.GetAnswer] + `ConversationalSearchService.GetAnswer + `__ API. session (google.cloud.discoveryengine_v1alpha.types.Session): - Session resource object. It will be only available when - session field is set and valid in the - [AnswerQueryRequest][google.cloud.discoveryengine.v1alpha.AnswerQueryRequest] + Session resource object. + It will be only available when session field is + set and valid in the `AnswerQueryRequest + `__ request. answer_query_token (str): A global unique ID used for logging. @@ -1078,7 +1137,8 @@ class GetAnswerRequest(proto.Message): Attributes: name (str): - Required. The resource name of the Answer to get. Format: + Required. The resource name of the Answer to + get. Format: ``projects/{project_number}/locations/{location_id}/collections/{collection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`` """ @@ -1093,7 +1153,8 @@ class CreateSessionRequest(proto.Message): Attributes: parent (str): - Required. Full resource name of parent data store. Format: + Required. Full resource name of parent data + store. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`` session (google.cloud.discoveryengine_v1alpha.types.Session): Required. The session to create. @@ -1118,12 +1179,15 @@ class UpdateSessionRequest(proto.Message): Required. The Session to update. update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided - [Session][google.cloud.discoveryengine.v1alpha.Session] to - update. The following are NOT supported: + `Session + `__ + to update. The following are NOT supported: - - [Session.name][google.cloud.discoveryengine.v1alpha.Session.name] + * `Session.name + `__ - If not set or empty, all supported fields are updated. + If not set or empty, all supported fields are + updated. """ session: gcd_session.Session = proto.Field( @@ -1143,8 +1207,8 @@ class DeleteSessionRequest(proto.Message): Attributes: name (str): - Required. The resource name of the Session to delete. - Format: + Required. The resource name of the Session to + delete. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`` """ @@ -1159,7 +1223,8 @@ class GetSessionRequest(proto.Message): Attributes: name (str): - Required. The resource name of the Session to get. Format: + Required. The resource name of the Session to + get. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`` include_answer_details (bool): Optional. If set to true, the full session @@ -1188,40 +1253,51 @@ class ListSessionsRequest(proto.Message): unspecified, defaults to 50. Max allowed value is 1000. page_token (str): - A page token, received from a previous ``ListSessions`` - call. Provide this to retrieve the subsequent page. + A page token, received from a previous + ``ListSessions`` call. Provide this to retrieve + the subsequent page. filter (str): - A comma-separated list of fields to filter by, in EBNF - grammar. The supported fields are: - - - ``user_pseudo_id`` - - ``state`` - - ``display_name`` - - ``starred`` - - ``is_pinned`` - - ``labels`` - - ``create_time`` - - ``update_time`` - - Examples: "user_pseudo_id = some_id" "display_name = - "some_name"" "starred = true" "is_pinned=true AND (NOT - labels:hidden)" "create_time > "1970-01-01T12:00:00Z"". + A comma-separated list of fields to filter by, + in EBNF grammar. The supported fields are: + + * ``user_pseudo_id`` + * ``state`` + + * ``display_name`` + * ``starred`` + + * ``is_pinned`` + * ``labels`` + + * ``create_time`` + * ``update_time`` + + Examples: + + "user_pseudo_id = some_id" + "display_name = \"some_name\"" + "starred = true" + "is_pinned=true AND (NOT labels:hidden)" + "create_time > \"1970-01-01T12:00:00Z\"". order_by (str): - A comma-separated list of fields to order by, sorted in - ascending order. Use "desc" after a field name for - descending. Supported fields: + A comma-separated list of fields to order by, + sorted in ascending order. Use "desc" after a + field name for descending. Supported fields: + + * ``update_time`` + * ``create_time`` - - ``update_time`` - - ``create_time`` - - ``session_name`` - - ``is_pinned`` + * ``session_name`` + * ``is_pinned`` Example: - - "update_time desc" - - "create_time" - - "is_pinned desc,update_time desc": list sessions by - is_pinned first, then by update_time. + * "update_time desc" + * "create_time" + + * "is_pinned desc,update_time desc": list + sessions by is_pinned first, then by + update_time. """ parent: str = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/custom_tuning_model.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/custom_tuning_model.py index dd6c72e94ddf..53fa1b008b57 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/custom_tuning_model.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/custom_tuning_model.py @@ -33,19 +33,20 @@ class CustomTuningModel(proto.Message): Attributes: name (str): - Required. The fully qualified resource name of the model. - + Required. The fully qualified resource name of + the model. Format: + ``projects/{project_number}/locations/{location}/collections/{collection}/dataStores/{data_store}/customTuningModels/{custom_tuning_model}`` - model must be an alpha-numerical string with limit of 40 - characters. + model must be an alpha-numerical string with + limit of 40 characters. display_name (str): The display name of the model. model_version (int): The version of the model. model_state (google.cloud.discoveryengine_v1alpha.types.CustomTuningModel.ModelState): - The state that the model is in (e.g.\ ``TRAINING`` or - ``TRAINING_FAILED``). + The state that the model is in (e.g.``TRAINING`` + or ``TRAINING_FAILED``). create_time (google.protobuf.timestamp_pb2.Timestamp): Timestamp the Model was created at. training_start_time (google.protobuf.timestamp_pb2.Timestamp): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/data_store.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/data_store.py index 39a172f176e2..34f21d6e15ec 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/data_store.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/data_store.py @@ -42,40 +42,45 @@ class DataStore(proto.Message): Attributes: name (str): - Immutable. The full resource name of the data store. Format: + Immutable. The full resource name of the data + store. Format: + ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}``. - This field must be a UTF-8 encoded string with a length - limit of 1024 characters. + This field must be a UTF-8 encoded string with a + length limit of 1024 characters. display_name (str): Required. The data store display name. - This field must be a UTF-8 encoded string with a length - limit of 128 characters. Otherwise, an INVALID_ARGUMENT - error is returned. + This field must be a UTF-8 encoded string with a + length limit of 128 characters. Otherwise, an + INVALID_ARGUMENT error is returned. industry_vertical (google.cloud.discoveryengine_v1alpha.types.IndustryVertical): Immutable. The industry vertical that the data store registers. solution_types (MutableSequence[google.cloud.discoveryengine_v1alpha.types.SolutionType]): - The solutions that the data store enrolls. Available - solutions for each - [industry_vertical][google.cloud.discoveryengine.v1alpha.DataStore.industry_vertical]: + The solutions that the data store enrolls. + Available solutions for each `industry_vertical + `__: - - ``MEDIA``: ``SOLUTION_TYPE_RECOMMENDATION`` and - ``SOLUTION_TYPE_SEARCH``. - - ``SITE_SEARCH``: ``SOLUTION_TYPE_SEARCH`` is automatically - enrolled. Other solutions cannot be enrolled. + * ``MEDIA``: ``SOLUTION_TYPE_RECOMMENDATION`` + and ``SOLUTION_TYPE_SEARCH``. * ``SITE_SEARCH``: + ``SOLUTION_TYPE_SEARCH`` is automatically + enrolled. Other solutions cannot be enrolled. default_schema_id (str): Output only. The id of the default - [Schema][google.cloud.discoveryengine.v1alpha.Schema] + `Schema + `__ asscociated to this data store. content_config (google.cloud.discoveryengine_v1alpha.types.DataStore.ContentConfig): - Immutable. The content config of the data store. If this - field is unset, the server behavior defaults to - [ContentConfig.NO_CONTENT][google.cloud.discoveryengine.v1alpha.DataStore.ContentConfig.NO_CONTENT]. + Immutable. The content config of the data store. + If this field is unset, the server behavior + defaults to `ContentConfig.NO_CONTENT + `__. create_time (google.protobuf.timestamp_pb2.Timestamp): Output only. Timestamp the - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] + `DataStore + `__ was created at. language_info (google.cloud.discoveryengine_v1alpha.types.LanguageInfo): Language info for DataStore. @@ -84,49 +89,62 @@ class DataStore(proto.Message): provider config. acl_enabled (bool): Immutable. Whether data in the - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] - has ACL information. If set to ``true``, the source data - must have ACL. ACL will be ingested when data is ingested by - [DocumentService.ImportDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ImportDocuments] + `DataStore + `__ + has ACL information. If set to ``true``, the + source data must have ACL. ACL will be ingested + when data is ingested by + `DocumentService.ImportDocuments + `__ methods. When ACL is enabled for the - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore], - [Document][google.cloud.discoveryengine.v1alpha.Document] + `DataStore + `__, + `Document + `__ can't be accessed by calling - [DocumentService.GetDocument][google.cloud.discoveryengine.v1alpha.DocumentService.GetDocument] + `DocumentService.GetDocument + `__ or - [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments]. + `DocumentService.ListDocuments + `__. - Currently ACL is only supported in ``GENERIC`` industry - vertical with non-``PUBLIC_WEBSITE`` content config. + Currently ACL is only supported in ``GENERIC`` + industry vertical with non-``PUBLIC_WEBSITE`` + content config. workspace_config (google.cloud.discoveryengine_v1alpha.types.WorkspaceConfig): - Config to store data store type configuration for workspace - data. This must be set when - [DataStore.content_config][google.cloud.discoveryengine.v1alpha.DataStore.content_config] + Config to store data store type configuration + for workspace data. This must be set when + `DataStore.content_config + `__ is set as - [DataStore.ContentConfig.GOOGLE_WORKSPACE][google.cloud.discoveryengine.v1alpha.DataStore.ContentConfig.GOOGLE_WORKSPACE]. + `DataStore.ContentConfig.GOOGLE_WORKSPACE + `__. document_processing_config (google.cloud.discoveryengine_v1alpha.types.DocumentProcessingConfig): Configuration for Document understanding and enrichment. starting_schema (google.cloud.discoveryengine_v1alpha.types.Schema): The start schema to use for this - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] - when provisioning it. If unset, a default vertical - specialized schema will be used. + `DataStore + `__ + when provisioning it. If unset, a default + vertical specialized schema will be used. - This field is only used by [CreateDataStore][] API, and will - be ignored if used in other APIs. This field will be omitted - from all API responses including [CreateDataStore][] API. To - retrieve a schema of a - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore], - use - [SchemaService.GetSchema][google.cloud.discoveryengine.v1alpha.SchemaService.GetSchema] + This field is only used by [CreateDataStore][] + API, and will be ignored if used in other APIs. + This field will be omitted from all API + responses including [CreateDataStore][] API. To + retrieve a schema of a `DataStore + `__, + use `SchemaService.GetSchema + `__ API instead. - The provided schema will be validated against certain rules - on schema. Learn more from `this - doc `__. + The provided schema will be validated against + certain rules on schema. Learn more from `this + doc + `__. """ class ContentConfig(proto.Enum): @@ -137,17 +155,20 @@ class ContentConfig(proto.Enum): Default value. NO_CONTENT (1): Only contains documents without any - [Document.content][google.cloud.discoveryengine.v1alpha.Document.content]. + `Document.content + `__. CONTENT_REQUIRED (2): Only contains documents with - [Document.content][google.cloud.discoveryengine.v1alpha.Document.content]. + `Document.content + `__. PUBLIC_WEBSITE (3): The data store is used for public website search. GOOGLE_WORKSPACE (4): - The data store is used for workspace search. Details of - workspace data store are specified in the - [WorkspaceConfig][google.cloud.discoveryengine.v1alpha.WorkspaceConfig]. + The data store is used for workspace search. + Details of workspace data store are specified in + the `WorkspaceConfig + `__. """ CONTENT_CONFIG_UNSPECIFIED = 0 NO_CONTENT = 1 @@ -225,17 +246,20 @@ class LanguageInfo(proto.Message): language_code (str): The language code for the DataStore. normalized_language_code (str): - Output only. This is the normalized form of language_code. - E.g.: language_code of ``en-GB``, ``en_GB``, ``en-UK`` or - ``en-gb`` will have normalized_language_code of ``en-GB``. + Output only. This is the normalized form of + language_code. E.g.: language_code of ``en-GB``, + ``en_GB``, ``en-UK`` or ``en-gb`` will have + normalized_language_code of ``en-GB``. language (str): - Output only. Language part of normalized_language_code. - E.g.: ``en-US`` -> ``en``, ``zh-Hans-HK`` -> ``zh``, ``en`` - -> ``en``. + Output only. Language part of + normalized_language_code. E.g.: ``en-US`` -> + ``en``, ``zh-Hans-HK`` -> ``zh``, ``en`` -> + ``en``. region (str): - Output only. Region part of normalized_language_code, if - present. E.g.: ``en-US`` -> ``US``, ``zh-Hans-HK`` -> - ``HK``, ``en`` -> \`\`. + Output only. Region part of + normalized_language_code, if present. E.g.: + ``en-US`` -> ``US``, ``zh-Hans-HK`` -> ``HK``, + ``en`` -> ``. """ language_code: str = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/data_store_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/data_store_service.py index 2547cd08e41d..ea6d22760b2a 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/data_store_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/data_store_service.py @@ -45,7 +45,8 @@ class CreateDataStoreRequest(proto.Message): r"""Request for - [DataStoreService.CreateDataStore][google.cloud.discoveryengine.v1alpha.DataStoreService.CreateDataStore] + `DataStoreService.CreateDataStore + `__ method. Attributes: @@ -53,33 +54,40 @@ class CreateDataStoreRequest(proto.Message): Required. The parent resource name, such as ``projects/{project}/locations/{location}/collections/{collection}``. data_store (google.cloud.discoveryengine_v1alpha.types.DataStore): - Required. The - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] + Required. The `DataStore + `__ to create. data_store_id (str): Required. The ID to use for the - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore], + `DataStore + `__, which will become the final component of the - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]'s + `DataStore + `__'s resource name. - This field must conform to - `RFC-1034 `__ standard - with a length limit of 63 characters. Otherwise, an - INVALID_ARGUMENT error is returned. + This field must conform to `RFC-1034 + `__ + standard with a length limit of 63 characters. + Otherwise, an INVALID_ARGUMENT error is + returned. create_advanced_site_search (bool): - A boolean flag indicating whether user want to directly - create an advanced data store for site search. If the data - store is not configured as site search (GENERIC vertical and - PUBLIC_WEBSITE content_config), this flag will be ignored. + A boolean flag indicating whether user want to + directly create an advanced data store for site + search. If the data store is not configured as + site + search (GENERIC vertical and PUBLIC_WEBSITE + content_config), this flag will be ignored. skip_default_schema_creation (bool): - A boolean flag indicating whether to skip the default schema - creation for the data store. Only enable this flag if you - are certain that the default schema is incompatible with - your use case. + A boolean flag indicating whether to skip the + default schema creation for the data store. Only + enable this flag if you are certain that the + default schema is incompatible with your use + case. - If set to true, you must manually create a schema for the - data store before any documents can be ingested. + If set to true, you must manually create a + schema for the data store before any documents + can be ingested. This flag cannot be specified if ``data_store.starting_schema`` is specified. @@ -110,23 +118,27 @@ class CreateDataStoreRequest(proto.Message): class GetDataStoreRequest(proto.Message): r"""Request message for - [DataStoreService.GetDataStore][google.cloud.discoveryengine.v1alpha.DataStoreService.GetDataStore] + `DataStoreService.GetDataStore + `__ method. Attributes: name (str): Required. Full resource name of - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore], + `DataStore + `__, such as ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}``. - If the caller does not have permission to access the - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore], - regardless of whether or not it exists, a PERMISSION_DENIED - error is returned. + If the caller does not have permission to access + the `DataStore + `__, + regardless of whether or not it exists, a + PERMISSION_DENIED error is returned. If the requested - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] + `DataStore + `__ does not exist, a NOT_FOUND error is returned. """ @@ -138,7 +150,8 @@ class GetDataStoreRequest(proto.Message): class CreateDataStoreMetadata(proto.Message): r"""Metadata related to the progress of the - [DataStoreService.CreateDataStore][google.cloud.discoveryengine.v1alpha.DataStoreService.CreateDataStore] + `DataStoreService.CreateDataStore + `__ operation. This will be returned by the google.longrunning.Operation.metadata field. @@ -164,39 +177,52 @@ class CreateDataStoreMetadata(proto.Message): class ListDataStoresRequest(proto.Message): r"""Request message for - [DataStoreService.ListDataStores][google.cloud.discoveryengine.v1alpha.DataStoreService.ListDataStores] + `DataStoreService.ListDataStores + `__ method. Attributes: parent (str): - Required. The parent branch resource name, such as + Required. The parent branch resource name, such + as ``projects/{project}/locations/{location}/collections/{collection_id}``. If the caller does not have permission to list - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]s - under this location, regardless of whether or not this data - store exists, a PERMISSION_DENIED error is returned. + `DataStore + `__s + under this location, regardless of whether or + not this data store exists, a PERMISSION_DENIED + error is returned. page_size (int): Maximum number of - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]s - to return. If unspecified, defaults to 10. The maximum - allowed value is 50. Values above 50 will be coerced to 50. - - If this field is negative, an INVALID_ARGUMENT is returned. + `DataStore + `__s + to return. If unspecified, defaults to 10. The + maximum allowed value is 50. Values above 50 + will be coerced to 50. + + If this field is negative, an INVALID_ARGUMENT + is returned. page_token (str): A page token - [ListDataStoresResponse.next_page_token][google.cloud.discoveryengine.v1alpha.ListDataStoresResponse.next_page_token], + `ListDataStoresResponse.next_page_token + `__, received from a previous - [DataStoreService.ListDataStores][google.cloud.discoveryengine.v1alpha.DataStoreService.ListDataStores] - call. Provide this to retrieve the subsequent page. - - When paginating, all other parameters provided to - [DataStoreService.ListDataStores][google.cloud.discoveryengine.v1alpha.DataStoreService.ListDataStores] - must match the call that provided the page token. Otherwise, - an INVALID_ARGUMENT error is returned. + `DataStoreService.ListDataStores + `__ + call. Provide this to retrieve the subsequent + page. + + When paginating, all other parameters provided + to `DataStoreService.ListDataStores + `__ + must match the call that provided the page + token. Otherwise, an INVALID_ARGUMENT error is + returned. filter (str): - Filter by solution type . For example: - ``filter = 'solution_type:SOLUTION_TYPE_SEARCH'`` + Filter by solution type . + For example: ``filter = + 'solution_type:SOLUTION_TYPE_SEARCH'`` """ parent: str = proto.Field( @@ -219,18 +245,21 @@ class ListDataStoresRequest(proto.Message): class ListDataStoresResponse(proto.Message): r"""Response message for - [DataStoreService.ListDataStores][google.cloud.discoveryengine.v1alpha.DataStoreService.ListDataStores] + `DataStoreService.ListDataStores + `__ method. Attributes: data_stores (MutableSequence[google.cloud.discoveryengine_v1alpha.types.DataStore]): All the customer's - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]s. + `DataStore + `__s. next_page_token (str): A token that can be sent as - [ListDataStoresRequest.page_token][google.cloud.discoveryengine.v1alpha.ListDataStoresRequest.page_token] - to retrieve the next page. If this field is omitted, there - are no subsequent pages. + `ListDataStoresRequest.page_token + `__ + to retrieve the next page. If this field is + omitted, there are no subsequent pages. """ @property @@ -250,24 +279,28 @@ def raw_page(self): class DeleteDataStoreRequest(proto.Message): r"""Request message for - [DataStoreService.DeleteDataStore][google.cloud.discoveryengine.v1alpha.DataStoreService.DeleteDataStore] + `DataStoreService.DeleteDataStore + `__ method. Attributes: name (str): Required. Full resource name of - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore], + `DataStore + `__, such as ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}``. - If the caller does not have permission to delete the - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore], - regardless of whether or not it exists, a PERMISSION_DENIED - error is returned. + If the caller does not have permission to delete + the `DataStore + `__, + regardless of whether or not it exists, a + PERMISSION_DENIED error is returned. - If the - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] - to delete does not exist, a NOT_FOUND error is returned. + If the `DataStore + `__ + to delete does not exist, a NOT_FOUND error is + returned. """ name: str = proto.Field( @@ -278,30 +311,34 @@ class DeleteDataStoreRequest(proto.Message): class UpdateDataStoreRequest(proto.Message): r"""Request message for - [DataStoreService.UpdateDataStore][google.cloud.discoveryengine.v1alpha.DataStoreService.UpdateDataStore] + `DataStoreService.UpdateDataStore + `__ method. Attributes: data_store (google.cloud.discoveryengine_v1alpha.types.DataStore): - Required. The - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] + Required. The `DataStore + `__ to update. - If the caller does not have permission to update the - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore], - regardless of whether or not it exists, a PERMISSION_DENIED - error is returned. + If the caller does not have permission to update + the `DataStore + `__, + regardless of whether or not it exists, a + PERMISSION_DENIED error is returned. - If the - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] - to update does not exist, a NOT_FOUND error is returned. + If the `DataStore + `__ + to update does not exist, a NOT_FOUND error is + returned. update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] + `DataStore + `__ to update. - If an unsupported or unknown field is provided, an - INVALID_ARGUMENT error is returned. + If an unsupported or unknown field is provided, + an INVALID_ARGUMENT error is returned. """ data_store: gcd_data_store.DataStore = proto.Field( @@ -318,7 +355,8 @@ class UpdateDataStoreRequest(proto.Message): class DeleteDataStoreMetadata(proto.Message): r"""Metadata related to the progress of the - [DataStoreService.DeleteDataStore][google.cloud.discoveryengine.v1alpha.DataStoreService.DeleteDataStore] + `DataStoreService.DeleteDataStore + `__ operation. This will be returned by the google.longrunning.Operation.metadata field. @@ -344,13 +382,14 @@ class DeleteDataStoreMetadata(proto.Message): class GetDocumentProcessingConfigRequest(proto.Message): r"""Request for - [DataStoreService.GetDocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DataStoreService.GetDocumentProcessingConfig] + `DataStoreService.GetDocumentProcessingConfig + `__ method. Attributes: name (str): - Required. Full DocumentProcessingConfig resource name. - Format: + Required. Full DocumentProcessingConfig resource + name. Format: ``projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/documentProcessingConfig`` """ @@ -362,28 +401,36 @@ class GetDocumentProcessingConfigRequest(proto.Message): class UpdateDocumentProcessingConfigRequest(proto.Message): r"""Request for - [DataStoreService.UpdateDocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DataStoreService.UpdateDocumentProcessingConfig] + `DataStoreService.UpdateDocumentProcessingConfig + `__ method. Attributes: document_processing_config (google.cloud.discoveryengine_v1alpha.types.DocumentProcessingConfig): Required. The - [DocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DocumentProcessingConfig] + `DocumentProcessingConfig + `__ to update. - If the caller does not have permission to update the - [DocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DocumentProcessingConfig], + If the caller does not have permission to update + the `DocumentProcessingConfig + `__, then a PERMISSION_DENIED error is returned. If the - [DocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DocumentProcessingConfig] - to update does not exist, a NOT_FOUND error is returned. + `DocumentProcessingConfig + `__ + to update does not exist, a NOT_FOUND error is + returned. update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided - [DocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DocumentProcessingConfig] - to update. The following are the only supported fields: + `DocumentProcessingConfig + `__ + to update. The following are the only supported + fields: - - [DocumentProcessingConfig.ocr_config][google.cloud.discoveryengine.v1alpha.DocumentProcessingConfig.ocr_config] + * `DocumentProcessingConfig.ocr_config + `__ If not set, all supported fields are updated. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/document.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/document.py index 8c516cd2895f..c3f4cc8ccccc 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/document.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/document.py @@ -46,65 +46,71 @@ class Document(proto.Message): Attributes: struct_data (google.protobuf.struct_pb2.Struct): - The structured JSON data for the document. It should conform - to the registered - [Schema][google.cloud.discoveryengine.v1alpha.Schema] or an - ``INVALID_ARGUMENT`` error is thrown. + The structured JSON data for the document. It + should conform to the registered `Schema + `__ + or an ``INVALID_ARGUMENT`` error is thrown. This field is a member of `oneof`_ ``data``. json_data (str): - The JSON string representation of the document. It should - conform to the registered - [Schema][google.cloud.discoveryengine.v1alpha.Schema] or an - ``INVALID_ARGUMENT`` error is thrown. + The JSON string representation of the document. + It should conform to the registered `Schema + `__ + or an ``INVALID_ARGUMENT`` error is thrown. This field is a member of `oneof`_ ``data``. name (str): - Immutable. The full resource name of the document. Format: + Immutable. The full resource name of the + document. Format: + ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}``. - This field must be a UTF-8 encoded string with a length - limit of 1024 characters. + This field must be a UTF-8 encoded string with a + length limit of 1024 characters. id (str): Immutable. The identifier of the document. - Id should conform to - `RFC-1034 `__ standard - with a length limit of 63 characters. + Id should conform to `RFC-1034 + `__ + standard with a length limit of 63 characters. schema_id (str): The identifier of the schema located in the same data store. content (google.cloud.discoveryengine_v1alpha.types.Document.Content): - The unstructured data linked to this document. Content must - be set if this document is under a ``CONTENT_REQUIRED`` data - store. + The unstructured data linked to this document. + Content must be set if this document is under a + ``CONTENT_REQUIRED`` data store. parent_document_id (str): - The identifier of the parent document. Currently supports at - most two level document hierarchy. + The identifier of the parent document. Currently + supports at most two level document hierarchy. - Id should conform to - `RFC-1034 `__ standard - with a length limit of 63 characters. + Id should conform to `RFC-1034 + `__ + standard with a length limit of 63 characters. derived_struct_data (google.protobuf.struct_pb2.Struct): - Output only. This field is OUTPUT_ONLY. It contains derived - data that are not in the original input document. + Output only. This field is OUTPUT_ONLY. + It contains derived data that are not in the + original input document. acl_info (google.cloud.discoveryengine_v1alpha.types.Document.AclInfo): Access control information for the document. index_time (google.protobuf.timestamp_pb2.Timestamp): - Output only. The last time the document was indexed. If this - field is set, the document could be returned in search - results. + Output only. The last time the document was + indexed. If this field is set, the document + could be returned in search results. - This field is OUTPUT_ONLY. If this field is not populated, - it means the document has never been indexed. + This field is OUTPUT_ONLY. If this field is not + populated, it means the document has never been + indexed. index_status (google.cloud.discoveryengine_v1alpha.types.Document.IndexStatus): Output only. The index status of the document. - - If document is indexed successfully, the index_time field - is populated. - - Otherwise, if document is not indexed due to errors, the - error_samples field is populated. - - Otherwise, index_status is unset. + * If document is indexed successfully, the + index_time field is populated. + + * Otherwise, if document is not indexed due to + errors, the error_samples field is populated. + + * Otherwise, index_status is unset. """ class Content(proto.Message): @@ -119,35 +125,40 @@ class Content(proto.Message): Attributes: raw_bytes (bytes): - The content represented as a stream of bytes. The maximum - length is 1,000,000 bytes (1 MB / ~0.95 MiB). - - Note: As with all ``bytes`` fields, this field is - represented as pure binary in Protocol Buffers and - base64-encoded string in JSON. For example, - ``abc123!?$*&()'-=@~`` should be represented as - ``YWJjMTIzIT8kKiYoKSctPUB+`` in JSON. See + The content represented as a stream of bytes. + The maximum length is 1,000,000 bytes (1 MB / + ~0.95 MiB). + + Note: As with all ``bytes`` fields, this field + is represented as pure binary in Protocol + Buffers and base64-encoded string in JSON. For + example, ``abc123!?$*&()'-=@~`` should be + represented as ``YWJjMTIzIT8kKiYoKSctPUB+`` in + JSON. See https://developers.google.com/protocol-buffers/docs/proto3#json. This field is a member of `oneof`_ ``content``. uri (str): - The URI of the content. Only Cloud Storage URIs (e.g. - ``gs://bucket-name/path/to/file``) are supported. The - maximum file size is 2.5 MB for text-based formats, 200 MB - for other formats. + The URI of the content. Only Cloud Storage URIs + (e.g. ``gs://bucket-name/path/to/file``) are + supported. The maximum file size is 2.5 MB for + text-based formats, 200 MB for other formats. This field is a member of `oneof`_ ``content``. mime_type (str): The MIME type of the content. Supported types: - - ``application/pdf`` (PDF, only native PDFs are supported - for now) - - ``text/html`` (HTML) - - ``application/vnd.openxmlformats-officedocument.wordprocessingml.document`` - (DOCX) - - ``application/vnd.openxmlformats-officedocument.presentationml.presentation`` - (PPTX) - - ``text/plain`` (TXT) + * ``application/pdf`` (PDF, only native PDFs are + supported for now) + + * ``text/html`` (HTML) + * + ``application/vnd.openxmlformats-officedocument.wordprocessingml.document`` + (DOCX) + + * + ``application/vnd.openxmlformats-officedocument.presentationml.presentation`` + (PPTX) * ``text/plain`` (TXT) See https://www.iana.org/assignments/media-types/media-types.xhtml. @@ -184,16 +195,59 @@ class AccessRestriction(proto.Message): Document Hierarchy - Space_S --> Page_P. - Readers: Space_S: group_1, user_1 Page_P: group_2, group_3, user_2 - - Space_S ACL Restriction - { "acl_info": { "readers": [ { - "principals": [ { "group_id": "group_1" }, { "user_id": "user_1" } ] - } ] } } - - Page_P ACL Restriction. { "acl_info": { "readers": [ { "principals": - [ { "group_id": "group_2" }, { "group_id": "group_3" }, { "user_id": - "user_2" } ], }, { "principals": [ { "group_id": "group_1" }, { - "user_id": "user_1" } ], } ] } } + Readers: + + Space_S: group_1, user_1 + Page_P: group_2, group_3, user_2 + + Space_S ACL Restriction - + { + "acl_info": { + "readers": [ + { + "principals": [ + { + "group_id": "group_1" + }, + { + "user_id": "user_1" + } + ] + } + ] + } + } + + Page_P ACL Restriction. + { + "acl_info": { + "readers": [ + { + "principals": [ + { + "group_id": "group_2" + }, + { + "group_id": "group_3" + }, + { + "user_id": "user_2" + } + ], + }, + { + "principals": [ + { + "group_id": "group_1" + }, + { + "user_id": "user_1" + } + ], + } + ] + } + } Attributes: principals (MutableSequence[google.cloud.discoveryengine_v1alpha.types.Principal]): @@ -313,8 +367,8 @@ class ProcessedDocument(proto.Message): This field is a member of `oneof`_ ``processed_data_format``. document (str): - Required. Full resource name of the referenced document, in - the format + Required. Full resource name of the referenced + document, in the format ``projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*``. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/document_processing_config.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/document_processing_config.py index 54ec21fe6151..a44b4416daf3 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/document_processing_config.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/document_processing_config.py @@ -29,17 +29,19 @@ class DocumentProcessingConfig(proto.Message): r"""A singleton resource of - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]. It's - empty when - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] is - created, which defaults to digital parser. The first call to - [DataStoreService.UpdateDocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DataStoreService.UpdateDocumentProcessingConfig] + `DataStore `__. + It's empty when `DataStore + `__ is created, + which defaults to digital parser. The first call to + `DataStoreService.UpdateDocumentProcessingConfig + `__ method will initialize the config. Attributes: name (str): - The full resource name of the Document Processing Config. - Format: + The full resource name of the Document + Processing Config. Format: + ``projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig``. chunking_config (google.cloud.discoveryengine_v1alpha.types.DocumentProcessingConfig.ChunkingConfig): Whether chunking mode is enabled. @@ -50,20 +52,29 @@ class DocumentProcessingConfig(proto.Message): parsing config will be applied to all file types for Document parsing. parsing_config_overrides (MutableMapping[str, google.cloud.discoveryengine_v1alpha.types.DocumentProcessingConfig.ParsingConfig]): - Map from file type to override the default parsing - configuration based on the file type. Supported keys: - - - ``pdf``: Override parsing config for PDF files, either - digital parsing, ocr parsing or layout parsing is - supported. - - ``html``: Override parsing config for HTML files, only - digital parsing and layout parsing are supported. - - ``docx``: Override parsing config for DOCX files, only - digital parsing and layout parsing are supported. - - ``pptx``: Override parsing config for PPTX files, only - digital parsing and layout parsing are supported. - - ``xlsx``: Override parsing config for XLSX files, only - digital parsing and layout parsing are supported. + Map from file type to override the default + parsing configuration based on the file type. + Supported keys: + + * ``pdf``: Override parsing config for PDF + files, either digital parsing, ocr parsing or + layout parsing is supported. + + * ``html``: Override parsing config for HTML + files, only digital parsing and layout parsing + are supported. + + * ``docx``: Override parsing config for DOCX + files, only digital parsing and layout parsing + are supported. + + * ``pptx``: Override parsing config for PPTX + files, only digital parsing and layout parsing + are supported. + + * ``xlsx``: Override parsing config for XLSX + files, only digital parsing and layout parsing + are supported. """ class ChunkingConfig(proto.Message): @@ -146,8 +157,9 @@ class OcrParsingConfig(proto.Message): Attributes: enhanced_document_elements (MutableSequence[str]): - [DEPRECATED] This field is deprecated. To use the additional - enhanced document elements processing, please switch to + [DEPRECATED] This field is deprecated. To use + the additional enhanced document elements + processing, please switch to ``layout_parsing_config``. use_native_text (bool): If true, will use native text instead of OCR diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/document_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/document_service.py index 37f30745eb28..f3dc02e8cba8 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/document_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/document_service.py @@ -41,24 +41,28 @@ class GetDocumentRequest(proto.Message): r"""Request message for - [DocumentService.GetDocument][google.cloud.discoveryengine.v1alpha.DocumentService.GetDocument] + `DocumentService.GetDocument + `__ method. Attributes: name (str): Required. Full resource name of - [Document][google.cloud.discoveryengine.v1alpha.Document], + `Document + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}``. - If the caller does not have permission to access the - [Document][google.cloud.discoveryengine.v1alpha.Document], + If the caller does not have permission to access + the `Document + `__, regardless of whether or not it exists, a ``PERMISSION_DENIED`` error is returned. - If the requested - [Document][google.cloud.discoveryengine.v1alpha.Document] - does not exist, a ``NOT_FOUND`` error is returned. + If the requested `Document + `__ + does not exist, a ``NOT_FOUND`` error is + returned. """ name: str = proto.Field( @@ -69,39 +73,50 @@ class GetDocumentRequest(proto.Message): class ListDocumentsRequest(proto.Message): r"""Request message for - [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments] + `DocumentService.ListDocuments + `__ method. Attributes: parent (str): - Required. The parent branch resource name, such as + Required. The parent branch resource name, such + as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}``. - Use ``default_branch`` as the branch ID, to list documents - under the default branch. + Use ``default_branch`` as the branch ID, to list + documents under the default branch. If the caller does not have permission to list - [Document][google.cloud.discoveryengine.v1alpha.Document]s - under this branch, regardless of whether or not this branch - exists, a ``PERMISSION_DENIED`` error is returned. + `Document + `__s + under this branch, regardless of whether or not + this branch exists, a ``PERMISSION_DENIED`` + error is returned. page_size (int): Maximum number of - [Document][google.cloud.discoveryengine.v1alpha.Document]s - to return. If unspecified, defaults to 100. The maximum - allowed value is 1000. Values above 1000 are set to 1000. + `Document + `__s + to return. If unspecified, defaults to 100. The + maximum allowed value is 1000. Values above 1000 + are set to 1000. - If this field is negative, an ``INVALID_ARGUMENT`` error is - returned. + If this field is negative, an + ``INVALID_ARGUMENT`` error is returned. page_token (str): A page token - [ListDocumentsResponse.next_page_token][google.cloud.discoveryengine.v1alpha.ListDocumentsResponse.next_page_token], + `ListDocumentsResponse.next_page_token + `__, received from a previous - [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments] - call. Provide this to retrieve the subsequent page. - - When paginating, all other parameters provided to - [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments] - must match the call that provided the page token. Otherwise, - an ``INVALID_ARGUMENT`` error is returned. + `DocumentService.ListDocuments + `__ + call. Provide this to retrieve the subsequent + page. + + When paginating, all other parameters provided + to `DocumentService.ListDocuments + `__ + must match the call that provided the page + token. Otherwise, an ``INVALID_ARGUMENT`` error + is returned. """ parent: str = proto.Field( @@ -120,18 +135,20 @@ class ListDocumentsRequest(proto.Message): class ListDocumentsResponse(proto.Message): r"""Response message for - [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments] + `DocumentService.ListDocuments + `__ method. Attributes: documents (MutableSequence[google.cloud.discoveryengine_v1alpha.types.Document]): - The - [Document][google.cloud.discoveryengine.v1alpha.Document]s. + The `Document + `__s. next_page_token (str): A token that can be sent as - [ListDocumentsRequest.page_token][google.cloud.discoveryengine.v1alpha.ListDocumentsRequest.page_token] - to retrieve the next page. If this field is omitted, there - are no subsequent pages. + `ListDocumentsRequest.page_token + `__ + to retrieve the next page. If this field is + omitted, there are no subsequent pages. """ @property @@ -151,7 +168,8 @@ def raw_page(self): class CreateDocumentRequest(proto.Message): r"""Request message for - [DocumentService.CreateDocument][google.cloud.discoveryengine.v1alpha.DocumentService.CreateDocument] + `DocumentService.CreateDocument + `__ method. Attributes: @@ -159,30 +177,36 @@ class CreateDocumentRequest(proto.Message): Required. The parent resource name, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}``. document (google.cloud.discoveryengine_v1alpha.types.Document): - Required. The - [Document][google.cloud.discoveryengine.v1alpha.Document] to - create. + Required. The `Document + `__ + to create. document_id (str): Required. The ID to use for the - [Document][google.cloud.discoveryengine.v1alpha.Document], + `Document + `__, which becomes the final component of the - [Document.name][google.cloud.discoveryengine.v1alpha.Document.name]. + `Document.name + `__. - If the caller does not have permission to create the - [Document][google.cloud.discoveryengine.v1alpha.Document], + If the caller does not have permission to create + the `Document + `__, regardless of whether or not it exists, a ``PERMISSION_DENIED`` error is returned. This field must be unique among all - [Document][google.cloud.discoveryengine.v1alpha.Document]s - with the same - [parent][google.cloud.discoveryengine.v1alpha.CreateDocumentRequest.parent]. - Otherwise, an ``ALREADY_EXISTS`` error is returned. - - This field must conform to - `RFC-1034 `__ standard - with a length limit of 63 characters. Otherwise, an - ``INVALID_ARGUMENT`` error is returned. + `Document + `__s + with the same `parent + `__. + Otherwise, an ``ALREADY_EXISTS`` error is + returned. + + This field must conform to `RFC-1034 + `__ + standard with a length limit of 63 characters. + Otherwise, an ``INVALID_ARGUMENT`` error is + returned. """ parent: str = proto.Field( @@ -202,29 +226,33 @@ class CreateDocumentRequest(proto.Message): class UpdateDocumentRequest(proto.Message): r"""Request message for - [DocumentService.UpdateDocument][google.cloud.discoveryengine.v1alpha.DocumentService.UpdateDocument] + `DocumentService.UpdateDocument + `__ method. Attributes: document (google.cloud.discoveryengine_v1alpha.types.Document): Required. The document to update/create. - If the caller does not have permission to update the - [Document][google.cloud.discoveryengine.v1alpha.Document], + If the caller does not have permission to update + the `Document + `__, regardless of whether or not it exists, a ``PERMISSION_DENIED`` error is returned. - If the - [Document][google.cloud.discoveryengine.v1alpha.Document] to - update does not exist and - [allow_missing][google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest.allow_missing] + If the `Document + `__ + to update does not exist and + `allow_missing + `__ is not set, a ``NOT_FOUND`` error is returned. allow_missing (bool): If set to ``true`` and the - [Document][google.cloud.discoveryengine.v1alpha.Document] is - not found, a new - [Document][google.cloud.discoveryengine.v1alpha.Document] is - be created. + `Document + `__ + is not found, a new `Document + `__ + is be created. update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided imported 'document' to update. If not set, by @@ -249,24 +277,28 @@ class UpdateDocumentRequest(proto.Message): class DeleteDocumentRequest(proto.Message): r"""Request message for - [DocumentService.DeleteDocument][google.cloud.discoveryengine.v1alpha.DocumentService.DeleteDocument] + `DocumentService.DeleteDocument + `__ method. Attributes: name (str): Required. Full resource name of - [Document][google.cloud.discoveryengine.v1alpha.Document], + `Document + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}``. - If the caller does not have permission to delete the - [Document][google.cloud.discoveryengine.v1alpha.Document], + If the caller does not have permission to delete + the `Document + `__, regardless of whether or not it exists, a ``PERMISSION_DENIED`` error is returned. - If the - [Document][google.cloud.discoveryengine.v1alpha.Document] to - delete does not exist, a ``NOT_FOUND`` error is returned. + If the `Document + `__ + to delete does not exist, a ``NOT_FOUND`` error + is returned. """ name: str = proto.Field( @@ -277,24 +309,28 @@ class DeleteDocumentRequest(proto.Message): class GetProcessedDocumentRequest(proto.Message): r"""Request message for - [DocumentService.GetDocument][google.cloud.discoveryengine.v1alpha.DocumentService.GetDocument] + `DocumentService.GetDocument + `__ method. Attributes: name (str): Required. Full resource name of - [Document][google.cloud.discoveryengine.v1alpha.Document], + `Document + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}``. - If the caller does not have permission to access the - [Document][google.cloud.discoveryengine.v1alpha.Document], + If the caller does not have permission to access + the `Document + `__, regardless of whether or not it exists, a ``PERMISSION_DENIED`` error is returned. - If the requested - [Document][google.cloud.discoveryengine.v1alpha.Document] - does not exist, a ``NOT_FOUND`` error is returned. + If the requested `Document + `__ + does not exist, a ``NOT_FOUND`` error is + returned. processed_document_type (google.cloud.discoveryengine_v1alpha.types.GetProcessedDocumentRequest.ProcessedDocumentType): Required. What type of processing to return. processed_document_format (google.cloud.discoveryengine_v1alpha.types.GetProcessedDocumentRequest.ProcessedDocumentFormat): @@ -354,21 +390,24 @@ class ProcessedDocumentFormat(proto.Enum): class BatchGetDocumentsMetadataRequest(proto.Message): r"""Request message for - [DocumentService.BatchGetDocumentsMetadata][google.cloud.discoveryengine.v1alpha.DocumentService.BatchGetDocumentsMetadata] + `DocumentService.BatchGetDocumentsMetadata + `__ method. Attributes: parent (str): - Required. The parent branch resource name, such as + Required. The parent branch resource name, such + as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}``. matcher (google.cloud.discoveryengine_v1alpha.types.BatchGetDocumentsMetadataRequest.Matcher): Required. Matcher for the - [Document][google.cloud.discoveryengine.v1alpha.Document]s. + `Document + `__s. """ class UrisMatcher(proto.Message): - r"""Matcher for the - [Document][google.cloud.discoveryengine.v1alpha.Document]s by exact + r"""Matcher for the `Document + `__s by exact uris. Attributes: @@ -382,9 +421,9 @@ class UrisMatcher(proto.Message): ) class Matcher(proto.Message): - r"""Matcher for the - [Document][google.cloud.discoveryengine.v1alpha.Document]s. - Currently supports matching by exact URIs. + r"""Matcher for the `Document + `__s. Currently + supports matching by exact URIs. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -416,35 +455,38 @@ class Matcher(proto.Message): class BatchGetDocumentsMetadataResponse(proto.Message): r"""Response message for - [DocumentService.BatchGetDocumentsMetadata][google.cloud.discoveryengine.v1alpha.DocumentService.BatchGetDocumentsMetadata] + `DocumentService.BatchGetDocumentsMetadata + `__ method. Attributes: documents_metadata (MutableSequence[google.cloud.discoveryengine_v1alpha.types.BatchGetDocumentsMetadataResponse.DocumentMetadata]): The metadata of the - [Document][google.cloud.discoveryengine.v1alpha.Document]s. + `Document + `__s. """ class State(proto.Enum): r"""The state of the - [Document][google.cloud.discoveryengine.v1alpha.Document]. + `Document `__. Values: STATE_UNSPECIFIED (0): Should never be set. INDEXED (1): - The - [Document][google.cloud.discoveryengine.v1alpha.Document] is - indexed. + The `Document + `__ + is indexed. NOT_IN_TARGET_SITE (2): - The - [Document][google.cloud.discoveryengine.v1alpha.Document] is - not indexed because its URI is not in the - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite]. + The `Document + `__ + is not indexed because its URI is not in the + `TargetSite + `__. NOT_IN_INDEX (3): - The - [Document][google.cloud.discoveryengine.v1alpha.Document] is - not indexed. + The `Document + `__ + is not indexed. """ STATE_UNSPECIFIED = 0 INDEXED = 1 @@ -453,23 +495,25 @@ class State(proto.Enum): class DocumentMetadata(proto.Message): r"""The metadata of a - [Document][google.cloud.discoveryengine.v1alpha.Document]. + `Document `__. Attributes: matcher_value (google.cloud.discoveryengine_v1alpha.types.BatchGetDocumentsMetadataResponse.DocumentMetadata.MatcherValue): - The value of the matcher that was used to match the - [Document][google.cloud.discoveryengine.v1alpha.Document]. + The value of the matcher that was used to match + the `Document + `__. state (google.cloud.discoveryengine_v1alpha.types.BatchGetDocumentsMetadataResponse.State): The state of the document. last_refreshed_time (google.protobuf.timestamp_pb2.Timestamp): The timestamp of the last time the - [Document][google.cloud.discoveryengine.v1alpha.Document] + `Document + `__ was last indexed. """ class MatcherValue(proto.Message): r"""The value of the matcher that was used to match the - [Document][google.cloud.discoveryengine.v1alpha.Document]. + `Document `__. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -477,7 +521,8 @@ class MatcherValue(proto.Message): Attributes: uri (str): If match by URI, the URI of the - [Document][google.cloud.discoveryengine.v1alpha.Document]. + `Document + `__. This field is a member of `oneof`_ ``matcher_value``. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/engine.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/engine.py index 42a29402806a..a9b431637ce4 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/engine.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/engine.py @@ -31,8 +31,8 @@ class Engine(proto.Message): - r"""Metadata that describes the training and serving parameters of an - [Engine][google.cloud.discoveryengine.v1alpha.Engine]. + r"""Metadata that describes the training and serving parameters of + an `Engine `__. This message has `oneof`_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. @@ -43,60 +43,74 @@ class Engine(proto.Message): Attributes: similar_documents_config (google.cloud.discoveryengine_v1alpha.types.Engine.SimilarDocumentsEngineConfig): - Additional config specs for a ``similar-items`` engine. + Additional config specs for a ``similar-items`` + engine. This field is a member of `oneof`_ ``engine_config``. chat_engine_config (google.cloud.discoveryengine_v1alpha.types.Engine.ChatEngineConfig): - Configurations for the Chat Engine. Only applicable if - [solution_type][google.cloud.discoveryengine.v1alpha.Engine.solution_type] + Configurations for the Chat Engine. Only + applicable if `solution_type + `__ is - [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_CHAT]. + `SOLUTION_TYPE_CHAT + `__. This field is a member of `oneof`_ ``engine_config``. search_engine_config (google.cloud.discoveryengine_v1alpha.types.Engine.SearchEngineConfig): - Configurations for the Search Engine. Only applicable if - [solution_type][google.cloud.discoveryengine.v1alpha.Engine.solution_type] + Configurations for the Search Engine. Only + applicable if `solution_type + `__ is - [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_SEARCH]. + `SOLUTION_TYPE_SEARCH + `__. This field is a member of `oneof`_ ``engine_config``. media_recommendation_engine_config (google.cloud.discoveryengine_v1alpha.types.Engine.MediaRecommendationEngineConfig): - Configurations for the Media Engine. Only applicable on the - data stores with - [solution_type][google.cloud.discoveryengine.v1alpha.Engine.solution_type] - [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION] + Configurations for the Media Engine. Only + applicable on the data stores with + `solution_type + `__ + `SOLUTION_TYPE_RECOMMENDATION + `__ and - [IndustryVertical.MEDIA][google.cloud.discoveryengine.v1alpha.IndustryVertical.MEDIA] + `IndustryVertical.MEDIA + `__ vertical. This field is a member of `oneof`_ ``engine_config``. recommendation_metadata (google.cloud.discoveryengine_v1alpha.types.Engine.RecommendationMetadata): - Output only. Additional information of a recommendation - engine. Only applicable if - [solution_type][google.cloud.discoveryengine.v1alpha.Engine.solution_type] + Output only. Additional information of a + recommendation engine. Only applicable if + `solution_type + `__ is - [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. + `SOLUTION_TYPE_RECOMMENDATION + `__. This field is a member of `oneof`_ ``engine_metadata``. chat_engine_metadata (google.cloud.discoveryengine_v1alpha.types.Engine.ChatEngineMetadata): - Output only. Additional information of the Chat Engine. Only - applicable if - [solution_type][google.cloud.discoveryengine.v1alpha.Engine.solution_type] + Output only. Additional information of the Chat + Engine. Only applicable if + `solution_type + `__ is - [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_CHAT]. + `SOLUTION_TYPE_CHAT + `__. This field is a member of `oneof`_ ``engine_metadata``. name (str): - Immutable. The fully qualified resource name of the engine. - - This field must be a UTF-8 encoded string with a length - limit of 1024 characters. + Immutable. The fully qualified resource name of + the engine. + This field must be a UTF-8 encoded string with a + length limit of 1024 characters. Format: + ``projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}`` - engine should be 1-63 characters, and valid characters are - /[a-z0-9][a-z0-9-\_]*/. Otherwise, an INVALID_ARGUMENT error - is returned. + engine should be 1-63 characters, and valid + characters are /`a-z0-9 `__*/. + Otherwise, an INVALID_ARGUMENT error is + returned. display_name (str): Required. The display name of the engine. Should be human readable. UTF-8 encoded string @@ -111,34 +125,41 @@ class Engine(proto.Message): The data stores associated with this engine. For - [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_SEARCH] + `SOLUTION_TYPE_SEARCH + `__ and - [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION] - type of engines, they can only associate with at most one - data store. + `SOLUTION_TYPE_RECOMMENDATION + `__ + type of engines, they can only associate with at + most one data store. If - [solution_type][google.cloud.discoveryengine.v1alpha.Engine.solution_type] + `solution_type + `__ is - [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_CHAT], - multiple - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]s - in the same - [Collection][google.cloud.discoveryengine.v1alpha.Collection] + `SOLUTION_TYPE_CHAT + `__, + multiple `DataStore + `__s + in the same `Collection + `__ can be associated here. Note that when used in - [CreateEngineRequest][google.cloud.discoveryengine.v1alpha.CreateEngineRequest], - one DataStore id must be provided as the system will use it - for necessary initializations. + `CreateEngineRequest + `__, + one DataStore id must be provided as the system + will use it for necessary initializations. solution_type (google.cloud.discoveryengine_v1alpha.types.SolutionType): Required. The solutions of the engine. industry_vertical (google.cloud.discoveryengine_v1alpha.types.IndustryVertical): - The industry vertical that the engine registers. The - restriction of the Engine industry vertical is based on - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]: - If unspecified, default to ``GENERIC``. Vertical on Engine - has to match vertical of the DataStore linked to the engine. + The industry vertical that the engine registers. + The restriction of the Engine industry vertical + is based on `DataStore + `__: + If unspecified, default to ``GENERIC``. Vertical + on Engine has to match vertical of the DataStore + linked to the engine. common_config (google.cloud.discoveryengine_v1alpha.types.Engine.CommonConfig): Common config spec that specifies the metadata of the engine. @@ -151,11 +172,13 @@ class SearchEngineConfig(proto.Message): search_tier (google.cloud.discoveryengine_v1alpha.types.SearchTier): The search feature tier of this engine. - Different tiers might have different pricing. To learn more, - check the pricing documentation. + Different tiers might have different + pricing. To learn more, check the pricing + documentation. Defaults to - [SearchTier.SEARCH_TIER_STANDARD][google.cloud.discoveryengine.v1alpha.SearchTier.SEARCH_TIER_STANDARD] + `SearchTier.SEARCH_TIER_STANDARD + `__ if not specified. search_add_ons (MutableSequence[google.cloud.discoveryengine_v1alpha.types.SearchAddOn]): The add-on that this search engine enables. @@ -180,51 +203,60 @@ class MediaRecommendationEngineConfig(proto.Message): Attributes: type_ (str): - Required. The type of engine. e.g., ``recommended-for-you``. - + Required. The type of engine. e.g., + ``recommended-for-you``. This field together with - [optimization_objective][Engine.optimization_objective] - describe engine metadata to use to control engine training - and serving. + `optimization_objective + `__ describe + engine metadata to use to control engine + training and serving. - Currently supported values: ``recommended-for-you``, + Currently supported values: + ``recommended-for-you``, ``others-you-may-like``, ``more-like-this``, ``most-popular-items``. optimization_objective (str): The optimization objective. e.g., ``cvr``. This field together with - [optimization_objective][google.cloud.discoveryengine.v1alpha.Engine.MediaRecommendationEngineConfig.type] - describe engine metadata to use to control engine training - and serving. + `optimization_objective + `__ + describe engine metadata to use to control + engine training and serving. - Currently supported values: ``ctr``, ``cvr``. + Currently supported + values: ``ctr``, ``cvr``. - If not specified, we choose default based on engine type. - Default depends on type of recommendation: + If not specified, we choose default based on + engine type. Default depends on type of + recommendation: ``recommended-for-you`` => ``ctr`` ``others-you-may-like`` => ``ctr`` optimization_objective_config (google.cloud.discoveryengine_v1alpha.types.Engine.MediaRecommendationEngineConfig.OptimizationObjectiveConfig): Name and value of the custom threshold for cvr - optimization_objective. For target_field ``watch-time``, - target_field_value must be an integer value indicating the - media progress time in seconds between (0, 86400] (excludes - 0, includes 86400) (e.g., 90). For target_field - ``watch-percentage``, the target_field_value must be a valid - float value between (0, 1.0] (excludes 0, includes 1.0) + optimization_objective. For target_field + ``watch-time``, target_field_value must be an + integer value indicating the media progress time + in seconds between (0, 86400] (excludes 0, + includes 86400) (e.g., 90). + For target_field ``watch-percentage``, the + target_field_value must be a valid float value + between (0, 1.0] (excludes 0, includes 1.0) (e.g., 0.5). training_state (google.cloud.discoveryengine_v1alpha.types.Engine.MediaRecommendationEngineConfig.TrainingState): - The training state that the engine is in (e.g. ``TRAINING`` - or ``PAUSED``). - - Since part of the cost of running the service is frequency - of training - this can be used to determine when to train - engine in order to control cost. If not specified: the - default value for ``CreateEngine`` method is ``TRAINING``. - The default value for ``UpdateEngine`` method is to keep the - state the same as before. + The training state that the engine is in (e.g. + ``TRAINING`` or ``PAUSED``). + + Since part of the cost of running the service is + frequency of training - this can be used to + determine when to train engine in order to + control cost. If not specified: the default + value for ``CreateEngine`` method is + ``TRAINING``. The default value for + ``UpdateEngine`` method is to keep the state the + same as before. """ class TrainingState(proto.Enum): @@ -247,8 +279,9 @@ class OptimizationObjectiveConfig(proto.Message): Attributes: target_field (str): - Required. The name of the field to target. Currently - supported values: ``watch-percentage``, ``watch-time``. + Required. The name of the field to target. + Currently supported values: + ``watch-percentage``, ``watch-time``. target_field_value_float (float): Required. The threshold to be applied to the target (e.g., 0.5). @@ -289,44 +322,53 @@ class ChatEngineConfig(proto.Message): Attributes: agent_creation_config (google.cloud.discoveryengine_v1alpha.types.Engine.ChatEngineConfig.AgentCreationConfig): - The configurationt generate the Dialogflow agent that is - associated to this Engine. - - Note that these configurations are one-time consumed by and - passed to Dialogflow service. It means they cannot be - retrieved using - [EngineService.GetEngine][google.cloud.discoveryengine.v1alpha.EngineService.GetEngine] + The configurationt generate the Dialogflow agent + that is associated to this Engine. + + Note that these configurations are one-time + consumed by and passed to Dialogflow service. It + means they cannot be retrieved using + `EngineService.GetEngine + `__ or - [EngineService.ListEngines][google.cloud.discoveryengine.v1alpha.EngineService.ListEngines] + `EngineService.ListEngines + `__ API after engine creation. dialogflow_agent_to_link (str): - The resource name of an exist Dialogflow agent to link to - this Chat Engine. Customers can either provide - ``agent_creation_config`` to create agent or provide an - agent name that links the agent with the Chat engine. - - Format: - ``projects//locations//agents/``. - - Note that the ``dialogflow_agent_to_link`` are one-time - consumed by and passed to Dialogflow service. It means they - cannot be retrieved using - [EngineService.GetEngine][google.cloud.discoveryengine.v1alpha.EngineService.GetEngine] + The resource name of an exist Dialogflow agent + to link to this Chat Engine. Customers can + either provide ``agent_creation_config`` to + create agent or provide an agent name that links + the agent with the Chat engine. + + Format: ``projects//locations//agents/``. + + Note that the ``dialogflow_agent_to_link`` are + one-time consumed by and passed to Dialogflow + service. It means they cannot be retrieved using + `EngineService.GetEngine + `__ or - [EngineService.ListEngines][google.cloud.discoveryengine.v1alpha.EngineService.ListEngines] + `EngineService.ListEngines + `__ API after engine creation. Use - [ChatEngineMetadata.dialogflow_agent][google.cloud.discoveryengine.v1alpha.Engine.ChatEngineMetadata.dialogflow_agent] - for actual agent association after Engine is created. + `ChatEngineMetadata.dialogflow_agent + `__ + for actual agent association after Engine is + created. """ class AgentCreationConfig(proto.Message): r"""Configurations for generating a Dialogflow agent. - Note that these configurations are one-time consumed by and passed - to Dialogflow service. It means they cannot be retrieved using - [EngineService.GetEngine][google.cloud.discoveryengine.v1alpha.EngineService.GetEngine] + Note that these configurations are one-time consumed by and + passed to Dialogflow service. It means they cannot be retrieved + using `EngineService.GetEngine + `__ or - [EngineService.ListEngines][google.cloud.discoveryengine.v1alpha.EngineService.ListEngines] + `EngineService.ListEngines + `__ API after engine creation. Attributes: @@ -336,13 +378,16 @@ class AgentCreationConfig(proto.Message): knowledge connector LLM prompt and for knowledge search. default_language_code (str): - Required. The default language of the agent as a language - tag. See `Language - Support `__ - for a list of the currently supported language codes. + Required. The default language of the agent as a + language tag. See `Language + Support + `__ + for a list of the currently supported language + codes. time_zone (str): - Required. The time zone of the agent from the `time zone - database `__, e.g., + Required. The time zone of the agent from the + `time zone database + `__, e.g., America/New_York, Europe/Paris. location (str): Agent location for Agent creation, supported @@ -401,17 +446,19 @@ class RecommendationMetadata(proto.Message): Attributes: serving_state (google.cloud.discoveryengine_v1alpha.types.Engine.RecommendationMetadata.ServingState): - Output only. The serving state of the engine: ``ACTIVE``, - ``NOT_ACTIVE``. + Output only. The serving state of the engine: + ``ACTIVE``, ``NOT_ACTIVE``. data_state (google.cloud.discoveryengine_v1alpha.types.Engine.RecommendationMetadata.DataState): - Output only. The state of data requirements for this engine: - ``DATA_OK`` and ``DATA_ERROR``. - - Engine cannot be trained if the data is in ``DATA_ERROR`` - state. Engine can have ``DATA_ERROR`` state even if serving - state is ``ACTIVE``: engines were trained successfully - before, but cannot be refreshed because the underlying - engine no longer has sufficient data for training. + Output only. The state of data requirements for + this engine: ``DATA_OK`` and ``DATA_ERROR``. + + Engine cannot be trained if the data is in + ``DATA_ERROR`` state. Engine can have + ``DATA_ERROR`` state even if serving state is + ``ACTIVE``: engines were trained successfully + before, but cannot be refreshed because the + underlying engine no longer has sufficient data + for training. last_tune_time (google.protobuf.timestamp_pb2.Timestamp): Output only. The timestamp when the latest successful tune finished. Only applicable on @@ -493,11 +540,11 @@ class ChatEngineMetadata(proto.Message): Attributes: dialogflow_agent (str): - The resource name of a Dialogflow agent, that this Chat - Engine refers to. + The resource name of a Dialogflow agent, that + this Chat Engine refers to. - Format: - ``projects//locations//agents/``. + Format: ``projects//locations//agents/``. """ dialogflow_agent: str = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/engine_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/engine_service.py index 2c97a5d28828..ca43613d6b73 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/engine_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/engine_service.py @@ -45,7 +45,8 @@ class CreateEngineRequest(proto.Message): r"""Request for - [EngineService.CreateEngine][google.cloud.discoveryengine.v1alpha.EngineService.CreateEngine] + `EngineService.CreateEngine + `__ method. Attributes: @@ -53,20 +54,23 @@ class CreateEngineRequest(proto.Message): Required. The parent resource name, such as ``projects/{project}/locations/{location}/collections/{collection}``. engine (google.cloud.discoveryengine_v1alpha.types.Engine): - Required. The - [Engine][google.cloud.discoveryengine.v1alpha.Engine] to - create. + Required. The `Engine + `__ + to create. engine_id (str): Required. The ID to use for the - [Engine][google.cloud.discoveryengine.v1alpha.Engine], which - will become the final component of the - [Engine][google.cloud.discoveryengine.v1alpha.Engine]'s + `Engine + `__, + which will become the final component of the + `Engine + `__'s resource name. - This field must conform to - `RFC-1034 `__ standard - with a length limit of 63 characters. Otherwise, an - INVALID_ARGUMENT error is returned. + This field must conform to `RFC-1034 + `__ + standard with a length limit of 63 characters. + Otherwise, an INVALID_ARGUMENT error is + returned. """ parent: str = proto.Field( @@ -86,7 +90,8 @@ class CreateEngineRequest(proto.Message): class CreateEngineMetadata(proto.Message): r"""Metadata related to the progress of the - [EngineService.CreateEngine][google.cloud.discoveryengine.v1alpha.EngineService.CreateEngine] + `EngineService.CreateEngine + `__ operation. This will be returned by the google.longrunning.Operation.metadata field. @@ -112,23 +117,28 @@ class CreateEngineMetadata(proto.Message): class DeleteEngineRequest(proto.Message): r"""Request message for - [EngineService.DeleteEngine][google.cloud.discoveryengine.v1alpha.EngineService.DeleteEngine] + `EngineService.DeleteEngine + `__ method. Attributes: name (str): Required. Full resource name of - [Engine][google.cloud.discoveryengine.v1alpha.Engine], such - as + `Engine + `__, + such as ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}``. - If the caller does not have permission to delete the - [Engine][google.cloud.discoveryengine.v1alpha.Engine], - regardless of whether or not it exists, a PERMISSION_DENIED - error is returned. + If the caller does not have permission to delete + the `Engine + `__, + regardless of whether or not it exists, a + PERMISSION_DENIED error is returned. - If the [Engine][google.cloud.discoveryengine.v1alpha.Engine] - to delete does not exist, a NOT_FOUND error is returned. + If the `Engine + `__ + to delete does not exist, a NOT_FOUND error is + returned. """ name: str = proto.Field( @@ -139,7 +149,8 @@ class DeleteEngineRequest(proto.Message): class DeleteEngineMetadata(proto.Message): r"""Metadata related to the progress of the - [EngineService.DeleteEngine][google.cloud.discoveryengine.v1alpha.EngineService.DeleteEngine] + `EngineService.DeleteEngine + `__ operation. This will be returned by the google.longrunning.Operation.metadata field. @@ -165,14 +176,16 @@ class DeleteEngineMetadata(proto.Message): class GetEngineRequest(proto.Message): r"""Request message for - [EngineService.GetEngine][google.cloud.discoveryengine.v1alpha.EngineService.GetEngine] + `EngineService.GetEngine + `__ method. Attributes: name (str): Required. Full resource name of - [Engine][google.cloud.discoveryengine.v1alpha.Engine], such - as + `Engine + `__, + such as ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}``. """ @@ -184,7 +197,8 @@ class GetEngineRequest(proto.Message): class ListEnginesRequest(proto.Message): r"""Request message for - [EngineService.ListEngines][google.cloud.discoveryengine.v1alpha.EngineService.ListEngines] + `EngineService.ListEngines + `__ method. Attributes: @@ -220,13 +234,14 @@ class ListEnginesRequest(proto.Message): class ListEnginesResponse(proto.Message): r"""Response message for - [EngineService.ListEngines][google.cloud.discoveryengine.v1alpha.EngineService.ListEngines] + `EngineService.ListEngines + `__ method. Attributes: engines (MutableSequence[google.cloud.discoveryengine_v1alpha.types.Engine]): - All the customer's - [Engine][google.cloud.discoveryengine.v1alpha.Engine]s. + All the customer's `Engine + `__s. next_page_token (str): Not supported. """ @@ -248,29 +263,34 @@ def raw_page(self): class UpdateEngineRequest(proto.Message): r"""Request message for - [EngineService.UpdateEngine][google.cloud.discoveryengine.v1alpha.EngineService.UpdateEngine] + `EngineService.UpdateEngine + `__ method. Attributes: engine (google.cloud.discoveryengine_v1alpha.types.Engine): - Required. The - [Engine][google.cloud.discoveryengine.v1alpha.Engine] to - update. - - If the caller does not have permission to update the - [Engine][google.cloud.discoveryengine.v1alpha.Engine], - regardless of whether or not it exists, a PERMISSION_DENIED - error is returned. - - If the [Engine][google.cloud.discoveryengine.v1alpha.Engine] - to update does not exist, a NOT_FOUND error is returned. + Required. The `Engine + `__ + to update. + + If the caller does not have permission to update + the `Engine + `__, + regardless of whether or not it exists, a + PERMISSION_DENIED error is returned. + + If the `Engine + `__ + to update does not exist, a NOT_FOUND error is + returned. update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided - [Engine][google.cloud.discoveryengine.v1alpha.Engine] to - update. + `Engine + `__ + to update. - If an unsupported or unknown field is provided, an - INVALID_ARGUMENT error is returned. + If an unsupported or unknown field is provided, + an INVALID_ARGUMENT error is returned. """ engine: gcd_engine.Engine = proto.Field( @@ -290,7 +310,9 @@ class PauseEngineRequest(proto.Message): Attributes: name (str): - Required. The name of the engine to pause. Format: + Required. The name of the engine to pause. + Format: + ``projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`` """ @@ -305,7 +327,9 @@ class ResumeEngineRequest(proto.Message): Attributes: name (str): - Required. The name of the engine to resume. Format: + Required. The name of the engine to resume. + Format: + ``projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`` """ @@ -321,7 +345,9 @@ class TuneEngineRequest(proto.Message): Attributes: name (str): - Required. The resource name of the engine to tune. Format: + Required. The resource name of the engine to + tune. Format: + ``projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`` """ @@ -336,8 +362,9 @@ class TuneEngineMetadata(proto.Message): Attributes: engine (str): - Required. The resource name of the engine that this tune - applies to. Format: + Required. The resource name of the engine that + this tune applies to. Format: + ``projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`` """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/estimate_billing_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/estimate_billing_service.py index 11db5f0dd9b7..ef0106d2d7f5 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/estimate_billing_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/estimate_billing_service.py @@ -34,7 +34,8 @@ class EstimateDataSizeRequest(proto.Message): r"""Request message for - [EstimateBillingService.EstimateDataSize][google.cloud.discoveryengine.v1alpha.EstimateBillingService.EstimateDataSize] + `EstimateBillingService.EstimateDataSize + `__ method This message has `oneof`_ fields (mutually exclusive fields). @@ -54,7 +55,8 @@ class EstimateDataSizeRequest(proto.Message): This field is a member of `oneof`_ ``data_source``. location (str): - Required. Full resource name of the location, such as + Required. Full resource name of the location, + such as ``projects/{project}/locations/{location}``. """ @@ -64,9 +66,9 @@ class WebsiteDataSource(proto.Message): Attributes: estimator_uri_patterns (MutableSequence[google.cloud.discoveryengine_v1alpha.types.EstimateDataSizeRequest.WebsiteDataSource.EstimatorUriPattern]): - Required. The URI patterns to estimate the data sizes. At - most 10 patterns are allowed, otherwise an INVALID_ARGUMENT - error is thrown. + Required. The URI patterns to estimate the data + sizes. At most 10 patterns are allowed, + otherwise an INVALID_ARGUMENT error is thrown. """ class EstimatorUriPattern(proto.Message): @@ -74,7 +76,8 @@ class EstimatorUriPattern(proto.Message): Attributes: provided_uri_pattern (str): - User provided URI pattern. For example, ``foo.com/bar/*``. + User provided URI pattern. For example, + ``foo.com/bar/*``. exact_match (bool): Whether we infer the generated URI or use the exact provided one. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/evaluation.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/evaluation.py index adfc5ebade66..bd120e099eb7 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/evaluation.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/evaluation.py @@ -40,23 +40,25 @@ class Evaluation(proto.Message): Attributes: name (str): Identifier. The full resource name of the - [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation], + `Evaluation + `__, in the format of ``projects/{project}/locations/{location}/evaluations/{evaluation}``. - This field must be a UTF-8 encoded string with a length - limit of 1024 characters. + This field must be a UTF-8 encoded string with a + length limit of 1024 characters. evaluation_spec (google.cloud.discoveryengine_v1alpha.types.Evaluation.EvaluationSpec): Required. The specification of the evaluation. quality_metrics (google.cloud.discoveryengine_v1alpha.types.QualityMetrics): - Output only. The metrics produced by the evaluation, - averaged across all - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]s - in the - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet]. - - Only populated when the evaluation's state is SUCCEEDED. + Output only. The metrics produced by the + evaluation, averaged across all `SampleQuery + `__s + in the `SampleQuerySet + `__. + + Only populated when the evaluation's state is + SUCCEEDED. state (google.cloud.discoveryengine_v1alpha.types.Evaluation.State): Output only. The state of the evaluation. error (google.rpc.status_pb2.Status): @@ -65,11 +67,13 @@ class Evaluation(proto.Message): state is FAILED. create_time (google.protobuf.timestamp_pb2.Timestamp): Output only. Timestamp the - [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation] + `Evaluation + `__ was created at. end_time (google.protobuf.timestamp_pb2.Timestamp): Output only. Timestamp the - [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation] + `Evaluation + `__ was completed at. error_samples (MutableSequence[google.rpc.status_pb2.Status]): Output only. A sample of errors encountered @@ -105,20 +109,29 @@ class EvaluationSpec(proto.Message): Attributes: search_request (google.cloud.discoveryengine_v1alpha.types.SearchRequest): - Required. The search request that is used to perform the - evaluation. - - Only the following fields within SearchRequest are - supported; if any other fields are provided, an UNSUPPORTED - error will be returned: - - - [SearchRequest.serving_config][google.cloud.discoveryengine.v1alpha.SearchRequest.serving_config] - - [SearchRequest.branch][google.cloud.discoveryengine.v1alpha.SearchRequest.branch] - - [SearchRequest.canonical_filter][google.cloud.discoveryengine.v1alpha.SearchRequest.canonical_filter] - - [SearchRequest.query_expansion_spec][google.cloud.discoveryengine.v1alpha.SearchRequest.query_expansion_spec] - - [SearchRequest.spell_correction_spec][google.cloud.discoveryengine.v1alpha.SearchRequest.spell_correction_spec] - - [SearchRequest.content_search_spec][google.cloud.discoveryengine.v1alpha.SearchRequest.content_search_spec] - - [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1alpha.SearchRequest.user_pseudo_id] + Required. The search request that is used to + perform the evaluation. + Only the following fields within SearchRequest + are supported; if any other fields are provided, + an UNSUPPORTED error will be returned: + + * `SearchRequest.serving_config + `__ + * `SearchRequest.branch + `__ + + * `SearchRequest.canonical_filter + `__ + * `SearchRequest.query_expansion_spec + `__ + + * `SearchRequest.spell_correction_spec + `__ + * `SearchRequest.content_search_spec + `__ + + * `SearchRequest.user_pseudo_id + `__ This field is a member of `oneof`_ ``search_spec``. query_set_spec (google.cloud.discoveryengine_v1alpha.types.Evaluation.EvaluationSpec.QuerySetSpec): @@ -131,7 +144,8 @@ class QuerySetSpec(proto.Message): Attributes: sample_query_set (str): Required. The full resource name of the - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet] + `SampleQuerySet + `__ used for the evaluation, in the format of ``projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}``. """ @@ -199,81 +213,98 @@ class QualityMetrics(proto.Message): Attributes: doc_recall (google.cloud.discoveryengine_v1alpha.types.QualityMetrics.TopkMetrics): - Recall per document, at various top-k cutoff levels. - - Recall is the fraction of relevant documents retrieved out - of all relevant documents. + Recall per document, at various top-k cutoff + levels. + Recall is the fraction of relevant documents + retrieved out of all relevant documents. Example (top-5): - - For a single - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery], - If 3 out of 5 relevant documents are retrieved in the - top-5, recall@5 = 3/5 = 0.6 + * For a single + `SampleQuery + `__, + If 3 out of 5 relevant documents are retrieved + in the top-5, recall@5 = 3/5 = 0.6 doc_precision (google.cloud.discoveryengine_v1alpha.types.QualityMetrics.TopkMetrics): - Precision per document, at various top-k cutoff levels. - - Precision is the fraction of retrieved documents that are - relevant. + Precision per document, at various top-k cutoff + levels. + Precision is the fraction of retrieved documents + that are relevant. Example (top-5): - - For a single - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery], - If 4 out of 5 retrieved documents in the top-5 are - relevant, precision@5 = 4/5 = 0.8 + * For a single + `SampleQuery + `__, + If 4 out of 5 retrieved documents in the top-5 + are relevant, precision@5 = 4/5 = 0.8 doc_ndcg (google.cloud.discoveryengine_v1alpha.types.QualityMetrics.TopkMetrics): - Normalized discounted cumulative gain (NDCG) per document, - at various top-k cutoff levels. + Normalized discounted cumulative gain (NDCG) per + document, at various top-k cutoff levels. - NDCG measures the ranking quality, giving higher relevance - to top results. + NDCG measures the ranking quality, giving higher + relevance to top results. - Example (top-3): Suppose - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery] - with three retrieved documents (D1, D2, D3) and binary - relevance judgements (1 for relevant, 0 for not relevant): + Example (top-3): - Retrieved: [D3 (0), D1 (1), D2 (1)] Ideal: [D1 (1), D2 (1), - D3 (0)] + Suppose `SampleQuery + `__ + with three retrieved documents (D1, D2, D3) and + binary relevance judgements (1 for relevant, 0 + for not relevant): - Calculate NDCG@3 for each - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]: - \* DCG@3: 0/log2(1+1) + 1/log2(2+1) + 1/log2(3+1) = 1.13 \* - Ideal DCG@3: 1/log2(1+1) + 1/log2(2+1) + 0/log2(3+1) = 1.63 - \* NDCG@3: 1.13/1.63 = 0.693 + Retrieved: [D3 (0), D1 (1), D2 (1)] + Ideal: [D1 (1), D2 (1), D3 (0)] + + Calculate NDCG@3 for each + `SampleQuery + `__: + + * DCG@3: 0/log2(1+1) + 1/log2(2+1) + 1/log2(3+1) + = 1.13 * Ideal DCG@3: 1/log2(1+1) + + 1/log2(2+1) + 0/log2(3+1) = 1.63 + + * NDCG@3: 1.13/1.63 = 0.693 page_recall (google.cloud.discoveryengine_v1alpha.types.QualityMetrics.TopkMetrics): Recall per page, at various top-k cutoff levels. - Recall is the fraction of relevant pages retrieved out of - all relevant pages. + Recall is the fraction of relevant pages + retrieved out of all relevant pages. Example (top-5): - - For a single - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery], - if 3 out of 5 relevant pages are retrieved in the top-5, - recall@5 = 3/5 = 0.6 + * For a single + `SampleQuery + `__, + if 3 out of 5 relevant pages are retrieved in + the top-5, recall@5 = 3/5 = 0.6 page_ndcg (google.cloud.discoveryengine_v1alpha.types.QualityMetrics.TopkMetrics): - Normalized discounted cumulative gain (NDCG) per page, at - various top-k cutoff levels. + Normalized discounted cumulative gain (NDCG) per + page, at various top-k cutoff levels. + + NDCG measures the ranking quality, giving higher + relevance to top results. + + Example (top-3): + + Suppose `SampleQuery + `__ + with three retrieved pages (P1, P2, P3) and + binary relevance judgements (1 for relevant, 0 + for not relevant): - NDCG measures the ranking quality, giving higher relevance - to top results. + Retrieved: [P3 (0), P1 (1), P2 (1)] + Ideal: [P1 (1), P2 (1), P3 (0)] - Example (top-3): Suppose - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery] - with three retrieved pages (P1, P2, P3) and binary relevance - judgements (1 for relevant, 0 for not relevant): + Calculate NDCG@3 for + `SampleQuery + `__: - Retrieved: [P3 (0), P1 (1), P2 (1)] Ideal: [P1 (1), P2 (1), - P3 (0)] + * DCG@3: 0/log2(1+1) + 1/log2(2+1) + 1/log2(3+1) + = 1.13 * Ideal DCG@3: 1/log2(1+1) + + 1/log2(2+1) + 0/log2(3+1) = 1.63 - Calculate NDCG@3 for - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]: - \* DCG@3: 0/log2(1+1) + 1/log2(2+1) + 1/log2(3+1) = 1.13 \* - Ideal DCG@3: 1/log2(1+1) + 1/log2(2+1) + 0/log2(3+1) = 1.63 - \* NDCG@3: 1.13/1.63 = 0.693 + * NDCG@3: 1.13/1.63 = 0.693 """ class TopkMetrics(proto.Message): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/evaluation_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/evaluation_service.py index 9f1f49fe4228..0b21d9c0312b 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/evaluation_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/evaluation_service.py @@ -38,23 +38,27 @@ class GetEvaluationRequest(proto.Message): r"""Request message for - [EvaluationService.GetEvaluation][google.cloud.discoveryengine.v1alpha.EvaluationService.GetEvaluation] + `EvaluationService.GetEvaluation + `__ method. Attributes: name (str): Required. Full resource name of - [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation], + `Evaluation + `__, such as ``projects/{project}/locations/{location}/evaluations/{evaluation}``. - If the caller does not have permission to access the - [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation], - regardless of whether or not it exists, a PERMISSION_DENIED - error is returned. + If the caller does not have permission to access + the `Evaluation + `__, + regardless of whether or not it exists, a + PERMISSION_DENIED error is returned. If the requested - [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation] + `Evaluation + `__ does not exist, a NOT_FOUND error is returned. """ @@ -66,38 +70,48 @@ class GetEvaluationRequest(proto.Message): class ListEvaluationsRequest(proto.Message): r"""Request message for - [EvaluationService.ListEvaluations][google.cloud.discoveryengine.v1alpha.EvaluationService.ListEvaluations] + `EvaluationService.ListEvaluations + `__ method. Attributes: parent (str): - Required. The parent location resource name, such as + Required. The parent location resource name, + such as ``projects/{project}/locations/{location}``. If the caller does not have permission to list - [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation]s - under this location, regardless of whether or not this - location exists, a ``PERMISSION_DENIED`` error is returned. + `Evaluation + `__s + under this location, regardless of whether or + not this location exists, a + ``PERMISSION_DENIED`` error is returned. page_size (int): Maximum number of - [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation]s - to return. If unspecified, defaults to 100. The maximum - allowed value is 1000. Values above 1000 will be coerced to - 1000. - - If this field is negative, an ``INVALID_ARGUMENT`` error is - returned. + `Evaluation + `__s + to return. If unspecified, defaults to 100. The + maximum allowed value is 1000. Values above 1000 + will be coerced to 1000. + + If this field is negative, an + ``INVALID_ARGUMENT`` error is returned. page_token (str): A page token - [ListEvaluationsResponse.next_page_token][google.cloud.discoveryengine.v1alpha.ListEvaluationsResponse.next_page_token], + `ListEvaluationsResponse.next_page_token + `__, received from a previous - [EvaluationService.ListEvaluations][google.cloud.discoveryengine.v1alpha.EvaluationService.ListEvaluations] - call. Provide this to retrieve the subsequent page. - - When paginating, all other parameters provided to - [EvaluationService.ListEvaluations][google.cloud.discoveryengine.v1alpha.EvaluationService.ListEvaluations] - must match the call that provided the page token. Otherwise, - an ``INVALID_ARGUMENT`` error is returned. + `EvaluationService.ListEvaluations + `__ + call. Provide this to retrieve the subsequent + page. + + When paginating, all other parameters provided + to `EvaluationService.ListEvaluations + `__ + must match the call that provided the page + token. Otherwise, an ``INVALID_ARGUMENT`` error + is returned. """ parent: str = proto.Field( @@ -116,18 +130,20 @@ class ListEvaluationsRequest(proto.Message): class ListEvaluationsResponse(proto.Message): r"""Response message for - [EvaluationService.ListEvaluations][google.cloud.discoveryengine.v1alpha.EvaluationService.ListEvaluations] + `EvaluationService.ListEvaluations + `__ method. Attributes: evaluations (MutableSequence[google.cloud.discoveryengine_v1alpha.types.Evaluation]): - The - [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation]s. + The `Evaluation + `__s. next_page_token (str): A token that can be sent as - [ListEvaluationsRequest.page_token][google.cloud.discoveryengine.v1alpha.ListEvaluationsRequest.page_token] - to retrieve the next page. If this field is omitted, there - are no subsequent pages. + `ListEvaluationsRequest.page_token + `__ + to retrieve the next page. If this field is + omitted, there are no subsequent pages. """ @property @@ -147,7 +163,8 @@ def raw_page(self): class CreateEvaluationRequest(proto.Message): r"""Request message for - [EvaluationService.CreateEvaluation][google.cloud.discoveryengine.v1alpha.EvaluationService.CreateEvaluation] + `EvaluationService.CreateEvaluation + `__ method. Attributes: @@ -155,8 +172,8 @@ class CreateEvaluationRequest(proto.Message): Required. The parent resource name, such as ``projects/{project}/locations/{location}``. evaluation (google.cloud.discoveryengine_v1alpha.types.Evaluation): - Required. The - [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation] + Required. The `Evaluation + `__ to create. """ @@ -173,7 +190,8 @@ class CreateEvaluationRequest(proto.Message): class CreateEvaluationMetadata(proto.Message): r"""Metadata for - [EvaluationService.CreateEvaluation][google.cloud.discoveryengine.v1alpha.EvaluationService.CreateEvaluation] + `EvaluationService.CreateEvaluation + `__ method. """ @@ -181,7 +199,8 @@ class CreateEvaluationMetadata(proto.Message): class ListEvaluationResultsRequest(proto.Message): r"""Request message for - [EvaluationService.ListEvaluationResults][google.cloud.discoveryengine.v1alpha.EvaluationService.ListEvaluationResults] + `EvaluationService.ListEvaluationResults + `__ method. Attributes: @@ -190,27 +209,34 @@ class ListEvaluationResultsRequest(proto.Message): ``projects/{project}/locations/{location}/evaluations/{evaluation}``. If the caller does not have permission to list - [EvaluationResult][] under this evaluation, regardless of - whether or not this evaluation set exists, a - ``PERMISSION_DENIED`` error is returned. + [EvaluationResult][] under this evaluation, + regardless of whether or not this evaluation set + exists, a ``PERMISSION_DENIED`` error is + returned. page_size (int): - Maximum number of [EvaluationResult][] to return. If - unspecified, defaults to 100. The maximum allowed value is - 1000. Values above 1000 will be coerced to 1000. + Maximum number of [EvaluationResult][] to + return. If unspecified, defaults to 100. The + maximum allowed value is 1000. Values above 1000 + will be coerced to 1000. - If this field is negative, an ``INVALID_ARGUMENT`` error is - returned. + If this field is negative, an + ``INVALID_ARGUMENT`` error is returned. page_token (str): A page token - [ListEvaluationResultsResponse.next_page_token][google.cloud.discoveryengine.v1alpha.ListEvaluationResultsResponse.next_page_token], + `ListEvaluationResultsResponse.next_page_token + `__, received from a previous - [EvaluationService.ListEvaluationResults][google.cloud.discoveryengine.v1alpha.EvaluationService.ListEvaluationResults] - call. Provide this to retrieve the subsequent page. - - When paginating, all other parameters provided to - [EvaluationService.ListEvaluationResults][google.cloud.discoveryengine.v1alpha.EvaluationService.ListEvaluationResults] - must match the call that provided the page token. Otherwise, - an ``INVALID_ARGUMENT`` error is returned. + `EvaluationService.ListEvaluationResults + `__ + call. Provide this to retrieve the subsequent + page. + + When paginating, all other parameters provided + to `EvaluationService.ListEvaluationResults + `__ + must match the call that provided the page + token. Otherwise, an ``INVALID_ARGUMENT`` error + is returned. """ evaluation: str = proto.Field( @@ -229,33 +255,38 @@ class ListEvaluationResultsRequest(proto.Message): class ListEvaluationResultsResponse(proto.Message): r"""Response message for - [EvaluationService.ListEvaluationResults][google.cloud.discoveryengine.v1alpha.EvaluationService.ListEvaluationResults] + `EvaluationService.ListEvaluationResults + `__ method. Attributes: evaluation_results (MutableSequence[google.cloud.discoveryengine_v1alpha.types.ListEvaluationResultsResponse.EvaluationResult]): The - [EvaluationResult][google.cloud.discoveryengine.v1alpha.ListEvaluationResultsResponse.EvaluationResult]s. + `EvaluationResult + `__s. next_page_token (str): A token that can be sent as - [ListEvaluationResultsRequest.page_token][google.cloud.discoveryengine.v1alpha.ListEvaluationResultsRequest.page_token] - to retrieve the next page. If this field is omitted, there - are no subsequent pages. + `ListEvaluationResultsRequest.page_token + `__ + to retrieve the next page. If this field is + omitted, there are no subsequent pages. """ class EvaluationResult(proto.Message): r"""Represents the results of an evaluation for a single - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]. + `SampleQuery + `__. Attributes: sample_query (google.cloud.discoveryengine_v1alpha.types.SampleQuery): Output only. The - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery] + `SampleQuery + `__ that was evaluated. quality_metrics (google.cloud.discoveryengine_v1alpha.types.QualityMetrics): - Output only. The metrics produced by the evaluation, for a - given - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]. + Output only. The metrics produced by the + evaluation, for a given `SampleQuery + `__. """ sample_query: gcd_sample_query.SampleQuery = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/grounded_generation_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/grounded_generation_service.py index 9b8178e5fd55..6d7bc949ef53 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/grounded_generation_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/grounded_generation_service.py @@ -38,12 +38,13 @@ class CheckGroundingSpec(proto.Message): Attributes: citation_threshold (float): - The threshold (in [0,1]) used for determining whether a fact - must be cited for a claim in the answer candidate. Choosing - a higher threshold will lead to fewer but very strong - citations, while choosing a lower threshold may lead to more - but somewhat weaker citations. If unset, the threshold will - default to 0.6. + The threshold (in [0,1]) used for determining + whether a fact must be cited for a claim in the + answer candidate. Choosing a higher threshold + will lead to fewer but very strong citations, + while choosing a lower threshold may lead to + more but somewhat weaker citations. If unset, + the threshold will default to 0.6. This field is a member of `oneof`_ ``_citation_threshold``. """ @@ -57,12 +58,14 @@ class CheckGroundingSpec(proto.Message): class CheckGroundingRequest(proto.Message): r"""Request message for - [GroundedGenerationService.CheckGrounding][google.cloud.discoveryengine.v1alpha.GroundedGenerationService.CheckGrounding] + `GroundedGenerationService.CheckGrounding + `__ method. Attributes: grounding_config (str): - Required. The resource name of the grounding config, such as + Required. The resource name of the grounding + config, such as ``projects/*/locations/global/groundingConfigs/default_grounding_config``. answer_candidate (str): Answer candidate to check. Can have a maximum @@ -73,26 +76,32 @@ class CheckGroundingRequest(proto.Message): grounding_spec (google.cloud.discoveryengine_v1alpha.types.CheckGroundingSpec): Configuration of the grounding check. user_labels (MutableMapping[str, str]): - The user labels applied to a resource must meet the - following requirements: - - - Each resource can have multiple labels, up to a maximum of - 64. - - Each label must be a key-value pair. - - Keys have a minimum length of 1 character and a maximum - length of 63 characters and cannot be empty. Values can be - empty and have a maximum length of 63 characters. - - Keys and values can contain only lowercase letters, - numeric characters, underscores, and dashes. All - characters must use UTF-8 encoding, and international - characters are allowed. - - The key portion of a label must be unique. However, you - can use the same key with multiple resources. - - Keys must start with a lowercase letter or international - character. + The user labels applied to a resource must meet + the following requirements: + * Each resource can have multiple labels, up to + a maximum of 64. + + * Each label must be a key-value pair. + * Keys have a minimum length of 1 character and + a maximum length of 63 characters and cannot + be empty. Values can be empty and have a maximum + length of 63 characters. + + * Keys and values can contain only lowercase + letters, numeric characters, underscores, and + dashes. All characters must use UTF-8 encoding, + and international characters are allowed. + + * The key portion of a label must be unique. + However, you can use the same key with + multiple resources. + + * Keys must start with a lowercase letter or + international character. See `Google Cloud - Document `__ + Document + `__ for more details. """ @@ -123,7 +132,8 @@ class CheckGroundingRequest(proto.Message): class CheckGroundingResponse(proto.Message): r"""Response message for the - [GroundedGenerationService.CheckGrounding][google.cloud.discoveryengine.v1alpha.GroundedGenerationService.CheckGrounding] + `GroundedGenerationService.CheckGrounding + `__ method. @@ -168,21 +178,27 @@ class Claim(proto.Message): Always provided regardless of whether citations or anti-citations are found. citation_indices (MutableSequence[int]): - A list of indices (into 'cited_chunks') specifying the - citations associated with the claim. For instance [1,3,4] - means that cited_chunks[1], cited_chunks[3], cited_chunks[4] - are the facts cited supporting for the claim. A citation to - a fact indicates that the claim is supported by the fact. + A list of indices (into 'cited_chunks') + specifying the citations associated with the + claim. For instance [1,3,4] means that + cited_chunks[1], cited_chunks[3], + cited_chunks[4] are the facts cited supporting + for the claim. A citation to a fact indicates + that the claim is supported by the fact. grounding_check_required (bool): - Indicates that this claim required grounding check. When the - system decided this claim doesn't require - attribution/grounding check, this field will be set to - false. In that case, no grounding check was done for the - claim and therefore - [citation_indices][google.cloud.discoveryengine.v1alpha.CheckGroundingResponse.Claim.citation_indices], - [anti_citation_indices][google.cloud.discoveryengine.v1alpha.CheckGroundingResponse.Claim.anti_citation_indices], + Indicates that this claim required grounding + check. When the system decided this claim + doesn't require attribution/grounding check, + this field will be set to false. In that case, + no grounding check was done for the claim and + therefore + `citation_indices + `__, + `anti_citation_indices + `__, and - [score][google.cloud.discoveryengine.v1alpha.CheckGroundingResponse.Claim.score] + `score + `__ should not be returned. This field is a member of `oneof`_ ``_grounding_check_required``. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/grounding.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/grounding.py index 623c792cc652..f6944ecba357 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/grounding.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/grounding.py @@ -36,10 +36,10 @@ class GroundingFact(proto.Message): Text content of the fact. Can be at most 10K characters long. attributes (MutableMapping[str, str]): - Attributes associated with the fact. Common attributes - include ``source`` (indicating where the fact was sourced - from), ``author`` (indicating the author of the fact), and - so on. + Attributes associated with the fact. + Common attributes include ``source`` (indicating + where the fact was sourced from), ``author`` + (indicating the author of the fact), and so on. """ fact_text: str = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/import_config.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/import_config.py index abf627df7402..1bfc46af660f 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/import_config.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/import_config.py @@ -67,44 +67,56 @@ class GcsSource(proto.Message): Attributes: input_uris (MutableSequence[str]): - Required. Cloud Storage URIs to input files. Each URI can be - up to 2000 characters long. URIs can match the full object - path (for example, ``gs://bucket/directory/object.json``) or - a pattern matching one or more files, such as + Required. Cloud Storage URIs to input files. + Each URI can be up to 2000 characters long. URIs + can match the full object path (for example, + ``gs://bucket/directory/object.json``) or a + pattern matching one or more files, such as ``gs://bucket/directory/*.json``. - A request can contain at most 100 files (or 100,000 files if - ``data_schema`` is ``content``). Each file can be up to 2 GB - (or 100 MB if ``data_schema`` is ``content``). + A request can contain at most 100 files (or + 100,000 files if ``data_schema`` is + ``content``). Each file can be up to 2 GB (or + 100 MB if ``data_schema`` is ``content``). data_schema (str): - The schema to use when parsing the data from the source. - + The schema to use when parsing the data from the + source. Supported values for document imports: - - ``document`` (default): One JSON - [Document][google.cloud.discoveryengine.v1alpha.Document] - per line. Each document must have a valid - [Document.id][google.cloud.discoveryengine.v1alpha.Document.id]. - - ``content``: Unstructured data (e.g. PDF, HTML). Each file - matched by ``input_uris`` becomes a document, with the ID - set to the first 128 bits of SHA256(URI) encoded as a hex - string. - - ``custom``: One custom data JSON per row in arbitrary - format that conforms to the defined - [Schema][google.cloud.discoveryengine.v1alpha.Schema] of - the data store. This can only be used by the GENERIC Data - Store vertical. - - ``csv``: A CSV file with header conforming to the defined - [Schema][google.cloud.discoveryengine.v1alpha.Schema] of - the data store. Each entry after the header is imported as - a Document. This can only be used by the GENERIC Data - Store vertical. + * ``document`` (default): One JSON + `Document + `__ + per line. Each document must + have a valid + `Document.id + `__. + + * ``content``: Unstructured data (e.g. PDF, + HTML). Each file matched by ``input_uris`` + becomes a document, with the ID set to the first + 128 bits of SHA256(URI) encoded as a hex + string. + + * ``custom``: One custom data JSON per row in + arbitrary format that conforms to the defined + `Schema + `__ + of the data store. This can only be used by + the GENERIC Data Store vertical. + + * ``csv``: A CSV file with header conforming to + the defined `Schema + `__ + of the data store. Each entry after the header + is imported as a Document. This can only be + used by the GENERIC Data Store vertical. Supported values for user event imports: - - ``user_event`` (default): One JSON - [UserEvent][google.cloud.discoveryengine.v1alpha.UserEvent] - per line. + * ``user_event`` (default): One JSON + `UserEvent + `__ + per line. """ input_uris: MutableSequence[str] = proto.RepeatedField( @@ -124,8 +136,8 @@ class BigQuerySource(proto.Message): Attributes: partition_date (google.type.date_pb2.Date): - BigQuery time partitioned table's \_PARTITIONDATE in - YYYY-MM-DD format. + BigQuery time partitioned table's _PARTITIONDATE + in YYYY-MM-DD format. This field is a member of `oneof`_ ``partition``. project_id (str): @@ -147,29 +159,37 @@ class BigQuerySource(proto.Message): have the BigQuery export to a specific Cloud Storage directory. data_schema (str): - The schema to use when parsing the data from the source. - + The schema to use when parsing the data from the + source. Supported values for user event imports: - - ``user_event`` (default): One - [UserEvent][google.cloud.discoveryengine.v1alpha.UserEvent] - per row. + * ``user_event`` (default): One + `UserEvent + `__ + per row. Supported values for document imports: - - ``document`` (default): One - [Document][google.cloud.discoveryengine.v1alpha.Document] - format per row. Each document must have a valid - [Document.id][google.cloud.discoveryengine.v1alpha.Document.id] - and one of - [Document.json_data][google.cloud.discoveryengine.v1alpha.Document.json_data] - or - [Document.struct_data][google.cloud.discoveryengine.v1alpha.Document.struct_data]. - - ``custom``: One custom data per row in arbitrary format - that conforms to the defined - [Schema][google.cloud.discoveryengine.v1alpha.Schema] of - the data store. This can only be used by the GENERIC Data - Store vertical. + * ``document`` (default): One + `Document + `__ + format per row. Each document must have a + valid + `Document.id + `__ + and one of + `Document.json_data + `__ + or + `Document.struct_data + `__. + + * ``custom``: One custom data per row in + arbitrary format that conforms to the defined + `Schema + `__ + of the data store. This can only be used by + the GENERIC Data Store vertical. """ partition_date: date_pb2.Date = proto.Field( @@ -219,9 +239,10 @@ class SpannerSource(proto.Message): Required. The table name of the Spanner database that needs to be imported. enable_data_boost (bool): - Whether to apply data boost on Spanner export. Enabling this - option will incur additional cost. More info can be found - `here `__. + Whether to apply data boost on Spanner export. + Enabling this option will incur additional cost. + More info can be found `here + `__. """ project_id: str = proto.Field( @@ -252,9 +273,9 @@ class BigtableOptions(proto.Message): Attributes: key_field_name (str): - The field name used for saving row key value in the - document. The name has to match the pattern - ``[a-zA-Z0-9][a-zA-Z0-9-_]*``. + The field name used for saving row key value in + the document. The name has to match the pattern + ```a-zA-Z0-9 `__*``. families (MutableMapping[str, google.cloud.discoveryengine_v1alpha.types.BigtableOptions.BigtableColumnFamily]): The mapping from family names to an object that contains column families level information @@ -263,9 +284,11 @@ class BigtableOptions(proto.Message): """ class Type(proto.Enum): - r"""The type of values in a Bigtable column or column family. The values - are expected to be encoded using `HBase - Bytes.toBytes `__ + r"""The type of values in a Bigtable column or column family. + The values are expected to be encoded using + `HBase + Bytes.toBytes + `__ function when the encoding value is set to ``BINARY``. Values: @@ -315,25 +338,28 @@ class BigtableColumnFamily(proto.Message): Attributes: field_name (str): - The field name to use for this column family in the - document. The name has to match the pattern - ``[a-zA-Z0-9][a-zA-Z0-9-_]*``. If not set, it is parsed from - the family name with best effort. However, due to different - naming patterns, field name collisions could happen, where - parsing behavior is undefined. + The field name to use for this column family in + the document. The name has to match the pattern + ```a-zA-Z0-9 `__*``. If not set, it + is parsed from the family name with best effort. + However, due to different naming patterns, field + name collisions could happen, where parsing + behavior is undefined. encoding (google.cloud.discoveryengine_v1alpha.types.BigtableOptions.Encoding): - The encoding mode of the values when the type is not STRING. - Acceptable encoding values are: - - - ``TEXT``: indicates values are alphanumeric text strings. - - ``BINARY``: indicates values are encoded using - ``HBase Bytes.toBytes`` family of functions. This can be - overridden for a specific column by listing that column in - ``columns`` and specifying an encoding for it. + The encoding mode of the values when the type is + not STRING. Acceptable encoding values are: + + * ``TEXT``: indicates values are alphanumeric + text strings. * ``BINARY``: indicates values are + encoded using ``HBase Bytes.toBytes`` family of + functions. This can be overridden for a specific + column by listing that column in ``columns`` and + specifying an encoding for it. type_ (google.cloud.discoveryengine_v1alpha.types.BigtableOptions.Type): - The type of values in this column family. The values are - expected to be encoded using ``HBase Bytes.toBytes`` - function when the encoding value is set to ``BINARY``. + The type of values in this column family. + The values are expected to be encoded using + ``HBase Bytes.toBytes`` function when the + encoding value is set to ``BINARY``. columns (MutableSequence[google.cloud.discoveryengine_v1alpha.types.BigtableOptions.BigtableColumn]): The list of objects that contains column level information for each column. If a column @@ -371,25 +397,28 @@ class BigtableColumn(proto.Message): cannot be decoded with utf-8, use a base-64 encoded string instead. field_name (str): - The field name to use for this column in the document. The - name has to match the pattern ``[a-zA-Z0-9][a-zA-Z0-9-_]*``. - If not set, it is parsed from the qualifier bytes with best - effort. However, due to different naming patterns, field - name collisions could happen, where parsing behavior is - undefined. + The field name to use for this column in the + document. The name has to match the pattern + ```a-zA-Z0-9 `__*``. If not set, it + is parsed from the qualifier bytes with best + effort. However, due to different naming + patterns, field name collisions could happen, + where parsing behavior is undefined. encoding (google.cloud.discoveryengine_v1alpha.types.BigtableOptions.Encoding): - The encoding mode of the values when the type is not - ``STRING``. Acceptable encoding values are: - - - ``TEXT``: indicates values are alphanumeric text strings. - - ``BINARY``: indicates values are encoded using - ``HBase Bytes.toBytes`` family of functions. This can be - overridden for a specific column by listing that column in - ``columns`` and specifying an encoding for it. + The encoding mode of the values when the type is + not ``STRING``. Acceptable encoding values are: + + * ``TEXT``: indicates values are alphanumeric + text strings. * ``BINARY``: indicates values are + encoded using ``HBase Bytes.toBytes`` family of + functions. This can be overridden for a specific + column by listing that column in ``columns`` and + specifying an encoding for it. type_ (google.cloud.discoveryengine_v1alpha.types.BigtableOptions.Type): - The type of values in this column family. The values are - expected to be encoded using ``HBase Bytes.toBytes`` - function when the encoding value is set to ``BINARY``. + The type of values in this column family. + The values are expected to be encoded using + ``HBase Bytes.toBytes`` function when the + encoding value is set to ``BINARY``. """ qualifier: bytes = proto.Field( @@ -469,8 +498,8 @@ class FhirStoreSource(proto.Message): Attributes: fhir_store (str): - Required. The full resource name of the FHIR store to import - data from, in the format of + Required. The full resource name of the FHIR + store to import data from, in the format of ``projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}``. gcs_staging_dir (str): Intermediate Cloud Storage directory used for @@ -479,10 +508,12 @@ class FhirStoreSource(proto.Message): have the FhirStore export to a specific Cloud Storage directory. resource_types (MutableSequence[str]): - The FHIR resource types to import. The resource types should - be a subset of all `supported FHIR resource - types `__. - Default to all supported FHIR resource types if empty. + The FHIR resource types to import. The resource + types should be a subset of all `supported FHIR + resource types + `__. + Default to all supported FHIR resource types if + empty. """ fhir_store: str = proto.Field( @@ -528,9 +559,10 @@ class CloudSqlSource(proto.Message): the necessary Cloud Storage Admin permissions to access the specified Cloud Storage directory. offload (bool): - Option for serverless export. Enabling this option will - incur additional cost. More info can be found - `here `__. + Option for serverless export. Enabling this + option will incur additional cost. More info can + be found `here + `__. """ project_id: str = proto.Field( @@ -671,10 +703,11 @@ class ImportErrorConfig(proto.Message): Attributes: gcs_prefix (str): - Cloud Storage prefix for import errors. This must be an - empty, existing Cloud Storage directory. Import errors are - written to sharded files in this directory, one per line, as - a JSON-encoded ``google.rpc.Status`` message. + Cloud Storage prefix for import errors. This + must be an empty, existing Cloud Storage + directory. Import errors are written to sharded + files in this directory, one per line, as a + JSON-encoded ``google.rpc.Status`` message. This field is a member of `oneof`_ ``destination``. """ @@ -711,7 +744,8 @@ class ImportUserEventsRequest(proto.Message): This field is a member of `oneof`_ ``source``. parent (str): - Required. Parent DataStore resource name, of the form + Required. Parent DataStore resource name, of the + form ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`` error_config (google.cloud.discoveryengine_v1alpha.types.ImportErrorConfig): The desired location of errors incurred @@ -939,92 +973,126 @@ class ImportDocumentsRequest(proto.Message): This field is a member of `oneof`_ ``source``. parent (str): - Required. The parent branch resource name, such as + Required. The parent branch resource name, such + as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}``. Requires create/update permission. error_config (google.cloud.discoveryengine_v1alpha.types.ImportErrorConfig): The desired location of errors incurred during the Import. reconciliation_mode (google.cloud.discoveryengine_v1alpha.types.ImportDocumentsRequest.ReconciliationMode): - The mode of reconciliation between existing documents and - the documents to be imported. Defaults to - [ReconciliationMode.INCREMENTAL][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.ReconciliationMode.INCREMENTAL]. + The mode of reconciliation between existing + documents and the documents to be imported. + Defaults to `ReconciliationMode.INCREMENTAL + `__. update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided imported documents to update. If not set, the default is to update all fields. auto_generate_ids (bool): - Whether to automatically generate IDs for the documents if - absent. - + Whether to automatically generate IDs for the + documents if absent. If set to ``true``, - [Document.id][google.cloud.discoveryengine.v1alpha.Document.id]s - are automatically generated based on the hash of the - payload, where IDs may not be consistent during multiple - imports. In which case - [ReconciliationMode.FULL][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.ReconciliationMode.FULL] - is highly recommended to avoid duplicate contents. If unset - or set to ``false``, - [Document.id][google.cloud.discoveryengine.v1alpha.Document.id]s + `Document.id + `__s + are automatically generated based on the hash of + the payload, where IDs may not be consistent + during multiple imports. In which case + `ReconciliationMode.FULL + `__ + is highly recommended to avoid duplicate + contents. If unset or set to ``false``, + `Document.id + `__s have to be specified using - [id_field][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.id_field], - otherwise, documents without IDs fail to be imported. + `id_field + `__, + otherwise, documents without IDs fail to be + imported. Supported data sources: - - [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource]. - [GcsSource.data_schema][google.cloud.discoveryengine.v1alpha.GcsSource.data_schema] - must be ``custom`` or ``csv``. Otherwise, an - INVALID_ARGUMENT error is thrown. - - [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource]. - [BigQuerySource.data_schema][google.cloud.discoveryengine.v1alpha.BigQuerySource.data_schema] - must be ``custom`` or ``csv``. Otherwise, an - INVALID_ARGUMENT error is thrown. - - [SpannerSource][google.cloud.discoveryengine.v1alpha.SpannerSource]. - - [CloudSqlSource][google.cloud.discoveryengine.v1alpha.CloudSqlSource]. - - [FirestoreSource][google.cloud.discoveryengine.v1alpha.FirestoreSource]. - - [BigtableSource][google.cloud.discoveryengine.v1alpha.BigtableSource]. + * `GcsSource + `__. + `GcsSource.data_schema + `__ + must be ``custom`` or ``csv``. Otherwise, an + INVALID_ARGUMENT error is thrown. + + * `BigQuerySource + `__. + `BigQuerySource.data_schema + `__ + must be ``custom`` or ``csv``. Otherwise, an + INVALID_ARGUMENT error is thrown. + + * `SpannerSource + `__. + * `CloudSqlSource + `__. + + * `FirestoreSource + `__. + * `BigtableSource + `__. id_field (str): - The field indicates the ID field or column to be used as - unique IDs of the documents. - - For - [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] - it is the key of the JSON field. For instance, ``my_id`` for - JSON ``{"my_id": "some_uuid"}``. For others, it may be the - column name of the table where the unique ids are stored. - - The values of the JSON field or the table column are used as - the - [Document.id][google.cloud.discoveryengine.v1alpha.Document.id]s. - The JSON field or the table column must be of string type, - and the values must be set as valid strings conform to - `RFC-1034 `__ with 1-63 - characters. Otherwise, documents without valid IDs fail to - be imported. + The field indicates the ID field or column to be + used as unique IDs of the documents. + + For `GcsSource + `__ + it is the key of the JSON field. For instance, + ``my_id`` for JSON ``{"my_id": + + "some_uuid"}``. For others, it may be the column + name of the table where the unique ids are + stored. + + The values of the JSON field or the table column + are used as the `Document.id + `__s. + The JSON field or the table column must be of + string type, and the values must be set as valid + strings conform to + `RFC-1034 + `__ with + 1-63 characters. Otherwise, documents without + valid IDs fail to be imported. Only set this field when - [auto_generate_ids][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.auto_generate_ids] - is unset or set as ``false``. Otherwise, an INVALID_ARGUMENT - error is thrown. + `auto_generate_ids + `__ + is unset or set as ``false``. Otherwise, an + INVALID_ARGUMENT error is thrown. - If it is unset, a default value ``_id`` is used when - importing from the allowed data sources. + If it is unset, a default value ``_id`` is used + when importing from the allowed data sources. Supported data sources: - - [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource]. - [GcsSource.data_schema][google.cloud.discoveryengine.v1alpha.GcsSource.data_schema] - must be ``custom`` or ``csv``. Otherwise, an - INVALID_ARGUMENT error is thrown. - - [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource]. - [BigQuerySource.data_schema][google.cloud.discoveryengine.v1alpha.BigQuerySource.data_schema] - must be ``custom`` or ``csv``. Otherwise, an - INVALID_ARGUMENT error is thrown. - - [SpannerSource][google.cloud.discoveryengine.v1alpha.SpannerSource]. - - [CloudSqlSource][google.cloud.discoveryengine.v1alpha.CloudSqlSource]. - - [FirestoreSource][google.cloud.discoveryengine.v1alpha.FirestoreSource]. - - [BigtableSource][google.cloud.discoveryengine.v1alpha.BigtableSource]. + * `GcsSource + `__. + `GcsSource.data_schema + `__ + must be ``custom`` or ``csv``. Otherwise, an + INVALID_ARGUMENT error is thrown. + + * `BigQuerySource + `__. + `BigQuerySource.data_schema + `__ + must be ``custom`` or ``csv``. Otherwise, an + INVALID_ARGUMENT error is thrown. + + * `SpannerSource + `__. + * `CloudSqlSource + `__. + + * `FirestoreSource + `__. + * `BigtableSource + `__. """ class ReconciliationMode(proto.Enum): @@ -1053,9 +1121,9 @@ class InlineSource(proto.Message): Attributes: documents (MutableSequence[google.cloud.discoveryengine_v1alpha.types.Document]): - Required. A list of documents to update/create. Each - document must have a valid - [Document.id][google.cloud.discoveryengine.v1alpha.Document.id]. + Required. A list of documents to update/create. + Each document must have a valid `Document.id + `__. Recommended max of 100 items. """ @@ -1150,10 +1218,11 @@ class InlineSource(proto.Message): class ImportDocumentsResponse(proto.Message): r"""Response of the - [ImportDocumentsRequest][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest]. - If the long running operation is done, then this message is returned - by the google.longrunning.Operations.response field if the operation - was successful. + `ImportDocumentsRequest + `__. + If the long running operation is done, then this message is + returned by the google.longrunning.Operations.response field if + the operation was successful. Attributes: error_samples (MutableSequence[google.rpc.status_pb2.Status]): @@ -1178,7 +1247,8 @@ class ImportDocumentsResponse(proto.Message): class ImportSuggestionDenyListEntriesRequest(proto.Message): r"""Request message for - [CompletionService.ImportSuggestionDenyListEntries][google.cloud.discoveryengine.v1alpha.CompletionService.ImportSuggestionDenyListEntries] + `CompletionService.ImportSuggestionDenyListEntries + `__ method. This message has `oneof`_ fields (mutually exclusive fields). @@ -1197,17 +1267,19 @@ class ImportSuggestionDenyListEntriesRequest(proto.Message): gcs_source (google.cloud.discoveryengine_v1alpha.types.GcsSource): Cloud Storage location for the input content. - Only 1 file can be specified that contains all entries to - import. Supported values ``gcs_source.schema`` for - autocomplete suggestion deny list entry imports: + Only 1 file can be specified that contains all + entries to import. Supported values + ``gcs_source.schema`` for autocomplete + suggestion deny list entry imports: - - ``suggestion_deny_list`` (default): One JSON - [SuggestionDenyListEntry] per line. + * ``suggestion_deny_list`` (default): One JSON + [SuggestionDenyListEntry] per line. This field is a member of `oneof`_ ``source``. parent (str): - Required. The parent data store resource name for which to - import denylist entries. Follows pattern + Required. The parent data store resource name + for which to import denylist entries. Follows + pattern projects/*/locations/*/collections/*/dataStores/*. """ @@ -1248,7 +1320,8 @@ class InlineSource(proto.Message): class ImportSuggestionDenyListEntriesResponse(proto.Message): r"""Response message for - [CompletionService.ImportSuggestionDenyListEntries][google.cloud.discoveryengine.v1alpha.CompletionService.ImportSuggestionDenyListEntries] + `CompletionService.ImportSuggestionDenyListEntries + `__ method. Attributes: @@ -1305,7 +1378,8 @@ class ImportSuggestionDenyListEntriesMetadata(proto.Message): class ImportCompletionSuggestionsRequest(proto.Message): r"""Request message for - [CompletionService.ImportCompletionSuggestions][google.cloud.discoveryengine.v1alpha.CompletionService.ImportCompletionSuggestions] + `CompletionService.ImportCompletionSuggestions + `__ method. This message has `oneof`_ fields (mutually exclusive fields). @@ -1329,8 +1403,9 @@ class ImportCompletionSuggestionsRequest(proto.Message): This field is a member of `oneof`_ ``source``. parent (str): - Required. The parent data store resource name for which to - import customer autocomplete suggestions. + Required. The parent data store resource name + for which to import customer autocomplete + suggestions. Follows pattern ``projects/*/locations/*/collections/*/dataStores/*`` @@ -1387,10 +1462,11 @@ class InlineSource(proto.Message): class ImportCompletionSuggestionsResponse(proto.Message): r"""Response of the - [CompletionService.ImportCompletionSuggestions][google.cloud.discoveryengine.v1alpha.CompletionService.ImportCompletionSuggestions] + `CompletionService.ImportCompletionSuggestions + `__ method. If the long running operation is done, this message is - returned by the google.longrunning.Operations.response field if the - operation is successful. + returned by the google.longrunning.Operations.response field if + the operation is successful. Attributes: error_samples (MutableSequence[google.rpc.status_pb2.Status]): @@ -1426,11 +1502,13 @@ class ImportCompletionSuggestionsMetadata(proto.Message): is done, this is also the finish time. success_count (int): Count of - [CompletionSuggestion][google.cloud.discoveryengine.v1alpha.CompletionSuggestion]s + `CompletionSuggestion + `__s successfully imported. failure_count (int): Count of - [CompletionSuggestion][google.cloud.discoveryengine.v1alpha.CompletionSuggestion]s + `CompletionSuggestion + `__s that failed to be imported. """ @@ -1456,7 +1534,8 @@ class ImportCompletionSuggestionsMetadata(proto.Message): class ImportSampleQueriesRequest(proto.Message): r"""Request message for - [SampleQueryService.ImportSampleQueries][google.cloud.discoveryengine.v1alpha.SampleQueryService.ImportSampleQueries] + `SampleQueryService.ImportSampleQueries + `__ method. This message has `oneof`_ fields (mutually exclusive fields). @@ -1480,14 +1559,16 @@ class ImportSampleQueriesRequest(proto.Message): This field is a member of `oneof`_ ``source``. parent (str): - Required. The parent sample query set resource name, such as + Required. The parent sample query set resource + name, such as ``projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}``. If the caller does not have permission to list - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]s - under this sample query set, regardless of whether or not - this sample query set exists, a ``PERMISSION_DENIED`` error - is returned. + `SampleQuery + `__s + under this sample query set, regardless of + whether or not this sample query set exists, a + ``PERMISSION_DENIED`` error is returned. error_config (google.cloud.discoveryengine_v1alpha.types.ImportErrorConfig): The desired location of errors incurred during the Import. @@ -1495,12 +1576,14 @@ class ImportSampleQueriesRequest(proto.Message): class InlineSource(proto.Message): r"""The inline source for - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]s. + `SampleQuery + `__s. Attributes: sample_queries (MutableSequence[google.cloud.discoveryengine_v1alpha.types.SampleQuery]): Required. A list of - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]s + `SampleQuery + `__s to import. Max of 1000 items. """ @@ -1541,10 +1624,11 @@ class InlineSource(proto.Message): class ImportSampleQueriesResponse(proto.Message): r"""Response of the - [SampleQueryService.ImportSampleQueries][google.cloud.discoveryengine.v1alpha.SampleQueryService.ImportSampleQueries] + `SampleQueryService.ImportSampleQueries + `__ method. If the long running operation is done, this message is - returned by the google.longrunning.Operations.response field if the - operation is successful. + returned by the google.longrunning.Operations.response field if + the operation is successful. Attributes: error_samples (MutableSequence[google.rpc.status_pb2.Status]): @@ -1580,16 +1664,17 @@ class ImportSampleQueriesMetadata(proto.Message): time. If the operation is done, this is also the finish time. success_count (int): - Count of - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]s + Count of `SampleQuery + `__s successfully imported. failure_count (int): - Count of - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]s + Count of `SampleQuery + `__s that failed to be imported. total_count (int): Total count of - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]s + `SampleQuery + `__s that were processed. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/project.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/project.py index 4fbc542736c7..6d6dfbc5402a 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/project.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/project.py @@ -34,10 +34,11 @@ class Project(proto.Message): Attributes: name (str): - Output only. Full resource name of the project, for example - ``projects/{project_number}``. Note that when making - requests, project number and project id are both acceptable, - but the server will always respond in project number. + Output only. Full resource name of the project, + for example ``projects/{project_number}``. + Note that when making requests, project number + and project id are both acceptable, but the + server will always respond in project number. create_time (google.protobuf.timestamp_pb2.Timestamp): Output only. The timestamp when this project is created. @@ -47,9 +48,9 @@ class Project(proto.Message): this project is still provisioning and is not ready for use. service_terms_map (MutableMapping[str, google.cloud.discoveryengine_v1alpha.types.Project.ServiceTerms]): - Output only. A map of terms of services. The key is the - ``id`` of - [ServiceTerms][google.cloud.discoveryengine.v1alpha.Project.ServiceTerms]. + Output only. A map of terms of services. The key + is the ``id`` of `ServiceTerms + `__. """ class ServiceTerms(proto.Message): @@ -57,18 +58,21 @@ class ServiceTerms(proto.Message): Attributes: id (str): - The unique identifier of this terms of service. Available - terms: + The unique identifier of this terms of service. + Available terms: - - ``GA_DATA_USE_TERMS``: `Terms for data - use `__. - When using this as ``id``, the acceptable - [version][google.cloud.discoveryengine.v1alpha.Project.ServiceTerms.version] - to provide is ``2022-11-23``. + * ``GA_DATA_USE_TERMS``: `Terms for data + use + `__. + When using this as ``id``, the acceptable + `version + `__ + to provide is ``2022-11-23``. version (str): - The version string of the terms of service. For acceptable - values, see the comments for - [id][google.cloud.discoveryengine.v1alpha.Project.ServiceTerms.id] + The version string of the terms of service. + For acceptable values, see the comments for + `id + `__ above. state (google.cloud.discoveryengine_v1alpha.types.Project.ServiceTerms.State): Whether the project has accepted/rejected the diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/project_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/project_service.py index 1b8fe4e3315b..15f667615dd1 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/project_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/project_service.py @@ -32,13 +32,15 @@ class GetProjectRequest(proto.Message): r"""Request message for - [ProjectService.GetProject][google.cloud.discoveryengine.v1alpha.ProjectService.GetProject] + `ProjectService.GetProject + `__ method. Attributes: name (str): Required. Full resource name of a - [Project][google.cloud.discoveryengine.v1alpha.Project], + `Project + `__, such as ``projects/{project_id_or_number}``. """ @@ -50,25 +52,30 @@ class GetProjectRequest(proto.Message): class ProvisionProjectRequest(proto.Message): r"""Request for - [ProjectService.ProvisionProject][google.cloud.discoveryengine.v1alpha.ProjectService.ProvisionProject] + `ProjectService.ProvisionProject + `__ method. Attributes: name (str): Required. Full resource name of a - [Project][google.cloud.discoveryengine.v1alpha.Project], + `Project + `__, such as ``projects/{project_id_or_number}``. accept_data_use_terms (bool): - Required. Set to ``true`` to specify that caller has read - and would like to give consent to the `Terms for data - use `__. + Required. Set to ``true`` to specify that caller + has read and would like to give consent to the + `Terms for data use + `__. data_use_terms_version (str): Required. The version of the `Terms for data - use `__ that - caller has read and would like to give consent to. + use + `__ + that caller has read and would like to give + consent to. - Acceptable version is ``2022-11-23``, and this may change - over time. + Acceptable version is ``2022-11-23``, and this + may change over time. """ name: str = proto.Field( @@ -99,17 +106,20 @@ class ReportConsentChangeRequest(proto.Message): At this moment, only accept action is supported. project (str): Required. Full resource name of a - [Project][google.cloud.discoveryengine.v1alpha.Project], + `Project + `__, such as ``projects/{project_id_or_number}``. service_term_id (str): - Required. The unique identifier of the terms of service to - update. Available term ids: - - - ``GA_DATA_USE_TERMS``: `Terms for data - use `__. - When using this service term id, the acceptable - [service_term_version][google.cloud.discoveryengine.v1alpha.ReportConsentChangeRequest.service_term_version] - to provide is ``2022-11-23``. + Required. The unique identifier of the terms of + service to update. Available term ids: + + * ``GA_DATA_USE_TERMS``: `Terms for data + use + `__. + When using this service term id, the acceptable + `service_term_version + `__ + to provide is ``2022-11-23``. service_term_version (str): Required. The version string of the terms of service to update. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/purge_config.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/purge_config.py index f7c0e7ac2f29..9fc134596445 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/purge_config.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/purge_config.py @@ -48,39 +48,59 @@ class PurgeUserEventsRequest(proto.Message): Attributes: parent (str): - Required. The resource name of the catalog under which the - events are created. The format is + Required. The resource name of the catalog under + which the events are created. The format is ``projects/${projectId}/locations/global/collections/{$collectionId}/dataStores/${dataStoreId}`` filter (str): - Required. The filter string to specify the events to be - deleted with a length limit of 5,000 characters. The - eligible fields for filtering are: - - - ``eventType``: Double quoted - [UserEvent.event_type][google.cloud.discoveryengine.v1alpha.UserEvent.event_type] - string. - - ``eventTime``: in ISO 8601 "zulu" format. - - ``userPseudoId``: Double quoted string. Specifying this - will delete all events associated with a visitor. - - ``userId``: Double quoted string. Specifying this will - delete all events associated with a user. + Required. The filter string to specify the + events to be deleted with a length limit of + 5,000 characters. The eligible fields for + filtering are: + + * ``eventType``: Double quoted + `UserEvent.event_type + `__ + string. + + * ``eventTime``: in ISO 8601 "zulu" format. + * ``userPseudoId``: Double quoted string. + Specifying this will delete all events + associated with a visitor. + + * ``userId``: Double quoted string. Specifying + this will delete all events associated with a + user. Examples: - - Deleting all events in a time range: - ``eventTime > "2012-04-23T18:25:43.511Z" eventTime < "2012-04-23T18:30:43.511Z"`` - - Deleting specific eventType: ``eventType = "search"`` - - Deleting all events for a specific visitor: + * Deleting all events in a time range: + + ``eventTime > "2012-04-23T18:25:43.511Z" + eventTime < "2012-04-23T18:30:43.511Z"`` + + * Deleting specific eventType: + + ``eventType = "search"`` + + * Deleting all events for a specific visitor: + ``userPseudoId = "visitor1024"`` - - Deleting all events inside a DataStore: ``*`` - The filtering fields are assumed to have an implicit AND. + * Deleting all events inside a DataStore: + + ``*`` + + The filtering fields are assumed to have an + implicit AND. force (bool): - The ``force`` field is currently not supported. Purge user - event requests will permanently delete all purgeable events. - Once the development is complete: If ``force`` is set to - false, the method will return the expected purge count - without deleting any user events. This field will default to + The ``force`` field is currently not supported. + Purge user event requests will permanently + delete all purgeable events. Once the + development is complete: + + If ``force`` is set to false, the method will + return the expected purge count without deleting + any user events. This field will default to false if not included in the request. """ @@ -161,10 +181,11 @@ class PurgeErrorConfig(proto.Message): Attributes: gcs_prefix (str): - Cloud Storage prefix for purge errors. This must be an - empty, existing Cloud Storage directory. Purge errors are - written to sharded files in this directory, one per line, as - a JSON-encoded ``google.rpc.Status`` message. + Cloud Storage prefix for purge errors. This must + be an empty, existing Cloud Storage directory. + Purge errors are written to sharded files in + this directory, one per line, as a JSON-encoded + ``google.rpc.Status`` message. This field is a member of `oneof`_ ``destination``. """ @@ -178,7 +199,8 @@ class PurgeErrorConfig(proto.Message): class PurgeDocumentsRequest(proto.Message): r"""Request message for - [DocumentService.PurgeDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.PurgeDocuments] + `DocumentService.PurgeDocuments + `__ method. This message has `oneof`_ fields (mutually exclusive fields). @@ -190,12 +212,13 @@ class PurgeDocumentsRequest(proto.Message): Attributes: gcs_source (google.cloud.discoveryengine_v1alpha.types.GcsSource): - Cloud Storage location for the input content. Supported - ``data_schema``: + Cloud Storage location for the input content. + Supported ``data_schema``: - - ``document_id``: One valid - [Document.id][google.cloud.discoveryengine.v1alpha.Document.id] - per line. + * ``document_id``: One valid + `Document.id + `__ + per line. This field is a member of `oneof`_ ``source``. inline_source (google.cloud.discoveryengine_v1alpha.types.PurgeDocumentsRequest.InlineSource): @@ -207,26 +230,28 @@ class PurgeDocumentsRequest(proto.Message): Required. The parent resource name, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}``. filter (str): - Required. Filter matching documents to purge. Only currently - supported value is ``*`` (all items). + Required. Filter matching documents to purge. + Only currently supported value is + ``*`` (all items). error_config (google.cloud.discoveryengine_v1alpha.types.PurgeErrorConfig): The desired location of errors incurred during the purge. force (bool): - Actually performs the purge. If ``force`` is set to false, - return the expected purge count without deleting any - documents. + Actually performs the purge. If ``force`` is set + to false, return the expected purge count + without deleting any documents. """ class InlineSource(proto.Message): r"""The inline source for the input config for - [DocumentService.PurgeDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.PurgeDocuments] + `DocumentService.PurgeDocuments + `__ method. Attributes: documents (MutableSequence[str]): - Required. A list of full resource name of documents to - purge. In the format + Required. A list of full resource name of + documents to purge. In the format ``projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*``. Recommended max of 100 items. """ @@ -269,7 +294,8 @@ class InlineSource(proto.Message): class PurgeDocumentsResponse(proto.Message): r"""Response message for - [DocumentService.PurgeDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.PurgeDocuments] + `DocumentService.PurgeDocuments + `__ method. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field. @@ -279,9 +305,10 @@ class PurgeDocumentsResponse(proto.Message): The total count of documents purged as a result of the operation. purge_sample (MutableSequence[str]): - A sample of document names that will be deleted. Only - populated if ``force`` is set to false. A max of 100 names - will be returned and the names are chosen at random. + A sample of document names that will be deleted. + Only populated if ``force`` is set to false. A + max of 100 names will be returned and the names + are chosen at random. """ purge_count: int = proto.Field( @@ -342,13 +369,15 @@ class PurgeDocumentsMetadata(proto.Message): class PurgeSuggestionDenyListEntriesRequest(proto.Message): r"""Request message for - [CompletionService.PurgeSuggestionDenyListEntries][google.cloud.discoveryengine.v1alpha.CompletionService.PurgeSuggestionDenyListEntries] + `CompletionService.PurgeSuggestionDenyListEntries + `__ method. Attributes: parent (str): - Required. The parent data store resource name for which to - import denylist entries. Follows pattern + Required. The parent data store resource name + for which to import denylist entries. Follows + pattern projects/*/locations/*/collections/*/dataStores/*. """ @@ -360,7 +389,8 @@ class PurgeSuggestionDenyListEntriesRequest(proto.Message): class PurgeSuggestionDenyListEntriesResponse(proto.Message): r"""Response message for - [CompletionService.PurgeSuggestionDenyListEntries][google.cloud.discoveryengine.v1alpha.CompletionService.PurgeSuggestionDenyListEntries] + `CompletionService.PurgeSuggestionDenyListEntries + `__ method. Attributes: @@ -410,13 +440,15 @@ class PurgeSuggestionDenyListEntriesMetadata(proto.Message): class PurgeCompletionSuggestionsRequest(proto.Message): r"""Request message for - [CompletionService.PurgeCompletionSuggestions][google.cloud.discoveryengine.v1alpha.CompletionService.PurgeCompletionSuggestions] + `CompletionService.PurgeCompletionSuggestions + `__ method. Attributes: parent (str): - Required. The parent data store resource name for which to - purge completion suggestions. Follows pattern + Required. The parent data store resource name + for which to purge completion suggestions. + Follows pattern projects/*/locations/*/collections/*/dataStores/*. """ @@ -428,7 +460,8 @@ class PurgeCompletionSuggestionsRequest(proto.Message): class PurgeCompletionSuggestionsResponse(proto.Message): r"""Response message for - [CompletionService.PurgeCompletionSuggestions][google.cloud.discoveryengine.v1alpha.CompletionService.PurgeCompletionSuggestions] + `CompletionService.PurgeCompletionSuggestions + `__ method. Attributes: diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/rank_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/rank_service.py index 10344f5ca79f..63ad582f49a7 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/rank_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/rank_service.py @@ -31,24 +31,31 @@ class RankingRecord(proto.Message): r"""Record message for - [RankService.Rank][google.cloud.discoveryengine.v1alpha.RankService.Rank] + `RankService.Rank + `__ method. Attributes: id (str): The unique ID to represent the record. title (str): - The title of the record. Empty by default. At least one of - [title][google.cloud.discoveryengine.v1alpha.RankingRecord.title] - or - [content][google.cloud.discoveryengine.v1alpha.RankingRecord.content] - should be set otherwise an INVALID_ARGUMENT error is thrown. + The title of the record. Empty by default. + At least one of + `title + `__ + or `content + `__ + should be set otherwise an INVALID_ARGUMENT + error is thrown. content (str): - The content of the record. Empty by default. At least one of - [title][google.cloud.discoveryengine.v1alpha.RankingRecord.title] - or - [content][google.cloud.discoveryengine.v1alpha.RankingRecord.content] - should be set otherwise an INVALID_ARGUMENT error is thrown. + The content of the record. Empty by default. + At least one of + `title + `__ + or `content + `__ + should be set otherwise an INVALID_ARGUMENT + error is thrown. score (float): The score of this record based on the given query and selected model. @@ -74,22 +81,23 @@ class RankingRecord(proto.Message): class RankRequest(proto.Message): r"""Request message for - [RankService.Rank][google.cloud.discoveryengine.v1alpha.RankService.Rank] + `RankService.Rank + `__ method. Attributes: ranking_config (str): - Required. The resource name of the rank service config, such - as + Required. The resource name of the rank service + config, such as ``projects/{project_num}/locations/{location_id}/rankingConfigs/default_ranking_config``. model (str): - The identifier of the model to use. It is one of: + The identifier of the model to use. It is one + of: + * ``semantic-ranker-512@latest``: Semantic + ranking model with maxiumn input token size 512. - - ``semantic-ranker-512@latest``: Semantic ranking model - with maxiumn input token size 512. - - It is set to ``semantic-ranker-512@latest`` by default if - unspecified. + It is set to ``semantic-ranker-512@latest`` by + default if unspecified. top_n (int): The number of results to return. If this is unset or no bigger than zero, returns all @@ -104,26 +112,32 @@ class RankRequest(proto.Message): record ID and score. By default, it is false, the response will contain record details. user_labels (MutableMapping[str, str]): - The user labels applied to a resource must meet the - following requirements: - - - Each resource can have multiple labels, up to a maximum of - 64. - - Each label must be a key-value pair. - - Keys have a minimum length of 1 character and a maximum - length of 63 characters and cannot be empty. Values can be - empty and have a maximum length of 63 characters. - - Keys and values can contain only lowercase letters, - numeric characters, underscores, and dashes. All - characters must use UTF-8 encoding, and international - characters are allowed. - - The key portion of a label must be unique. However, you - can use the same key with multiple resources. - - Keys must start with a lowercase letter or international - character. + The user labels applied to a resource must meet + the following requirements: + * Each resource can have multiple labels, up to + a maximum of 64. + + * Each label must be a key-value pair. + * Keys have a minimum length of 1 character and + a maximum length of 63 characters and cannot + be empty. Values can be empty and have a maximum + length of 63 characters. + + * Keys and values can contain only lowercase + letters, numeric characters, underscores, and + dashes. All characters must use UTF-8 encoding, + and international characters are allowed. + + * The key portion of a label must be unique. + However, you can use the same key with + multiple resources. + + * Keys must start with a lowercase letter or + international character. See `Google Cloud - Document `__ + Document + `__ for more details. """ @@ -161,7 +175,8 @@ class RankRequest(proto.Message): class RankResponse(proto.Message): r"""Response message for - [RankService.Rank][google.cloud.discoveryengine.v1alpha.RankService.Rank] + `RankService.Rank + `__ method. Attributes: diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/recommendation_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/recommendation_service.py index db06b8c5820a..9b70a8da62c1 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/recommendation_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/recommendation_service.py @@ -38,38 +38,48 @@ class RecommendRequest(proto.Message): Attributes: serving_config (str): Required. Full resource name of a - [ServingConfig][google.cloud.discoveryengine.v1alpha.ServingConfig]: + `ServingConfig + `__: + ``projects/*/locations/global/collections/*/engines/*/servingConfigs/*``, or ``projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*`` - One default serving config is created along with your - recommendation engine creation. The engine ID is used as the - ID of the default serving config. For example, for Engine + One default serving config is created along with + your recommendation engine creation. The engine + ID is used as the ID of the default serving + config. For example, for Engine ``projects/*/locations/global/collections/*/engines/my-engine``, you can use ``projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine`` for your - [RecommendationService.Recommend][google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend] + `RecommendationService.Recommend + `__ requests. user_event (google.cloud.discoveryengine_v1alpha.types.UserEvent): - Required. Context about the user, what they are looking at - and what action they took to trigger the Recommend request. - Note that this user event detail won't be ingested to - userEvent logs. Thus, a separate userEvent write request is + Required. Context about the user, what they are + looking at and what action they took to trigger + the Recommend request. Note that this user event + detail won't be ingested to userEvent logs. + Thus, a separate userEvent write request is required for event logging. Don't set - [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id] + `UserEvent.user_pseudo_id + `__ or - [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1alpha.UserInfo.user_id] - to the same fixed ID for different users. If you are trying - to receive non-personalized recommendations (not - recommended; this can negatively impact model performance), - instead set - [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id] + `UserEvent.user_info.user_id + `__ + to the same fixed ID for different users. If you + are trying to receive non-personalized + recommendations (not recommended; this can + negatively impact model performance), instead + set + `UserEvent.user_pseudo_id + `__ to a random unique ID and leave - [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1alpha.UserInfo.user_id] + `UserEvent.user_info.user_id + `__ unset. page_size (int): Maximum number of results to return. Set this @@ -78,95 +88,120 @@ class RecommendRequest(proto.Message): reasonable default. The maximum allowed value is 100. Values above 100 are set to 100. filter (str): - Filter for restricting recommendation results with a length - limit of 5,000 characters. Currently, only filter - expressions on the ``filter_tags`` attribute is supported. + Filter for restricting recommendation results + with a length limit of 5,000 characters. + Currently, only filter expressions on the + ``filter_tags`` attribute is supported. Examples: - - ``(filter_tags: ANY("Red", "Blue") OR filter_tags: ANY("Hot", "Cold"))`` - - ``(filter_tags: ANY("Red", "Blue")) AND NOT (filter_tags: ANY("Green"))`` - - If ``attributeFilteringSyntax`` is set to true under the - ``params`` field, then attribute-based expressions are - expected instead of the above described tag-based syntax. - Examples: - - - (launguage: ANY("en", "es")) AND NOT (categories: - ANY("Movie")) - - (available: true) AND (launguage: ANY("en", "es")) OR - (categories: ANY("Movie")) - - If your filter blocks all results, the API returns generic - (unfiltered) popular Documents. If you only want results - strictly matching the filters, set ``strictFiltering`` to - ``true`` in - [RecommendRequest.params][google.cloud.discoveryengine.v1alpha.RecommendRequest.params] + * ``(filter_tags: ANY("Red", "Blue") OR + filter_tags: ANY("Hot", "Cold"))`` * + ``(filter_tags: ANY("Red", "Blue")) AND NOT + (filter_tags: ANY("Green"))`` + + If ``attributeFilteringSyntax`` is set to true + under the ``params`` field, then attribute-based + expressions are expected instead of the above + described tag-based syntax. Examples: + + * (launguage: ANY("en", "es")) AND NOT + (categories: ANY("Movie")) * (available: true) + AND + (launguage: ANY("en", "es")) OR (categories: + ANY("Movie")) + + If your filter blocks all results, the API + returns generic (unfiltered) popular Documents. + If you only want results strictly matching the + filters, set ``strictFiltering`` to ``true`` in + `RecommendRequest.params + `__ to receive empty results instead. Note that the API never returns - [Document][google.cloud.discoveryengine.v1alpha.Document]s - with ``storageStatus`` as ``EXPIRED`` or ``DELETED`` - regardless of filter choices. + `Document + `__s + with ``storageStatus`` as ``EXPIRED`` or + ``DELETED`` regardless of filter choices. validate_only (bool): - Use validate only mode for this recommendation query. If set - to ``true``, a fake model is used that returns arbitrary - Document IDs. Note that the validate only mode should only - be used for testing the API, or if the model is not ready. + Use validate only mode for this recommendation + query. If set to ``true``, a fake model is used + that returns arbitrary Document IDs. Note that + the validate only mode should only be used for + testing the API, or if the model is not ready. params (MutableMapping[str, google.protobuf.struct_pb2.Value]): Additional domain specific parameters for the recommendations. - Allowed values: - - ``returnDocument``: Boolean. If set to ``true``, the - associated Document object is returned in - [RecommendResponse.RecommendationResult.document][google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult.document]. - - ``returnScore``: Boolean. If set to true, the - recommendation score corresponding to each returned - Document is set in - [RecommendResponse.RecommendationResult.metadata][google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult.metadata]. - The given score indicates the probability of a Document - conversion given the user's context and history. - - ``strictFiltering``: Boolean. True by default. If set to - ``false``, the service returns generic (unfiltered) - popular Documents instead of empty if your filter blocks - all recommendation results. - - ``diversityLevel``: String. Default empty. If set to be - non-empty, then it needs to be one of: - - - ``no-diversity`` - - ``low-diversity`` - - ``medium-diversity`` - - ``high-diversity`` - - ``auto-diversity`` This gives request-level control and - adjusts recommendation results based on Document - category. - - - ``attributeFilteringSyntax``: Boolean. False by default. - If set to true, the ``filter`` field is interpreted - according to the new, attribute-based syntax. + * ``returnDocument``: Boolean. If set to + ``true``, the associated Document object is + returned in + `RecommendResponse.RecommendationResult.document + `__. + + * ``returnScore``: Boolean. If set to true, the + recommendation score corresponding to each + returned Document is set in + `RecommendResponse.RecommendationResult.metadata + `__. + The given score indicates the probability of a + Document conversion given the user's context + and history. + + * ``strictFiltering``: Boolean. True by default. + If set to ``false``, the service + returns generic (unfiltered) popular + Documents instead of empty if your filter + blocks all recommendation results. + + * ``diversityLevel``: String. Default empty. If + set to be non-empty, then it needs to be one + of: + + * ``no-diversity`` + * ``low-diversity`` + + * ``medium-diversity`` + * ``high-diversity`` + + * ``auto-diversity`` + This gives request-level control and adjusts + recommendation results based on Document + category. + + * ``attributeFilteringSyntax``: Boolean. False + by default. If set to true, the ``filter`` + field is interpreted according to the new, + attribute-based syntax. user_labels (MutableMapping[str, str]): - The user labels applied to a resource must meet the - following requirements: - - - Each resource can have multiple labels, up to a maximum of - 64. - - Each label must be a key-value pair. - - Keys have a minimum length of 1 character and a maximum - length of 63 characters and cannot be empty. Values can be - empty and have a maximum length of 63 characters. - - Keys and values can contain only lowercase letters, - numeric characters, underscores, and dashes. All - characters must use UTF-8 encoding, and international - characters are allowed. - - The key portion of a label must be unique. However, you - can use the same key with multiple resources. - - Keys must start with a lowercase letter or international - character. + The user labels applied to a resource must meet + the following requirements: + * Each resource can have multiple labels, up to + a maximum of 64. + + * Each label must be a key-value pair. + * Keys have a minimum length of 1 character and + a maximum length of 63 characters and cannot + be empty. Values can be empty and have a maximum + length of 63 characters. + + * Keys and values can contain only lowercase + letters, numeric characters, underscores, and + dashes. All characters must use UTF-8 encoding, + and international characters are allowed. + + * The key portion of a label must be unique. + However, you can use the same key with + multiple resources. + + * Keys must start with a lowercase letter or + international character. See `Requirements for - labels `__ + labels + `__ for more details. """ @@ -213,17 +248,20 @@ class RecommendResponse(proto.Message): represents the ranking (from the most relevant Document to the least). attribution_token (str): - A unique attribution token. This should be included in the - [UserEvent][google.cloud.discoveryengine.v1alpha.UserEvent] - logs resulting from this recommendation, which enables - accurate attribution of recommendation model performance. + A unique attribution token. This should be + included in the `UserEvent + `__ + logs resulting from this recommendation, which + enables accurate attribution of recommendation + model performance. missing_ids (MutableSequence[str]): IDs of documents in the request that were missing from the default Branch associated with the requested ServingConfig. validate_only (bool): True if - [RecommendRequest.validate_only][google.cloud.discoveryengine.v1alpha.RecommendRequest.validate_only] + `RecommendRequest.validate_only + `__ was set. """ @@ -236,15 +274,18 @@ class RecommendationResult(proto.Message): Resource ID of the recommended Document. document (google.cloud.discoveryengine_v1alpha.types.Document): Set if ``returnDocument`` is set to true in - [RecommendRequest.params][google.cloud.discoveryengine.v1alpha.RecommendRequest.params]. + `RecommendRequest.params + `__. metadata (MutableMapping[str, google.protobuf.struct_pb2.Value]): Additional Document metadata or annotations. Possible values: - - ``score``: Recommendation score in double value. Is set if - ``returnScore`` is set to true in - [RecommendRequest.params][google.cloud.discoveryengine.v1alpha.RecommendRequest.params]. + * ``score``: Recommendation score in double + value. Is set if ``returnScore`` is set to + true in + `RecommendRequest.params + `__. """ id: str = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/sample_query.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/sample_query.py index e6d834a42d5c..2ad69ae91c1f 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/sample_query.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/sample_query.py @@ -39,15 +39,16 @@ class SampleQuery(proto.Message): This field is a member of `oneof`_ ``content``. name (str): - Identifier. The full resource name of the sample query, in - the format of + Identifier. The full resource name of the sample + query, in the format of ``projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}/sampleQueries/{sample_query}``. - This field must be a UTF-8 encoded string with a length - limit of 1024 characters. + This field must be a UTF-8 encoded string with a + length limit of 1024 characters. create_time (google.protobuf.timestamp_pb2.Timestamp): Output only. Timestamp the - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery] + `SampleQuery + `__ was created at. """ @@ -71,10 +72,11 @@ class Target(proto.Message): uri (str): Expected uri of the target. - This field must be a UTF-8 encoded string with a length - limit of 2048 characters. + This field must be a UTF-8 encoded string with a + length limit of 2048 characters. - Example of valid uris: ``https://example.com/abc``, + Example of valid uris: + ``https://example.com/abc``, ``gcs://example/example.pdf``. page_numbers (MutableSequence[int]): Expected page numbers of the target. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/sample_query_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/sample_query_service.py index 29a623493981..ff9fe427dc4b 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/sample_query_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/sample_query_service.py @@ -37,23 +37,27 @@ class GetSampleQueryRequest(proto.Message): r"""Request message for - [SampleQueryService.GetSampleQuery][google.cloud.discoveryengine.v1alpha.SampleQueryService.GetSampleQuery] + `SampleQueryService.GetSampleQuery + `__ method. Attributes: name (str): Required. Full resource name of - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery], + `SampleQuery + `__, such as ``projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}/sampleQueries/{sample_query}``. - If the caller does not have permission to access the - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery], - regardless of whether or not it exists, a PERMISSION_DENIED - error is returned. + If the caller does not have permission to access + the `SampleQuery + `__, + regardless of whether or not it exists, a + PERMISSION_DENIED error is returned. If the requested - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery] + `SampleQuery + `__ does not exist, a NOT_FOUND error is returned. """ @@ -65,39 +69,48 @@ class GetSampleQueryRequest(proto.Message): class ListSampleQueriesRequest(proto.Message): r"""Request message for - [SampleQueryService.ListSampleQueries][google.cloud.discoveryengine.v1alpha.SampleQueryService.ListSampleQueries] + `SampleQueryService.ListSampleQueries + `__ method. Attributes: parent (str): - Required. The parent sample query set resource name, such as + Required. The parent sample query set resource + name, such as ``projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}``. If the caller does not have permission to list - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]s - under this sample query set, regardless of whether or not - this sample query set exists, a ``PERMISSION_DENIED`` error - is returned. + `SampleQuery + `__s + under this sample query set, regardless of + whether or not this sample query set exists, a + ``PERMISSION_DENIED`` error is returned. page_size (int): Maximum number of - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]s - to return. If unspecified, defaults to 100. The maximum - allowed value is 1000. Values above 1000 will be coerced to - 1000. + `SampleQuery + `__s + to return. If unspecified, defaults to 100. The + maximum allowed value is 1000. Values above 1000 + will be coerced to 1000. - If this field is negative, an ``INVALID_ARGUMENT`` error is - returned. + If this field is negative, an + ``INVALID_ARGUMENT`` error is returned. page_token (str): A page token - [ListSampleQueriesResponse.next_page_token][google.cloud.discoveryengine.v1alpha.ListSampleQueriesResponse.next_page_token], + `ListSampleQueriesResponse.next_page_token + `__, received from a previous - [SampleQueryService.ListSampleQueries][google.cloud.discoveryengine.v1alpha.SampleQueryService.ListSampleQueries] - call. Provide this to retrieve the subsequent page. - - When paginating, all other parameters provided to - [SampleQueryService.ListSampleQueries][google.cloud.discoveryengine.v1alpha.SampleQueryService.ListSampleQueries] - must match the call that provided the page token. Otherwise, - an ``INVALID_ARGUMENT`` error is returned. + `SampleQueryService.ListSampleQueries + `__ + call. Provide this to retrieve the subsequent + page. + + When paginating, all other parameters provided + to `SampleQueryService.ListSampleQueries + `__ + must match the call that provided the page + token. Otherwise, an ``INVALID_ARGUMENT`` error + is returned. """ parent: str = proto.Field( @@ -116,18 +129,20 @@ class ListSampleQueriesRequest(proto.Message): class ListSampleQueriesResponse(proto.Message): r"""Response message for - [SampleQueryService.ListSampleQueries][google.cloud.discoveryengine.v1alpha.SampleQueryService.ListSampleQueries] + `SampleQueryService.ListSampleQueries + `__ method. Attributes: sample_queries (MutableSequence[google.cloud.discoveryengine_v1alpha.types.SampleQuery]): - The - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]s. + The `SampleQuery + `__s. next_page_token (str): A token that can be sent as - [ListSampleQueriesRequest.page_token][google.cloud.discoveryengine.v1alpha.ListSampleQueriesRequest.page_token] - to retrieve the next page. If this field is omitted, there - are no subsequent pages. + `ListSampleQueriesRequest.page_token + `__ + to retrieve the next page. If this field is + omitted, there are no subsequent pages. """ @property @@ -147,7 +162,8 @@ def raw_page(self): class CreateSampleQueryRequest(proto.Message): r"""Request message for - [SampleQueryService.CreateSampleQuery][google.cloud.discoveryengine.v1alpha.SampleQueryService.CreateSampleQuery] + `SampleQueryService.CreateSampleQuery + `__ method. Attributes: @@ -156,29 +172,37 @@ class CreateSampleQueryRequest(proto.Message): ``projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}``. sample_query (google.cloud.discoveryengine_v1alpha.types.SampleQuery): Required. The - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery] + `SampleQuery + `__ to create. sample_query_id (str): Required. The ID to use for the - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery], + `SampleQuery + `__, which will become the final component of the - [SampleQuery.name][google.cloud.discoveryengine.v1alpha.SampleQuery.name]. + `SampleQuery.name + `__. - If the caller does not have permission to create the - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery], + If the caller does not have permission to create + the `SampleQuery + `__, regardless of whether or not it exists, a ``PERMISSION_DENIED`` error is returned. This field must be unique among all - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]s + `SampleQuery + `__s with the same - [parent][google.cloud.discoveryengine.v1alpha.CreateSampleQueryRequest.parent]. - Otherwise, an ``ALREADY_EXISTS`` error is returned. + `parent + `__. + Otherwise, an ``ALREADY_EXISTS`` error is + returned. - This field must conform to - `RFC-1034 `__ standard - with a length limit of 63 characters. Otherwise, an - ``INVALID_ARGUMENT`` error is returned. + This field must conform to `RFC-1034 + `__ + standard with a length limit of 63 characters. + Otherwise, an ``INVALID_ARGUMENT`` error is + returned. """ parent: str = proto.Field( @@ -198,21 +222,24 @@ class CreateSampleQueryRequest(proto.Message): class UpdateSampleQueryRequest(proto.Message): r"""Request message for - [SampleQueryService.UpdateSampleQuery][google.cloud.discoveryengine.v1alpha.SampleQueryService.UpdateSampleQuery] + `SampleQueryService.UpdateSampleQuery + `__ method. Attributes: sample_query (google.cloud.discoveryengine_v1alpha.types.SampleQuery): Required. The simple query to update. - If the caller does not have permission to update the - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery], + If the caller does not have permission to update + the `SampleQuery + `__, regardless of whether or not it exists, a ``PERMISSION_DENIED`` error is returned. - If the - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery] - to update does not exist a ``NOT_FOUND`` error is returned. + If the `SampleQuery + `__ + to update does not exist a ``NOT_FOUND`` error + is returned. update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided imported 'simple query' to update. If not set, @@ -233,24 +260,28 @@ class UpdateSampleQueryRequest(proto.Message): class DeleteSampleQueryRequest(proto.Message): r"""Request message for - [SampleQueryService.DeleteSampleQuery][google.cloud.discoveryengine.v1alpha.SampleQueryService.DeleteSampleQuery] + `SampleQueryService.DeleteSampleQuery + `__ method. Attributes: name (str): Required. Full resource name of - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery], + `SampleQuery + `__, such as ``projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}/sampleQueries/{sample_query}``. - If the caller does not have permission to delete the - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery], + If the caller does not have permission to delete + the `SampleQuery + `__, regardless of whether or not it exists, a ``PERMISSION_DENIED`` error is returned. - If the - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery] - to delete does not exist, a ``NOT_FOUND`` error is returned. + If the `SampleQuery + `__ + to delete does not exist, a ``NOT_FOUND`` error + is returned. """ name: str = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/sample_query_set.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/sample_query_set.py index 0b91372a0e2e..130925d33577 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/sample_query_set.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/sample_query_set.py @@ -35,12 +35,13 @@ class SampleQuerySet(proto.Message): Attributes: name (str): Identifier. The full resource name of the - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet], + `SampleQuerySet + `__, in the format of ``projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}``. - This field must be a UTF-8 encoded string with a length - limit of 1024 characters. + This field must be a UTF-8 encoded string with a + length limit of 1024 characters. display_name (str): Required. The sample query set display name. @@ -48,11 +49,13 @@ class SampleQuerySet(proto.Message): length limit of 128 characters. create_time (google.protobuf.timestamp_pb2.Timestamp): Output only. Timestamp the - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet] + `SampleQuerySet + `__ was created at. description (str): The description of the - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet]. + `SampleQuerySet + `__. """ name: str = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/sample_query_set_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/sample_query_set_service.py index b493508c4cd9..a7f2512907fc 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/sample_query_set_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/sample_query_set_service.py @@ -39,23 +39,27 @@ class GetSampleQuerySetRequest(proto.Message): r"""Request message for - [SampleQuerySetService.GetSampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySetService.GetSampleQuerySet] + `SampleQuerySetService.GetSampleQuerySet + `__ method. Attributes: name (str): Required. Full resource name of - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet], + `SampleQuerySet + `__, such as ``projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}``. - If the caller does not have permission to access the - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet], - regardless of whether or not it exists, a PERMISSION_DENIED - error is returned. + If the caller does not have permission to access + the `SampleQuerySet + `__, + regardless of whether or not it exists, a + PERMISSION_DENIED error is returned. If the requested - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet] + `SampleQuerySet + `__ does not exist, a NOT_FOUND error is returned. """ @@ -67,38 +71,48 @@ class GetSampleQuerySetRequest(proto.Message): class ListSampleQuerySetsRequest(proto.Message): r"""Request message for - [SampleQuerySetService.ListSampleQuerySets][google.cloud.discoveryengine.v1alpha.SampleQuerySetService.ListSampleQuerySets] + `SampleQuerySetService.ListSampleQuerySets + `__ method. Attributes: parent (str): - Required. The parent location resource name, such as + Required. The parent location resource name, + such as ``projects/{project}/locations/{location}``. If the caller does not have permission to list - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet]s - under this location, regardless of whether or not this - location exists, a ``PERMISSION_DENIED`` error is returned. + `SampleQuerySet + `__s + under this location, regardless of whether or + not this location exists, a + ``PERMISSION_DENIED`` error is returned. page_size (int): Maximum number of - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet]s - to return. If unspecified, defaults to 100. The maximum - allowed value is 1000. Values above 1000 will be coerced to - 1000. + `SampleQuerySet + `__s + to return. If unspecified, defaults to 100. The + maximum allowed value is 1000. Values above 1000 + will be coerced to 1000. - If this field is negative, an ``INVALID_ARGUMENT`` error is - returned. + If this field is negative, an + ``INVALID_ARGUMENT`` error is returned. page_token (str): A page token - [ListSampleQuerySetsResponse.next_page_token][google.cloud.discoveryengine.v1alpha.ListSampleQuerySetsResponse.next_page_token], + `ListSampleQuerySetsResponse.next_page_token + `__, received from a previous - [SampleQuerySetService.ListSampleQuerySets][google.cloud.discoveryengine.v1alpha.SampleQuerySetService.ListSampleQuerySets] - call. Provide this to retrieve the subsequent page. - - When paginating, all other parameters provided to - [SampleQuerySetService.ListSampleQuerySets][google.cloud.discoveryengine.v1alpha.SampleQuerySetService.ListSampleQuerySets] - must match the call that provided the page token. Otherwise, - an ``INVALID_ARGUMENT`` error is returned. + `SampleQuerySetService.ListSampleQuerySets + `__ + call. Provide this to retrieve the subsequent + page. + + When paginating, all other parameters provided + to `SampleQuerySetService.ListSampleQuerySets + `__ + must match the call that provided the page + token. Otherwise, an ``INVALID_ARGUMENT`` error + is returned. """ parent: str = proto.Field( @@ -117,18 +131,20 @@ class ListSampleQuerySetsRequest(proto.Message): class ListSampleQuerySetsResponse(proto.Message): r"""Response message for - [SampleQuerySetService.ListSampleQuerySets][google.cloud.discoveryengine.v1alpha.SampleQuerySetService.ListSampleQuerySets] + `SampleQuerySetService.ListSampleQuerySets + `__ method. Attributes: sample_query_sets (MutableSequence[google.cloud.discoveryengine_v1alpha.types.SampleQuerySet]): - The - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet]s. + The `SampleQuerySet + `__s. next_page_token (str): A token that can be sent as - [ListSampleQuerySetsRequest.page_token][google.cloud.discoveryengine.v1alpha.ListSampleQuerySetsRequest.page_token] - to retrieve the next page. If this field is omitted, there - are no subsequent pages. + `ListSampleQuerySetsRequest.page_token + `__ + to retrieve the next page. If this field is + omitted, there are no subsequent pages. """ @property @@ -150,7 +166,8 @@ def raw_page(self): class CreateSampleQuerySetRequest(proto.Message): r"""Request message for - [SampleQuerySetService.CreateSampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySetService.CreateSampleQuerySet] + `SampleQuerySetService.CreateSampleQuerySet + `__ method. Attributes: @@ -159,29 +176,37 @@ class CreateSampleQuerySetRequest(proto.Message): ``projects/{project}/locations/{location}``. sample_query_set (google.cloud.discoveryengine_v1alpha.types.SampleQuerySet): Required. The - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet] + `SampleQuerySet + `__ to create. sample_query_set_id (str): Required. The ID to use for the - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet], + `SampleQuerySet + `__, which will become the final component of the - [SampleQuerySet.name][google.cloud.discoveryengine.v1alpha.SampleQuerySet.name]. + `SampleQuerySet.name + `__. - If the caller does not have permission to create the - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet], + If the caller does not have permission to create + the `SampleQuerySet + `__, regardless of whether or not it exists, a ``PERMISSION_DENIED`` error is returned. This field must be unique among all - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet]s + `SampleQuerySet + `__s with the same - [parent][google.cloud.discoveryengine.v1alpha.CreateSampleQuerySetRequest.parent]. - Otherwise, an ``ALREADY_EXISTS`` error is returned. + `parent + `__. + Otherwise, an ``ALREADY_EXISTS`` error is + returned. - This field must conform to - `RFC-1034 `__ standard - with a length limit of 63 characters. Otherwise, an - ``INVALID_ARGUMENT`` error is returned. + This field must conform to `RFC-1034 + `__ + standard with a length limit of 63 characters. + Otherwise, an ``INVALID_ARGUMENT`` error is + returned. """ parent: str = proto.Field( @@ -201,21 +226,25 @@ class CreateSampleQuerySetRequest(proto.Message): class UpdateSampleQuerySetRequest(proto.Message): r"""Request message for - [SampleQuerySetService.UpdateSampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySetService.UpdateSampleQuerySet] + `SampleQuerySetService.UpdateSampleQuerySet + `__ method. Attributes: sample_query_set (google.cloud.discoveryengine_v1alpha.types.SampleQuerySet): Required. The sample query set to update. - If the caller does not have permission to update the - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet], + If the caller does not have permission to update + the `SampleQuerySet + `__, regardless of whether or not it exists, a ``PERMISSION_DENIED`` error is returned. If the - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet] - to update does not exist a ``NOT_FOUND`` error is returned. + `SampleQuerySet + `__ + to update does not exist a ``NOT_FOUND`` error + is returned. update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided imported 'sample query set' to update. If not @@ -236,24 +265,29 @@ class UpdateSampleQuerySetRequest(proto.Message): class DeleteSampleQuerySetRequest(proto.Message): r"""Request message for - [SampleQuerySetService.DeleteSampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySetService.DeleteSampleQuerySet] + `SampleQuerySetService.DeleteSampleQuerySet + `__ method. Attributes: name (str): Required. Full resource name of - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet], + `SampleQuerySet + `__, such as ``projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}``. - If the caller does not have permission to delete the - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet], + If the caller does not have permission to delete + the `SampleQuerySet + `__, regardless of whether or not it exists, a ``PERMISSION_DENIED`` error is returned. If the - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet] - to delete does not exist, a ``NOT_FOUND`` error is returned. + `SampleQuerySet + `__ + to delete does not exist, a ``NOT_FOUND`` error + is returned. """ name: str = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/schema.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/schema.py index c689e740ae89..2196466f1dce 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/schema.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/schema.py @@ -49,12 +49,12 @@ class Schema(proto.Message): This field is a member of `oneof`_ ``schema``. name (str): - Immutable. The full resource name of the schema, in the - format of + Immutable. The full resource name of the schema, + in the format of ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}``. - This field must be a UTF-8 encoded string with a length - limit of 1024 characters. + This field must be a UTF-8 encoded string with a + length limit of 1024 characters. field_configs (MutableSequence[google.cloud.discoveryengine_v1alpha.types.FieldConfig]): Output only. Configurations for fields of the schema. @@ -88,179 +88,241 @@ class FieldConfig(proto.Message): Attributes: field_path (str): - Required. Field path of the schema field. For example: - ``title``, ``description``, ``release_info.release_year``. + Required. Field path of the schema field. + For example: ``title``, ``description``, + ``release_info.release_year``. field_type (google.cloud.discoveryengine_v1alpha.types.FieldConfig.FieldType): Output only. Raw type of the field. indexable_option (google.cloud.discoveryengine_v1alpha.types.FieldConfig.IndexableOption): If - [indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option] + `indexable_option + `__ is - [INDEXABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption.INDEXABLE_ENABLED], - field values are indexed so that it can be filtered or - faceted in - [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]. + `INDEXABLE_ENABLED + `__, + field values are indexed so that it can be + filtered or faceted in `SearchService.Search + `__. If - [indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option] + `indexable_option + `__ is unset, the server behavior defaults to - [INDEXABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption.INDEXABLE_DISABLED] - for fields that support setting indexable options. For those - fields that do not support setting indexable options, such - as ``object`` and ``boolean`` and key properties, the server + `INDEXABLE_DISABLED + `__ + for fields that support setting indexable + options. For those fields that do not support + setting indexable options, such as ``object`` + and ``boolean`` and key properties, the server will skip - [indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option] + `indexable_option + `__ setting, and setting - [indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option] - for those fields will throw ``INVALID_ARGUMENT`` error. + `indexable_option + `__ + for those fields will throw ``INVALID_ARGUMENT`` + error. dynamic_facetable_option (google.cloud.discoveryengine_v1alpha.types.FieldConfig.DynamicFacetableOption): If - [dynamic_facetable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.dynamic_facetable_option] + `dynamic_facetable_option + `__ is - [DYNAMIC_FACETABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption.DYNAMIC_FACETABLE_ENABLED], - field values are available for dynamic facet. Could only be - [DYNAMIC_FACETABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption.DYNAMIC_FACETABLE_DISABLED] + `DYNAMIC_FACETABLE_ENABLED + `__, + field values are available for dynamic facet. + Could only be `DYNAMIC_FACETABLE_DISABLED + `__ if - [FieldConfig.indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option] + `FieldConfig.indexable_option + `__ is - [INDEXABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption.INDEXABLE_DISABLED]. - Otherwise, an ``INVALID_ARGUMENT`` error will be returned. + `INDEXABLE_DISABLED + `__. + Otherwise, an ``INVALID_ARGUMENT`` error will be + returned. If - [dynamic_facetable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.dynamic_facetable_option] + `dynamic_facetable_option + `__ is unset, the server behavior defaults to - [DYNAMIC_FACETABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption.DYNAMIC_FACETABLE_DISABLED] - for fields that support setting dynamic facetable options. - For those fields that do not support setting dynamic - facetable options, such as ``object`` and ``boolean``, the - server will skip dynamic facetable option setting, and + `DYNAMIC_FACETABLE_DISABLED + `__ + for fields that support setting dynamic + facetable options. For those fields that do not + support setting dynamic facetable options, such + as ``object`` and ``boolean``, the server will + skip dynamic facetable option setting, and setting - [dynamic_facetable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.dynamic_facetable_option] - for those fields will throw ``INVALID_ARGUMENT`` error. + `dynamic_facetable_option + `__ + for those fields will throw ``INVALID_ARGUMENT`` + error. searchable_option (google.cloud.discoveryengine_v1alpha.types.FieldConfig.SearchableOption): If - [searchable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option] + `searchable_option + `__ is - [SEARCHABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption.SEARCHABLE_ENABLED], + `SEARCHABLE_ENABLED + `__, field values are searchable by text queries in - [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]. + `SearchService.Search + `__. If - [SEARCHABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption.SEARCHABLE_ENABLED] - but field type is numerical, field values will not be - searchable by text queries in - [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search], - as there are no text values associated to numerical fields. + `SEARCHABLE_ENABLED + `__ + but field type is numerical, field values will + not be searchable by text queries in + `SearchService.Search + `__, + as there are no text values associated to + numerical fields. If - [searchable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option] + `searchable_option + `__ is unset, the server behavior defaults to - [SEARCHABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption.SEARCHABLE_DISABLED] - for fields that support setting searchable options. Only - ``string`` fields that have no key property mapping support - setting - [searchable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option]. - - For those fields that do not support setting searchable - options, the server will skip searchable option setting, and - setting - [searchable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option] - for those fields will throw ``INVALID_ARGUMENT`` error. + `SEARCHABLE_DISABLED + `__ + for fields that support setting searchable + options. Only ``string`` fields that have no key + property mapping support setting + `searchable_option + `__. + + For those fields that do not support setting + searchable options, the server will skip + searchable option setting, and setting + `searchable_option + `__ + for those fields will throw ``INVALID_ARGUMENT`` + error. retrievable_option (google.cloud.discoveryengine_v1alpha.types.FieldConfig.RetrievableOption): If - [retrievable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.retrievable_option] + `retrievable_option + `__ is - [RETRIEVABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.RetrievableOption.RETRIEVABLE_ENABLED], + `RETRIEVABLE_ENABLED + `__, field values are included in the search results. If - [retrievable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.retrievable_option] + `retrievable_option + `__ is unset, the server behavior defaults to - [RETRIEVABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.RetrievableOption.RETRIEVABLE_DISABLED] - for fields that support setting retrievable options. For - those fields that do not support setting retrievable - options, such as ``object`` and ``boolean``, the server will - skip retrievable option setting, and setting - [retrievable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.retrievable_option] - for those fields will throw ``INVALID_ARGUMENT`` error. + `RETRIEVABLE_DISABLED + `__ + for fields that support setting retrievable + options. For those fields that do not support + setting retrievable options, such as ``object`` + and ``boolean``, the server will skip + retrievable option setting, and setting + `retrievable_option + `__ + for those fields will throw ``INVALID_ARGUMENT`` + error. completable_option (google.cloud.discoveryengine_v1alpha.types.FieldConfig.CompletableOption): If - [completable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.completable_option] + `completable_option + `__ is - [COMPLETABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.CompletableOption.COMPLETABLE_ENABLED], - field values are directly used and returned as suggestions - for Autocomplete in - [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1alpha.CompletionService.CompleteQuery]. + `COMPLETABLE_ENABLED + `__, + field values are directly used and returned as + suggestions for Autocomplete in + `CompletionService.CompleteQuery + `__. If - [completable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.completable_option] + `completable_option + `__ is unset, the server behavior defaults to - [COMPLETABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.CompletableOption.COMPLETABLE_DISABLED] - for fields that support setting completable options, which - are just ``string`` fields. For those fields that do not - support setting completable options, the server will skip + `COMPLETABLE_DISABLED + `__ + for fields that support setting completable + options, which are just ``string`` fields. For + those fields that do not support setting + completable options, the server will skip completable option setting, and setting - [completable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.completable_option] - for those fields will throw ``INVALID_ARGUMENT`` error. + `completable_option + `__ + for those fields will throw ``INVALID_ARGUMENT`` + error. recs_filterable_option (google.cloud.discoveryengine_v1alpha.types.FieldConfig.FilterableOption): If - [recs_filterable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.recs_filterable_option] + `recs_filterable_option + `__ is - [FILTERABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption.FILTERABLE_ENABLED], - field values are filterable by filter expression in - [RecommendationService.Recommend][google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend]. + `FILTERABLE_ENABLED + `__, + field values are filterable by filter expression + in `RecommendationService.Recommend + `__. If - [FILTERABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption.FILTERABLE_ENABLED] - but the field type is numerical, field values are not - filterable by text queries in - [RecommendationService.Recommend][google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend]. + `FILTERABLE_ENABLED + `__ + but the field type is numerical, field values + are not filterable by text queries in + `RecommendationService.Recommend + `__. Only textual fields are supported. If - [recs_filterable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.recs_filterable_option] + `recs_filterable_option + `__ is unset, the default setting is - [FILTERABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption.FILTERABLE_DISABLED] - for fields that support setting filterable options. - - When a field set to [FILTERABLE_DISABLED] is filtered, a - warning is generated and an empty result is returned. + `FILTERABLE_DISABLED + `__ + for fields that support setting filterable + options. + + When a field set to [FILTERABLE_DISABLED] is + filtered, a warning is generated and an empty + result is returned. key_property_type (str): - Output only. Type of the key property that this field is - mapped to. Empty string if this is not annotated as mapped - to a key property. - - Example types are ``title``, ``description``. Full list is - defined by ``keyPropertyMapping`` in the schema field - annotation. - - If the schema field has a ``KeyPropertyMapping`` annotation, - ``indexable_option`` and ``searchable_option`` of this field - cannot be modified. + Output only. Type of the key property that this + field is mapped to. Empty string if this is not + annotated as mapped to a key property. + + Example types are ``title``, ``description``. + Full list is defined by ``keyPropertyMapping`` + in the schema field annotation. + + If the schema field has a ``KeyPropertyMapping`` + annotation, ``indexable_option`` and + ``searchable_option`` of this field cannot be + modified. advanced_site_search_data_sources (MutableSequence[google.cloud.discoveryengine_v1alpha.types.FieldConfig.AdvancedSiteSearchDataSource]): - If this field is set, only the corresponding source will be - indexed for this field. Otherwise, the values from different - sources are merged. - - Assuming a page with ```` in meta tag, and - ```` in page map: if this enum is set to - METATAGS, we will only index ````; if this enum - is not set, we will merge them and index - ````. + If this field is set, only the corresponding + source will be indexed for this field. + Otherwise, the values from different sources are + merged. + + Assuming a page with ```` in meta + tag, and ```` in page map: + + if this enum is set to METATAGS, we will only + index ````; if this enum is not set, + we will merge them and index ````. schema_org_paths (MutableSequence[str]): - Field paths for indexing custom attribute from schema.org - data. More details of schema.org and its defined types can - be found at `schema.org `__. + Field paths for indexing custom attribute from + schema.org data. More details of schema.org and + its defined types can be found at `schema.org + `__. It is only used on advanced site search schema. - Currently only support full path from root. The full path to - a field is constructed by concatenating field names, - starting from ``_root``, with a period ``.`` as the - delimiter. Examples: + Currently only support full path from root. The + full path to a field is constructed by + concatenating field names, starting from + ``_root``, with a period ``.`` as the delimiter. + Examples: - - Publish date of the root: \_root.datePublished - - Publish date of the reviews: \_root.review.datePublished + * Publish date of the root: _root.datePublished + * Publish date of the reviews: + _root.review.datePublished """ class FieldType(proto.Enum): @@ -280,31 +342,37 @@ class FieldType(proto.Enum): BOOLEAN (5): Field value type is Boolean. GEOLOCATION (6): - Field value type is Geolocation. Geolocation is expressed as - an object with the following keys: - - - ``id``: a string representing the location id - - ``longitude``: a number representing the longitude - coordinate of the location - - ``latitude``: a number repesenting the latitude coordinate - of the location - - ``address``: a string representing the full address of the - location - - ``latitude`` and ``longitude`` must always be provided - together. At least one of a) ``address`` or b) - ``latitude``-``longitude`` pair must be provided. + Field value type is Geolocation. Geolocation is + expressed as an object with the following keys: + + * ``id``: a string representing the location id + * ``longitude``: a number representing the + longitude coordinate of the location + + * ``latitude``: a number repesenting the + latitude coordinate of the location + + * ``address``: a string representing the full + address of the location + + ``latitude`` and ``longitude`` must always be + provided together. At least one of a) + ``address`` or b) ``latitude``-``longitude`` + pair must be provided. DATETIME (7): - Field value type is Datetime. Datetime can be expressed as - either: - - - a number representing milliseconds-since-the-epoch - - a string representing milliseconds-since-the-epoch. e.g. - ``"1420070400001"`` - - a string representing the `ISO - 8601 `__ date or - date and time. e.g. ``"2015-01-01"`` or - ``"2015-01-01T12:10:30Z"`` + Field value type is Datetime. Datetime can be + expressed as either: + * a number representing + milliseconds-since-the-epoch + + * a string representing + milliseconds-since-the-epoch. e.g. + ``"1420070400001"`` + + * a string representing the `ISO + 8601 `__ + date or date and time. e.g. ``"2015-01-01"`` or + ``"2015-01-01T12:10:30Z"`` """ FIELD_TYPE_UNSPECIFIED = 0 OBJECT = 1 @@ -425,7 +493,8 @@ class AdvancedSiteSearchDataSource(proto.Enum): Retrieve value from page map. URI_PATTERN_MAPPING (3): Retrieve value from the attributes set by - [SiteSearchEngineService.SetUriPatternDocumentData][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.SetUriPatternDocumentData] + `SiteSearchEngineService.SetUriPatternDocumentData + `__ API. SCHEMA_ORG (4): Retrieve value from schema.org data. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/schema_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/schema_service.py index 1bcb7a03dc21..b97565b58844 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/schema_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/schema_service.py @@ -40,13 +40,14 @@ class GetSchemaRequest(proto.Message): r"""Request message for - [SchemaService.GetSchema][google.cloud.discoveryengine.v1alpha.SchemaService.GetSchema] + `SchemaService.GetSchema + `__ method. Attributes: name (str): - Required. The full resource name of the schema, in the - format of + Required. The full resource name of the schema, + in the format of ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}``. """ @@ -58,33 +59,41 @@ class GetSchemaRequest(proto.Message): class ListSchemasRequest(proto.Message): r"""Request message for - [SchemaService.ListSchemas][google.cloud.discoveryengine.v1alpha.SchemaService.ListSchemas] + `SchemaService.ListSchemas + `__ method. Attributes: parent (str): - Required. The parent data store resource name, in the format - of + Required. The parent data store resource name, + in the format of ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}``. page_size (int): The maximum number of - [Schema][google.cloud.discoveryengine.v1alpha.Schema]s to - return. The service may return fewer than this value. + `Schema + `__s + to return. The service may return fewer than + this value. If unspecified, at most 100 - [Schema][google.cloud.discoveryengine.v1alpha.Schema]s are - returned. + `Schema + `__s + are returned. - The maximum value is 1000; values above 1000 are set to - 1000. + The maximum value is 1000; values above 1000 are + set to 1000. page_token (str): A page token, received from a previous - [SchemaService.ListSchemas][google.cloud.discoveryengine.v1alpha.SchemaService.ListSchemas] - call. Provide this to retrieve the subsequent page. - - When paginating, all other parameters provided to - [SchemaService.ListSchemas][google.cloud.discoveryengine.v1alpha.SchemaService.ListSchemas] - must match the call that provided the page token. + `SchemaService.ListSchemas + `__ + call. Provide this to retrieve the subsequent + page. + + When paginating, all other parameters provided + to `SchemaService.ListSchemas + `__ + must match the call that provided the page + token. """ parent: str = proto.Field( @@ -103,17 +112,20 @@ class ListSchemasRequest(proto.Message): class ListSchemasResponse(proto.Message): r"""Response message for - [SchemaService.ListSchemas][google.cloud.discoveryengine.v1alpha.SchemaService.ListSchemas] + `SchemaService.ListSchemas + `__ method. Attributes: schemas (MutableSequence[google.cloud.discoveryengine_v1alpha.types.Schema]): - The [Schema][google.cloud.discoveryengine.v1alpha.Schema]s. + The `Schema + `__s. next_page_token (str): A token that can be sent as - [ListSchemasRequest.page_token][google.cloud.discoveryengine.v1alpha.ListSchemasRequest.page_token] - to retrieve the next page. If this field is omitted, there - are no subsequent pages. + `ListSchemasRequest.page_token + `__ + to retrieve the next page. If this field is + omitted, there are no subsequent pages. """ @property @@ -133,27 +145,31 @@ def raw_page(self): class CreateSchemaRequest(proto.Message): r"""Request message for - [SchemaService.CreateSchema][google.cloud.discoveryengine.v1alpha.SchemaService.CreateSchema] + `SchemaService.CreateSchema + `__ method. Attributes: parent (str): - Required. The parent data store resource name, in the format - of + Required. The parent data store resource name, + in the format of ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}``. schema (google.cloud.discoveryengine_v1alpha.types.Schema): - Required. The - [Schema][google.cloud.discoveryengine.v1alpha.Schema] to - create. + Required. The `Schema + `__ + to create. schema_id (str): Required. The ID to use for the - [Schema][google.cloud.discoveryengine.v1alpha.Schema], which - becomes the final component of the - [Schema.name][google.cloud.discoveryengine.v1alpha.Schema.name]. + `Schema + `__, + which becomes the final component of the + `Schema.name + `__. This field should conform to - `RFC-1034 `__ standard - with a length limit of 63 characters. + `RFC-1034 + `__ + standard with a length limit of 63 characters. """ parent: str = proto.Field( @@ -173,20 +189,23 @@ class CreateSchemaRequest(proto.Message): class UpdateSchemaRequest(proto.Message): r"""Request message for - [SchemaService.UpdateSchema][google.cloud.discoveryengine.v1alpha.SchemaService.UpdateSchema] + `SchemaService.UpdateSchema + `__ method. Attributes: schema (google.cloud.discoveryengine_v1alpha.types.Schema): - Required. The - [Schema][google.cloud.discoveryengine.v1alpha.Schema] to - update. + Required. The `Schema + `__ + to update. allow_missing (bool): If set to true, and the - [Schema][google.cloud.discoveryengine.v1alpha.Schema] is not - found, a new - [Schema][google.cloud.discoveryengine.v1alpha.Schema] is - created. In this situation, ``update_mask`` is ignored. + `Schema + `__ + is not found, a new `Schema + `__ + is created. In this situation, ``update_mask`` + is ignored. """ schema: gcd_schema.Schema = proto.Field( @@ -202,13 +221,14 @@ class UpdateSchemaRequest(proto.Message): class DeleteSchemaRequest(proto.Message): r"""Request message for - [SchemaService.DeleteSchema][google.cloud.discoveryengine.v1alpha.SchemaService.DeleteSchema] + `SchemaService.DeleteSchema + `__ method. Attributes: name (str): - Required. The full resource name of the schema, in the - format of + Required. The full resource name of the schema, + in the format of ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}``. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/search_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/search_service.py index ec032e3f2105..0b5a5ac6097a 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/search_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/search_service.py @@ -35,63 +35,73 @@ class SearchRequest(proto.Message): r"""Request message for - [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search] + `SearchService.Search + `__ method. Attributes: serving_config (str): - Required. The resource name of the Search serving config, - such as + Required. The resource name of the Search + serving config, such as ``projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config``, or ``projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config``. - This field is used to identify the serving configuration - name, set of models used to make the search. + This field is used to identify the serving + configuration name, set of models used to make + the search. branch (str): The branch resource name, such as ``projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0``. - Use ``default_branch`` as the branch ID or leave this field - empty, to search documents under the default branch. + Use ``default_branch`` as the branch ID or leave + this field empty, to search documents under the + default branch. query (str): Raw search query. image_query (google.cloud.discoveryengine_v1alpha.types.SearchRequest.ImageQuery): Raw image query. page_size (int): Maximum number of - [Document][google.cloud.discoveryengine.v1alpha.Document]s - to return. The maximum allowed value depends on the data - type. Values above the maximum value are coerced to the - maximum value. - - - Websites with basic indexing: Default ``10``, Maximum - ``25``. - - Websites with advanced indexing: Default ``25``, Maximum - ``50``. - - Other: Default ``50``, Maximum ``100``. - - If this field is negative, an ``INVALID_ARGUMENT`` is - returned. + `Document + `__s + to return. The maximum allowed value depends on + the data type. Values above the maximum value + are coerced to the maximum value. + + * Websites with basic indexing: Default ``10``, + Maximum ``25``. * Websites with advanced + indexing: Default ``25``, Maximum ``50``. + + * Other: Default ``50``, Maximum ``100``. + + If this field is negative, an + ``INVALID_ARGUMENT`` is returned. page_token (str): A page token received from a previous - [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search] - call. Provide this to retrieve the subsequent page. - - When paginating, all other parameters provided to - [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search] - must match the call that provided the page token. Otherwise, - an ``INVALID_ARGUMENT`` error is returned. + `SearchService.Search + `__ + call. Provide this to retrieve the subsequent + page. + + When paginating, all other parameters provided + to `SearchService.Search + `__ + must match the call that provided the page + token. Otherwise, an ``INVALID_ARGUMENT`` + error is returned. offset (int): - A 0-indexed integer that specifies the current offset (that - is, starting result location, amongst the - [Document][google.cloud.discoveryengine.v1alpha.Document]s - deemed by the API as relevant) in search results. This field - is only considered if - [page_token][google.cloud.discoveryengine.v1alpha.SearchRequest.page_token] + A 0-indexed integer that specifies the current + offset (that is, starting result location, + amongst the `Document + `__s + deemed by the API as relevant) in search + results. This field is only considered if + `page_token + `__ is unset. - If this field is negative, an ``INVALID_ARGUMENT`` is - returned. + If this field is negative, an + ``INVALID_ARGUMENT`` is returned. data_store_specs (MutableSequence[google.cloud.discoveryengine_v1alpha.types.SearchRequest.DataStoreSpec]): Specs defining dataStores to filter on in a search call and configurations for those @@ -100,98 +110,115 @@ class SearchRequest(proto.Message): dataStore within an engine, they should use the specs at the top level. filter (str): - The filter syntax consists of an expression language for - constructing a predicate from one or more fields of the - documents being filtered. Filter expression is - case-sensitive. - - If this field is unrecognizable, an ``INVALID_ARGUMENT`` is - returned. - - Filtering in Vertex AI Search is done by mapping the LHS - filter key to a key property defined in the Vertex AI Search - backend -- this mapping is defined by the customer in their - schema. For example a media customer might have a field - 'name' in their schema. In this case the filter would look - like this: filter --> name:'ANY("king kong")' - - For more information about filtering including syntax and - filter operators, see - `Filter `__ + The filter syntax consists of an expression + language for constructing a predicate from one + or more fields of the documents being filtered. + Filter expression is case-sensitive. + + If this field is unrecognizable, an + ``INVALID_ARGUMENT`` is returned. + + Filtering in Vertex AI Search is done by mapping + the LHS filter key to a key property defined in + the Vertex AI Search backend -- this mapping is + defined by the customer in their schema. For + example a media customer might have a field + 'name' in their schema. In this case the filter + would look like this: filter --> name:'ANY("king + kong")' + + For more information about filtering including + syntax and filter operators, see + `Filter + `__ canonical_filter (str): - The default filter that is applied when a user performs a - search without checking any filters on the search page. - - The filter applied to every search request when quality - improvement such as query expansion is needed. In the case a - query does not have a sufficient amount of results this - filter will be used to determine whether or not to enable - the query expansion flow. The original filter will still be - used for the query expanded search. This field is strongly - recommended to achieve high search quality. + The default filter that is applied when a user + performs a search without checking any filters + on the search page. + + The filter applied to every search request when + quality improvement such as query expansion is + needed. In the case a query does not have a + sufficient amount of results this filter will be + used to determine whether or not to enable the + query expansion flow. The original filter will + still be used for the query expanded search. + This field is strongly recommended to achieve + high search quality. For more information about filter syntax, see - [SearchRequest.filter][google.cloud.discoveryengine.v1alpha.SearchRequest.filter]. + `SearchRequest.filter + `__. order_by (str): - The order in which documents are returned. Documents can be - ordered by a field in an - [Document][google.cloud.discoveryengine.v1alpha.Document] - object. Leave it unset if ordered by relevance. ``order_by`` - expression is case-sensitive. - - For more information on ordering the website search results, - see `Order web search - results `__. - For more information on ordering the healthcare search - results, see `Order healthcare search - results `__. - If this field is unrecognizable, an ``INVALID_ARGUMENT`` is - returned. + The order in which documents are returned. + Documents can be ordered by a field in an + `Document + `__ + object. Leave it unset if ordered by relevance. + ``order_by`` expression is case-sensitive. + + For more information on ordering the website + search results, see `Order web search + results + `__. + For more information on ordering the healthcare + search results, see `Order healthcare search + results + `__. + If this field is unrecognizable, an + ``INVALID_ARGUMENT`` is returned. user_info (google.cloud.discoveryengine_v1alpha.types.UserInfo): - Information about the end user. Highly recommended for - analytics. - [UserInfo.user_agent][google.cloud.discoveryengine.v1alpha.UserInfo.user_agent] + Information about the end user. + Highly recommended for analytics. + `UserInfo.user_agent + `__ is used to deduce ``device_type`` for analytics. language_code (str): - The BCP-47 language code, such as "en-US" or "sr-Latn". For - more information, see `Standard - fields `__. - This field helps to better interpret the query. If a value - isn't specified, the query language code is automatically - detected, which may not be accurate. + The BCP-47 language code, such as "en-US" or + "sr-Latn". For more information, see `Standard + fields + `__. + This field helps to better interpret the query. + If a value isn't specified, the query language + code is automatically detected, which may not be + accurate. region_code (str): - The Unicode country/region code (CLDR) of a location, such - as "US" and "419". For more information, see `Standard - fields `__. - If set, then results will be boosted based on the - region_code provided. + The Unicode country/region code (CLDR) of a + location, such as "US" and "419". For more + information, see `Standard fields + `__. + If set, then results will be boosted based on + the region_code provided. facet_specs (MutableSequence[google.cloud.discoveryengine_v1alpha.types.SearchRequest.FacetSpec]): - Facet specifications for faceted search. If empty, no facets - are returned. - - A maximum of 100 values are allowed. Otherwise, an - ``INVALID_ARGUMENT`` error is returned. + Facet specifications for faceted search. If + empty, no facets are returned. + A maximum of 100 values are allowed. Otherwise, + an ``INVALID_ARGUMENT`` error is returned. boost_spec (google.cloud.discoveryengine_v1alpha.types.SearchRequest.BoostSpec): - Boost specification to boost certain documents. For more - information on boosting, see - `Boosting `__ + Boost specification to boost certain documents. + For more information on boosting, see + `Boosting + `__ params (MutableMapping[str, google.protobuf.struct_pb2.Value]): Additional search parameters. - For public website search only, supported values are: + For public website search only, supported values + are: - - ``user_country_code``: string. Default empty. If set to - non-empty, results are restricted or boosted based on the - location provided. For example, - ``user_country_code: "au"`` + * ``user_country_code``: string. Default empty. + If set to non-empty, results are restricted + or boosted based on the location provided. + For example, ``user_country_code: "au"`` - For available codes see `Country - Codes `__ + For available codes see `Country + Codes + `__ - - ``search_type``: double. Default empty. Enables - non-webpage searching depending on the value. The only - valid non-default value is 1, which enables image - searching. For example, ``search_type: 1`` + * ``search_type``: double. Default empty. + Enables non-webpage searching depending on + the value. The only valid non-default value is + 1, which enables image searching. + For example, ``search_type: 1`` query_expansion_spec (google.cloud.discoveryengine_v1alpha.types.SearchRequest.QueryExpansionSpec): The query expansion specification that specifies the conditions under which query @@ -201,68 +228,62 @@ class SearchRequest(proto.Message): specifies the mode under which spell correction takes effect. user_pseudo_id (str): - A unique identifier for tracking visitors. For example, this - could be implemented with an HTTP cookie, which should be - able to uniquely identify a visitor on a single device. This - unique identifier should not change if the visitor logs in - or out of the website. + A unique identifier for tracking visitors. For + example, this could be implemented with an HTTP + cookie, which should be able to uniquely + identify a visitor on a single device. This + unique identifier should not change if the + visitor logs in or out of the website. This field should NOT have a fixed value such as ``unknown_visitor``. This should be the same identifier as - [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id] + `UserEvent.user_pseudo_id + `__ and - [CompleteQueryRequest.user_pseudo_id][google.cloud.discoveryengine.v1alpha.CompleteQueryRequest.user_pseudo_id] + `CompleteQueryRequest.user_pseudo_id + `__ - The field must be a UTF-8 encoded string with a length limit - of 128 characters. Otherwise, an ``INVALID_ARGUMENT`` error - is returned. + The field must be a UTF-8 encoded string with a + length limit of 128 characters. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. content_search_spec (google.cloud.discoveryengine_v1alpha.types.SearchRequest.ContentSearchSpec): A specification for configuring the behavior of content search. embedding_spec (google.cloud.discoveryengine_v1alpha.types.SearchRequest.EmbeddingSpec): - Uses the provided embedding to do additional semantic - document retrieval. The retrieval is based on the dot - product of - [SearchRequest.EmbeddingSpec.EmbeddingVector.vector][google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector.vector] + Uses the provided embedding to do additional + semantic document retrieval. The retrieval is + based on the dot product of + `SearchRequest.EmbeddingSpec.EmbeddingVector.vector + `__ and the document embedding that is provided in - [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path]. + `SearchRequest.EmbeddingSpec.EmbeddingVector.field_path + `__. If - [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path] + `SearchRequest.EmbeddingSpec.EmbeddingVector.field_path + `__ is not provided, it will use - [ServingConfig.EmbeddingConfig.field_path][google.cloud.discoveryengine.v1alpha.ServingConfig.embedding_config]. + `ServingConfig.EmbeddingConfig.field_path + `__. ranking_expression (str): - The ranking expression controls the customized ranking on - retrieval documents. This overrides - [ServingConfig.ranking_expression][google.cloud.discoveryengine.v1alpha.ServingConfig.ranking_expression]. - The syntax and supported features depend on the - ``ranking_expression_backend`` value. If - ``ranking_expression_backend`` is not provided, it defaults - to ``RANK_BY_EMBEDDING``. + The ranking expression controls the customized ranking on retrieval documents. This overrides [ServingConfig.ranking_expression][google.cloud.discoveryengine.v1alpha.ServingConfig.ranking_expression]. The syntax and supported features depend on the ``ranking_expression_backend`` value. If ``ranking_expression_backend`` is not provided, it defaults to ``RANK_BY_EMBEDDING``. - If - [ranking_expression_backend][google.cloud.discoveryengine.v1alpha.SearchRequest.ranking_expression_backend] - is not provided or set to ``RANK_BY_EMBEDDING``, it should - be a single function or multiple functions that are joined - by "+". + If [ranking_expression_backend][google.cloud.discoveryengine.v1alpha.SearchRequest.ranking_expression_backend] is not provided or set to ``RANK_BY_EMBEDDING``, it should be a single function or multiple functions that are joined by "+". - - ranking_expression = function, { " + ", function }; + - ranking_expression = function, { " + ", function }; Supported functions: - - double \* relevance_score - - double \* dotProduct(embedding_field_path) + - double \* relevance_score + - double \* dotProduct(embedding_field_path) Function variables: - - ``relevance_score``: pre-defined keywords, used for - measure relevance between query and document. - - ``embedding_field_path``: the document embedding field - used with query embedding vector. - - ``dotProduct``: embedding function between - ``embedding_field_path`` and query embedding vector. + - ``relevance_score``: pre-defined keywords, used for measure relevance between query and document. + - ``embedding_field_path``: the document embedding field used with query embedding vector. + - ``dotProduct``: embedding function between ``embedding_field_path`` and query embedding vector. Example ranking expression: @@ -271,71 +292,34 @@ class SearchRequest(proto.Message): If document has an embedding field doc_embedding, the ranking expression could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`. - If - [ranking_expression_backend][google.cloud.discoveryengine.v1alpha.SearchRequest.ranking_expression_backend] - is set to ``RANK_BY_FORMULA``, the following expression - types (and combinations of those chained using + or - - - operators) are supported: - - - ``double`` - - ``signal`` - - ``log(signal)`` - - ``exp(signal)`` - - ``rr(signal, double > 0)`` -- reciprocal rank - transformation with second argument being a denominator - constant. - - ``is_nan(signal)`` -- returns 0 if signal is NaN, 1 - otherwise. - - ``fill_nan(signal1, signal2 | double)`` -- if signal1 is - NaN, returns signal2 \| double, else returns signal1. - - Here are a few examples of ranking formulas that use the - supported ranking expression types: - - - ``0.2 * semantic_similarity_score + 0.8 * log(keyword_similarity_score)`` - -- mostly rank by the logarithm of - ``keyword_similarity_score`` with slight - ``semantic_smilarity_score`` adjustment. - - ``0.2 * exp(fill_nan(semantic_similarity_score, 0)) + 0.3 * is_nan(keyword_similarity_score)`` - -- rank by the exponent of ``semantic_similarity_score`` - filling the value with 0 if it's NaN, also add constant - 0.3 adjustment to the final score if - ``semantic_similarity_score`` is NaN. - - ``0.2 * rr(semantic_similarity_score, 16) + 0.8 * rr(keyword_similarity_score, 16)`` - -- mostly rank by the reciprocal rank of - ``keyword_similarity_score`` with slight adjustment of - reciprocal rank of ``semantic_smilarity_score``. + If [ranking_expression_backend][google.cloud.discoveryengine.v1alpha.SearchRequest.ranking_expression_backend] is set to ``RANK_BY_FORMULA``, the following expression types (and combinations of those chained using + or + + - operators) are supported: + + - ``double`` + - ``signal`` + - ``log(signal)`` + - ``exp(signal)`` + - ``rr(signal, double > 0)`` -- reciprocal rank transformation with second argument being a denominator constant. + - ``is_nan(signal)`` -- returns 0 if signal is NaN, 1 otherwise. + - ``fill_nan(signal1, signal2 | double)`` -- if signal1 is NaN, returns signal2 \| double, else returns signal1. + + Here are a few examples of ranking formulas that use the supported ranking expression types: + + - ``0.2 * semantic_similarity_score + 0.8 * log(keyword_similarity_score)`` -- mostly rank by the logarithm of ``keyword_similarity_score`` with slight ``semantic_smilarity_score`` adjustment. + - ``0.2 * exp(fill_nan(semantic_similarity_score, 0)) + 0.3 * is_nan(keyword_similarity_score)`` -- rank by the exponent of ``semantic_similarity_score`` filling the value with 0 if it's NaN, also add constant 0.3 adjustment to the final score if ``semantic_similarity_score`` is NaN. + - ``0.2 * rr(semantic_similarity_score, 16) + 0.8 * rr(keyword_similarity_score, 16)`` -- mostly rank by the reciprocal rank of ``keyword_similarity_score`` with slight adjustment of reciprocal rank of ``semantic_smilarity_score``. The following signals are supported: - - ``semantic_similarity_score``: semantic similarity - adjustment that is calculated using the embeddings - generated by a proprietary Google model. This score - determines how semantically similar a search query is to a - document. - - ``keyword_similarity_score``: keyword match adjustment - uses the Best Match 25 (BM25) ranking function. This score - is calculated using a probabilistic model to estimate the - probability that a document is relevant to a given query. - - ``relevance_score``: semantic relevance adjustment that - uses a proprietary Google model to determine the meaning - and intent behind a user's query in context with the - content in the documents. - - ``pctr_rank``: predicted conversion rate adjustment as a - rank use predicted Click-through rate (pCTR) to gauge the - relevance and attractiveness of a search result from a - user's perspective. A higher pCTR suggests that the result - is more likely to satisfy the user's query and intent, - making it a valuable signal for ranking. - - ``freshness_rank``: freshness adjustment as a rank - - ``document_age``: The time in hours elapsed since the - document was last updated, a floating-point number (e.g., - 0.25 means 15 minutes). - - ``topicality_rank``: topicality adjustment as a rank. Uses - proprietary Google model to determine the keyword-based - overlap between the query and the document. - - ``base_rank``: the default rank of the result + - ``semantic_similarity_score``: semantic similarity adjustment that is calculated using the embeddings generated by a proprietary Google model. This score determines how semantically similar a search query is to a document. + - ``keyword_similarity_score``: keyword match adjustment uses the Best Match 25 (BM25) ranking function. This score is calculated using a probabilistic model to estimate the probability that a document is relevant to a given query. + - ``relevance_score``: semantic relevance adjustment that uses a proprietary Google model to determine the meaning and intent behind a user's query in context with the content in the documents. + - ``pctr_rank``: predicted conversion rate adjustment as a rank use predicted Click-through rate (pCTR) to gauge the relevance and attractiveness of a search result from a user's perspective. A higher pCTR suggests that the result is more likely to satisfy the user's query and intent, making it a valuable signal for ranking. + - ``freshness_rank``: freshness adjustment as a rank + - ``document_age``: The time in hours elapsed since the document was last updated, a floating-point number (e.g., 0.25 means 15 minutes). + - ``topicality_rank``: topicality adjustment as a rank. Uses proprietary Google model to determine the keyword-based overlap between the query and the document. + - ``base_rank``: the default rank of the result ranking_expression_backend (google.cloud.discoveryengine_v1alpha.types.SearchRequest.RankingExpressionBackend): The backend to use for the ranking expression evaluation. @@ -343,39 +327,47 @@ class SearchRequest(proto.Message): Whether to turn on safe search. This is only supported for website search. user_labels (MutableMapping[str, str]): - The user labels applied to a resource must meet the - following requirements: - - - Each resource can have multiple labels, up to a maximum of - 64. - - Each label must be a key-value pair. - - Keys have a minimum length of 1 character and a maximum - length of 63 characters and cannot be empty. Values can be - empty and have a maximum length of 63 characters. - - Keys and values can contain only lowercase letters, - numeric characters, underscores, and dashes. All - characters must use UTF-8 encoding, and international - characters are allowed. - - The key portion of a label must be unique. However, you - can use the same key with multiple resources. - - Keys must start with a lowercase letter or international - character. + The user labels applied to a resource must meet + the following requirements: + * Each resource can have multiple labels, up to + a maximum of 64. + + * Each label must be a key-value pair. + * Keys have a minimum length of 1 character and + a maximum length of 63 characters and cannot + be empty. Values can be empty and have a maximum + length of 63 characters. + + * Keys and values can contain only lowercase + letters, numeric characters, underscores, and + dashes. All characters must use UTF-8 encoding, + and international characters are allowed. + + * The key portion of a label must be unique. + However, you can use the same key with + multiple resources. + + * Keys must start with a lowercase letter or + international character. See `Google Cloud - Document `__ + Document + `__ for more details. natural_language_query_understanding_spec (google.cloud.discoveryengine_v1alpha.types.SearchRequest.NaturalLanguageQueryUnderstandingSpec): - If ``naturalLanguageQueryUnderstandingSpec`` is not - specified, no additional natural language query - understanding will be done. + If ``naturalLanguageQueryUnderstandingSpec`` is + not specified, no additional natural language + query understanding will be done. search_as_you_type_spec (google.cloud.discoveryengine_v1alpha.types.SearchRequest.SearchAsYouTypeSpec): - Search as you type configuration. Only supported for the - [IndustryVertical.MEDIA][google.cloud.discoveryengine.v1alpha.IndustryVertical.MEDIA] + Search as you type configuration. Only supported + for the `IndustryVertical.MEDIA + `__ vertical. custom_fine_tuning_spec (google.cloud.discoveryengine_v1alpha.types.CustomFineTuningSpec): - Custom fine tuning configs. If set, it has higher priority - than the configs set in - [ServingConfig.custom_fine_tuning_spec][google.cloud.discoveryengine.v1alpha.ServingConfig.custom_fine_tuning_spec]. + Custom fine tuning configs. + If set, it has higher priority than the configs + set in `ServingConfig.custom_fine_tuning_spec + `__. session (str): The session resource name. Optional. @@ -487,7 +479,8 @@ class DataStoreSpec(proto.Message): Attributes: data_store (str): Required. Full resource name of - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore], + `DataStore + `__, such as ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}``. """ @@ -504,80 +497,91 @@ class FacetSpec(proto.Message): facet_key (google.cloud.discoveryengine_v1alpha.types.SearchRequest.FacetSpec.FacetKey): Required. The facet key specification. limit (int): - Maximum facet values that are returned for this facet. If - unspecified, defaults to 20. The maximum allowed value is - 300. Values above 300 are coerced to 300. For aggregation in - healthcare search, when the [FacetKey.key] is - "healthcare_aggregation_key", the limit will be overridden - to 10,000 internally, regardless of the value set here. - - If this field is negative, an ``INVALID_ARGUMENT`` is - returned. + Maximum facet values that are returned for this + facet. If unspecified, defaults to 20. The + maximum allowed value is 300. Values above 300 + are coerced to 300. + For aggregation in healthcare search, when the + [FacetKey.key] is "healthcare_aggregation_key", + the limit will be overridden to 10,000 + internally, regardless of the value set here. + + If this field is negative, an + ``INVALID_ARGUMENT`` is returned. excluded_filter_keys (MutableSequence[str]): List of keys to exclude when faceting. By default, - [FacetKey.key][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.key] - is not excluded from the filter unless it is listed in this - field. - - Listing a facet key in this field allows its values to - appear as facet results, even when they are filtered out of - search results. Using this field does not affect what search - results are returned. - - For example, suppose there are 100 documents with the color - facet "Red" and 200 documents with the color facet "Blue". A - query containing the filter "color:ANY("Red")" and having - "color" as - [FacetKey.key][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.key] - would by default return only "Red" documents in the search - results, and also return "Red" with count 100 as the only - color facet. Although there are also blue documents - available, "Blue" would not be shown as an available facet - value. - - If "color" is listed in "excludedFilterKeys", then the query - returns the facet values "Red" with count 100 and "Blue" - with count 200, because the "color" key is now excluded from - the filter. Because this field doesn't affect search - results, the search results are still correctly filtered to - return only "Red" documents. - - A maximum of 100 values are allowed. Otherwise, an - ``INVALID_ARGUMENT`` error is returned. + `FacetKey.key + `__ + is not excluded from the filter unless it is + listed in this field. + + Listing a facet key in this field allows its + values to appear as facet results, even when + they are filtered out of search results. Using + this field does not affect what search results + are returned. + + For example, suppose there are 100 documents + with the color facet "Red" and 200 documents + with the color facet "Blue". A query containing + the filter "color:ANY("Red")" and having "color" + as `FacetKey.key + `__ + would by default return only "Red" documents in + the search results, and also return "Red" with + count 100 as the only color facet. Although + there are also blue documents available, "Blue" + would not be shown as an available facet value. + + If "color" is listed in "excludedFilterKeys", + then the query returns the facet values "Red" + with count 100 and "Blue" with count 200, + because the "color" key is now excluded from the + filter. Because this field doesn't affect search + results, the search results are still correctly + filtered to return only "Red" documents. + + A maximum of 100 values are allowed. Otherwise, + an ``INVALID_ARGUMENT`` error is returned. enable_dynamic_position (bool): - Enables dynamic position for this facet. If set to true, the - position of this facet among all facets in the response is - determined automatically. If dynamic facets are enabled, it - is ordered together. If set to false, the position of this - facet in the response is the same as in the request, and it - is ranked before the facets with dynamic position enable and - all dynamic facets. - - For example, you may always want to have rating facet - returned in the response, but it's not necessarily to always - display the rating facet at the top. In that case, you can - set enable_dynamic_position to true so that the position of - rating facet in response is determined automatically. - - Another example, assuming you have the following facets in - the request: - - - "rating", enable_dynamic_position = true - - - "price", enable_dynamic_position = false - - - "brands", enable_dynamic_position = false - - And also you have a dynamic facets enabled, which generates - a facet ``gender``. Then the final order of the facets in - the response can be ("price", "brands", "rating", "gender") - or ("price", "brands", "gender", "rating") depends on how - API orders "gender" and "rating" facets. However, notice - that "price" and "brands" are always ranked at first and - second position because their enable_dynamic_position is - false. + Enables dynamic position for this facet. If set + to true, the position of this facet among all + facets in the response is determined + automatically. If dynamic facets are enabled, it + is ordered together. If set to false, the + position of this facet in the response is the + same as in the request, and it is ranked before + the facets with dynamic position enable and all + dynamic facets. + + For example, you may always want to have rating + facet returned in the response, but it's not + necessarily to always display the rating facet + at the top. In that case, you can set + enable_dynamic_position to true so that the + position of rating facet in response is + determined automatically. + + Another example, assuming you have the following + facets in the request: + + * "rating", enable_dynamic_position = true + + * "price", enable_dynamic_position = false + + * "brands", enable_dynamic_position = false + + And also you have a dynamic facets enabled, + which generates a facet ``gender``. Then the + final order of the facets in the response can be + ("price", "brands", "rating", "gender") or + ("price", "brands", "gender", "rating") depends + on how API orders "gender" and "rating" facets. + However, notice that "price" and "brands" are + always ranked at first and second position + because their enable_dynamic_position is false. """ class FacetKey(proto.Message): @@ -585,21 +589,23 @@ class FacetKey(proto.Message): Attributes: key (str): - Required. Supported textual and numerical facet keys in - [Document][google.cloud.discoveryengine.v1alpha.Document] - object, over which the facet values are computed. Facet key - is case-sensitive. + Required. Supported textual and numerical facet + keys in `Document + `__ + object, over which the facet values are + computed. Facet key is case-sensitive. intervals (MutableSequence[google.cloud.discoveryengine_v1alpha.types.Interval]): Set only if values should be bucketed into intervals. Must be set for facets with numerical values. Must not be set for facet with text values. Maximum number of intervals is 30. restricted_values (MutableSequence[str]): - Only get facet for the given restricted values. Only - supported on textual fields. For example, suppose "category" - has three values "Action > 2022", "Action > 2021" and - "Sci-Fi > 2022". If set "restricted_values" to "Action > - 2022", the "category" facet only contains "Action > 2022". + Only get facet for the given restricted values. + Only supported on textual fields. For example, + suppose "category" has three values "Action > + 2022", "Action > 2021" and "Sci-Fi > 2022". If + set "restricted_values" to "Action > 2022", the + "category" facet only contains "Action > 2022". Only supported on textual fields. Maximum is 10. prefixes (MutableSequence[str]): Only get facet values that start with the @@ -627,18 +633,24 @@ class FacetKey(proto.Message): Allowed values are: - - "count desc", which means order by - [SearchResponse.Facet.values.count][google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue.count] - descending. - - - "value desc", which means order by - [SearchResponse.Facet.values.value][google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue.value] - descending. Only applies to textual facets. - - If not set, textual values are sorted in `natural - order `__; - numerical intervals are sorted in the order given by - [FacetSpec.FacetKey.intervals][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.intervals]. + * "count desc", which means order by + `SearchResponse.Facet.values.count + `__ + descending. + + * "value desc", which means order by + `SearchResponse.Facet.values.value + `__ + descending. + Only applies to textual facets. + + If not set, textual values are sorted in + `natural order + `__; + numerical intervals are sorted in the order + given by + `FacetSpec.FacetKey.intervals + `__. """ key: str = proto.Field( @@ -707,39 +719,46 @@ class ConditionBoostSpec(proto.Message): Attributes: condition (str): - An expression which specifies a boost condition. The syntax - and supported fields are the same as a filter expression. - See - [SearchRequest.filter][google.cloud.discoveryengine.v1alpha.SearchRequest.filter] + An expression which specifies a boost condition. + The syntax and supported fields are the same as + a filter expression. See `SearchRequest.filter + `__ for detail syntax and limitations. Examples: - - To boost documents with document ID "doc_1" or "doc_2", - and color "Red" or "Blue": - ``(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))`` + * To boost documents with document ID "doc_1" or + "doc_2", and color "Red" or "Blue": + + ``(document_id: ANY("doc_1", "doc_2")) AND + (color: ANY("Red", "Blue"))`` boost (float): - Strength of the condition boost, which should be in [-1, 1]. - Negative boost means demotion. Default is 0.0. - - Setting to 1.0 gives the document a big promotion. However, - it does not necessarily mean that the boosted document will - be the top result at all times, nor that other documents - will be excluded. Results could still be shown even when - none of them matches the condition. And results that are - significantly more relevant to the search query can still - trump your heavily favored but irrelevant documents. - - Setting to -1.0 gives the document a big demotion. However, - results that are deeply relevant might still be shown. The - document will have an upstream battle to get a fairly high + Strength of the condition boost, which should be + in [-1, 1]. Negative boost means demotion. + Default is 0.0. + + Setting to 1.0 gives the document a big + promotion. However, it does not necessarily mean + that the boosted document will be the top result + at all times, nor that other documents will be + excluded. Results could still be shown even when + none of them matches the condition. And results + that are significantly more relevant to the + search query can still trump your heavily + favored but irrelevant documents. + + Setting to -1.0 gives the document a big + demotion. However, results that are deeply + relevant might still be shown. The document will + have an upstream battle to get a fairly high ranking, but it is not blocked out completely. - Setting to 0.0 means no boost applied. The boosting - condition is ignored. Only one of the (condition, boost) - combination or the boost_control_spec below are set. If both - are set then the global boost is ignored and the more - fine-grained boost_control_spec is applied. + Setting to 0.0 means no boost applied. The + boosting condition is ignored. Only one of the + (condition, boost) combination or the + boost_control_spec below are set. If both are + set then the global boost is ignored and the + more fine-grained boost_control_spec is applied. boost_control_spec (google.cloud.discoveryengine_v1alpha.types.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec): Complex specification for custom ranking based on customer defined attribute value. @@ -755,19 +774,22 @@ class BoostControlSpec(proto.Message): The name of the field whose value will be used to determine the boost amount. attribute_type (google.cloud.discoveryengine_v1alpha.types.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.AttributeType): - The attribute type to be used to determine the boost amount. - The attribute value can be derived from the field value of - the specified field_name. In the case of numerical it is + The attribute type to be used to determine the + boost amount. The attribute value can be derived + from the field value of the specified + field_name. In the case of numerical it is straightforward i.e. attribute_value = - numerical_field_value. In the case of freshness however, - attribute_value = (time.now() - datetime_field_value). + numerical_field_value. In the case of freshness + however, attribute_value = (time.now() - + datetime_field_value). interpolation_type (google.cloud.discoveryengine_v1alpha.types.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.InterpolationType): The interpolation type to be applied to connect the control points listed below. control_points (MutableSequence[google.cloud.discoveryengine_v1alpha.types.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint]): - The control points used to define the curve. The monotonic - function (defined through the interpolation_type above) - passes through the control points listed here. + The control points used to define the curve. The + monotonic function (defined through the + interpolation_type above) passes through the + control points listed here. """ class AttributeType(proto.Enum): @@ -778,19 +800,21 @@ class AttributeType(proto.Enum): ATTRIBUTE_TYPE_UNSPECIFIED (0): Unspecified AttributeType. NUMERICAL (1): - The value of the numerical field will be used to dynamically - update the boost amount. In this case, the attribute_value - (the x value) of the control point will be the actual value - of the numerical field for which the boost_amount is + The value of the numerical field will be used to + dynamically update the boost amount. In this + case, the attribute_value (the x value) of the + control point will be the actual value of the + numerical field for which the boost_amount is specified. FRESHNESS (2): - For the freshness use case the attribute value will be the - duration between the current time and the date in the - datetime field specified. The value must be formatted as an - XSD ``dayTimeDuration`` value (a restricted subset of an ISO - 8601 duration value). The pattern for this is: - ``[nD][T[nH][nM][nS]]``. For example, ``5D``, ``3DT12H30M``, - ``T24H``. + For the freshness use case the attribute value + will be the duration between the current time + and the date in the datetime field specified. + The value must be formatted as an XSD + ``dayTimeDuration`` value (a restricted subset + of an ISO 8601 duration value). The pattern for + this is: ```nD `__`nM `__]``. For + example, ``5D``, ``3DT12H30M``, ``T24H``. """ ATTRIBUTE_TYPE_UNSPECIFIED = 0 NUMERICAL = 1 @@ -821,13 +845,16 @@ class ControlPoint(proto.Message): Can be one of: 1. The numerical field value. - 2. The duration spec for freshness: The value must be - formatted as an XSD ``dayTimeDuration`` value (a - restricted subset of an ISO 8601 duration value). The - pattern for this is: ``[nD][T[nH][nM][nS]]``. + 2. The duration spec for freshness: + + The value must be formatted as an XSD + ``dayTimeDuration`` value (a restricted subset + of an ISO 8601 duration value). The pattern for + this is: ```nD `__`nM `__]``. boost_amount (float): - The value between -1 to 1 by which to boost the score if the - attribute_value evaluates to the value specified above. + The value between -1 to 1 by which to boost the + score if the attribute_value evaluates to the + value specified above. """ attribute_value: str = proto.Field( @@ -889,9 +916,9 @@ class QueryExpansionSpec(proto.Message): Attributes: condition (google.cloud.discoveryengine_v1alpha.types.SearchRequest.QueryExpansionSpec.Condition): - The condition under which query expansion should occur. - Default to - [Condition.DISABLED][google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec.Condition.DISABLED]. + The condition under which query expansion should + occur. Default to `Condition.DISABLED + `__. pin_unexpanded_results (bool): Whether to pin unexpanded results. If this field is set to true, unexpanded products are @@ -905,13 +932,15 @@ class Condition(proto.Enum): Values: CONDITION_UNSPECIFIED (0): - Unspecified query expansion condition. In this case, server - behavior defaults to - [Condition.DISABLED][google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec.Condition.DISABLED]. + Unspecified query expansion condition. In this + case, server behavior defaults to + `Condition.DISABLED + `__. DISABLED (1): - Disabled query expansion. Only the exact search query is - used, even if - [SearchResponse.total_size][google.cloud.discoveryengine.v1alpha.SearchResponse.total_size] + Disabled query expansion. Only the exact search + query is used, even if + `SearchResponse.total_size + `__ is zero. AUTO (2): Automatic query expansion built by the Search @@ -936,9 +965,10 @@ class SpellCorrectionSpec(proto.Message): Attributes: mode (google.cloud.discoveryengine_v1alpha.types.SearchRequest.SpellCorrectionSpec.Mode): - The mode under which spell correction replaces the original - search query. Defaults to - [Mode.AUTO][google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec.Mode.AUTO]. + The mode under which spell correction + replaces the original search query. Defaults to + `Mode.AUTO + `__. """ class Mode(proto.Enum): @@ -947,14 +977,17 @@ class Mode(proto.Enum): Values: MODE_UNSPECIFIED (0): - Unspecified spell correction mode. In this case, server - behavior defaults to - [Mode.AUTO][google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec.Mode.AUTO]. + Unspecified spell correction mode. In this case, + server behavior defaults to + `Mode.AUTO + `__. SUGGESTION_ONLY (1): - Search API tries to find a spelling suggestion. If a - suggestion is found, it is put in the - [SearchResponse.corrected_query][google.cloud.discoveryengine.v1alpha.SearchResponse.corrected_query]. - The spelling suggestion won't be used as the search query. + Search API tries to find a spelling suggestion. + If a suggestion is found, it is put in the + `SearchResponse.corrected_query + `__. + The spelling suggestion won't be used as the + search query. AUTO (2): Automatic spell correction built by the Search API. Search will be based on the @@ -976,28 +1009,32 @@ class ContentSearchSpec(proto.Message): Attributes: snippet_spec (google.cloud.discoveryengine_v1alpha.types.SearchRequest.ContentSearchSpec.SnippetSpec): - If ``snippetSpec`` is not specified, snippets are not - included in the search response. + If ``snippetSpec`` is not specified, snippets + are not included in the search response. summary_spec (google.cloud.discoveryengine_v1alpha.types.SearchRequest.ContentSearchSpec.SummarySpec): - If ``summarySpec`` is not specified, summaries are not - included in the search response. + If ``summarySpec`` is not specified, summaries + are not included in the search response. extractive_content_spec (google.cloud.discoveryengine_v1alpha.types.SearchRequest.ContentSearchSpec.ExtractiveContentSpec): - If there is no extractive_content_spec provided, there will - be no extractive answer in the search response. + If there is no extractive_content_spec provided, + there will be no extractive answer in the search + response. search_result_mode (google.cloud.discoveryengine_v1alpha.types.SearchRequest.ContentSearchSpec.SearchResultMode): - Specifies the search result mode. If unspecified, the search - result mode defaults to ``DOCUMENTS``. + Specifies the search result mode. If + unspecified, the search result mode defaults to + ``DOCUMENTS``. chunk_spec (google.cloud.discoveryengine_v1alpha.types.SearchRequest.ContentSearchSpec.ChunkSpec): - Specifies the chunk spec to be returned from the search - response. Only available if the - [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.search_result_mode] + Specifies the chunk spec to be returned from the + search response. Only available if the + `SearchRequest.ContentSearchSpec.search_result_mode + `__ is set to - [CHUNKS][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS] + `CHUNKS + `__ """ class SearchResultMode(proto.Enum): - r"""Specifies the search result mode. If unspecified, the search result - mode defaults to ``DOCUMENTS``. + r"""Specifies the search result mode. If unspecified, the + search result mode defaults to ``DOCUMENTS``. Values: SEARCH_RESULT_MODE_UNSPECIFIED (0): @@ -1005,9 +1042,10 @@ class SearchResultMode(proto.Enum): DOCUMENTS (1): Returns documents in the search result. CHUNKS (2): - Returns chunks in the search result. Only available if the - [DataStore.DocumentProcessingConfig.chunking_config][] is - specified. + Returns chunks in the search result. Only + available if the + [DataStore.DocumentProcessingConfig.chunking_config][] + is specified. """ SEARCH_RESULT_MODE_UNSPECIFIED = 0 DOCUMENTS = 1 @@ -1019,18 +1057,19 @@ class SnippetSpec(proto.Message): Attributes: max_snippet_count (int): - [DEPRECATED] This field is deprecated. To control snippet - return, use ``return_snippet`` field. For backwards - compatibility, we will return snippet if max_snippet_count > - 0. + [DEPRECATED] This field is deprecated. To + control snippet return, use ``return_snippet`` + field. For backwards compatibility, we will + return snippet if max_snippet_count > 0. reference_only (bool): - [DEPRECATED] This field is deprecated and will have no - affect on the snippet. + [DEPRECATED] This field is deprecated and will + have no affect on the snippet. return_snippet (bool): - If ``true``, then return snippet. If no snippet can be - generated, we return "No snippet is available for this - page." A ``snippet_status`` with ``SUCCESS`` or - ``NO_SNIPPET_AVAILABLE`` will also be returned. + If ``true``, then return snippet. If no snippet + can be generated, we return "No snippet is + available for this page." A ``snippet_status`` + with ``SUCCESS`` or ``NO_SNIPPET_AVAILABLE`` + will also be returned. """ max_snippet_count: int = proto.Field( @@ -1052,77 +1091,89 @@ class SummarySpec(proto.Message): Attributes: summary_result_count (int): - The number of top results to generate the summary from. If - the number of results returned is less than - ``summaryResultCount``, the summary is generated from all of - the results. - - At most 10 results for documents mode, or 50 for chunks - mode, can be used to generate a summary. The chunks mode is - used when - [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.search_result_mode] + The number of top results to generate the + summary from. If the number of results returned + is less than ``summaryResultCount``, the summary + is generated from all of the results. + + At most 10 results for documents mode, or 50 for + chunks mode, can be used to generate a summary. + The chunks mode is used when + `SearchRequest.ContentSearchSpec.search_result_mode + `__ is set to - [CHUNKS][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]. + `CHUNKS + `__. include_citations (bool): - Specifies whether to include citations in the summary. The - default value is ``false``. + Specifies whether to include citations in the + summary. The default value is ``false``. - When this field is set to ``true``, summaries include - in-line citation numbers. + When this field is set to ``true``, summaries + include in-line citation numbers. Example summary including citations: - BigQuery is Google Cloud's fully managed and completely - serverless enterprise data warehouse [1]. BigQuery supports - all data types, works across clouds, and has built-in - machine learning and business intelligence, all within a - unified platform [2, 3]. - - The citation numbers refer to the returned search results - and are 1-indexed. For example, [1] means that the sentence - is attributed to the first search result. [2, 3] means that - the sentence is attributed to both the second and third - search results. + BigQuery is Google Cloud's fully managed and + completely serverless enterprise data warehouse + [1]. BigQuery supports all data types, works + across clouds, and has built-in machine learning + and business intelligence, all within a unified + platform [2, 3]. + + The citation numbers refer to the returned + search results and are 1-indexed. For example, + [1] means that the sentence is attributed to the + first search result. [2, 3] means that the + sentence is attributed to both the second and + third search results. ignore_adversarial_query (bool): - Specifies whether to filter out adversarial queries. The - default value is ``false``. - - Google employs search-query classification to detect - adversarial queries. No summary is returned if the search - query is classified as an adversarial query. For example, a - user might ask a question regarding negative comments about - the company or submit a query designed to generate unsafe, - policy-violating output. If this field is set to ``true``, - we skip generating summaries for adversarial queries and - return fallback messages instead. + Specifies whether to filter out adversarial + queries. The default value is ``false``. + + Google employs search-query classification to + detect adversarial queries. No summary is + returned if the search query is classified as an + adversarial query. For example, a user might ask + a question regarding negative comments about the + company or submit a query designed to generate + unsafe, policy-violating output. If this field + is set to ``true``, we skip generating summaries + for adversarial queries and return fallback + messages instead. ignore_non_summary_seeking_query (bool): - Specifies whether to filter out queries that are not - summary-seeking. The default value is ``false``. - - Google employs search-query classification to detect - summary-seeking queries. No summary is returned if the - search query is classified as a non-summary seeking query. - For example, ``why is the sky blue`` and - ``Who is the best soccer player in the world?`` are - summary-seeking queries, but ``SFO airport`` and - ``world cup 2026`` are not. They are most likely - navigational queries. If this field is set to ``true``, we - skip generating summaries for non-summary seeking queries - and return fallback messages instead. + Specifies whether to filter out queries that are + not summary-seeking. The default value is + ``false``. + + Google employs search-query classification to + detect summary-seeking queries. No summary is + returned if the search query is classified as a + non-summary seeking query. For example, ``why is + the sky blue`` and ``Who is the best soccer + player in the world?`` are summary-seeking + queries, but ``SFO airport`` and ``world cup + 2026`` are not. They are most likely + navigational queries. If this field is set to + ``true``, we skip generating summaries for + non-summary seeking queries and return fallback + messages instead. ignore_low_relevant_content (bool): - Specifies whether to filter out queries that have low - relevance. The default value is ``false``. - - If this field is set to ``false``, all search results are - used regardless of relevance to generate answers. If set to - ``true``, only queries with high relevance search results - will generate answers. + Specifies whether to filter out queries that + have low relevance. The default value is + ``false``. + + If this field is set to ``false``, all search + results are used regardless of relevance to + generate answers. If set to ``true``, only + queries with high relevance search results will + generate answers. model_prompt_spec (google.cloud.discoveryengine_v1alpha.types.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec): If specified, the spec will be used to modify the prompt provided to the LLM. language_code (str): - Language code for Summary. Use language tags defined by - `BCP47 `__. + Language code for Summary. Use language tags + defined by `BCP47 + `__. Note: This is an experimental feature. model_spec (google.cloud.discoveryengine_v1alpha.types.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec): If specified, the spec will be used to modify @@ -1162,15 +1213,19 @@ class ModelSpec(proto.Message): Supported values are: - - ``stable``: string. Default value when no value is - specified. Uses a generally available, fine-tuned model. - For more information, see `Answer generation model - versions and - lifecycle `__. - - ``preview``: string. (Public preview) Uses a preview - model. For more information, see `Answer generation model - versions and - lifecycle `__. + * ``stable``: string. Default value when no + value is specified. Uses a generally + available, fine-tuned model. For more + information, see `Answer generation model + versions and + lifecycle + `__. + + * ``preview``: string. (Public preview) Uses a + preview model. For more information, see + `Answer generation model versions and + lifecycle + `__. """ version: str = proto.Field( @@ -1225,53 +1280,63 @@ class ExtractiveContentSpec(proto.Message): Attributes: max_extractive_answer_count (int): - The maximum number of extractive answers returned in each - search result. + The maximum number of extractive answers + returned in each search result. - An extractive answer is a verbatim answer extracted from the - original document, which provides a precise and contextually - relevant answer to the search query. + An extractive answer is a verbatim answer + extracted from the original document, which + provides a precise and contextually relevant + answer to the search query. - If the number of matching answers is less than the - ``max_extractive_answer_count``, return all of the answers. - Otherwise, return the ``max_extractive_answer_count``. + If the number of matching answers is less than + the ``max_extractive_answer_count``, return all + of the answers. Otherwise, return the + ``max_extractive_answer_count``. At most five answers are returned for each - [SearchResult][google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult]. + `SearchResult + `__. max_extractive_segment_count (int): - The max number of extractive segments returned in each - search result. Only applied if the - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] + The max number of extractive segments returned + in each search result. Only applied if the + `DataStore + `__ is set to - [DataStore.ContentConfig.CONTENT_REQUIRED][google.cloud.discoveryengine.v1alpha.DataStore.ContentConfig.CONTENT_REQUIRED] + `DataStore.ContentConfig.CONTENT_REQUIRED + `__ or - [DataStore.solution_types][google.cloud.discoveryengine.v1alpha.DataStore.solution_types] + `DataStore.solution_types + `__ is - [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_CHAT]. + `SOLUTION_TYPE_CHAT + `__. - An extractive segment is a text segment extracted from the - original document that is relevant to the search query, and, - in general, more verbose than an extractive answer. The - segment could then be used as input for LLMs to generate - summaries and answers. + An extractive segment is a text segment + extracted from the original document that is + relevant to the search query, and, in general, + more verbose than an extractive answer. The + segment could then be used as input for LLMs to + generate summaries and answers. If the number of matching segments is less than - ``max_extractive_segment_count``, return all of the - segments. Otherwise, return the + ``max_extractive_segment_count``, return all of + the segments. Otherwise, return the ``max_extractive_segment_count``. return_extractive_segment_score (bool): - Specifies whether to return the confidence score from the - extractive segments in each search result. This feature is - available only for new or allowlisted data stores. To - allowlist your data store, contact your Customer Engineer. - The default value is ``false``. + Specifies whether to return the confidence score + from the extractive segments in each search + result. This feature is available only for new + or allowlisted data stores. To allowlist your + data store, contact your Customer Engineer. The + default value is ``false``. num_previous_segments (int): - Specifies whether to also include the adjacent from each - selected segments. Return at most ``num_previous_segments`` + Specifies whether to also include the adjacent + from each selected segments. + Return at most ``num_previous_segments`` segments before each selected segments. num_next_segments (int): - Return at most ``num_next_segments`` segments after each - selected segments. + Return at most ``num_next_segments`` segments + after each selected segments. """ max_extractive_answer_count: int = proto.Field( @@ -1296,11 +1361,13 @@ class ExtractiveContentSpec(proto.Message): ) class ChunkSpec(proto.Message): - r"""Specifies the chunk spec to be returned from the search response. - Only available if the - [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.search_result_mode] + r"""Specifies the chunk spec to be returned from the search + response. Only available if the + `SearchRequest.ContentSearchSpec.search_result_mode + `__ is set to - [CHUNKS][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS] + `CHUNKS + `__ Attributes: num_previous_chunks (int): @@ -1395,16 +1462,19 @@ class NaturalLanguageQueryUnderstandingSpec(proto.Message): Attributes: filter_extraction_condition (google.cloud.discoveryengine_v1alpha.types.SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition): - The condition under which filter extraction should occur. - Default to [Condition.DISABLED][]. + The condition under which filter extraction + should occur. Default to [Condition.DISABLED][]. geo_search_query_detection_field_names (MutableSequence[str]): - Field names used for location-based filtering, where - geolocation filters are detected in natural language search - queries. Only valid when the FilterExtractionCondition is - set to ``ENABLED``. - - If this field is set, it overrides the field names set in - [ServingConfig.geo_search_query_detection_field_names][google.cloud.discoveryengine.v1alpha.ServingConfig.geo_search_query_detection_field_names]. + Field names used for location-based filtering, + where geolocation filters are detected in + natural language search queries. Only valid when + the FilterExtractionCondition is set to + ``ENABLED``. + + If this field is set, it overrides the field + names set in + `ServingConfig.geo_search_query_detection_field_names + `__. """ class FilterExtractionCondition(proto.Enum): @@ -1413,7 +1483,8 @@ class FilterExtractionCondition(proto.Enum): Values: CONDITION_UNSPECIFIED (0): - Server behavior defaults to [Condition.DISABLED][]. + Server behavior defaults to + [Condition.DISABLED][]. DISABLED (1): Disables NL filter extraction. ENABLED (2): @@ -1440,9 +1511,10 @@ class SearchAsYouTypeSpec(proto.Message): Attributes: condition (google.cloud.discoveryengine_v1alpha.types.SearchRequest.SearchAsYouTypeSpec.Condition): - The condition under which search as you type should occur. - Default to - [Condition.DISABLED][google.cloud.discoveryengine.v1alpha.SearchRequest.SearchAsYouTypeSpec.Condition.DISABLED]. + The condition under which search as you type + should occur. Default to + `Condition.DISABLED + `__. """ class Condition(proto.Enum): @@ -1452,7 +1524,8 @@ class Condition(proto.Enum): Values: CONDITION_UNSPECIFIED (0): Server behavior defaults to - [Condition.DISABLED][google.cloud.discoveryengine.v1alpha.SearchRequest.SearchAsYouTypeSpec.Condition.DISABLED]. + `Condition.DISABLED + `__. DISABLED (1): Disables Search As You Type. ENABLED (2): @@ -1481,38 +1554,48 @@ class SessionSpec(proto.Message): Attributes: query_id (str): - If set, the search result gets stored to the "turn" - specified by this query ID. + If set, the search result gets stored to the + "turn" specified by this query ID. - Example: Let's say the session looks like this: session { - name: ".../sessions/xxx" turns { query { text: "What is - foo?" query_id: ".../questions/yyy" } answer: "Foo is ..." } - turns { query { text: "How about bar then?" query_id: - ".../questions/zzz" } } } + Example: Let's say the session looks like this: - The user can call /search API with a request like this: + session { + name: ".../sessions/xxx" + turns { + query { text: "What is foo?" query_id: + ".../questions/yyy" } answer: "Foo is ..." + } + turns { + query { text: "How about bar then?" + query_id: ".../questions/zzz" } } + } - :: + The user can call /search API with a request + like this: session: ".../sessions/xxx" - session_spec { query_id: ".../questions/zzz" } - - Then, the API stores the search result, associated with the - last turn. The stored search result can be used by a - subsequent /answer API call (with the session ID and the - query ID specified). Also, it is possible to call /search - and /answer in parallel with the same session ID & query ID. + session_spec { query_id: ".../questions/zzz" + } + + Then, the API stores the search result, + associated with the last turn. The stored search + result can be used by a subsequent /answer API + call (with the session ID and the query ID + specified). Also, it is possible to call /search + and /answer in parallel with the same session ID + & query ID. search_result_persistence_count (int): - The number of top search results to persist. The persisted - search results can be used for the subsequent /answer api - call. + The number of top search results to persist. The + persisted search results can be used for the + subsequent /answer api call. - This field is simliar to the ``summary_result_count`` field - in - [SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count]. + This field is simliar to the + ``summary_result_count`` field in + `SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count + `__. - At most 10 results for documents mode, or 50 for chunks - mode. + At most 10 results for documents mode, or 50 for + chunks mode. This field is a member of `oneof`_ ``_search_result_persistence_count``. """ @@ -1679,7 +1762,8 @@ class SessionSpec(proto.Message): class SearchResponse(proto.Message): r"""Response message for - [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search] + `SearchService.Search + `__ method. Attributes: @@ -1691,39 +1775,47 @@ class SearchResponse(proto.Message): guided_search_result (google.cloud.discoveryengine_v1alpha.types.SearchResponse.GuidedSearchResult): Guided search result. total_size (int): - The estimated total count of matched items irrespective of - pagination. The count of - [results][google.cloud.discoveryengine.v1alpha.SearchResponse.results] + The estimated total count of matched items + irrespective of pagination. The count of + `results + `__ returned by pagination may be less than the - [total_size][google.cloud.discoveryengine.v1alpha.SearchResponse.total_size] + `total_size + `__ that matches. attribution_token (str): - A unique search token. This should be included in the - [UserEvent][google.cloud.discoveryengine.v1alpha.UserEvent] - logs resulting from this search, which enables accurate - attribution of search model performance. This also helps to - identify a request during the customer support scenarios. + A unique search token. This should be included + in the `UserEvent + `__ + logs resulting from this search, which enables + accurate attribution of search model + performance. This also helps to identify a + request during the customer support scenarios. redirect_uri (str): - The URI of a customer-defined redirect page. If redirect - action is triggered, no search is performed, and only - [redirect_uri][google.cloud.discoveryengine.v1alpha.SearchResponse.redirect_uri] + The URI of a customer-defined redirect page. If + redirect action is triggered, no search is + performed, and only `redirect_uri + `__ and - [attribution_token][google.cloud.discoveryengine.v1alpha.SearchResponse.attribution_token] + `attribution_token + `__ are set in the response. next_page_token (str): A token that can be sent as - [SearchRequest.page_token][google.cloud.discoveryengine.v1alpha.SearchRequest.page_token] - to retrieve the next page. If this field is omitted, there - are no subsequent pages. + `SearchRequest.page_token + `__ + to retrieve the next page. If this field is + omitted, there are no subsequent pages. corrected_query (str): - Contains the spell corrected query, if found. If the spell - correction type is AUTOMATIC, then the search results are - based on corrected_query. Otherwise the original query is - used for search. + Contains the spell corrected query, if found. If + the spell correction type is AUTOMATIC, then the + search results are based on corrected_query. + Otherwise the original query is used for search. summary (google.cloud.discoveryengine_v1alpha.types.SearchResponse.Summary): - A summary as part of the search results. This field is only - returned if - [SearchRequest.ContentSearchSpec.summary_spec][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.summary_spec] + A summary as part of the search results. + This field is only returned if + `SearchRequest.ContentSearchSpec.summary_spec + `__ is set. applied_controls (MutableSequence[str]): Controls applied as part of the Control @@ -1740,8 +1832,10 @@ class SearchResponse(proto.Message): Session information. Only set if - [SearchRequest.session][google.cloud.discoveryengine.v1alpha.SearchRequest.session] - is provided. See its description for more details. + `SearchRequest.session + `__ + is provided. See its description for more + details. one_box_results (MutableSequence[google.cloud.discoveryengine_v1alpha.types.SearchResponse.OneBoxResult]): A list of One Box results. There can be multiple One Box results of different types. @@ -1752,17 +1846,21 @@ class SearchResult(proto.Message): Attributes: id (str): - [Document.id][google.cloud.discoveryengine.v1alpha.Document.id] - of the searched - [Document][google.cloud.discoveryengine.v1alpha.Document]. + `Document.id + `__ + of the searched `Document + `__. document (google.cloud.discoveryengine_v1alpha.types.Document): - The document data snippet in the search response. Only - fields that are marked as ``retrievable`` are populated. + The document data snippet in the search + response. Only fields that are marked as + ``retrievable`` are populated. chunk (google.cloud.discoveryengine_v1alpha.types.Chunk): The chunk data in the search response if the - [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.search_result_mode] + `SearchRequest.ContentSearchSpec.search_result_mode + `__ is set to - [CHUNKS][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]. + `CHUNKS + `__. model_scores (MutableMapping[str, google.cloud.discoveryengine_v1alpha.types.DoubleList]): Google provided available scores. rank_signals (google.cloud.discoveryengine_v1alpha.types.SearchResponse.SearchResult.RankSignals): @@ -1909,9 +2007,10 @@ class Facet(proto.Message): Attributes: key (str): - The key for this facet. For example, ``"colors"`` or - ``"price"``. It matches - [SearchRequest.FacetSpec.FacetKey.key][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.key]. + The key for this facet. For example, + ``"colors"`` or ``"price"``. It matches + `SearchRequest.FacetSpec.FacetKey.key + `__. values (MutableSequence[google.cloud.discoveryengine_v1alpha.types.SearchResponse.Facet.FacetValue]): The facet values for this field. dynamic_facet (bool): @@ -1935,9 +2034,10 @@ class FacetValue(proto.Message): This field is a member of `oneof`_ ``facet_value``. interval (google.cloud.discoveryengine_v1alpha.types.Interval): - Interval value for a facet, such as [10, 20) for facet - "price". It matches - [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.intervals]. + Interval value for a facet, such as `10, 20) for + facet "price". It matches + [SearchRequest.FacetSpec.FacetKey.intervals + `__. This field is a member of `oneof`_ ``facet_value``. count (int): @@ -1993,11 +2093,11 @@ class RefinementAttribute(proto.Message): Attributes: attribute_key (str): - Attribute key used to refine the results. For example, - ``"movie_type"``. + Attribute key used to refine the results. For + example, ``"movie_type"``. attribute_value (str): - Attribute value used to refine the results. For example, - ``"drama"``. + Attribute value used to refine the results. For + example, ``"drama"``. """ attribute_key: str = proto.Field( @@ -2050,13 +2150,15 @@ class SummarySkippedReason(proto.Enum): The adversarial query ignored case. Only used when - [SummarySpec.ignore_adversarial_query][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ignore_adversarial_query] + `SummarySpec.ignore_adversarial_query + `__ is set to ``true``. NON_SUMMARY_SEEKING_QUERY_IGNORED (2): The non-summary seeking query ignored case. Only used when - [SummarySpec.ignore_non_summary_seeking_query][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_summary_seeking_query] + `SummarySpec.ignore_non_summary_seeking_query + `__ is set to ``true``. OUT_OF_DOMAIN_QUERY_IGNORED (3): The out-of-domain query ignored case. @@ -2085,8 +2187,8 @@ class SummarySkippedReason(proto.Enum): JAIL_BREAKING_QUERY_IGNORED (7): The jail-breaking query ignored case. - For example, "Reply in the tone of a competing company's - CEO". Only used when + For example, "Reply in the tone of a competing + company's CEO". Only used when [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query] is set to ``true``. CUSTOMER_POLICY_VIOLATION (8): @@ -2188,9 +2290,9 @@ class CitationSource(proto.Message): Attributes: reference_index (int): Document reference index from - SummaryWithMetadata.references. It is 0-indexed and the - value will be zero if the reference_index is not set - explicitly. + SummaryWithMetadata.references. It is 0-indexed + and the value will be zero if the + reference_index is not set explicitly. """ reference_index: int = proto.Field( @@ -2206,9 +2308,10 @@ class Reference(proto.Message): Title of the document. document (str): Required. - [Document.name][google.cloud.discoveryengine.v1alpha.Document.name] - of the document. Full resource name of the referenced - document, in the format + `Document.name + `__ + of the document. Full resource name of the + referenced document, in the format ``projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*``. uri (str): Cloud Storage or HTTP uri for the document. @@ -2339,9 +2442,10 @@ class QueryExpansionInfo(proto.Message): Bool describing whether query expansion has occurred. pinned_result_count (int): - Number of pinned results. This field will only be set when - expansion happens and - [SearchRequest.QueryExpansionSpec.pin_unexpanded_results][google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec.pin_unexpanded_results] + Number of pinned results. This field will only + be set when expansion happens and + `SearchRequest.QueryExpansionSpec.pin_unexpanded_results + `__ is set to true. """ @@ -2447,7 +2551,8 @@ class Comparison(proto.Enum): LESS_THAN (3): Denotes less than ``<`` operator. GREATER_THAN_EQUALS (4): - Denotes greater than or equal to ``>=`` operator. + Denotes greater than or equal to ``>=`` + operator. GREATER_THAN (5): Denotes greater than ``>`` operator. """ @@ -2646,10 +2751,12 @@ class SessionInfo(proto.Message): Attributes: name (str): - Name of the session. If the auto-session mode is used (when - [SearchRequest.session][google.cloud.discoveryengine.v1alpha.SearchRequest.session] - ends with "-"), this field holds the newly generated session - name. + Name of the session. + If the auto-session mode is used (when + `SearchRequest.session + `__ + ends with "-"), this field holds the newly + generated session name. query_id (str): Query ID that corresponds to this search API call. One session can have multiple turns, each diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/search_tuning_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/search_tuning_service.py index 2134c54c126e..7beafc9fe1a5 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/search_tuning_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/search_tuning_service.py @@ -40,16 +40,17 @@ class ListCustomModelsRequest(proto.Message): r"""Request message for - [SearchTuningService.ListCustomModels][google.cloud.discoveryengine.v1alpha.SearchTuningService.ListCustomModels] + `SearchTuningService.ListCustomModels + `__ method. Attributes: data_store (str): - Required. The resource name of the parent Data Store, such - as + Required. The resource name of the parent Data + Store, such as ``projects/*/locations/global/collections/default_collection/dataStores/default_data_store``. - This field is used to identify the data store where to fetch - the models from. + This field is used to identify the data store + where to fetch the models from. """ data_store: str = proto.Field( @@ -60,7 +61,8 @@ class ListCustomModelsRequest(proto.Message): class ListCustomModelsResponse(proto.Message): r"""Response message for - [SearchTuningService.ListCustomModels][google.cloud.discoveryengine.v1alpha.SearchTuningService.ListCustomModels] + `SearchTuningService.ListCustomModels + `__ method. Attributes: @@ -79,7 +81,8 @@ class ListCustomModelsResponse(proto.Message): class TrainCustomModelRequest(proto.Message): r"""Request message for - [SearchTuningService.TrainCustomModel][google.cloud.discoveryengine.v1alpha.SearchTuningService.TrainCustomModel] + `SearchTuningService.TrainCustomModel + `__ method. @@ -91,15 +94,16 @@ class TrainCustomModelRequest(proto.Message): This field is a member of `oneof`_ ``training_input``. data_store (str): - Required. The resource name of the Data Store, such as + Required. The resource name of the Data Store, + such as ``projects/*/locations/global/collections/default_collection/dataStores/default_data_store``. - This field is used to identify the data store where to train - the models. + This field is used to identify the data store + where to train the models. model_type (str): Model to be trained. Supported values are: - - **search-tuning**: Fine tuning the search system based on - data provided. + * **search-tuning**: Fine tuning the search + system based on data provided. error_config (google.cloud.discoveryengine_v1alpha.types.ImportErrorConfig): The desired location of errors incurred during the data ingestion and training. @@ -112,39 +116,45 @@ class GcsTrainingInput(proto.Message): Attributes: corpus_data_path (str): - The Cloud Storage corpus data which could be associated in - train data. The data path format is - ``gs:///``. A newline - delimited jsonl/ndjson file. + The Cloud Storage corpus data which could be + associated in train data. The data path format + is ``gs:///``. + A newline delimited jsonl/ndjson file. + + For search-tuning model, each line should have + the _id, title and text. Example: - For search-tuning model, each line should have the \_id, - title and text. Example: - ``{"_id": "doc1", title: "relevant doc", "text": "relevant text"}`` + ``{"_id": "doc1", title: "relevant doc", "text": + "relevant text"}`` query_data_path (str): - The gcs query data which could be associated in train data. - The data path format is - ``gs:///``. A newline - delimited jsonl/ndjson file. + The gcs query data which could be associated in + train data. The data path format is + ``gs:///``. A + newline delimited jsonl/ndjson file. - For search-tuning model, each line should have the \_id and - text. Example: {"\_id": "query1", "text": "example query"} + For search-tuning model, each line should have + the _id and text. Example: {"_id": "query1", + "text": "example query"} train_data_path (str): - Cloud Storage training data path whose format should be - ``gs:///``. The file should - be in tsv format. Each line should have the doc_id and - query_id and score (number). - - For search-tuning model, it should have the query-id - corpus-id score as tsv file header. The score should be a - number in ``[0, inf+)``. The larger the number is, the more - relevant the pair is. Example: - - - ``query-id\tcorpus-id\tscore`` - - ``query1\tdoc1\t1`` + Cloud Storage training data path whose format + should be + ``gs:///``. The + file should be in tsv format. Each line should + have the doc_id and query_id and score (number). + + For search-tuning model, it should have the + query-id corpus-id score as tsv file header. The + score should be a number in ``[0, inf+)``. The + larger the number is, the more relevant the pair + is. Example: + + * ``query-id\tcorpus-id\tscore`` + * ``query1\tdoc1\t1`` test_data_path (str): - Cloud Storage test data. Same format as train_data_path. If - not provided, a random 80/20 train/test split will be - performed on train_data_path. + Cloud Storage test data. Same format as + train_data_path. If not provided, a random 80/20 + train/test split will be performed on + train_data_path. """ corpus_data_path: str = proto.Field( @@ -191,7 +201,8 @@ class GcsTrainingInput(proto.Message): class TrainCustomModelResponse(proto.Message): r"""Response of the - [TrainCustomModelRequest][google.cloud.discoveryengine.v1alpha.TrainCustomModelRequest]. + `TrainCustomModelRequest + `__. This message is returned by the google.longrunning.Operations.response field. @@ -205,15 +216,20 @@ class TrainCustomModelResponse(proto.Message): model_status (str): The trained model status. Possible values are: - - **bad-data**: The training data quality is bad. - - **no-improvement**: Tuning didn't improve performance. - Won't deploy. - - **in-progress**: Model training job creation is in - progress. - - **training**: Model is actively training. - - **evaluating**: The model is evaluating trained metrics. - - **indexing**: The model trained metrics are indexing. - - **ready**: The model is ready for serving. + * **bad-data**: The training data quality is + bad. + + * **no-improvement**: Tuning didn't improve + performance. Won't deploy. * **in-progress**: + Model training job creation is in progress. + + * **training**: Model is actively training. + * **evaluating**: The model is evaluating + trained metrics. + + * **indexing**: The model trained metrics are + indexing. * **ready**: The model is ready for + serving. metrics (MutableMapping[str, float]): The metrics of the trained model. model_name (str): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/serving_config.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/serving_config.py index b375e48b8ce0..71a4991120f2 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/serving_config.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/serving_config.py @@ -57,95 +57,115 @@ class ServingConfig(proto.Message): Immutable. Fully qualified name ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}`` display_name (str): - Required. The human readable serving config display name. - Used in Discovery UI. + Required. The human readable serving config + display name. Used in Discovery UI. - This field must be a UTF-8 encoded string with a length - limit of 128 characters. Otherwise, an INVALID_ARGUMENT - error is returned. + This field must be a UTF-8 encoded string with a + length limit of 128 characters. Otherwise, an + INVALID_ARGUMENT error is returned. solution_type (google.cloud.discoveryengine_v1alpha.types.SolutionType): Required. Immutable. Specifies the solution type that a serving config can be associated with. model_id (str): - The id of the model to use at serving time. Currently only - RecommendationModels are supported. Can be changed but only - to a compatible model (e.g. others-you-may-like CTR to - others-you-may-like CVR). + The id of the model to use at serving time. + Currently only RecommendationModels are + supported. Can be changed but only to a + compatible model (e.g. others-you-may-like CTR + to others-you-may-like CVR). Required when - [SolutionType][google.cloud.discoveryengine.v1alpha.SolutionType] - is - [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. + `SolutionType + `__ + is `SOLUTION_TYPE_RECOMMENDATION + `__. diversity_level (str): - How much diversity to use in recommendation model results - e.g. ``medium-diversity`` or ``high-diversity``. Currently - supported values: + How much diversity to use in recommendation + model results e.g. ``medium-diversity`` or + ``high-diversity``. Currently supported values: - - ``no-diversity`` - - ``low-diversity`` - - ``medium-diversity`` - - ``high-diversity`` - - ``auto-diversity`` + * ``no-diversity`` + * ``low-diversity`` - If not specified, we choose default based on recommendation - model type. Default value: ``no-diversity``. + * ``medium-diversity`` + * ``high-diversity`` + + * ``auto-diversity`` + + If not specified, we choose default based on + recommendation model type. Default value: + ``no-diversity``. Can only be set if - [SolutionType][google.cloud.discoveryengine.v1alpha.SolutionType] - is - [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. + `SolutionType + `__ + is `SOLUTION_TYPE_RECOMMENDATION + `__. embedding_config (google.cloud.discoveryengine_v1alpha.types.EmbeddingConfig): - Bring your own embedding config. The config is used for - search semantic retrieval. The retrieval is based on the dot - product of - [SearchRequest.EmbeddingSpec.EmbeddingVector.vector][google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector.vector] - and the document embeddings that are provided by this - EmbeddingConfig. If - [SearchRequest.EmbeddingSpec.EmbeddingVector.vector][google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector.vector] + Bring your own embedding config. The config is + used for search semantic retrieval. The + retrieval is based on the dot product of + `SearchRequest.EmbeddingSpec.EmbeddingVector.vector + `__ + and the document embeddings that are provided by + this EmbeddingConfig. If + `SearchRequest.EmbeddingSpec.EmbeddingVector.vector + `__ is provided, it overrides this - [ServingConfig.embedding_config][google.cloud.discoveryengine.v1alpha.ServingConfig.embedding_config]. + `ServingConfig.embedding_config + `__. ranking_expression (str): - The ranking expression controls the customized ranking on - retrieval documents. To leverage this, document embedding is - required. The ranking expression setting in ServingConfig - applies to all search requests served by the serving config. - However, if - [SearchRequest.ranking_expression][google.cloud.discoveryengine.v1alpha.SearchRequest.ranking_expression] - is specified, it overrides the ServingConfig ranking - expression. - - The ranking expression is a single function or multiple - functions that are joined by "+". - - - ranking_expression = function, { " + ", function }; + The ranking expression controls the customized + ranking on retrieval documents. To leverage + this, document embedding is required. The + ranking expression setting in ServingConfig + applies to all search requests served by the + serving config. However, if + `SearchRequest.ranking_expression + `__ + is specified, it overrides the ServingConfig + ranking expression. + + The ranking expression is a single function or + multiple functions that are joined by "+". + + * ranking_expression = function, { " + ", + function }; Supported functions: - - double \* relevance_score - - double \* dotProduct(embedding_field_path) + * double * relevance_score + * double * dotProduct(embedding_field_path) Function variables: - - ``relevance_score``: pre-defined keywords, used for - measure relevance between query and document. - - ``embedding_field_path``: the document embedding field - used with query embedding vector. - - ``dotProduct``: embedding function between - embedding_field_path and query embedding vector. + * ``relevance_score``: pre-defined keywords, + used for measure relevance between query and + document. + + * ``embedding_field_path``: the document + embedding field used with query embedding + vector. - Example ranking expression: + * ``dotProduct``: embedding function between + embedding_field_path and query embedding + vector. - :: + Example ranking expression: - If document has an embedding field doc_embedding, the ranking expression - could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`. + If document has an embedding field + doc_embedding, the ranking expression could + be ``0.5 * relevance_score + 0.3 * + dotProduct(doc_embedding)``. guided_search_spec (google.cloud.discoveryengine_v1alpha.types.GuidedSearchSpec): Guided search configs. custom_fine_tuning_spec (google.cloud.discoveryengine_v1alpha.types.CustomFineTuningSpec): - Custom fine tuning configs. If - [SearchRequest.custom_fine_tuning_spec][google.cloud.discoveryengine.v1alpha.SearchRequest.custom_fine_tuning_spec] - is set, it has higher priority than the configs set here. + Custom fine tuning configs. + If + `SearchRequest.custom_fine_tuning_spec + `__ + is set, it has higher priority than the configs + set here. create_time (google.protobuf.timestamp_pb2.Timestamp): Output only. ServingConfig created timestamp. update_time (google.protobuf.timestamp_pb2.Timestamp): @@ -163,52 +183,64 @@ class ServingConfig(proto.Message): the serving config. Maximum of 20 boost controls. redirect_control_ids (MutableSequence[str]): - IDs of the redirect controls. Only the first triggered - redirect action is applied, even if multiple apply. Maximum - number of specifications is 100. + IDs of the redirect controls. Only the first + triggered redirect action is applied, even if + multiple apply. Maximum number of specifications + is 100. Can only be set if - [SolutionType][google.cloud.discoveryengine.v1alpha.SolutionType] - is - [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_SEARCH]. + `SolutionType + `__ + is `SOLUTION_TYPE_SEARCH + `__. synonyms_control_ids (MutableSequence[str]): - Condition synonyms specifications. If multiple synonyms - conditions match, all matching synonyms controls in the list - will execute. Maximum number of specifications is 100. + Condition synonyms specifications. If multiple + synonyms conditions match, all matching synonyms + controls in the list will execute. Maximum + number of specifications is 100. Can only be set if - [SolutionType][google.cloud.discoveryengine.v1alpha.SolutionType] - is - [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_SEARCH]. + `SolutionType + `__ + is `SOLUTION_TYPE_SEARCH + `__. oneway_synonyms_control_ids (MutableSequence[str]): - Condition oneway synonyms specifications. If multiple oneway - synonyms conditions match, all matching oneway synonyms - controls in the list will execute. Maximum number of - specifications is 100. + Condition oneway synonyms specifications. If + multiple oneway synonyms conditions match, all + matching oneway synonyms controls in the list + will execute. Maximum number of specifications + is 100. Can only be set if - [SolutionType][google.cloud.discoveryengine.v1alpha.SolutionType] - is - [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_SEARCH]. + `SolutionType + `__ + is `SOLUTION_TYPE_SEARCH + `__. dissociate_control_ids (MutableSequence[str]): - Condition do not associate specifications. If multiple do - not associate conditions match, all matching do not - associate controls in the list will execute. Order does not - matter. Maximum number of specifications is 100. + Condition do not associate specifications. If + multiple do not associate conditions match, all + matching do not associate controls in the list + will execute. + Order does not matter. + Maximum number of specifications is 100. Can only be set if - [SolutionType][google.cloud.discoveryengine.v1alpha.SolutionType] - is - [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_SEARCH]. + `SolutionType + `__ + is `SOLUTION_TYPE_SEARCH + `__. replacement_control_ids (MutableSequence[str]): - Condition replacement specifications. Applied according to - the order in the list. A previously replaced term can not be - re-replaced. Maximum number of specifications is 100. + Condition replacement specifications. + Applied according to the order in the list. + A previously replaced term can not be + re-replaced. Maximum number of specifications is + 100. Can only be set if - [SolutionType][google.cloud.discoveryengine.v1alpha.SolutionType] - is - [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_SEARCH]. + `SolutionType + `__ + is `SOLUTION_TYPE_SEARCH + `__. ignore_control_ids (MutableSequence[str]): Condition ignore specifications. If multiple ignore conditions match, all matching ignore @@ -218,23 +250,25 @@ class ServingConfig(proto.Message): """ class MediaConfig(proto.Message): - r"""Specifies the configurations needed for Media Discovery. Currently - we support: - - - ``demote_content_watched``: Threshold for watched content - demotion. Customers can specify if using watched content demotion - or use viewed detail page. Using the content watched demotion, - customers need to specify the watched minutes or percentage - exceeds the threshold, the content will be demoted in the - recommendation result. - - ``promote_fresh_content``: cutoff days for fresh content - promotion. Customers can specify if using content freshness - promotion. If the content was published within the cutoff days, - the content will be promoted in the recommendation result. Can - only be set if - [SolutionType][google.cloud.discoveryengine.v1alpha.SolutionType] - is - [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. + r"""Specifies the configurations needed for Media Discovery. + Currently we support: + + * ``demote_content_watched``: Threshold for watched content + demotion. Customers can specify if using watched content + demotion or use viewed detail page. Using the content watched + demotion, customers need to specify the watched minutes or + percentage exceeds the threshold, the content will be demoted in + the recommendation result. + + * ``promote_fresh_content``: cutoff days for fresh content + promotion. Customers can specify if using content freshness + promotion. If the content was published within the cutoff days, + the content will be promoted in the recommendation result. + Can only be set if + `SolutionType + `__ is + `SOLUTION_TYPE_RECOMMENDATION + `__. This message has `oneof`_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. @@ -245,9 +279,9 @@ class MediaConfig(proto.Message): Attributes: content_watched_percentage_threshold (float): - Specifies the content watched percentage threshold for - demotion. Threshold value must be between [0, 1.0] - inclusive. + Specifies the content watched percentage + threshold for demotion. Threshold value must be + between [0, 1.0] inclusive. This field is a member of `oneof`_ ``demote_content_watched``. content_watched_seconds_threshold (float): @@ -256,17 +290,20 @@ class MediaConfig(proto.Message): This field is a member of `oneof`_ ``demote_content_watched``. demotion_event_type (str): - Specifies the event type used for demoting recommendation - result. Currently supported values: + Specifies the event type used for demoting + recommendation result. Currently supported + values: + + * ``view-item``: Item viewed. + * ``media-play``: Start/resume watching a video, + playing a song, etc. - - ``view-item``: Item viewed. - - ``media-play``: Start/resume watching a video, playing a - song, etc. - - ``media-complete``: Finished or stopped midway through a - video, song, etc. + * ``media-complete``: Finished or stopped midway + through a video, song, etc. - If unset, watch history demotion will not be applied. - Content freshness demotion will still be applied. + If unset, watch history demotion will not be + applied. Content freshness demotion will still + be applied. content_freshness_cutoff_days (int): Specifies the content freshness used for recommendation result. Contents will be demoted @@ -294,10 +331,11 @@ class MediaConfig(proto.Message): ) class GenericConfig(proto.Message): - r"""Specifies the configurations needed for Generic Discovery.Currently - we support: + r"""Specifies the configurations needed for Generic + Discovery.Currently we support: - - ``content_search_spec``: configuration for generic content search. + * ``content_search_spec``: configuration for generic content + search. Attributes: content_search_spec (google.cloud.discoveryengine_v1alpha.types.SearchRequest.ContentSearchSpec): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/serving_config_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/serving_config_service.py index 40b86435dce1..2c08ed12b5f7 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/serving_config_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/serving_config_service.py @@ -43,10 +43,12 @@ class UpdateServingConfigRequest(proto.Message): Required. The ServingConfig to update. update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided - [ServingConfig][google.cloud.discoveryengine.v1alpha.ServingConfig] + `ServingConfig + `__ to update. The following are NOT supported: - - [ServingConfig.name][google.cloud.discoveryengine.v1alpha.ServingConfig.name] + * `ServingConfig.name + `__ If not set, all supported fields are updated. """ @@ -68,8 +70,8 @@ class GetServingConfigRequest(proto.Message): Attributes: name (str): - Required. The resource name of the ServingConfig to get. - Format: + Required. The resource name of the ServingConfig + to get. Format: ``projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config_id}`` """ @@ -84,7 +86,8 @@ class ListServingConfigsRequest(proto.Message): Attributes: parent (str): - Required. Full resource name of the parent resource. Format: + Required. Full resource name of the parent + resource. Format: ``projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}`` page_size (int): Optional. Maximum number of results to @@ -93,8 +96,8 @@ class ListServingConfigsRequest(proto.Message): results are returned. page_token (str): Optional. A page token, received from a previous - ``ListServingConfigs`` call. Provide this to retrieve the - subsequent page. + ``ListServingConfigs`` call. Provide this to + retrieve the subsequent page. """ parent: str = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/session.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/session.py index a4ebfbde229b..dfc3b3ae5a2d 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/session.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/session.py @@ -123,11 +123,13 @@ class Turn(proto.Message): call) happened in this turn. detailed_answer (google.cloud.discoveryengine_v1alpha.types.Answer): Output only. In - [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1alpha.ConversationalSearchService.GetSession] + `ConversationalSearchService.GetSession + `__ API, if - [GetSessionRequest.include_answer_details][google.cloud.discoveryengine.v1alpha.GetSessionRequest.include_answer_details] - is set to true, this field will be populated when getting - answer query session. + `GetSessionRequest.include_answer_details + `__ + is set to true, this field will be populated + when getting answer query session. query_config (MutableMapping[str, str]): Optional. Represents metadata related to the query config, for example LLM model and version @@ -486,21 +488,26 @@ class FileMetadata(proto.Message): used. download_uri (str): Output only. The - [AssistantService.DownloadSessionFile][google.cloud.discoveryengine.v1alpha.AssistantService.DownloadSessionFile] - URL to download the file. This URL will need the same - credentials as - [AssistantService.ListSessionFileMetadata][google.cloud.discoveryengine.v1alpha.AssistantService.ListSessionFileMetadata] + `AssistantService.DownloadSessionFile + `__ + URL to download the file. This URL will need the + same credentials as + `AssistantService.ListSessionFileMetadata + `__ method and will provide the resource. file_origin_type (google.cloud.discoveryengine_v1alpha.types.FileOriginType): Optional. The origin of the file. views (MutableMapping[str, google.cloud.discoveryengine_v1alpha.types.FileView]): - Output only. Alternate views of this file object. Each file - view is attached to a specific role. Possible example keys: + Output only. Alternate views of this file + object. Each file view is attached to a specific + role. Possible example keys: - "thumbnail" - - "mobile_thumbnail" + - "mobile_thumbnail" + - "clip" - - "summary" + - "summary" + - "translation". """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/session_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/session_service.py index 30f221be13d0..2e2285805418 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/session_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/session_service.py @@ -32,49 +32,60 @@ class ListFilesRequest(proto.Message): r"""Request message for - [SessionService.ListFiles][google.cloud.discoveryengine.v1alpha.SessionService.ListFiles] + `SessionService.ListFiles + `__ method. Attributes: parent (str): - Required. The resource name of the Session. Format: + Required. The resource name of the Session. + Format: + ``projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}`` - Name of the session resource to which the file belong. + Name of the session resource to which the file + belong. filter (str): - Optional. The filter syntax consists of an expression - language for constructing a predicate from one or more - fields of the files being filtered. Filter expression is - case-sensitive. Currently supported field names are: + Optional. The filter syntax consists of an + expression language for constructing a predicate + from one or more fields of the files being + filtered. Filter expression is case-sensitive. + Currently supported field names are: + + * upload_time + * last_add_time - - upload_time - - last_add_time - - last_use_time - - file_name - - mime_type + * last_use_time + * file_name + + * mime_type Some examples of filters would be: - - "file_name = 'file_1'" - - "file_name = 'file_1' AND mime_type = 'text/plain'" - - "last_use_time > '2025-06-14T12:00:00Z'" + * "file_name = 'file_1'" + * "file_name = 'file_1' AND mime_type = + 'text/plain'" + + * "last_use_time > '2025-06-14T12:00:00Z'" - For a full description of the filter format, please see - https://google.aip.dev/160. + For a full description of the filter format, + please see https://google.aip.dev/160. page_size (int): - Optional. The maximum number of files to return. The service - may return fewer than this value. If unspecified, at most - 100 files will be returned. The maximum value is 1000; - values above 1000 will be coerced to 1000. If user specifies - a value less than or equal to 0 - the request will be - rejected with an INVALID_ARGUMENT error. + Optional. The maximum number of files to return. + The service may return fewer than this value. If + unspecified, at most 100 files will be returned. + The maximum value is 1000; values above 1000 + will be coerced to 1000. If user specifies a + value less than or equal to 0 - the request will + be rejected with an INVALID_ARGUMENT error. page_token (str): Optional. A page token received from a previous - ``ListFiles`` call. Provide this to retrieve the subsequent - page. + ``ListFiles`` call. Provide this to retrieve the + subsequent page. - When paginating, all other parameters provided to - ``ListFiles`` must match the call that provided the page - token (except ``page_size``, which may differ). + When paginating, all other parameters provided + to ``ListFiles`` must match the call that + provided the page token (except ``page_size``, + which may differ). """ parent: str = proto.Field( @@ -97,19 +108,21 @@ class ListFilesRequest(proto.Message): class ListFilesResponse(proto.Message): r"""Response message for - [SessionService.ListFiles][google.cloud.discoveryengine.v1alpha.SessionService.ListFiles] + `SessionService.ListFiles + `__ method. Attributes: files (MutableSequence[google.cloud.discoveryengine_v1alpha.types.FileMetadata]): - The - [FileMetadata][google.cloud.discoveryengine.v1alpha.FileMetadata]s. + The `FileMetadata + `__s. next_page_token (str): - A token to retrieve next page of results. Pass this value in - the - [ListFilesRequest.page_token][google.cloud.discoveryengine.v1main.ListFilesRequest.page_token] - field in the subsequent call to ``ListFiles`` method to - retrieve the next page of results. + A token to retrieve next page of results. + Pass this value in the + `ListFilesRequest.page_token + `__ + field in the subsequent call to ``ListFiles`` + method to retrieve the next page of results. """ @property diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/site_search_engine.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/site_search_engine.py index 166338513ae6..8c459a291b31 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/site_search_engine.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/site_search_engine.py @@ -37,8 +37,8 @@ class SiteSearchEngine(proto.Message): Attributes: name (str): - The fully qualified resource name of the site search engine. - Format: + The fully qualified resource name of the site + search engine. Format: ``projects/*/locations/*/dataStores/*/siteSearchEngine`` """ @@ -53,30 +53,34 @@ class TargetSite(proto.Message): Attributes: name (str): - Output only. The fully qualified resource name of the target - site. + Output only. The fully qualified resource name + of the target site. ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}`` The ``target_site_id`` is system-generated. provided_uri_pattern (str): - Required. Input only. The user provided URI pattern from - which the ``generated_uri_pattern`` is generated. + Required. Input only. The user provided URI + pattern from which the ``generated_uri_pattern`` + is generated. type_ (google.cloud.discoveryengine_v1alpha.types.TargetSite.Type): The type of the target site, e.g., whether the site is to be included or excluded. exact_match (bool): - Input only. If set to false, a uri_pattern is generated to - include all pages whose address contains the - provided_uri_pattern. If set to true, an uri_pattern is - generated to try to be an exact match of the - provided_uri_pattern or just the specific page if the - provided_uri_pattern is a specific one. provided_uri_pattern - is always normalized to generate the URI pattern to be used - by the search engine. + Input only. If set to false, a uri_pattern is + generated to include all pages whose address + contains the provided_uri_pattern. If set to + true, an uri_pattern is generated to try to be + an exact match of the provided_uri_pattern or + just the specific page if the + provided_uri_pattern is a specific one. + provided_uri_pattern is always normalized to + generate the URI pattern to be used by the + search engine. generated_uri_pattern (str): - Output only. This is system-generated based on the - provided_uri_pattern. + Output only. This is system-generated based on + the provided_uri_pattern. root_domain_uri (str): - Output only. Root domain of the provided_uri_pattern. + Output only. Root domain of the + provided_uri_pattern. site_verification_info (google.cloud.discoveryengine_v1alpha.types.SiteVerificationInfo): Output only. Site ownership and validity verification status. @@ -94,9 +98,9 @@ class Type(proto.Enum): Values: TYPE_UNSPECIFIED (0): - This value is unused. In this case, server behavior defaults - to - [Type.INCLUDE][google.cloud.discoveryengine.v1alpha.TargetSite.Type.INCLUDE]. + This value is unused. In this case, server + behavior defaults to `Type.INCLUDE + `__. INCLUDE (1): Include the target site. EXCLUDE (2): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/site_search_engine_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/site_search_engine_service.py index a54f73fddbfc..c1778ba6cb1a 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/site_search_engine_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/site_search_engine_service.py @@ -66,19 +66,22 @@ class GetSiteSearchEngineRequest(proto.Message): r"""Request message for - [SiteSearchEngineService.GetSiteSearchEngine][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.GetSiteSearchEngine] + `SiteSearchEngineService.GetSiteSearchEngine + `__ method. Attributes: name (str): Required. Resource name of - [SiteSearchEngine][google.cloud.discoveryengine.v1alpha.SiteSearchEngine], + `SiteSearchEngine + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine``. - If the caller does not have permission to access the - [SiteSearchEngine], regardless of whether or not it exists, - a PERMISSION_DENIED error is returned. + If the caller does not have permission to access + the [SiteSearchEngine], regardless of whether or + not it exists, a PERMISSION_DENIED error is + returned. """ name: str = proto.Field( @@ -89,18 +92,20 @@ class GetSiteSearchEngineRequest(proto.Message): class CreateTargetSiteRequest(proto.Message): r"""Request message for - [SiteSearchEngineService.CreateTargetSite][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.CreateTargetSite] + `SiteSearchEngineService.CreateTargetSite + `__ method. Attributes: parent (str): Required. Parent resource name of - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite], + `TargetSite + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine``. target_site (google.cloud.discoveryengine_v1alpha.types.TargetSite): - Required. The - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite] + Required. The `TargetSite + `__ to create. """ @@ -117,7 +122,8 @@ class CreateTargetSiteRequest(proto.Message): class CreateTargetSiteMetadata(proto.Message): r"""Metadata related to the progress of the - [SiteSearchEngineService.CreateTargetSite][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.CreateTargetSite] + `SiteSearchEngineService.CreateTargetSite + `__ operation. This will be returned by the google.longrunning.Operation.metadata field. @@ -143,16 +149,18 @@ class CreateTargetSiteMetadata(proto.Message): class BatchCreateTargetSitesRequest(proto.Message): r"""Request message for - [SiteSearchEngineService.BatchCreateTargetSites][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.BatchCreateTargetSites] + `SiteSearchEngineService.BatchCreateTargetSites + `__ method. Attributes: parent (str): - Required. The parent resource shared by all TargetSites - being created. + Required. The parent resource shared by all + TargetSites being created. ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine``. - The parent field in the CreateBookRequest messages must - either be empty or match this field. + The parent field in the CreateBookRequest + messages must either be empty or match this + field. requests (MutableSequence[google.cloud.discoveryengine_v1alpha.types.CreateTargetSiteRequest]): Required. The request message specifying the resources to create. A maximum of 20 TargetSites @@ -172,23 +180,27 @@ class BatchCreateTargetSitesRequest(proto.Message): class GetTargetSiteRequest(proto.Message): r"""Request message for - [SiteSearchEngineService.GetTargetSite][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.GetTargetSite] + `SiteSearchEngineService.GetTargetSite + `__ method. Attributes: name (str): Required. Full resource name of - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite], + `TargetSite + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}``. - If the caller does not have permission to access the - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite], - regardless of whether or not it exists, a PERMISSION_DENIED - error is returned. + If the caller does not have permission to access + the `TargetSite + `__, + regardless of whether or not it exists, a + PERMISSION_DENIED error is returned. If the requested - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite] + `TargetSite + `__ does not exist, a NOT_FOUND error is returned. """ @@ -200,20 +212,23 @@ class GetTargetSiteRequest(proto.Message): class UpdateTargetSiteRequest(proto.Message): r"""Request message for - [SiteSearchEngineService.UpdateTargetSite][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.UpdateTargetSite] + `SiteSearchEngineService.UpdateTargetSite + `__ method. Attributes: target_site (google.cloud.discoveryengine_v1alpha.types.TargetSite): - Required. The target site to update. If the caller does not - have permission to update the - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite], - regardless of whether or not it exists, a PERMISSION_DENIED - error is returned. - - If the - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite] - to update does not exist, a NOT_FOUND error is returned. + Required. The target site to update. + If the caller does not have permission to update + the `TargetSite + `__, + regardless of whether or not it exists, a + PERMISSION_DENIED error is returned. + + If the `TargetSite + `__ + to update does not exist, a NOT_FOUND error is + returned. """ target_site: gcd_site_search_engine.TargetSite = proto.Field( @@ -225,7 +240,8 @@ class UpdateTargetSiteRequest(proto.Message): class UpdateTargetSiteMetadata(proto.Message): r"""Metadata related to the progress of the - [SiteSearchEngineService.UpdateTargetSite][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.UpdateTargetSite] + `SiteSearchEngineService.UpdateTargetSite + `__ operation. This will be returned by the google.longrunning.Operation.metadata field. @@ -251,23 +267,27 @@ class UpdateTargetSiteMetadata(proto.Message): class DeleteTargetSiteRequest(proto.Message): r"""Request message for - [SiteSearchEngineService.DeleteTargetSite][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.DeleteTargetSite] + `SiteSearchEngineService.DeleteTargetSite + `__ method. Attributes: name (str): Required. Full resource name of - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite], + `TargetSite + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}``. - If the caller does not have permission to access the - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite], - regardless of whether or not it exists, a PERMISSION_DENIED - error is returned. + If the caller does not have permission to access + the `TargetSite + `__, + regardless of whether or not it exists, a + PERMISSION_DENIED error is returned. If the requested - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite] + `TargetSite + `__ does not exist, a NOT_FOUND error is returned. """ @@ -279,7 +299,8 @@ class DeleteTargetSiteRequest(proto.Message): class DeleteTargetSiteMetadata(proto.Message): r"""Metadata related to the progress of the - [SiteSearchEngineService.DeleteTargetSite][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.DeleteTargetSite] + `SiteSearchEngineService.DeleteTargetSite + `__ operation. This will be returned by the google.longrunning.Operation.metadata field. @@ -305,34 +326,39 @@ class DeleteTargetSiteMetadata(proto.Message): class ListTargetSitesRequest(proto.Message): r"""Request message for - [SiteSearchEngineService.ListTargetSites][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.ListTargetSites] + `SiteSearchEngineService.ListTargetSites + `__ method. Attributes: parent (str): - Required. The parent site search engine resource name, such - as + Required. The parent site search engine resource + name, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine``. If the caller does not have permission to list - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite]s - under this site search engine, regardless of whether or not - this branch exists, a PERMISSION_DENIED error is returned. + `TargetSite + `__s + under this site search engine, regardless of + whether or not this branch exists, a + PERMISSION_DENIED error is returned. page_size (int): - Requested page size. Server may return fewer items than - requested. If unspecified, server will pick an appropriate - default. The maximum value is 1000; values above 1000 will - be coerced to 1000. + Requested page size. Server may return fewer + items than requested. If unspecified, server + will pick an appropriate default. The maximum + value is 1000; values above 1000 will be coerced + to 1000. - If this field is negative, an INVALID_ARGUMENT error is - returned. + If this field is negative, an INVALID_ARGUMENT + error is returned. page_token (str): - A page token, received from a previous ``ListTargetSites`` - call. Provide this to retrieve the subsequent page. + A page token, received from a previous + ``ListTargetSites`` call. Provide this to + retrieve the subsequent page. - When paginating, all other parameters provided to - ``ListTargetSites`` must match the call that provided the - page token. + When paginating, all other parameters provided + to ``ListTargetSites`` must match the call that + provided the page token. """ parent: str = proto.Field( @@ -351,16 +377,17 @@ class ListTargetSitesRequest(proto.Message): class ListTargetSitesResponse(proto.Message): r"""Response message for - [SiteSearchEngineService.ListTargetSites][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.ListTargetSites] + `SiteSearchEngineService.ListTargetSites + `__ method. Attributes: target_sites (MutableSequence[google.cloud.discoveryengine_v1alpha.types.TargetSite]): List of TargetSites. next_page_token (str): - A token that can be sent as ``page_token`` to retrieve the - next page. If this field is omitted, there are no subsequent - pages. + A token that can be sent as ``page_token`` to + retrieve the next page. If this field is + omitted, there are no subsequent pages. total_size (int): The total number of items matching the request. This will always be populated in the @@ -390,7 +417,8 @@ def raw_page(self): class BatchCreateTargetSiteMetadata(proto.Message): r"""Metadata related to the progress of the - [SiteSearchEngineService.BatchCreateTargetSites][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.BatchCreateTargetSites] + `SiteSearchEngineService.BatchCreateTargetSites + `__ operation. This will be returned by the google.longrunning.Operation.metadata field. @@ -416,7 +444,8 @@ class BatchCreateTargetSiteMetadata(proto.Message): class BatchCreateTargetSitesResponse(proto.Message): r"""Response message for - [SiteSearchEngineService.BatchCreateTargetSites][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.BatchCreateTargetSites] + `SiteSearchEngineService.BatchCreateTargetSites + `__ method. Attributes: @@ -435,13 +464,15 @@ class BatchCreateTargetSitesResponse(proto.Message): class EnableAdvancedSiteSearchRequest(proto.Message): r"""Request message for - [SiteSearchEngineService.EnableAdvancedSiteSearch][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.EnableAdvancedSiteSearch] + `SiteSearchEngineService.EnableAdvancedSiteSearch + `__ method. Attributes: site_search_engine (str): Required. Full resource name of the - [SiteSearchEngine][google.cloud.discoveryengine.v1alpha.SiteSearchEngine], + `SiteSearchEngine + `__, such as ``projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSearchEngine``. """ @@ -454,7 +485,8 @@ class EnableAdvancedSiteSearchRequest(proto.Message): class EnableAdvancedSiteSearchResponse(proto.Message): r"""Response message for - [SiteSearchEngineService.EnableAdvancedSiteSearch][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.EnableAdvancedSiteSearch] + `SiteSearchEngineService.EnableAdvancedSiteSearch + `__ method. """ @@ -462,7 +494,8 @@ class EnableAdvancedSiteSearchResponse(proto.Message): class EnableAdvancedSiteSearchMetadata(proto.Message): r"""Metadata related to the progress of the - [SiteSearchEngineService.EnableAdvancedSiteSearch][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.EnableAdvancedSiteSearch] + `SiteSearchEngineService.EnableAdvancedSiteSearch + `__ operation. This will be returned by the google.longrunning.Operation.metadata field. @@ -488,13 +521,15 @@ class EnableAdvancedSiteSearchMetadata(proto.Message): class DisableAdvancedSiteSearchRequest(proto.Message): r"""Request message for - [SiteSearchEngineService.DisableAdvancedSiteSearch][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.DisableAdvancedSiteSearch] + `SiteSearchEngineService.DisableAdvancedSiteSearch + `__ method. Attributes: site_search_engine (str): Required. Full resource name of the - [SiteSearchEngine][google.cloud.discoveryengine.v1alpha.SiteSearchEngine], + `SiteSearchEngine + `__, such as ``projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSearchEngine``. """ @@ -507,7 +542,8 @@ class DisableAdvancedSiteSearchRequest(proto.Message): class DisableAdvancedSiteSearchResponse(proto.Message): r"""Response message for - [SiteSearchEngineService.DisableAdvancedSiteSearch][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.DisableAdvancedSiteSearch] + `SiteSearchEngineService.DisableAdvancedSiteSearch + `__ method. """ @@ -515,7 +551,8 @@ class DisableAdvancedSiteSearchResponse(proto.Message): class DisableAdvancedSiteSearchMetadata(proto.Message): r"""Metadata related to the progress of the - [SiteSearchEngineService.DisableAdvancedSiteSearch][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.DisableAdvancedSiteSearch] + `SiteSearchEngineService.DisableAdvancedSiteSearch + `__ operation. This will be returned by the google.longrunning.Operation.metadata field. @@ -541,20 +578,23 @@ class DisableAdvancedSiteSearchMetadata(proto.Message): class RecrawlUrisRequest(proto.Message): r"""Request message for - [SiteSearchEngineService.RecrawlUris][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.RecrawlUris] + `SiteSearchEngineService.RecrawlUris + `__ method. Attributes: site_search_engine (str): Required. Full resource name of the - [SiteSearchEngine][google.cloud.discoveryengine.v1alpha.SiteSearchEngine], + `SiteSearchEngine + `__, such as ``projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine``. uris (MutableSequence[str]): - Required. List of URIs to crawl. At most 10K URIs are - supported, otherwise an INVALID_ARGUMENT error is thrown. - Each URI should match at least one - [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite] + Required. List of URIs to crawl. At most 10K + URIs are supported, otherwise an + INVALID_ARGUMENT error is thrown. Each URI + should match at least one `TargetSite + `__ in ``site_search_engine``. """ @@ -570,12 +610,14 @@ class RecrawlUrisRequest(proto.Message): class RecrawlUrisResponse(proto.Message): r"""Response message for - [SiteSearchEngineService.RecrawlUris][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.RecrawlUris] + `SiteSearchEngineService.RecrawlUris + `__ method. Attributes: failure_samples (MutableSequence[google.cloud.discoveryengine_v1alpha.types.RecrawlUrisResponse.FailureInfo]): - Details for a sample of up to 10 ``failed_uris``. + Details for a sample of up to 10 + ``failed_uris``. failed_uris (MutableSequence[str]): URIs that were not crawled before the LRO terminated. @@ -659,7 +701,8 @@ class CorpusType(proto.Enum): class RecrawlUrisMetadata(proto.Message): r"""Metadata related to the progress of the - [SiteSearchEngineService.RecrawlUris][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.RecrawlUris] + `SiteSearchEngineService.RecrawlUris + `__ operation. This will be returned by the google.longrunning.Operation.metadata field. @@ -675,8 +718,8 @@ class RecrawlUrisMetadata(proto.Message): TargetSites that haven't been fully indexed, or match a TargetSite with type EXCLUDE. valid_uris_count (int): - Total number of unique URIs in the request that are not in - invalid_uris. + Total number of unique URIs in the request that + are not in invalid_uris. success_count (int): Total number of URIs that have been crawled so far. @@ -722,13 +765,14 @@ class RecrawlUrisMetadata(proto.Message): class BatchVerifyTargetSitesRequest(proto.Message): r"""Request message for - [SiteSearchEngineService.BatchVerifyTargetSites][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.BatchVerifyTargetSites] + `SiteSearchEngineService.BatchVerifyTargetSites + `__ method. Attributes: parent (str): - Required. The parent resource shared by all TargetSites - being verified. + Required. The parent resource shared by all + TargetSites being verified. ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine``. """ @@ -740,7 +784,8 @@ class BatchVerifyTargetSitesRequest(proto.Message): class BatchVerifyTargetSitesResponse(proto.Message): r"""Response message for - [SiteSearchEngineService.BatchVerifyTargetSites][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.BatchVerifyTargetSites] + `SiteSearchEngineService.BatchVerifyTargetSites + `__ method. """ @@ -748,7 +793,8 @@ class BatchVerifyTargetSitesResponse(proto.Message): class BatchVerifyTargetSitesMetadata(proto.Message): r"""Metadata related to the progress of the - [SiteSearchEngineService.BatchVerifyTargetSites][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.BatchVerifyTargetSites] + `SiteSearchEngineService.BatchVerifyTargetSites + `__ operation. This will be returned by the google.longrunning.Operation.metadata field. @@ -774,30 +820,33 @@ class BatchVerifyTargetSitesMetadata(proto.Message): class FetchDomainVerificationStatusRequest(proto.Message): r"""Request message for - [SiteSearchEngineService.FetchDomainVerificationStatus][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.FetchDomainVerificationStatus] + `SiteSearchEngineService.FetchDomainVerificationStatus + `__ method. Attributes: site_search_engine (str): - Required. The site search engine resource under which we - fetch all the domain verification status. + Required. The site search engine resource under + which we fetch all the domain verification + status. ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine``. page_size (int): - Requested page size. Server may return fewer items than - requested. If unspecified, server will pick an appropriate - default. The maximum value is 1000; values above 1000 will - be coerced to 1000. + Requested page size. Server may return fewer + items than requested. If unspecified, server + will pick an appropriate default. The maximum + value is 1000; values above 1000 will be coerced + to 1000. - If this field is negative, an INVALID_ARGUMENT error is - returned. + If this field is negative, an INVALID_ARGUMENT + error is returned. page_token (str): A page token, received from a previous - ``FetchDomainVerificationStatus`` call. Provide this to - retrieve the subsequent page. + ``FetchDomainVerificationStatus`` call. Provide + this to retrieve the subsequent page. - When paginating, all other parameters provided to - ``FetchDomainVerificationStatus`` must match the call that - provided the page token. + When paginating, all other parameters provided + to ``FetchDomainVerificationStatus`` must match + the call that provided the page token. """ site_search_engine: str = proto.Field( @@ -816,7 +865,8 @@ class FetchDomainVerificationStatusRequest(proto.Message): class FetchDomainVerificationStatusResponse(proto.Message): r"""Response message for - [SiteSearchEngineService.FetchDomainVerificationStatus][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.FetchDomainVerificationStatus] + `SiteSearchEngineService.FetchDomainVerificationStatus + `__ method. Attributes: @@ -824,9 +874,9 @@ class FetchDomainVerificationStatusResponse(proto.Message): List of TargetSites containing the site verification status. next_page_token (str): - A token that can be sent as ``page_token`` to retrieve the - next page. If this field is omitted, there are no subsequent - pages. + A token that can be sent as ``page_token`` to + retrieve the next page. If this field is + omitted, there are no subsequent pages. total_size (int): The total number of items matching the request. This will always be populated in the @@ -856,38 +906,57 @@ def raw_page(self): class SetUriPatternDocumentDataRequest(proto.Message): r"""Request message for - [SiteSearchEngineService.SetUriPatternDocumentData][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.SetUriPatternDocumentData] + `SiteSearchEngineService.SetUriPatternDocumentData + `__ method. Attributes: site_search_engine (str): Required. Full resource name of the - [SiteSearchEngine][google.cloud.discoveryengine.v1alpha.SiteSearchEngine], + `SiteSearchEngine + `__, such as ``projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine``. document_data_map (MutableMapping[str, google.protobuf.struct_pb2.Struct]): - Document data keyed by URI pattern. Each entry must be - consistent with the - [Schema][google.cloud.discoveryengine.v1alpha.Schema]. For - example: - [Schema][google.cloud.discoveryengine.v1alpha.Schema] = { - "type": "object", "properties": { "Categories": { "type": - "array", "items": { "retrievable": true, "type": "string" } - } } - - document_data_map = { "www.url1.com/*": { "Categories": - ["category1", "category2"] }, "www.url2.com/*": { - "Categories": ["category3"] } } + Document data keyed by URI pattern. Each entry + must be consistent with the `Schema + `__. + For example: + + `Schema + `__ + = { "type": "object", + "properties": { + "Categories": { + "type": "array", + "items": { + "retrievable": true, + "type": "string" + } + } + } + + document_data_map = { + "www.url1.com/*": { + "Categories": ["category1", "category2"] + }, + "www.url2.com/*": { + "Categories": ["category3"] + } + } empty_document_data_map (bool): If true, clears the document data map. If true, - [SetUriPatternDocumentDataRequest.document_data_map][google.cloud.discoveryengine.v1alpha.SetUriPatternDocumentDataRequest.document_data_map] + `SetUriPatternDocumentDataRequest.document_data_map + `__ must be empty. schema (google.protobuf.struct_pb2.Struct): Optional. If not provided, the current - [Schema][google.cloud.discoveryengine.v1alpha.Schema] is - used. If provided, validates and updates the - [Schema][google.cloud.discoveryengine.v1alpha.Schema]. If - validation fails, an error is returned. + `Schema + `__ + is used. If provided, validates and updates the + `Schema + `__. + If validation fails, an error is returned. """ site_search_engine: str = proto.Field( @@ -913,7 +982,8 @@ class SetUriPatternDocumentDataRequest(proto.Message): class SetUriPatternDocumentDataResponse(proto.Message): r"""Response message for - [SiteSearchEngineService.SetUriPatternDocumentData][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.SetUriPatternDocumentData] + `SiteSearchEngineService.SetUriPatternDocumentData + `__ method. """ @@ -921,7 +991,8 @@ class SetUriPatternDocumentDataResponse(proto.Message): class SetUriPatternDocumentDataMetadata(proto.Message): r"""Metadata related to the progress of the - [SiteSearchEngineService.SetUriPatternDocumentData][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.SetUriPatternDocumentData] + `SiteSearchEngineService.SetUriPatternDocumentData + `__ operation. This will be returned by the google.longrunning.Operation.metadata field. @@ -947,13 +1018,15 @@ class SetUriPatternDocumentDataMetadata(proto.Message): class GetUriPatternDocumentDataRequest(proto.Message): r"""Request message for - [SiteSearchEngineService.GetUriPatternDocumentData][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.GetUriPatternDocumentData] + `SiteSearchEngineService.GetUriPatternDocumentData + `__ method. Attributes: site_search_engine (str): Required. Full resource name of the - [SiteSearchEngine][google.cloud.discoveryengine.v1alpha.SiteSearchEngine], + `SiteSearchEngine + `__, such as ``projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine``. """ @@ -966,15 +1039,21 @@ class GetUriPatternDocumentDataRequest(proto.Message): class GetUriPatternDocumentDataResponse(proto.Message): r"""Response message for - [SiteSearchEngineService.GetUriPatternDocumentData][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.GetUriPatternDocumentData] + `SiteSearchEngineService.GetUriPatternDocumentData + `__ method. Attributes: document_data_map (MutableMapping[str, google.protobuf.struct_pb2.Struct]): Document data keyed by URI pattern. For example: - document_data_map = { "www.url1.com/*": { "Categories": - ["category1", "category2"] }, "www.url2.com/*": { - "Categories": ["category3"] } } + document_data_map = { + "www.url1.com/*": { + "Categories": ["category1", "category2"] + }, + "www.url2.com/*": { + "Categories": ["category3"] + } + } """ document_data_map: MutableMapping[str, struct_pb2.Struct] = proto.MapField( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/user_event.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/user_event.py index 8b04f0b4a5ba..34394c51629d 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/user_event.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/user_event.py @@ -49,189 +49,226 @@ class UserEvent(proto.Message): Generic values: - - ``search``: Search for Documents. - - ``view-item``: Detailed page view of a Document. - - ``view-item-list``: View of a panel or ordered list of - Documents. - - ``view-home-page``: View of the home page. - - ``view-category-page``: View of a category page, e.g. Home - > Men > Jeans + * ``search``: Search for Documents. + * ``view-item``: Detailed page view of a + Document. + + * ``view-item-list``: View of a panel or ordered + list of Documents. * ``view-home-page``: View of + the home page. + + * ``view-category-page``: View of a category + page, e.g. Home > Men > Jeans Retail-related values: - - ``add-to-cart``: Add an item(s) to cart, e.g. in Retail - online shopping - - ``purchase``: Purchase an item(s) + * ``add-to-cart``: Add an item(s) to cart, e.g. + in Retail online shopping * ``purchase``: + Purchase an item(s) Media-related values: - - ``media-play``: Start/resume watching a video, playing a - song, etc. - - ``media-complete``: Finished or stopped midway through a - video, song, etc. + * ``media-play``: Start/resume watching a video, + playing a song, etc. * ``media-complete``: + Finished or stopped midway through a video, + song, etc. user_pseudo_id (str): - Required. A unique identifier for tracking visitors. - - For example, this could be implemented with an HTTP cookie, - which should be able to uniquely identify a visitor on a - single device. This unique identifier should not change if - the visitor log in/out of the website. - - Do not set the field to the same fixed ID for different - users. This mixes the event history of those users together, - which results in degraded model quality. - - The field must be a UTF-8 encoded string with a length limit - of 128 characters. Otherwise, an ``INVALID_ARGUMENT`` error - is returned. + Required. A unique identifier for tracking + visitors. + For example, this could be implemented with an + HTTP cookie, which should be able to uniquely + identify a visitor on a single device. This + unique identifier should not change if the + visitor log in/out of the website. + + Do not set the field to the same fixed ID for + different users. This mixes the event history of + those users together, which results in degraded + model quality. + + The field must be a UTF-8 encoded string with a + length limit of 128 characters. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. - The field should not contain PII or user-data. We recommend - to use Google Analytics `Client - ID `__ + The field should not contain PII or user-data. + We recommend to use Google Analytics `Client + ID + `__ for this field. engine (str): - The [Engine][google.cloud.discoveryengine.v1alpha.Engine] + The `Engine + `__ resource name, in the form of ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}``. Optional. Only required for - [Engine][google.cloud.discoveryengine.v1alpha.Engine] - produced user events. For example, user events from blended - search. + `Engine + `__ + produced user events. For example, user events + from blended search. data_store (str): - The - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] + The `DataStore + `__ resource full name, of the form ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}``. - Optional. Only required for user events whose data store - can't by determined by - [UserEvent.engine][google.cloud.discoveryengine.v1alpha.UserEvent.engine] + Optional. Only required for user events whose + data store can't by determined by + `UserEvent.engine + `__ or - [UserEvent.documents][google.cloud.discoveryengine.v1alpha.UserEvent.documents]. - If data store is set in the parent of write/import/collect - user event requests, this field can be omitted. + `UserEvent.documents + `__. + If data store is set in the parent of + write/import/collect user event requests, this + field can be omitted. event_time (google.protobuf.timestamp_pb2.Timestamp): Only required for - [UserEventService.ImportUserEvents][google.cloud.discoveryengine.v1alpha.UserEventService.ImportUserEvents] - method. Timestamp of when the user event happened. + `UserEventService.ImportUserEvents + `__ + method. Timestamp of when the user event + happened. user_info (google.cloud.discoveryengine_v1alpha.types.UserInfo): Information about the end user. direct_user_request (bool): - Should set to true if the request is made directly from the - end user, in which case the - [UserEvent.user_info.user_agent][google.cloud.discoveryengine.v1alpha.UserInfo.user_agent] + Should set to true if the request is made + directly from the end user, in which case the + `UserEvent.user_info.user_agent + `__ can be populated from the HTTP request. - This flag should be set only if the API request is made - directly from the end user such as a mobile app (and not if - a gateway or a server is processing and pushing the user - events). + This flag should be set only if the API request + is made directly from the end user such as a + mobile app (and not if a gateway or a server is + processing and pushing the user events). - This should not be set when using the JavaScript tag in - [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1alpha.UserEventService.CollectUserEvent]. + This should not be set when using the JavaScript + tag in `UserEventService.CollectUserEvent + `__. session_id (str): - A unique identifier for tracking a visitor session with a - length limit of 128 bytes. A session is an aggregation of an - end user behavior in a time span. + A unique identifier for tracking a visitor + session with a length limit of 128 bytes. A + session is an aggregation of an end user + behavior in a time span. A general guideline to populate the session_id: - 1. If user has no activity for 30 min, a new session_id - should be assigned. - 2. The session_id should be unique across users, suggest use - uuid or add - [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id] - as prefix. + 1. If user has no activity for 30 min, a new + session_id should be assigned. + 2. The session_id should be unique across users, + suggest use uuid or add + `UserEvent.user_pseudo_id + `__ + as prefix. page_info (google.cloud.discoveryengine_v1alpha.types.PageInfo): - Page metadata such as categories and other critical - information for certain event types such as - ``view-category-page``. + Page metadata such as categories and other + critical information for certain event types + such as ``view-category-page``. attribution_token (str): - Token to attribute an API response to user action(s) to - trigger the event. - - Highly recommended for user events that are the result of - [RecommendationService.Recommend][google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend]. - This field enables accurate attribution of recommendation - model performance. + Token to attribute an API response to user + action(s) to trigger the event. + Highly recommended for user events that are the + result of `RecommendationService.Recommend + `__. + This field enables accurate attribution of + recommendation model performance. The value must be one of: - - [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1alpha.RecommendResponse.attribution_token] - for events that are the result of - [RecommendationService.Recommend][google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend]. - - [SearchResponse.attribution_token][google.cloud.discoveryengine.v1alpha.SearchResponse.attribution_token] - for events that are the result of - [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]. - - This token enables us to accurately attribute page view or - conversion completion back to the event and the particular - predict response containing this clicked/purchased product. - If user clicks on product K in the recommendation results, - pass - [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1alpha.RecommendResponse.attribution_token] - as a URL parameter to product K's page. When recording - events on product K's page, log the - [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1alpha.RecommendResponse.attribution_token] + * `RecommendResponse.attribution_token + `__ + for events that are the result of + `RecommendationService.Recommend + `__. + + * `SearchResponse.attribution_token + `__ + for events that are the result of + `SearchService.Search + `__. + + This token enables us to accurately attribute + page view or conversion completion back to the + event and the particular predict response + containing this clicked/purchased product. If + user clicks on product K in the recommendation + results, pass + `RecommendResponse.attribution_token + `__ + as a URL parameter to product K's page. When + recording events on product K's page, log the + `RecommendResponse.attribution_token + `__ to this field. filter (str): - The filter syntax consists of an expression language for - constructing a predicate from one or more fields of the - documents being filtered. + The filter syntax consists of an expression + language for constructing a predicate from one + or more fields of the documents being filtered. - One example is for ``search`` events, the associated - [SearchRequest][google.cloud.discoveryengine.v1alpha.SearchRequest] + One example is for ``search`` events, the + associated `SearchRequest + `__ may contain a filter expression in - [SearchRequest.filter][google.cloud.discoveryengine.v1alpha.SearchRequest.filter] - conforming to https://google.aip.dev/160#filtering. - - Similarly, for ``view-item-list`` events that are generated - from a - [RecommendRequest][google.cloud.discoveryengine.v1alpha.RecommendRequest], + `SearchRequest.filter + `__ + conforming to + https://google.aip.dev/160#filtering. + + Similarly, for ``view-item-list`` events that + are generated from a `RecommendRequest + `__, this field may be populated directly from - [RecommendRequest.filter][google.cloud.discoveryengine.v1alpha.RecommendRequest.filter] - conforming to https://google.aip.dev/160#filtering. + `RecommendRequest.filter + `__ + conforming to + https://google.aip.dev/160#filtering. - The value must be a UTF-8 encoded string with a length limit - of 1,000 characters. Otherwise, an ``INVALID_ARGUMENT`` - error is returned. + The value must be a UTF-8 encoded string with a + length limit of 1,000 characters. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. documents (MutableSequence[google.cloud.discoveryengine_v1alpha.types.DocumentInfo]): - List of - [Document][google.cloud.discoveryengine.v1alpha.Document]s + List of `Document + `__s associated with this user event. - This field is optional except for the following event types: - - - ``view-item`` - - ``add-to-cart`` - - ``purchase`` - - ``media-play`` - - ``media-complete`` - - In a ``search`` event, this field represents the documents - returned to the end user on the current page (the end user - may have not finished browsing the whole page yet). When a - new page is returned to the end user, after - pagination/filtering/ordering even for the same query, a new - ``search`` event with different - [UserEvent.documents][google.cloud.discoveryengine.v1alpha.UserEvent.documents] + This field is optional except for the following + event types: + + * ``view-item`` + * ``add-to-cart`` + + * ``purchase`` + * ``media-play`` + + * ``media-complete`` + + In a ``search`` event, this field represents the + documents returned to the end user on the + current page (the end user may have not finished + browsing the whole page yet). When a new page is + returned to the end user, after + pagination/filtering/ordering even for the same + query, a new ``search`` event with different + `UserEvent.documents + `__ is desired. panel (google.cloud.discoveryengine_v1alpha.types.PanelInfo): Panel metadata associated with this user event. search_info (google.cloud.discoveryengine_v1alpha.types.SearchInfo): - [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search] + `SearchService.Search + `__ details related to the event. This field should be set for ``search`` event. completion_info (google.cloud.discoveryengine_v1alpha.types.CompletionInfo): - [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1alpha.CompletionService.CompleteQuery] + `CompletionService.CompleteQuery + `__ details related to the event. - This field should be set for ``search`` event when - autocomplete function is enabled and the user clicks a - suggestion for search. + This field should be set for ``search`` event + when autocomplete function is enabled and the + user clicks a suggestion for search. transaction_info (google.cloud.discoveryengine_v1alpha.types.TransactionInfo): The transaction metadata (if any) associated with this user event. @@ -245,34 +282,42 @@ class UserEvent(proto.Message): associated with promotions. Currently, this field is restricted to at most one ID. attributes (MutableMapping[str, google.cloud.discoveryengine_v1alpha.types.CustomAttribute]): - Extra user event features to include in the recommendation - model. These attributes must NOT contain data that needs to - be parsed or processed further, e.g. JSON or other - encodings. - - If you provide custom attributes for ingested user events, - also include them in the user events that you associate with - prediction requests. Custom attribute formatting must be - consistent between imported events and events provided with - prediction requests. This lets the Discovery Engine API use - those custom attributes when training models and serving - predictions, which helps improve recommendation quality. - - This field needs to pass all below criteria, otherwise an - ``INVALID_ARGUMENT`` error is returned: - - - The key must be a UTF-8 encoded string with a length limit - of 5,000 characters. - - For text attributes, at most 400 values are allowed. Empty - values are not allowed. Each value must be a UTF-8 encoded - string with a length limit of 256 characters. - - For number attributes, at most 400 values are allowed. - - For product recommendations, an example of extra user - information is ``traffic_channel``, which is how a user - arrives at the site. Users can arrive at the site by coming - to the site directly, coming through Google search, or in - other ways. + Extra user event features to include in the + recommendation model. These attributes must NOT + contain data that needs to be parsed or + processed further, e.g. JSON or other encodings. + + If you provide custom attributes for ingested + user events, also include them in the user + events that you associate with prediction + requests. Custom attribute formatting must be + consistent between imported events and events + provided with prediction requests. This lets the + Discovery Engine API use those custom attributes + when training models and serving predictions, + which helps improve recommendation quality. + + This field needs to pass all below criteria, + otherwise an ``INVALID_ARGUMENT`` error is + returned: + + * The key must be a UTF-8 encoded string with a + length limit of 5,000 characters. + + * For text attributes, at most 400 values are + allowed. Empty values are not allowed. Each + value must be a UTF-8 encoded string with a + length limit of 256 characters. + + * For number attributes, at most 400 values are + allowed. + + For product recommendations, an example of extra + user information is ``traffic_channel``, which + is how a user arrives at the site. Users can + arrive + at the site by coming to the site directly, + coming through Google search, or in other ways. media_info (google.cloud.discoveryengine_v1alpha.types.MediaInfo): Media-specific info. """ @@ -377,31 +422,36 @@ class PageInfo(proto.Message): pageview_id (str): A unique ID of a web page view. - This should be kept the same for all user events triggered - from the same pageview. For example, an item detail page - view could trigger multiple events as the user is browsing - the page. The ``pageview_id`` property should be kept the - same for all these events so that they can be grouped + This should be kept the same for all user events + triggered from the same pageview. For example, + an item detail page view could trigger multiple + events as the user is browsing the page. The + ``pageview_id`` property should be kept the same + for all these events so that they can be grouped together properly. - When using the client side event reporting with JavaScript - pixel and Google Tag Manager, this value is filled in - automatically. + When using the client side event reporting with + JavaScript pixel and Google Tag Manager, this + value is filled in automatically. page_category (str): - The most specific category associated with a category page. - - To represent full path of category, use '>' sign to separate - different hierarchies. If '>' is part of the category name, - replace it with other character(s). - - Category pages include special pages such as sales or - promotions. For instance, a special sale page may have the - category hierarchy: - ``"pageCategory" : "Sales > 2017 Black Friday Deals"``. - - Required for ``view-category-page`` events. Other event - types should not set this field. Otherwise, an - ``INVALID_ARGUMENT`` error is returned. + The most specific category associated with a + category page. + To represent full path of category, use '>' sign + to separate different hierarchies. If '>' is + part of the category name, replace it with other + character(s). + + Category pages include special pages such as + sales or promotions. For instance, a special + sale page may have the category hierarchy: + + ``"pageCategory" : "Sales > 2017 Black Friday + Deals"``. + + Required for ``view-category-page`` events. + Other event types should not set this field. + Otherwise, an ``INVALID_ARGUMENT`` error is + returned. uri (str): Complete URL (window.location.href) of the user's current page. @@ -447,49 +497,57 @@ class SearchInfo(proto.Message): The user's search query. See - [SearchRequest.query][google.cloud.discoveryengine.v1alpha.SearchRequest.query] + `SearchRequest.query + `__ for definition. - The value must be a UTF-8 encoded string with a length limit - of 5,000 characters. Otherwise, an ``INVALID_ARGUMENT`` - error is returned. + The value must be a UTF-8 encoded string with a + length limit of 5,000 characters. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. At least one of - [search_query][google.cloud.discoveryengine.v1alpha.SearchInfo.search_query] + `search_query + `__ or - [PageInfo.page_category][google.cloud.discoveryengine.v1alpha.PageInfo.page_category] - is required for ``search`` events. Other event types should - not set this field. Otherwise, an ``INVALID_ARGUMENT`` error - is returned. + `PageInfo.page_category + `__ + is required for ``search`` events. Other event + types should not set this field. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. order_by (str): - The order in which products are returned, if applicable. - + The order in which products are returned, if + applicable. See - [SearchRequest.order_by][google.cloud.discoveryengine.v1alpha.SearchRequest.order_by] + `SearchRequest.order_by + `__ for definition and syntax. - The value must be a UTF-8 encoded string with a length limit - of 1,000 characters. Otherwise, an ``INVALID_ARGUMENT`` - error is returned. - - This can only be set for ``search`` events. Other event - types should not set this field. Otherwise, an + The value must be a UTF-8 encoded string with a + length limit of 1,000 characters. Otherwise, an ``INVALID_ARGUMENT`` error is returned. + + This can only be set for ``search`` events. + Other event types should not set this field. + Otherwise, an ``INVALID_ARGUMENT`` error is + returned. offset (int): - An integer that specifies the current offset for pagination - (the 0-indexed starting location, amongst the products - deemed by the API as relevant). + An integer that specifies the current offset for + pagination (the 0-indexed starting location, + amongst the products deemed by the API as + relevant). See - [SearchRequest.offset][google.cloud.discoveryengine.v1alpha.SearchRequest.offset] + `SearchRequest.offset + `__ for definition. - If this field is negative, an ``INVALID_ARGUMENT`` is - returned. + If this field is negative, an + ``INVALID_ARGUMENT`` is returned. - This can only be set for ``search`` events. Other event - types should not set this field. Otherwise, an - ``INVALID_ARGUMENT`` error is returned. + This can only be set for ``search`` events. + Other event types should not set this field. + Otherwise, an ``INVALID_ARGUMENT`` error is + returned. This field is a member of `oneof`_ ``_offset``. """ @@ -516,10 +574,12 @@ class CompletionInfo(proto.Message): Attributes: selected_suggestion (str): End user selected - [CompleteQueryResponse.QuerySuggestion.suggestion][google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion.suggestion]. + `CompleteQueryResponse.QuerySuggestion.suggestion + `__. selected_position (int): End user selected - [CompleteQueryResponse.QuerySuggestion.suggestion][google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion.suggestion] + `CompleteQueryResponse.QuerySuggestion.suggestion + `__ position, starting from 0. """ @@ -558,43 +618,51 @@ class TransactionInfo(proto.Message): This field is a member of `oneof`_ ``_tax``. cost (float): - All the costs associated with the products. These can be - manufacturing costs, shipping expenses not borne by the end - user, or any other costs, such that: - - - Profit = - [value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value] - - - [tax][google.cloud.discoveryengine.v1alpha.TransactionInfo.tax] - - - [cost][google.cloud.discoveryengine.v1alpha.TransactionInfo.cost] + All the costs associated with the products. + These can be manufacturing costs, shipping + expenses not borne by the end user, or any other + costs, such that: + + * Profit = + `value + `__ + - `tax + `__ + - `cost + `__ This field is a member of `oneof`_ ``_cost``. discount_value (float): - The total discount(s) value applied to this transaction. - This figure should be excluded from - [TransactionInfo.value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value] + The total discount(s) value applied to this + transaction. This figure should be excluded from + `TransactionInfo.value + `__ For example, if a user paid - [TransactionInfo.value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value] - amount, then nominal (pre-discount) value of the transaction - is the sum of - [TransactionInfo.value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value] + `TransactionInfo.value + `__ + amount, then nominal (pre-discount) value of the + transaction is the sum of `TransactionInfo.value + `__ and - [TransactionInfo.discount_value][google.cloud.discoveryengine.v1alpha.TransactionInfo.discount_value] + `TransactionInfo.discount_value + `__ - This means that profit is calculated the same way, - regardless of the discount value, and that - [TransactionInfo.discount_value][google.cloud.discoveryengine.v1alpha.TransactionInfo.discount_value] + This means that profit is calculated the same + way, regardless of the discount value, and that + `TransactionInfo.discount_value + `__ can be larger than - [TransactionInfo.value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value]: + `TransactionInfo.value + `__: - - Profit = - [value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value] - - - [tax][google.cloud.discoveryengine.v1alpha.TransactionInfo.tax] - - - [cost][google.cloud.discoveryengine.v1alpha.TransactionInfo.cost] + * Profit = + `value + `__ + - `tax + `__ + - `cost + `__ This field is a member of `oneof`_ ``_discount_value``. """ @@ -641,35 +709,37 @@ class DocumentInfo(proto.Message): Attributes: id (str): - The - [Document][google.cloud.discoveryengine.v1alpha.Document] + The `Document + `__ resource ID. This field is a member of `oneof`_ ``document_descriptor``. name (str): - The - [Document][google.cloud.discoveryengine.v1alpha.Document] + The `Document + `__ resource full name, of the form: + ``projects/{project_id}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`` This field is a member of `oneof`_ ``document_descriptor``. uri (str): - The - [Document][google.cloud.discoveryengine.v1alpha.Document] + The `Document + `__ URI - only allowed for website data stores. This field is a member of `oneof`_ ``document_descriptor``. quantity (int): - Quantity of the Document associated with the user event. - Defaults to 1. - - For example, this field is 2 if two quantities of the same - Document are involved in a ``add-to-cart`` event. + Quantity of the Document associated with the + user event. Defaults to 1. + For example, this field is 2 if two quantities + of the same Document are involved in a + ``add-to-cart`` event. - Required for events of the following event types: + Required for events of the following event + types: - - ``add-to-cart`` - - ``purchase`` + * ``add-to-cart`` + * ``purchase`` This field is a member of `oneof`_ ``_quantity``. promotion_ids (MutableSequence[str]): @@ -722,16 +792,18 @@ class PanelInfo(proto.Message): display_name (str): The display name of the panel. panel_position (int): - The ordered position of the panel, if shown to the user with - other panels. If set, then - [total_panels][google.cloud.discoveryengine.v1alpha.PanelInfo.total_panels] + The ordered position of the panel, if shown to + the user with other panels. If set, then + `total_panels + `__ must also be set. This field is a member of `oneof`_ ``_panel_position``. total_panels (int): - The total number of panels, including this one, shown to the - user. Must be set if - [panel_position][google.cloud.discoveryengine.v1alpha.PanelInfo.panel_position] + The total number of panels, including this one, + shown to the user. Must be set if + `panel_position + `__ is set. This field is a member of `oneof`_ ``_total_panels``. @@ -764,20 +836,24 @@ class MediaInfo(proto.Message): Attributes: media_progress_duration (google.protobuf.duration_pb2.Duration): - The media progress time in seconds, if applicable. For - example, if the end user has finished 90 seconds of a - playback video, then - [MediaInfo.media_progress_duration.seconds][google.protobuf.Duration.seconds] - should be set to 90. + The media progress time in seconds, if + applicable. For example, if the end user has + finished 90 seconds of a playback video, then + `MediaInfo.media_progress_duration.seconds + `__ should be + set to 90. media_progress_percentage (float): Media progress should be computed using only the - [media_progress_duration][google.cloud.discoveryengine.v1alpha.MediaInfo.media_progress_duration] + `media_progress_duration + `__ relative to the media total length. - This value must be between ``[0, 1.0]`` inclusive. + This value must be between ``[0, 1.0]`` + inclusive. - If this is not a playback or the progress cannot be computed - (e.g. ongoing livestream), this field should be unset. + If this is not a playback or the progress cannot + be computed (e.g. ongoing livestream), this + field should be unset. This field is a member of `oneof`_ ``_media_progress_percentage``. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/user_event_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/user_event_service.py index 41c480fb642d..45b7f1b3f846 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/user_event_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/user_event_service.py @@ -37,17 +37,22 @@ class WriteUserEventRequest(proto.Message): Attributes: parent (str): - Required. The parent resource name. If the write user event - action is applied in - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] + Required. The parent resource name. + If the write user event action is applied in + `DataStore + `__ level, the format is: + ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}``. - If the write user event action is applied in [Location][] - level, for example, the event with - [Document][google.cloud.discoveryengine.v1alpha.Document] - across multiple - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore], - the format is: ``projects/{project}/locations/{location}``. + If the write user event action is applied in + [Location][] level, for example, the event with + `Document + `__ + across multiple `DataStore + `__, + the format is: + + ``projects/{project}/locations/{location}``. user_event (google.cloud.discoveryengine_v1alpha.types.UserEvent): Required. User event to write. @@ -81,7 +86,8 @@ class CollectUserEventRequest(proto.Message): Attributes: parent (str): - Required. The parent DataStore resource name, such as + Required. The parent DataStore resource name, + such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}``. user_event (str): Required. URL encoded UserEvent proto with a diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/gapic_version.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/gapic_version.py index be6c08cee3cf..fd79d4e761b7 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/gapic_version.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.16.0" # {x-release-please-version} +__version__ = "0.4.0" # {x-release-please-version} diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/completion_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/completion_service/async_client.py index 696b788ee215..e697fd23b9a4 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/completion_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/completion_service/async_client.py @@ -348,7 +348,8 @@ async def sample_complete_query(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.CompleteQueryRequest, dict]]): The request object. Request message for - [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1beta.CompletionService.CompleteQuery] + `CompletionService.CompleteQuery + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -361,8 +362,9 @@ async def sample_complete_query(): Returns: google.cloud.discoveryengine_v1beta.types.CompleteQueryResponse: Response message for - [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1beta.CompletionService.CompleteQuery] - method. + `CompletionService.CompleteQuery + `__ + method. """ # Create or coerce a protobuf request object. @@ -442,8 +444,10 @@ async def sample_advanced_complete_query(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.AdvancedCompleteQueryRequest, dict]]): The request object. Request message for - [CompletionService.AdvancedCompleteQuery][google.cloud.discoveryengine.v1beta.CompletionService.AdvancedCompleteQuery] - method. . + `CompletionService.AdvancedCompleteQuery + `__ + method. + . retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -455,8 +459,9 @@ async def sample_advanced_complete_query(): Returns: google.cloud.discoveryengine_v1beta.types.AdvancedCompleteQueryResponse: Response message for - [CompletionService.AdvancedCompleteQuery][google.cloud.discoveryengine.v1beta.CompletionService.AdvancedCompleteQuery] - method. + `CompletionService.AdvancedCompleteQuery + `__ + method. """ # Create or coerce a protobuf request object. @@ -504,7 +509,8 @@ async def import_suggestion_deny_list_entries( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: r"""Imports all - [SuggestionDenyListEntry][google.cloud.discoveryengine.v1beta.SuggestionDenyListEntry] + `SuggestionDenyListEntry + `__ for a DataStore. .. code-block:: python @@ -545,7 +551,8 @@ async def sample_import_suggestion_deny_list_entries(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.ImportSuggestionDenyListEntriesRequest, dict]]): The request object. Request message for - [CompletionService.ImportSuggestionDenyListEntries][google.cloud.discoveryengine.v1beta.CompletionService.ImportSuggestionDenyListEntries] + `CompletionService.ImportSuggestionDenyListEntries + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -557,11 +564,15 @@ async def sample_import_suggestion_deny_list_entries(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1beta.types.ImportSuggestionDenyListEntriesResponse` Response message for - [CompletionService.ImportSuggestionDenyListEntries][google.cloud.discoveryengine.v1beta.CompletionService.ImportSuggestionDenyListEntries] - method. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1beta.types.ImportSuggestionDenyListEntriesResponse` + Response message for + `CompletionService.ImportSuggestionDenyListEntries + `__ + method. """ # Create or coerce a protobuf request object. @@ -617,7 +628,8 @@ async def purge_suggestion_deny_list_entries( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: r"""Permanently deletes all - [SuggestionDenyListEntry][google.cloud.discoveryengine.v1beta.SuggestionDenyListEntry] + `SuggestionDenyListEntry + `__ for a DataStore. .. code-block:: python @@ -653,7 +665,8 @@ async def sample_purge_suggestion_deny_list_entries(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.PurgeSuggestionDenyListEntriesRequest, dict]]): The request object. Request message for - [CompletionService.PurgeSuggestionDenyListEntries][google.cloud.discoveryengine.v1beta.CompletionService.PurgeSuggestionDenyListEntries] + `CompletionService.PurgeSuggestionDenyListEntries + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -665,11 +678,15 @@ async def sample_purge_suggestion_deny_list_entries(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1beta.types.PurgeSuggestionDenyListEntriesResponse` Response message for - [CompletionService.PurgeSuggestionDenyListEntries][google.cloud.discoveryengine.v1beta.CompletionService.PurgeSuggestionDenyListEntries] - method. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1beta.types.PurgeSuggestionDenyListEntriesResponse` + Response message for + `CompletionService.PurgeSuggestionDenyListEntries + `__ + method. """ # Create or coerce a protobuf request object. @@ -723,7 +740,8 @@ async def import_completion_suggestions( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: r"""Imports - [CompletionSuggestion][google.cloud.discoveryengine.v1beta.CompletionSuggestion]s + `CompletionSuggestion + `__s for a DataStore. .. code-block:: python @@ -764,7 +782,8 @@ async def sample_import_completion_suggestions(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.ImportCompletionSuggestionsRequest, dict]]): The request object. Request message for - [CompletionService.ImportCompletionSuggestions][google.cloud.discoveryengine.v1beta.CompletionService.ImportCompletionSuggestions] + `CompletionService.ImportCompletionSuggestions + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -776,14 +795,18 @@ async def sample_import_completion_suggestions(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1beta.types.ImportCompletionSuggestionsResponse` Response of the - [CompletionService.ImportCompletionSuggestions][google.cloud.discoveryengine.v1beta.CompletionService.ImportCompletionSuggestions] - method. If the long running operation is done, this - message is returned by the - google.longrunning.Operations.response field if the - operation is successful. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1beta.types.ImportCompletionSuggestionsResponse` + Response of the + `CompletionService.ImportCompletionSuggestions + `__ + method. If the long running operation is + done, this message is returned by the + google.longrunning.Operations.response + field if the operation is successful. """ # Create or coerce a protobuf request object. @@ -837,7 +860,8 @@ async def purge_completion_suggestions( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: r"""Permanently deletes all - [CompletionSuggestion][google.cloud.discoveryengine.v1beta.CompletionSuggestion]s + `CompletionSuggestion + `__s for a DataStore. .. code-block:: python @@ -873,7 +897,8 @@ async def sample_purge_completion_suggestions(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.PurgeCompletionSuggestionsRequest, dict]]): The request object. Request message for - [CompletionService.PurgeCompletionSuggestions][google.cloud.discoveryengine.v1beta.CompletionService.PurgeCompletionSuggestions] + `CompletionService.PurgeCompletionSuggestions + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -885,11 +910,15 @@ async def sample_purge_completion_suggestions(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1beta.types.PurgeCompletionSuggestionsResponse` Response message for - [CompletionService.PurgeCompletionSuggestions][google.cloud.discoveryengine.v1beta.CompletionService.PurgeCompletionSuggestions] - method. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1beta.types.PurgeCompletionSuggestionsResponse` + Response message for + `CompletionService.PurgeCompletionSuggestions + `__ + method. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/completion_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/completion_service/client.py index c41e24c823f1..526c9c6a46b9 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/completion_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/completion_service/client.py @@ -830,7 +830,8 @@ def sample_complete_query(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.CompleteQueryRequest, dict]): The request object. Request message for - [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1beta.CompletionService.CompleteQuery] + `CompletionService.CompleteQuery + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -843,8 +844,9 @@ def sample_complete_query(): Returns: google.cloud.discoveryengine_v1beta.types.CompleteQueryResponse: Response message for - [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1beta.CompletionService.CompleteQuery] - method. + `CompletionService.CompleteQuery + `__ + method. """ # Create or coerce a protobuf request object. @@ -922,8 +924,10 @@ def sample_advanced_complete_query(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.AdvancedCompleteQueryRequest, dict]): The request object. Request message for - [CompletionService.AdvancedCompleteQuery][google.cloud.discoveryengine.v1beta.CompletionService.AdvancedCompleteQuery] - method. . + `CompletionService.AdvancedCompleteQuery + `__ + method. + . retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -935,8 +939,9 @@ def sample_advanced_complete_query(): Returns: google.cloud.discoveryengine_v1beta.types.AdvancedCompleteQueryResponse: Response message for - [CompletionService.AdvancedCompleteQuery][google.cloud.discoveryengine.v1beta.CompletionService.AdvancedCompleteQuery] - method. + `CompletionService.AdvancedCompleteQuery + `__ + method. """ # Create or coerce a protobuf request object. @@ -982,7 +987,8 @@ def import_suggestion_deny_list_entries( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: r"""Imports all - [SuggestionDenyListEntry][google.cloud.discoveryengine.v1beta.SuggestionDenyListEntry] + `SuggestionDenyListEntry + `__ for a DataStore. .. code-block:: python @@ -1023,7 +1029,8 @@ def sample_import_suggestion_deny_list_entries(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.ImportSuggestionDenyListEntriesRequest, dict]): The request object. Request message for - [CompletionService.ImportSuggestionDenyListEntries][google.cloud.discoveryengine.v1beta.CompletionService.ImportSuggestionDenyListEntries] + `CompletionService.ImportSuggestionDenyListEntries + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1035,11 +1042,15 @@ def sample_import_suggestion_deny_list_entries(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1beta.types.ImportSuggestionDenyListEntriesResponse` Response message for - [CompletionService.ImportSuggestionDenyListEntries][google.cloud.discoveryengine.v1beta.CompletionService.ImportSuggestionDenyListEntries] - method. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1beta.types.ImportSuggestionDenyListEntriesResponse` + Response message for + `CompletionService.ImportSuggestionDenyListEntries + `__ + method. """ # Create or coerce a protobuf request object. @@ -1095,7 +1106,8 @@ def purge_suggestion_deny_list_entries( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: r"""Permanently deletes all - [SuggestionDenyListEntry][google.cloud.discoveryengine.v1beta.SuggestionDenyListEntry] + `SuggestionDenyListEntry + `__ for a DataStore. .. code-block:: python @@ -1131,7 +1143,8 @@ def sample_purge_suggestion_deny_list_entries(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.PurgeSuggestionDenyListEntriesRequest, dict]): The request object. Request message for - [CompletionService.PurgeSuggestionDenyListEntries][google.cloud.discoveryengine.v1beta.CompletionService.PurgeSuggestionDenyListEntries] + `CompletionService.PurgeSuggestionDenyListEntries + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1143,11 +1156,15 @@ def sample_purge_suggestion_deny_list_entries(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1beta.types.PurgeSuggestionDenyListEntriesResponse` Response message for - [CompletionService.PurgeSuggestionDenyListEntries][google.cloud.discoveryengine.v1beta.CompletionService.PurgeSuggestionDenyListEntries] - method. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1beta.types.PurgeSuggestionDenyListEntriesResponse` + Response message for + `CompletionService.PurgeSuggestionDenyListEntries + `__ + method. """ # Create or coerce a protobuf request object. @@ -1201,7 +1218,8 @@ def import_completion_suggestions( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: r"""Imports - [CompletionSuggestion][google.cloud.discoveryengine.v1beta.CompletionSuggestion]s + `CompletionSuggestion + `__s for a DataStore. .. code-block:: python @@ -1242,7 +1260,8 @@ def sample_import_completion_suggestions(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.ImportCompletionSuggestionsRequest, dict]): The request object. Request message for - [CompletionService.ImportCompletionSuggestions][google.cloud.discoveryengine.v1beta.CompletionService.ImportCompletionSuggestions] + `CompletionService.ImportCompletionSuggestions + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1254,14 +1273,18 @@ def sample_import_completion_suggestions(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1beta.types.ImportCompletionSuggestionsResponse` Response of the - [CompletionService.ImportCompletionSuggestions][google.cloud.discoveryengine.v1beta.CompletionService.ImportCompletionSuggestions] - method. If the long running operation is done, this - message is returned by the - google.longrunning.Operations.response field if the - operation is successful. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1beta.types.ImportCompletionSuggestionsResponse` + Response of the + `CompletionService.ImportCompletionSuggestions + `__ + method. If the long running operation is + done, this message is returned by the + google.longrunning.Operations.response + field if the operation is successful. """ # Create or coerce a protobuf request object. @@ -1315,7 +1338,8 @@ def purge_completion_suggestions( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: r"""Permanently deletes all - [CompletionSuggestion][google.cloud.discoveryengine.v1beta.CompletionSuggestion]s + `CompletionSuggestion + `__s for a DataStore. .. code-block:: python @@ -1351,7 +1375,8 @@ def sample_purge_completion_suggestions(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.PurgeCompletionSuggestionsRequest, dict]): The request object. Request message for - [CompletionService.PurgeCompletionSuggestions][google.cloud.discoveryengine.v1beta.CompletionService.PurgeCompletionSuggestions] + `CompletionService.PurgeCompletionSuggestions + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1363,11 +1388,15 @@ def sample_purge_completion_suggestions(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1beta.types.PurgeCompletionSuggestionsResponse` Response message for - [CompletionService.PurgeCompletionSuggestions][google.cloud.discoveryengine.v1beta.CompletionService.PurgeCompletionSuggestions] - method. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1beta.types.PurgeCompletionSuggestionsResponse` + Response message for + `CompletionService.PurgeCompletionSuggestions + `__ + method. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/completion_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/completion_service/transports/base.py index 35762aa97803..83d33eb5f3a6 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/completion_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/completion_service/transports/base.py @@ -88,8 +88,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -104,11 +102,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/completion_service/transports/grpc.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/completion_service/transports/grpc.py index 6ba36c174ca5..4beffc2a1f6e 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/completion_service/transports/grpc.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/completion_service/transports/grpc.py @@ -414,7 +414,8 @@ def import_suggestion_deny_list_entries( entries method over gRPC. Imports all - [SuggestionDenyListEntry][google.cloud.discoveryengine.v1beta.SuggestionDenyListEntry] + `SuggestionDenyListEntry + `__ for a DataStore. Returns: @@ -447,7 +448,8 @@ def purge_suggestion_deny_list_entries( entries method over gRPC. Permanently deletes all - [SuggestionDenyListEntry][google.cloud.discoveryengine.v1beta.SuggestionDenyListEntry] + `SuggestionDenyListEntry + `__ for a DataStore. Returns: @@ -479,7 +481,8 @@ def import_completion_suggestions( r"""Return a callable for the import completion suggestions method over gRPC. Imports - [CompletionSuggestion][google.cloud.discoveryengine.v1beta.CompletionSuggestion]s + `CompletionSuggestion + `__s for a DataStore. Returns: @@ -511,7 +514,8 @@ def purge_completion_suggestions( r"""Return a callable for the purge completion suggestions method over gRPC. Permanently deletes all - [CompletionSuggestion][google.cloud.discoveryengine.v1beta.CompletionSuggestion]s + `CompletionSuggestion + `__s for a DataStore. Returns: diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/completion_service/transports/grpc_asyncio.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/completion_service/transports/grpc_asyncio.py index 026a65da5aa3..de3b89d371dc 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/completion_service/transports/grpc_asyncio.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/completion_service/transports/grpc_asyncio.py @@ -423,7 +423,8 @@ def import_suggestion_deny_list_entries( entries method over gRPC. Imports all - [SuggestionDenyListEntry][google.cloud.discoveryengine.v1beta.SuggestionDenyListEntry] + `SuggestionDenyListEntry + `__ for a DataStore. Returns: @@ -457,7 +458,8 @@ def purge_suggestion_deny_list_entries( entries method over gRPC. Permanently deletes all - [SuggestionDenyListEntry][google.cloud.discoveryengine.v1beta.SuggestionDenyListEntry] + `SuggestionDenyListEntry + `__ for a DataStore. Returns: @@ -490,7 +492,8 @@ def import_completion_suggestions( r"""Return a callable for the import completion suggestions method over gRPC. Imports - [CompletionSuggestion][google.cloud.discoveryengine.v1beta.CompletionSuggestion]s + `CompletionSuggestion + `__s for a DataStore. Returns: @@ -523,7 +526,8 @@ def purge_completion_suggestions( r"""Return a callable for the purge completion suggestions method over gRPC. Permanently deletes all - [CompletionSuggestion][google.cloud.discoveryengine.v1beta.CompletionSuggestion]s + `CompletionSuggestion + `__s for a DataStore. Returns: diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/completion_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/completion_service/transports/rest.py index 595318f8a1df..db5ff2df0fe8 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/completion_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/completion_service/transports/rest.py @@ -800,8 +800,10 @@ def __call__( Args: request (~.completion_service.AdvancedCompleteQueryRequest): The request object. Request message for - [CompletionService.AdvancedCompleteQuery][google.cloud.discoveryengine.v1beta.CompletionService.AdvancedCompleteQuery] - method. . + `CompletionService.AdvancedCompleteQuery + `__ + method. + . retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -813,7 +815,8 @@ def __call__( Returns: ~.completion_service.AdvancedCompleteQueryResponse: Response message for - [CompletionService.AdvancedCompleteQuery][google.cloud.discoveryengine.v1beta.CompletionService.AdvancedCompleteQuery] + `CompletionService.AdvancedCompleteQuery + `__ method. """ @@ -963,7 +966,8 @@ def __call__( Args: request (~.completion_service.CompleteQueryRequest): The request object. Request message for - [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1beta.CompletionService.CompleteQuery] + `CompletionService.CompleteQuery + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -976,7 +980,8 @@ def __call__( Returns: ~.completion_service.CompleteQueryResponse: Response message for - [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1beta.CompletionService.CompleteQuery] + `CompletionService.CompleteQuery + `__ method. """ @@ -1117,7 +1122,8 @@ def __call__( Args: request (~.import_config.ImportCompletionSuggestionsRequest): The request object. Request message for - [CompletionService.ImportCompletionSuggestions][google.cloud.discoveryengine.v1beta.CompletionService.ImportCompletionSuggestions] + `CompletionService.ImportCompletionSuggestions + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1279,7 +1285,8 @@ def __call__( Args: request (~.import_config.ImportSuggestionDenyListEntriesRequest): The request object. Request message for - [CompletionService.ImportSuggestionDenyListEntries][google.cloud.discoveryengine.v1beta.CompletionService.ImportSuggestionDenyListEntries] + `CompletionService.ImportSuggestionDenyListEntries + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1442,7 +1449,8 @@ def __call__( Args: request (~.purge_config.PurgeCompletionSuggestionsRequest): The request object. Request message for - [CompletionService.PurgeCompletionSuggestions][google.cloud.discoveryengine.v1beta.CompletionService.PurgeCompletionSuggestions] + `CompletionService.PurgeCompletionSuggestions + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1599,7 +1607,8 @@ def __call__( Args: request (~.purge_config.PurgeSuggestionDenyListEntriesRequest): The request object. Request message for - [CompletionService.PurgeSuggestionDenyListEntries][google.cloud.discoveryengine.v1beta.CompletionService.PurgeSuggestionDenyListEntries] + `CompletionService.PurgeSuggestionDenyListEntries + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/control_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/control_service/async_client.py index 3888df9f0ba6..f614ea5ec6f8 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/control_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/control_service/async_client.py @@ -313,10 +313,12 @@ async def create_control( ) -> gcd_control.Control: r"""Creates a Control. - By default 1000 controls are allowed for a data store. A request - can be submitted to adjust this limit. If the - [Control][google.cloud.discoveryengine.v1beta.Control] to create - already exists, an ALREADY_EXISTS error is returned. + By default 1000 controls are allowed for a data store. A + request can be submitted to adjust this limit. If the + `Control + `__ to + create already exists, an ALREADY_EXISTS error is + returned. .. code-block:: python @@ -357,8 +359,8 @@ async def sample_create_control(): request (Optional[Union[google.cloud.discoveryengine_v1beta.types.CreateControlRequest, dict]]): The request object. Request for CreateControl method. parent (:class:`str`): - Required. Full resource name of parent data store. - Format: + Required. Full resource name of parent + data store. Format: ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`` or ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}``. @@ -372,12 +374,13 @@ async def sample_create_control(): on the ``request`` instance; if ``request`` is provided, this should not be set. control_id (:class:`str`): - Required. The ID to use for the Control, which will - become the final component of the Control's resource - name. + Required. The ID to use for the Control, + which will become the final component of + the Control's resource name. - This value must be within 1-63 characters. Valid - characters are /[a-z][0-9]-\_/. + This value must be within 1-63 + characters. Valid characters are /`a-z + <0-9>`__-_/. This corresponds to the ``control_id`` field on the ``request`` instance; if ``request`` is provided, this @@ -392,11 +395,13 @@ async def sample_create_control(): Returns: google.cloud.discoveryengine_v1beta.types.Control: - Defines a conditioned behavior to employ during serving. - Must be attached to a - [ServingConfig][google.cloud.discoveryengine.v1beta.ServingConfig] - to be considered at serving time. Permitted actions - dependent on SolutionType. + Defines a conditioned behavior to employ + during serving. Must be attached to a + `ServingConfig + `__ + to be considered at serving time. + Permitted actions dependent on + ``SolutionType``. """ # Create or coerce a protobuf request object. @@ -463,7 +468,8 @@ async def delete_control( ) -> None: r"""Deletes a Control. - If the [Control][google.cloud.discoveryengine.v1beta.Control] to + If the `Control + `__ to delete does not exist, a NOT_FOUND error is returned. .. code-block:: python @@ -493,8 +499,8 @@ async def sample_delete_control(): request (Optional[Union[google.cloud.discoveryengine_v1beta.types.DeleteControlRequest, dict]]): The request object. Request for DeleteControl method. name (:class:`str`): - Required. The resource name of the Control to delete. - Format: + Required. The resource name of the + Control to delete. Format: ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`` This corresponds to the ``name`` field @@ -566,10 +572,11 @@ async def update_control( ) -> gcd_control.Control: r"""Updates a Control. - [Control][google.cloud.discoveryengine.v1beta.Control] action - type cannot be changed. If the - [Control][google.cloud.discoveryengine.v1beta.Control] to update - does not exist, a NOT_FOUND error is returned. + `Control + `__ action + type cannot be changed. If the `Control + `__ to + update does not exist, a NOT_FOUND error is returned. .. code-block:: python @@ -613,14 +620,19 @@ async def sample_update_control(): on the ``request`` instance; if ``request`` is provided, this should not be set. update_mask (:class:`google.protobuf.field_mask_pb2.FieldMask`): - Optional. Indicates which fields in the provided - [Control][google.cloud.discoveryengine.v1beta.Control] - to update. The following are NOT supported: + Optional. Indicates which fields in the + provided `Control + `__ + to update. The following are NOT + supported: - - [Control.name][google.cloud.discoveryengine.v1beta.Control.name] - - [Control.solution_type][google.cloud.discoveryengine.v1beta.Control.solution_type] + * `Control.name + `__ + * `Control.solution_type + `__ - If not set or empty, all supported fields are updated. + If not set or empty, all supported + fields are updated. This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this @@ -635,11 +647,13 @@ async def sample_update_control(): Returns: google.cloud.discoveryengine_v1beta.types.Control: - Defines a conditioned behavior to employ during serving. - Must be attached to a - [ServingConfig][google.cloud.discoveryengine.v1beta.ServingConfig] - to be considered at serving time. Permitted actions - dependent on SolutionType. + Defines a conditioned behavior to employ + during serving. Must be attached to a + `ServingConfig + `__ + to be considered at serving time. + Permitted actions dependent on + ``SolutionType``. """ # Create or coerce a protobuf request object. @@ -736,8 +750,8 @@ async def sample_get_control(): request (Optional[Union[google.cloud.discoveryengine_v1beta.types.GetControlRequest, dict]]): The request object. Request for GetControl method. name (:class:`str`): - Required. The resource name of the Control to get. - Format: + Required. The resource name of the + Control to get. Format: ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`` This corresponds to the ``name`` field @@ -753,11 +767,13 @@ async def sample_get_control(): Returns: google.cloud.discoveryengine_v1beta.types.Control: - Defines a conditioned behavior to employ during serving. - Must be attached to a - [ServingConfig][google.cloud.discoveryengine.v1beta.ServingConfig] - to be considered at serving time. Permitted actions - dependent on SolutionType. + Defines a conditioned behavior to employ + during serving. Must be attached to a + `ServingConfig + `__ + to be considered at serving time. + Permitted actions dependent on + ``SolutionType``. """ # Create or coerce a protobuf request object. @@ -819,7 +835,8 @@ async def list_controls( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListControlsAsyncPager: r"""Lists all Controls by their parent - [DataStore][google.cloud.discoveryengine.v1beta.DataStore]. + `DataStore + `__. .. code-block:: python @@ -852,7 +869,8 @@ async def sample_list_controls(): request (Optional[Union[google.cloud.discoveryengine_v1beta.types.ListControlsRequest, dict]]): The request object. Request for ListControls method. parent (:class:`str`): - Required. The data store resource name. Format: + Required. The data store resource name. + Format: ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`` or ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}``. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/control_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/control_service/client.py index 820e4dbe2279..c37809d8b79e 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/control_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/control_service/client.py @@ -776,10 +776,12 @@ def create_control( ) -> gcd_control.Control: r"""Creates a Control. - By default 1000 controls are allowed for a data store. A request - can be submitted to adjust this limit. If the - [Control][google.cloud.discoveryengine.v1beta.Control] to create - already exists, an ALREADY_EXISTS error is returned. + By default 1000 controls are allowed for a data store. A + request can be submitted to adjust this limit. If the + `Control + `__ to + create already exists, an ALREADY_EXISTS error is + returned. .. code-block:: python @@ -820,8 +822,8 @@ def sample_create_control(): request (Union[google.cloud.discoveryengine_v1beta.types.CreateControlRequest, dict]): The request object. Request for CreateControl method. parent (str): - Required. Full resource name of parent data store. - Format: + Required. Full resource name of parent + data store. Format: ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`` or ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}``. @@ -835,12 +837,13 @@ def sample_create_control(): on the ``request`` instance; if ``request`` is provided, this should not be set. control_id (str): - Required. The ID to use for the Control, which will - become the final component of the Control's resource - name. + Required. The ID to use for the Control, + which will become the final component of + the Control's resource name. - This value must be within 1-63 characters. Valid - characters are /[a-z][0-9]-\_/. + This value must be within 1-63 + characters. Valid characters are /`a-z + <0-9>`__-_/. This corresponds to the ``control_id`` field on the ``request`` instance; if ``request`` is provided, this @@ -855,11 +858,13 @@ def sample_create_control(): Returns: google.cloud.discoveryengine_v1beta.types.Control: - Defines a conditioned behavior to employ during serving. - Must be attached to a - [ServingConfig][google.cloud.discoveryengine.v1beta.ServingConfig] - to be considered at serving time. Permitted actions - dependent on SolutionType. + Defines a conditioned behavior to employ + during serving. Must be attached to a + `ServingConfig + `__ + to be considered at serving time. + Permitted actions dependent on + ``SolutionType``. """ # Create or coerce a protobuf request object. @@ -923,7 +928,8 @@ def delete_control( ) -> None: r"""Deletes a Control. - If the [Control][google.cloud.discoveryengine.v1beta.Control] to + If the `Control + `__ to delete does not exist, a NOT_FOUND error is returned. .. code-block:: python @@ -953,8 +959,8 @@ def sample_delete_control(): request (Union[google.cloud.discoveryengine_v1beta.types.DeleteControlRequest, dict]): The request object. Request for DeleteControl method. name (str): - Required. The resource name of the Control to delete. - Format: + Required. The resource name of the + Control to delete. Format: ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`` This corresponds to the ``name`` field @@ -1023,10 +1029,11 @@ def update_control( ) -> gcd_control.Control: r"""Updates a Control. - [Control][google.cloud.discoveryengine.v1beta.Control] action - type cannot be changed. If the - [Control][google.cloud.discoveryengine.v1beta.Control] to update - does not exist, a NOT_FOUND error is returned. + `Control + `__ action + type cannot be changed. If the `Control + `__ to + update does not exist, a NOT_FOUND error is returned. .. code-block:: python @@ -1070,14 +1077,19 @@ def sample_update_control(): on the ``request`` instance; if ``request`` is provided, this should not be set. update_mask (google.protobuf.field_mask_pb2.FieldMask): - Optional. Indicates which fields in the provided - [Control][google.cloud.discoveryengine.v1beta.Control] - to update. The following are NOT supported: + Optional. Indicates which fields in the + provided `Control + `__ + to update. The following are NOT + supported: - - [Control.name][google.cloud.discoveryengine.v1beta.Control.name] - - [Control.solution_type][google.cloud.discoveryengine.v1beta.Control.solution_type] + * `Control.name + `__ + * `Control.solution_type + `__ - If not set or empty, all supported fields are updated. + If not set or empty, all supported + fields are updated. This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this @@ -1092,11 +1104,13 @@ def sample_update_control(): Returns: google.cloud.discoveryengine_v1beta.types.Control: - Defines a conditioned behavior to employ during serving. - Must be attached to a - [ServingConfig][google.cloud.discoveryengine.v1beta.ServingConfig] - to be considered at serving time. Permitted actions - dependent on SolutionType. + Defines a conditioned behavior to employ + during serving. Must be attached to a + `ServingConfig + `__ + to be considered at serving time. + Permitted actions dependent on + ``SolutionType``. """ # Create or coerce a protobuf request object. @@ -1190,8 +1204,8 @@ def sample_get_control(): request (Union[google.cloud.discoveryengine_v1beta.types.GetControlRequest, dict]): The request object. Request for GetControl method. name (str): - Required. The resource name of the Control to get. - Format: + Required. The resource name of the + Control to get. Format: ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`` This corresponds to the ``name`` field @@ -1207,11 +1221,13 @@ def sample_get_control(): Returns: google.cloud.discoveryengine_v1beta.types.Control: - Defines a conditioned behavior to employ during serving. - Must be attached to a - [ServingConfig][google.cloud.discoveryengine.v1beta.ServingConfig] - to be considered at serving time. Permitted actions - dependent on SolutionType. + Defines a conditioned behavior to employ + during serving. Must be attached to a + `ServingConfig + `__ + to be considered at serving time. + Permitted actions dependent on + ``SolutionType``. """ # Create or coerce a protobuf request object. @@ -1270,7 +1286,8 @@ def list_controls( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListControlsPager: r"""Lists all Controls by their parent - [DataStore][google.cloud.discoveryengine.v1beta.DataStore]. + `DataStore + `__. .. code-block:: python @@ -1303,7 +1320,8 @@ def sample_list_controls(): request (Union[google.cloud.discoveryengine_v1beta.types.ListControlsRequest, dict]): The request object. Request for ListControls method. parent (str): - Required. The data store resource name. Format: + Required. The data store resource name. + Format: ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`` or ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}``. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/control_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/control_service/transports/base.py index ba414265cc34..63b745ee1a34 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/control_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/control_service/transports/base.py @@ -87,8 +87,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -103,11 +101,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/control_service/transports/grpc.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/control_service/transports/grpc.py index 565c95b76904..3742b4fa6635 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/control_service/transports/grpc.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/control_service/transports/grpc.py @@ -337,10 +337,12 @@ def create_control( Creates a Control. - By default 1000 controls are allowed for a data store. A request - can be submitted to adjust this limit. If the - [Control][google.cloud.discoveryengine.v1beta.Control] to create - already exists, an ALREADY_EXISTS error is returned. + By default 1000 controls are allowed for a data store. A + request can be submitted to adjust this limit. If the + `Control + `__ to + create already exists, an ALREADY_EXISTS error is + returned. Returns: Callable[[~.CreateControlRequest], @@ -368,7 +370,8 @@ def delete_control( Deletes a Control. - If the [Control][google.cloud.discoveryengine.v1beta.Control] to + If the `Control + `__ to delete does not exist, a NOT_FOUND error is returned. Returns: @@ -397,10 +400,11 @@ def update_control( Updates a Control. - [Control][google.cloud.discoveryengine.v1beta.Control] action - type cannot be changed. If the - [Control][google.cloud.discoveryengine.v1beta.Control] to update - does not exist, a NOT_FOUND error is returned. + `Control + `__ action + type cannot be changed. If the `Control + `__ to + update does not exist, a NOT_FOUND error is returned. Returns: Callable[[~.UpdateControlRequest], @@ -455,7 +459,8 @@ def list_controls( r"""Return a callable for the list controls method over gRPC. Lists all Controls by their parent - [DataStore][google.cloud.discoveryengine.v1beta.DataStore]. + `DataStore + `__. Returns: Callable[[~.ListControlsRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/control_service/transports/grpc_asyncio.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/control_service/transports/grpc_asyncio.py index 3c7f3db9fd36..9fc670552162 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/control_service/transports/grpc_asyncio.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/control_service/transports/grpc_asyncio.py @@ -347,10 +347,12 @@ def create_control( Creates a Control. - By default 1000 controls are allowed for a data store. A request - can be submitted to adjust this limit. If the - [Control][google.cloud.discoveryengine.v1beta.Control] to create - already exists, an ALREADY_EXISTS error is returned. + By default 1000 controls are allowed for a data store. A + request can be submitted to adjust this limit. If the + `Control + `__ to + create already exists, an ALREADY_EXISTS error is + returned. Returns: Callable[[~.CreateControlRequest], @@ -378,7 +380,8 @@ def delete_control( Deletes a Control. - If the [Control][google.cloud.discoveryengine.v1beta.Control] to + If the `Control + `__ to delete does not exist, a NOT_FOUND error is returned. Returns: @@ -409,10 +412,11 @@ def update_control( Updates a Control. - [Control][google.cloud.discoveryengine.v1beta.Control] action - type cannot be changed. If the - [Control][google.cloud.discoveryengine.v1beta.Control] to update - does not exist, a NOT_FOUND error is returned. + `Control + `__ action + type cannot be changed. If the `Control + `__ to + update does not exist, a NOT_FOUND error is returned. Returns: Callable[[~.UpdateControlRequest], @@ -468,7 +472,8 @@ def list_controls( r"""Return a callable for the list controls method over gRPC. Lists all Controls by their parent - [DataStore][google.cloud.discoveryengine.v1beta.DataStore]. + `DataStore + `__. Returns: Callable[[~.ListControlsRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/control_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/control_service/transports/rest.py index 0a6dac3c2688..82a73251ed7b 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/control_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/control_service/transports/rest.py @@ -537,11 +537,13 @@ def __call__( Returns: ~.gcd_control.Control: - Defines a conditioned behavior to employ during serving. - Must be attached to a - [ServingConfig][google.cloud.discoveryengine.v1beta.ServingConfig] - to be considered at serving time. Permitted actions - dependent on ``SolutionType``. + Defines a conditioned behavior to employ + during serving. Must be attached to a + `ServingConfig + `__ + to be considered at serving time. + Permitted actions dependent on + ``SolutionType``. """ @@ -797,11 +799,13 @@ def __call__( Returns: ~.control.Control: - Defines a conditioned behavior to employ during serving. - Must be attached to a - [ServingConfig][google.cloud.discoveryengine.v1beta.ServingConfig] - to be considered at serving time. Permitted actions - dependent on ``SolutionType``. + Defines a conditioned behavior to employ + during serving. Must be attached to a + `ServingConfig + `__ + to be considered at serving time. + Permitted actions dependent on + ``SolutionType``. """ @@ -1095,11 +1099,13 @@ def __call__( Returns: ~.gcd_control.Control: - Defines a conditioned behavior to employ during serving. - Must be attached to a - [ServingConfig][google.cloud.discoveryengine.v1beta.ServingConfig] - to be considered at serving time. Permitted actions - dependent on ``SolutionType``. + Defines a conditioned behavior to employ + during serving. Must be attached to a + `ServingConfig + `__ + to be considered at serving time. + Permitted actions dependent on + ``SolutionType``. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/conversational_search_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/conversational_search_service/async_client.py index 8cb819a55752..250d17c96fe8 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/conversational_search_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/conversational_search_service/async_client.py @@ -385,17 +385,18 @@ async def sample_converse_conversation(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.ConverseConversationRequest, dict]]): The request object. Request message for - [ConversationalSearchService.ConverseConversation][google.cloud.discoveryengine.v1beta.ConversationalSearchService.ConverseConversation] + `ConversationalSearchService.ConverseConversation + `__ method. name (:class:`str`): - Required. The resource name of the Conversation to get. - Format: + Required. The resource name of the + Conversation to get. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}``. Use ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/-`` - to activate auto session mode, which automatically - creates a new conversation inside a ConverseConversation - session. + to activate auto session mode, which + automatically creates a new conversation + inside a ConverseConversation session. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -416,8 +417,9 @@ async def sample_converse_conversation(): Returns: google.cloud.discoveryengine_v1beta.types.ConverseConversationResponse: Response message for - [ConversationalSearchService.ConverseConversation][google.cloud.discoveryengine.v1beta.ConversationalSearchService.ConverseConversation] - method. + `ConversationalSearchService.ConverseConversation + `__ + method. """ # Create or coerce a protobuf request object. @@ -487,9 +489,10 @@ async def create_conversation( ) -> gcd_conversation.Conversation: r"""Creates a Conversation. - If the - [Conversation][google.cloud.discoveryengine.v1beta.Conversation] - to create already exists, an ALREADY_EXISTS error is returned. + If the `Conversation + `__ to + create already exists, an ALREADY_EXISTS error is + returned. .. code-block:: python @@ -522,8 +525,8 @@ async def sample_create_conversation(): The request object. Request for CreateConversation method. parent (:class:`str`): - Required. Full resource name of parent data store. - Format: + Required. Full resource name of parent + data store. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`` This corresponds to the ``parent`` field @@ -614,9 +617,9 @@ async def delete_conversation( ) -> None: r"""Deletes a Conversation. - If the - [Conversation][google.cloud.discoveryengine.v1beta.Conversation] - to delete does not exist, a NOT_FOUND error is returned. + If the `Conversation + `__ to + delete does not exist, a NOT_FOUND error is returned. .. code-block:: python @@ -646,8 +649,8 @@ async def sample_delete_conversation(): The request object. Request for DeleteConversation method. name (:class:`str`): - Required. The resource name of the Conversation to - delete. Format: + Required. The resource name of the + Conversation to delete. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`` This corresponds to the ``name`` field @@ -723,10 +726,12 @@ async def update_conversation( ) -> gcd_conversation.Conversation: r"""Updates a Conversation. - [Conversation][google.cloud.discoveryengine.v1beta.Conversation] + `Conversation + `__ action type cannot be changed. If the - [Conversation][google.cloud.discoveryengine.v1beta.Conversation] - to update does not exist, a NOT_FOUND error is returned. + `Conversation + `__ to + update does not exist, a NOT_FOUND error is returned. .. code-block:: python @@ -764,12 +769,16 @@ async def sample_update_conversation(): should not be set. update_mask (:class:`google.protobuf.field_mask_pb2.FieldMask`): Indicates which fields in the provided - [Conversation][google.cloud.discoveryengine.v1beta.Conversation] - to update. The following are NOT supported: + `Conversation + `__ + to update. The following are NOT + supported: - - [Conversation.name][google.cloud.discoveryengine.v1beta.Conversation.name] + * `Conversation.name + `__ - If not set or empty, all supported fields are updated. + If not set or empty, all supported + fields are updated. This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this @@ -886,8 +895,8 @@ async def sample_get_conversation(): request (Optional[Union[google.cloud.discoveryengine_v1beta.types.GetConversationRequest, dict]]): The request object. Request for GetConversation method. name (:class:`str`): - Required. The resource name of the Conversation to get. - Format: + Required. The resource name of the + Conversation to get. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`` This corresponds to the ``name`` field @@ -970,7 +979,8 @@ async def list_conversations( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListConversationsAsyncPager: r"""Lists all Conversations by their parent - [DataStore][google.cloud.discoveryengine.v1beta.DataStore]. + `DataStore + `__. .. code-block:: python @@ -1003,7 +1013,8 @@ async def sample_list_conversations(): request (Optional[Union[google.cloud.discoveryengine_v1beta.types.ListConversationsRequest, dict]]): The request object. Request for ListConversations method. parent (:class:`str`): - Required. The data store resource name. Format: + Required. The data store resource name. + Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`` This corresponds to the ``parent`` field @@ -1133,7 +1144,8 @@ async def sample_answer_query(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.AnswerQueryRequest, dict]]): The request object. Request message for - [ConversationalSearchService.AnswerQuery][google.cloud.discoveryengine.v1beta.ConversationalSearchService.AnswerQuery] + `ConversationalSearchService.AnswerQuery + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -1146,8 +1158,9 @@ async def sample_answer_query(): Returns: google.cloud.discoveryengine_v1beta.types.AnswerQueryResponse: Response message for - [ConversationalSearchService.AnswerQuery][google.cloud.discoveryengine.v1beta.ConversationalSearchService.AnswerQuery] - method. + `ConversationalSearchService.AnswerQuery + `__ + method. """ # Create or coerce a protobuf request object. @@ -1227,8 +1240,8 @@ async def sample_get_answer(): request (Optional[Union[google.cloud.discoveryengine_v1beta.types.GetAnswerRequest, dict]]): The request object. Request for GetAnswer method. name (:class:`str`): - Required. The resource name of the Answer to get. - Format: + Required. The resource name of the + Answer to get. Format: ``projects/{project}/locations/{location}/collections/{collection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`` This corresponds to the ``name`` field @@ -1309,8 +1322,10 @@ async def create_session( ) -> gcd_session.Session: r"""Creates a Session. - If the [Session][google.cloud.discoveryengine.v1beta.Session] to - create already exists, an ALREADY_EXISTS error is returned. + If the `Session + `__ to + create already exists, an ALREADY_EXISTS error is + returned. .. code-block:: python @@ -1342,8 +1357,8 @@ async def sample_create_session(): request (Optional[Union[google.cloud.discoveryengine_v1beta.types.CreateSessionRequest, dict]]): The request object. Request for CreateSession method. parent (:class:`str`): - Required. Full resource name of parent data store. - Format: + Required. Full resource name of parent + data store. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`` This corresponds to the ``parent`` field @@ -1430,7 +1445,8 @@ async def delete_session( ) -> None: r"""Deletes a Session. - If the [Session][google.cloud.discoveryengine.v1beta.Session] to + If the `Session + `__ to delete does not exist, a NOT_FOUND error is returned. .. code-block:: python @@ -1460,8 +1476,8 @@ async def sample_delete_session(): request (Optional[Union[google.cloud.discoveryengine_v1beta.types.DeleteSessionRequest, dict]]): The request object. Request for DeleteSession method. name (:class:`str`): - Required. The resource name of the Session to delete. - Format: + Required. The resource name of the + Session to delete. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`` This corresponds to the ``name`` field @@ -1535,10 +1551,11 @@ async def update_session( ) -> gcd_session.Session: r"""Updates a Session. - [Session][google.cloud.discoveryengine.v1beta.Session] action - type cannot be changed. If the - [Session][google.cloud.discoveryengine.v1beta.Session] to update - does not exist, a NOT_FOUND error is returned. + `Session + `__ action + type cannot be changed. If the `Session + `__ to + update does not exist, a NOT_FOUND error is returned. .. code-block:: python @@ -1575,12 +1592,16 @@ async def sample_update_session(): should not be set. update_mask (:class:`google.protobuf.field_mask_pb2.FieldMask`): Indicates which fields in the provided - [Session][google.cloud.discoveryengine.v1beta.Session] - to update. The following are NOT supported: + `Session + `__ + to update. The following are NOT + supported: - - [Session.name][google.cloud.discoveryengine.v1beta.Session.name] + * `Session.name + `__ - If not set or empty, all supported fields are updated. + If not set or empty, all supported + fields are updated. This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this @@ -1693,8 +1714,8 @@ async def sample_get_session(): request (Optional[Union[google.cloud.discoveryengine_v1beta.types.GetSessionRequest, dict]]): The request object. Request for GetSession method. name (:class:`str`): - Required. The resource name of the Session to get. - Format: + Required. The resource name of the + Session to get. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`` This corresponds to the ``name`` field @@ -1773,7 +1794,8 @@ async def list_sessions( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListSessionsAsyncPager: r"""Lists all Sessions by their parent - [DataStore][google.cloud.discoveryengine.v1beta.DataStore]. + `DataStore + `__. .. code-block:: python @@ -1806,7 +1828,8 @@ async def sample_list_sessions(): request (Optional[Union[google.cloud.discoveryengine_v1beta.types.ListSessionsRequest, dict]]): The request object. Request for ListSessions method. parent (:class:`str`): - Required. The data store resource name. Format: + Required. The data store resource name. + Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`` This corresponds to the ``parent`` field diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/conversational_search_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/conversational_search_service/client.py index 692c151b5bfb..52e2d1aae3bb 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/conversational_search_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/conversational_search_service/client.py @@ -953,17 +953,18 @@ def sample_converse_conversation(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.ConverseConversationRequest, dict]): The request object. Request message for - [ConversationalSearchService.ConverseConversation][google.cloud.discoveryengine.v1beta.ConversationalSearchService.ConverseConversation] + `ConversationalSearchService.ConverseConversation + `__ method. name (str): - Required. The resource name of the Conversation to get. - Format: + Required. The resource name of the + Conversation to get. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}``. Use ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/-`` - to activate auto session mode, which automatically - creates a new conversation inside a ConverseConversation - session. + to activate auto session mode, which + automatically creates a new conversation + inside a ConverseConversation session. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -984,8 +985,9 @@ def sample_converse_conversation(): Returns: google.cloud.discoveryengine_v1beta.types.ConverseConversationResponse: Response message for - [ConversationalSearchService.ConverseConversation][google.cloud.discoveryengine.v1beta.ConversationalSearchService.ConverseConversation] - method. + `ConversationalSearchService.ConverseConversation + `__ + method. """ # Create or coerce a protobuf request object. @@ -1052,9 +1054,10 @@ def create_conversation( ) -> gcd_conversation.Conversation: r"""Creates a Conversation. - If the - [Conversation][google.cloud.discoveryengine.v1beta.Conversation] - to create already exists, an ALREADY_EXISTS error is returned. + If the `Conversation + `__ to + create already exists, an ALREADY_EXISTS error is + returned. .. code-block:: python @@ -1087,8 +1090,8 @@ def sample_create_conversation(): The request object. Request for CreateConversation method. parent (str): - Required. Full resource name of parent data store. - Format: + Required. Full resource name of parent + data store. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`` This corresponds to the ``parent`` field @@ -1176,9 +1179,9 @@ def delete_conversation( ) -> None: r"""Deletes a Conversation. - If the - [Conversation][google.cloud.discoveryengine.v1beta.Conversation] - to delete does not exist, a NOT_FOUND error is returned. + If the `Conversation + `__ to + delete does not exist, a NOT_FOUND error is returned. .. code-block:: python @@ -1208,8 +1211,8 @@ def sample_delete_conversation(): The request object. Request for DeleteConversation method. name (str): - Required. The resource name of the Conversation to - delete. Format: + Required. The resource name of the + Conversation to delete. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`` This corresponds to the ``name`` field @@ -1282,10 +1285,12 @@ def update_conversation( ) -> gcd_conversation.Conversation: r"""Updates a Conversation. - [Conversation][google.cloud.discoveryengine.v1beta.Conversation] + `Conversation + `__ action type cannot be changed. If the - [Conversation][google.cloud.discoveryengine.v1beta.Conversation] - to update does not exist, a NOT_FOUND error is returned. + `Conversation + `__ to + update does not exist, a NOT_FOUND error is returned. .. code-block:: python @@ -1323,12 +1328,16 @@ def sample_update_conversation(): should not be set. update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided - [Conversation][google.cloud.discoveryengine.v1beta.Conversation] - to update. The following are NOT supported: + `Conversation + `__ + to update. The following are NOT + supported: - - [Conversation.name][google.cloud.discoveryengine.v1beta.Conversation.name] + * `Conversation.name + `__ - If not set or empty, all supported fields are updated. + If not set or empty, all supported + fields are updated. This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this @@ -1442,8 +1451,8 @@ def sample_get_conversation(): request (Union[google.cloud.discoveryengine_v1beta.types.GetConversationRequest, dict]): The request object. Request for GetConversation method. name (str): - Required. The resource name of the Conversation to get. - Format: + Required. The resource name of the + Conversation to get. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`` This corresponds to the ``name`` field @@ -1523,7 +1532,8 @@ def list_conversations( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListConversationsPager: r"""Lists all Conversations by their parent - [DataStore][google.cloud.discoveryengine.v1beta.DataStore]. + `DataStore + `__. .. code-block:: python @@ -1556,7 +1566,8 @@ def sample_list_conversations(): request (Union[google.cloud.discoveryengine_v1beta.types.ListConversationsRequest, dict]): The request object. Request for ListConversations method. parent (str): - Required. The data store resource name. Format: + Required. The data store resource name. + Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`` This corresponds to the ``parent`` field @@ -1683,7 +1694,8 @@ def sample_answer_query(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.AnswerQueryRequest, dict]): The request object. Request message for - [ConversationalSearchService.AnswerQuery][google.cloud.discoveryengine.v1beta.ConversationalSearchService.AnswerQuery] + `ConversationalSearchService.AnswerQuery + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1696,8 +1708,9 @@ def sample_answer_query(): Returns: google.cloud.discoveryengine_v1beta.types.AnswerQueryResponse: Response message for - [ConversationalSearchService.AnswerQuery][google.cloud.discoveryengine.v1beta.ConversationalSearchService.AnswerQuery] - method. + `ConversationalSearchService.AnswerQuery + `__ + method. """ # Create or coerce a protobuf request object. @@ -1775,8 +1788,8 @@ def sample_get_answer(): request (Union[google.cloud.discoveryengine_v1beta.types.GetAnswerRequest, dict]): The request object. Request for GetAnswer method. name (str): - Required. The resource name of the Answer to get. - Format: + Required. The resource name of the + Answer to get. Format: ``projects/{project}/locations/{location}/collections/{collection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`` This corresponds to the ``name`` field @@ -1854,8 +1867,10 @@ def create_session( ) -> gcd_session.Session: r"""Creates a Session. - If the [Session][google.cloud.discoveryengine.v1beta.Session] to - create already exists, an ALREADY_EXISTS error is returned. + If the `Session + `__ to + create already exists, an ALREADY_EXISTS error is + returned. .. code-block:: python @@ -1887,8 +1902,8 @@ def sample_create_session(): request (Union[google.cloud.discoveryengine_v1beta.types.CreateSessionRequest, dict]): The request object. Request for CreateSession method. parent (str): - Required. Full resource name of parent data store. - Format: + Required. Full resource name of parent + data store. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`` This corresponds to the ``parent`` field @@ -1972,7 +1987,8 @@ def delete_session( ) -> None: r"""Deletes a Session. - If the [Session][google.cloud.discoveryengine.v1beta.Session] to + If the `Session + `__ to delete does not exist, a NOT_FOUND error is returned. .. code-block:: python @@ -2002,8 +2018,8 @@ def sample_delete_session(): request (Union[google.cloud.discoveryengine_v1beta.types.DeleteSessionRequest, dict]): The request object. Request for DeleteSession method. name (str): - Required. The resource name of the Session to delete. - Format: + Required. The resource name of the + Session to delete. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`` This corresponds to the ``name`` field @@ -2074,10 +2090,11 @@ def update_session( ) -> gcd_session.Session: r"""Updates a Session. - [Session][google.cloud.discoveryengine.v1beta.Session] action - type cannot be changed. If the - [Session][google.cloud.discoveryengine.v1beta.Session] to update - does not exist, a NOT_FOUND error is returned. + `Session + `__ action + type cannot be changed. If the `Session + `__ to + update does not exist, a NOT_FOUND error is returned. .. code-block:: python @@ -2114,12 +2131,16 @@ def sample_update_session(): should not be set. update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided - [Session][google.cloud.discoveryengine.v1beta.Session] - to update. The following are NOT supported: + `Session + `__ + to update. The following are NOT + supported: - - [Session.name][google.cloud.discoveryengine.v1beta.Session.name] + * `Session.name + `__ - If not set or empty, all supported fields are updated. + If not set or empty, all supported + fields are updated. This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this @@ -2229,8 +2250,8 @@ def sample_get_session(): request (Union[google.cloud.discoveryengine_v1beta.types.GetSessionRequest, dict]): The request object. Request for GetSession method. name (str): - Required. The resource name of the Session to get. - Format: + Required. The resource name of the + Session to get. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`` This corresponds to the ``name`` field @@ -2306,7 +2327,8 @@ def list_sessions( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListSessionsPager: r"""Lists all Sessions by their parent - [DataStore][google.cloud.discoveryengine.v1beta.DataStore]. + `DataStore + `__. .. code-block:: python @@ -2339,7 +2361,8 @@ def sample_list_sessions(): request (Union[google.cloud.discoveryengine_v1beta.types.ListSessionsRequest, dict]): The request object. Request for ListSessions method. parent (str): - Required. The data store resource name. Format: + Required. The data store resource name. + Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`` This corresponds to the ``parent`` field diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/conversational_search_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/conversational_search_service/transports/base.py index 6934e2a7a1dc..974dc196a579 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/conversational_search_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/conversational_search_service/transports/base.py @@ -90,8 +90,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -106,11 +104,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/conversational_search_service/transports/grpc.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/conversational_search_service/transports/grpc.py index 131a37cfd5bd..cc17f5851183 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/conversational_search_service/transports/grpc.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/conversational_search_service/transports/grpc.py @@ -369,9 +369,10 @@ def create_conversation( Creates a Conversation. - If the - [Conversation][google.cloud.discoveryengine.v1beta.Conversation] - to create already exists, an ALREADY_EXISTS error is returned. + If the `Conversation + `__ to + create already exists, an ALREADY_EXISTS error is + returned. Returns: Callable[[~.CreateConversationRequest], @@ -401,9 +402,9 @@ def delete_conversation( Deletes a Conversation. - If the - [Conversation][google.cloud.discoveryengine.v1beta.Conversation] - to delete does not exist, a NOT_FOUND error is returned. + If the `Conversation + `__ to + delete does not exist, a NOT_FOUND error is returned. Returns: Callable[[~.DeleteConversationRequest], @@ -434,10 +435,12 @@ def update_conversation( Updates a Conversation. - [Conversation][google.cloud.discoveryengine.v1beta.Conversation] + `Conversation + `__ action type cannot be changed. If the - [Conversation][google.cloud.discoveryengine.v1beta.Conversation] - to update does not exist, a NOT_FOUND error is returned. + `Conversation + `__ to + update does not exist, a NOT_FOUND error is returned. Returns: Callable[[~.UpdateConversationRequest], @@ -496,7 +499,8 @@ def list_conversations( r"""Return a callable for the list conversations method over gRPC. Lists all Conversations by their parent - [DataStore][google.cloud.discoveryengine.v1beta.DataStore]. + `DataStore + `__. Returns: Callable[[~.ListConversationsRequest], @@ -581,8 +585,10 @@ def create_session( Creates a Session. - If the [Session][google.cloud.discoveryengine.v1beta.Session] to - create already exists, an ALREADY_EXISTS error is returned. + If the `Session + `__ to + create already exists, an ALREADY_EXISTS error is + returned. Returns: Callable[[~.CreateSessionRequest], @@ -612,7 +618,8 @@ def delete_session( Deletes a Session. - If the [Session][google.cloud.discoveryengine.v1beta.Session] to + If the `Session + `__ to delete does not exist, a NOT_FOUND error is returned. Returns: @@ -643,10 +650,11 @@ def update_session( Updates a Session. - [Session][google.cloud.discoveryengine.v1beta.Session] action - type cannot be changed. If the - [Session][google.cloud.discoveryengine.v1beta.Session] to update - does not exist, a NOT_FOUND error is returned. + `Session + `__ action + type cannot be changed. If the `Session + `__ to + update does not exist, a NOT_FOUND error is returned. Returns: Callable[[~.UpdateSessionRequest], @@ -702,7 +710,8 @@ def list_sessions( r"""Return a callable for the list sessions method over gRPC. Lists all Sessions by their parent - [DataStore][google.cloud.discoveryengine.v1beta.DataStore]. + `DataStore + `__. Returns: Callable[[~.ListSessionsRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/conversational_search_service/transports/grpc_asyncio.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/conversational_search_service/transports/grpc_asyncio.py index 45e9effbe00b..1b59703957f2 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/conversational_search_service/transports/grpc_asyncio.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/conversational_search_service/transports/grpc_asyncio.py @@ -379,9 +379,10 @@ def create_conversation( Creates a Conversation. - If the - [Conversation][google.cloud.discoveryengine.v1beta.Conversation] - to create already exists, an ALREADY_EXISTS error is returned. + If the `Conversation + `__ to + create already exists, an ALREADY_EXISTS error is + returned. Returns: Callable[[~.CreateConversationRequest], @@ -412,9 +413,9 @@ def delete_conversation( Deletes a Conversation. - If the - [Conversation][google.cloud.discoveryengine.v1beta.Conversation] - to delete does not exist, a NOT_FOUND error is returned. + If the `Conversation + `__ to + delete does not exist, a NOT_FOUND error is returned. Returns: Callable[[~.DeleteConversationRequest], @@ -445,10 +446,12 @@ def update_conversation( Updates a Conversation. - [Conversation][google.cloud.discoveryengine.v1beta.Conversation] + `Conversation + `__ action type cannot be changed. If the - [Conversation][google.cloud.discoveryengine.v1beta.Conversation] - to update does not exist, a NOT_FOUND error is returned. + `Conversation + `__ to + update does not exist, a NOT_FOUND error is returned. Returns: Callable[[~.UpdateConversationRequest], @@ -507,7 +510,8 @@ def list_conversations( r"""Return a callable for the list conversations method over gRPC. Lists all Conversations by their parent - [DataStore][google.cloud.discoveryengine.v1beta.DataStore]. + `DataStore + `__. Returns: Callable[[~.ListConversationsRequest], @@ -595,8 +599,10 @@ def create_session( Creates a Session. - If the [Session][google.cloud.discoveryengine.v1beta.Session] to - create already exists, an ALREADY_EXISTS error is returned. + If the `Session + `__ to + create already exists, an ALREADY_EXISTS error is + returned. Returns: Callable[[~.CreateSessionRequest], @@ -626,7 +632,8 @@ def delete_session( Deletes a Session. - If the [Session][google.cloud.discoveryengine.v1beta.Session] to + If the `Session + `__ to delete does not exist, a NOT_FOUND error is returned. Returns: @@ -658,10 +665,11 @@ def update_session( Updates a Session. - [Session][google.cloud.discoveryengine.v1beta.Session] action - type cannot be changed. If the - [Session][google.cloud.discoveryengine.v1beta.Session] to update - does not exist, a NOT_FOUND error is returned. + `Session + `__ action + type cannot be changed. If the `Session + `__ to + update does not exist, a NOT_FOUND error is returned. Returns: Callable[[~.UpdateSessionRequest], @@ -719,7 +727,8 @@ def list_sessions( r"""Return a callable for the list sessions method over gRPC. Lists all Sessions by their parent - [DataStore][google.cloud.discoveryengine.v1beta.DataStore]. + `DataStore + `__. Returns: Callable[[~.ListSessionsRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/conversational_search_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/conversational_search_service/transports/rest.py index 2087c6d7b598..fa253b64fcf1 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/conversational_search_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/conversational_search_service/transports/rest.py @@ -959,7 +959,8 @@ def __call__( Args: request (~.conversational_search_service.AnswerQueryRequest): The request object. Request message for - [ConversationalSearchService.AnswerQuery][google.cloud.discoveryengine.v1beta.ConversationalSearchService.AnswerQuery] + `ConversationalSearchService.AnswerQuery + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -972,7 +973,8 @@ def __call__( Returns: ~.conversational_search_service.AnswerQueryResponse: Response message for - [ConversationalSearchService.AnswerQuery][google.cloud.discoveryengine.v1beta.ConversationalSearchService.AnswerQuery] + `ConversationalSearchService.AnswerQuery + `__ method. """ @@ -1121,7 +1123,8 @@ def __call__( Args: request (~.conversational_search_service.ConverseConversationRequest): The request object. Request message for - [ConversationalSearchService.ConverseConversation][google.cloud.discoveryengine.v1beta.ConversationalSearchService.ConverseConversation] + `ConversationalSearchService.ConverseConversation + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1134,7 +1137,8 @@ def __call__( Returns: ~.conversational_search_service.ConverseConversationResponse: Response message for - [ConversationalSearchService.ConverseConversation][google.cloud.discoveryengine.v1beta.ConversationalSearchService.ConverseConversation] + `ConversationalSearchService.ConverseConversation + `__ method. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/data_store_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/data_store_service/async_client.py index 07a111abc18e..ccd133b3f8fa 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/data_store_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/data_store_service/async_client.py @@ -78,7 +78,7 @@ class DataStoreServiceAsyncClient: """Service for managing - [DataStore][google.cloud.discoveryengine.v1beta.DataStore] + `DataStore `__ configuration. """ @@ -330,14 +330,15 @@ async def create_data_store( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: - r"""Creates a - [DataStore][google.cloud.discoveryengine.v1beta.DataStore]. - + r"""Creates a `DataStore + `__. DataStore is for storing - [Documents][google.cloud.discoveryengine.v1beta.Document]. To - serve these documents for Search, or Recommendation use case, an - [Engine][google.cloud.discoveryengine.v1beta.Engine] needs to be - created separately. + `Documents + `__. To + serve these documents for Search, or Recommendation use + case, an `Engine + `__ needs to + be created separately. .. code-block:: python @@ -377,18 +378,20 @@ async def sample_create_data_store(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.CreateDataStoreRequest, dict]]): The request object. Request for - [DataStoreService.CreateDataStore][google.cloud.discoveryengine.v1beta.DataStoreService.CreateDataStore] + `DataStoreService.CreateDataStore + `__ method. parent (:class:`str`): - Required. The parent resource name, such as + Required. The parent resource name, such + as ``projects/{project}/locations/{location}/collections/{collection}``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. data_store (:class:`google.cloud.discoveryengine_v1beta.types.DataStore`): - Required. The - [DataStore][google.cloud.discoveryengine.v1beta.DataStore] + Required. The `DataStore + `__ to create. This corresponds to the ``data_store`` field @@ -396,15 +399,19 @@ async def sample_create_data_store(): should not be set. data_store_id (:class:`str`): Required. The ID to use for the - [DataStore][google.cloud.discoveryengine.v1beta.DataStore], - which will become the final component of the - [DataStore][google.cloud.discoveryengine.v1beta.DataStore]'s + `DataStore + `__, + which will become the final component of + the + `DataStore + `__'s resource name. - This field must conform to - `RFC-1034 `__ - standard with a length limit of 63 characters. - Otherwise, an INVALID_ARGUMENT error is returned. + This field must conform to `RFC-1034 + `__ + standard with a length limit of 63 + characters. Otherwise, an + INVALID_ARGUMENT error is returned. This corresponds to the ``data_store_id`` field on the ``request`` instance; if ``request`` is provided, this @@ -419,12 +426,13 @@ async def sample_create_data_store(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be + An object representing a long-running + operation. + The result type for the operation will + be :class:`google.cloud.discoveryengine_v1beta.types.DataStore` - DataStore captures global settings and configs at the - DataStore level. + DataStore captures global settings and + configs at the DataStore level. """ # Create or coerce a protobuf request object. @@ -497,8 +505,8 @@ async def get_data_store( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> data_store.DataStore: - r"""Gets a - [DataStore][google.cloud.discoveryengine.v1beta.DataStore]. + r"""Gets a `DataStore + `__. .. code-block:: python @@ -529,22 +537,26 @@ async def sample_get_data_store(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.GetDataStoreRequest, dict]]): The request object. Request message for - [DataStoreService.GetDataStore][google.cloud.discoveryengine.v1beta.DataStoreService.GetDataStore] + `DataStoreService.GetDataStore + `__ method. name (:class:`str`): Required. Full resource name of - [DataStore][google.cloud.discoveryengine.v1beta.DataStore], + `DataStore + `__, such as ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}``. - If the caller does not have permission to access the - [DataStore][google.cloud.discoveryengine.v1beta.DataStore], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to access the `DataStore + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. - If the requested - [DataStore][google.cloud.discoveryengine.v1beta.DataStore] - does not exist, a NOT_FOUND error is returned. + If the requested `DataStore + `__ + does not exist, a NOT_FOUND error is + returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -621,8 +633,8 @@ async def list_data_stores( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListDataStoresAsyncPager: - r"""Lists all the - [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s + r"""Lists all the `DataStore + `__s associated with the project. .. code-block:: python @@ -655,17 +667,20 @@ async def sample_list_data_stores(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.ListDataStoresRequest, dict]]): The request object. Request message for - [DataStoreService.ListDataStores][google.cloud.discoveryengine.v1beta.DataStoreService.ListDataStores] + `DataStoreService.ListDataStores + `__ method. parent (:class:`str`): - Required. The parent branch resource name, such as + Required. The parent branch resource + name, such as ``projects/{project}/locations/{location}/collections/{collection_id}``. - If the caller does not have permission to list - [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s - under this location, regardless of whether or not this - data store exists, a PERMISSION_DENIED error is - returned. + If the caller does not have permission + to list `DataStore + `__s + under this location, regardless of + whether or not this data store exists, a + PERMISSION_DENIED error is returned. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -681,11 +696,13 @@ async def sample_list_data_stores(): Returns: google.cloud.discoveryengine_v1beta.services.data_store_service.pagers.ListDataStoresAsyncPager: Response message for - [DataStoreService.ListDataStores][google.cloud.discoveryengine.v1beta.DataStoreService.ListDataStores] - method. + `DataStoreService.ListDataStores + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -759,8 +776,8 @@ async def delete_data_store( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: - r"""Deletes a - [DataStore][google.cloud.discoveryengine.v1beta.DataStore]. + r"""Deletes a `DataStore + `__. .. code-block:: python @@ -795,22 +812,26 @@ async def sample_delete_data_store(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.DeleteDataStoreRequest, dict]]): The request object. Request message for - [DataStoreService.DeleteDataStore][google.cloud.discoveryengine.v1beta.DataStoreService.DeleteDataStore] + `DataStoreService.DeleteDataStore + `__ method. name (:class:`str`): Required. Full resource name of - [DataStore][google.cloud.discoveryengine.v1beta.DataStore], + `DataStore + `__, such as ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}``. - If the caller does not have permission to delete the - [DataStore][google.cloud.discoveryengine.v1beta.DataStore], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to delete the `DataStore + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. - If the - [DataStore][google.cloud.discoveryengine.v1beta.DataStore] - to delete does not exist, a NOT_FOUND error is returned. + If the `DataStore + `__ + to delete does not exist, a NOT_FOUND + error is returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -825,18 +846,21 @@ async def sample_delete_data_store(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.protobuf.empty_pb2.Empty` A generic empty message that you can re-use to avoid defining duplicated - empty messages in your APIs. A typical example is to - use it as the request or the response type of an API - method. For instance: - - service Foo { - rpc Bar(google.protobuf.Empty) returns - (google.protobuf.Empty); - - } + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.protobuf.empty_pb2.Empty` + A generic empty message that you can + re-use to avoid defining duplicated + empty messages in your APIs. A typical + example is to use it as the request or + the response type of an API method. For + instance: + + service Foo { + rpc Bar(google.protobuf.Empty) + returns (google.protobuf.Empty); } """ # Create or coerce a protobuf request object. @@ -908,8 +932,8 @@ async def update_data_store( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> gcd_data_store.DataStore: - r"""Updates a - [DataStore][google.cloud.discoveryengine.v1beta.DataStore] + r"""Updates a `DataStore + `__ .. code-block:: python @@ -943,32 +967,37 @@ async def sample_update_data_store(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.UpdateDataStoreRequest, dict]]): The request object. Request message for - [DataStoreService.UpdateDataStore][google.cloud.discoveryengine.v1beta.DataStoreService.UpdateDataStore] + `DataStoreService.UpdateDataStore + `__ method. data_store (:class:`google.cloud.discoveryengine_v1beta.types.DataStore`): - Required. The - [DataStore][google.cloud.discoveryengine.v1beta.DataStore] + Required. The `DataStore + `__ to update. - If the caller does not have permission to update the - [DataStore][google.cloud.discoveryengine.v1beta.DataStore], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to update the `DataStore + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. - If the - [DataStore][google.cloud.discoveryengine.v1beta.DataStore] - to update does not exist, a NOT_FOUND error is returned. + If the `DataStore + `__ + to update does not exist, a NOT_FOUND + error is returned. This corresponds to the ``data_store`` field on the ``request`` instance; if ``request`` is provided, this should not be set. update_mask (:class:`google.protobuf.field_mask_pb2.FieldMask`): Indicates which fields in the provided - [DataStore][google.cloud.discoveryengine.v1beta.DataStore] + `DataStore + `__ to update. - If an unsupported or unknown field is provided, an - INVALID_ARGUMENT error is returned. + If an unsupported or unknown field is + provided, an INVALID_ARGUMENT error is + returned. This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/data_store_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/data_store_service/client.py index 831718574c1b..000c649e083e 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/data_store_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/data_store_service/client.py @@ -124,7 +124,7 @@ def get_transport_class( class DataStoreServiceClient(metaclass=DataStoreServiceClientMeta): """Service for managing - [DataStore][google.cloud.discoveryengine.v1beta.DataStore] + `DataStore `__ configuration. """ @@ -832,14 +832,15 @@ def create_data_store( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: - r"""Creates a - [DataStore][google.cloud.discoveryengine.v1beta.DataStore]. - + r"""Creates a `DataStore + `__. DataStore is for storing - [Documents][google.cloud.discoveryengine.v1beta.Document]. To - serve these documents for Search, or Recommendation use case, an - [Engine][google.cloud.discoveryengine.v1beta.Engine] needs to be - created separately. + `Documents + `__. To + serve these documents for Search, or Recommendation use + case, an `Engine + `__ needs to + be created separately. .. code-block:: python @@ -879,18 +880,20 @@ def sample_create_data_store(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.CreateDataStoreRequest, dict]): The request object. Request for - [DataStoreService.CreateDataStore][google.cloud.discoveryengine.v1beta.DataStoreService.CreateDataStore] + `DataStoreService.CreateDataStore + `__ method. parent (str): - Required. The parent resource name, such as + Required. The parent resource name, such + as ``projects/{project}/locations/{location}/collections/{collection}``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. data_store (google.cloud.discoveryengine_v1beta.types.DataStore): - Required. The - [DataStore][google.cloud.discoveryengine.v1beta.DataStore] + Required. The `DataStore + `__ to create. This corresponds to the ``data_store`` field @@ -898,15 +901,19 @@ def sample_create_data_store(): should not be set. data_store_id (str): Required. The ID to use for the - [DataStore][google.cloud.discoveryengine.v1beta.DataStore], - which will become the final component of the - [DataStore][google.cloud.discoveryengine.v1beta.DataStore]'s + `DataStore + `__, + which will become the final component of + the + `DataStore + `__'s resource name. - This field must conform to - `RFC-1034 `__ - standard with a length limit of 63 characters. - Otherwise, an INVALID_ARGUMENT error is returned. + This field must conform to `RFC-1034 + `__ + standard with a length limit of 63 + characters. Otherwise, an + INVALID_ARGUMENT error is returned. This corresponds to the ``data_store_id`` field on the ``request`` instance; if ``request`` is provided, this @@ -921,12 +928,13 @@ def sample_create_data_store(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be + An object representing a long-running + operation. + The result type for the operation will + be :class:`google.cloud.discoveryengine_v1beta.types.DataStore` - DataStore captures global settings and configs at the - DataStore level. + DataStore captures global settings and + configs at the DataStore level. """ # Create or coerce a protobuf request object. @@ -996,8 +1004,8 @@ def get_data_store( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> data_store.DataStore: - r"""Gets a - [DataStore][google.cloud.discoveryengine.v1beta.DataStore]. + r"""Gets a `DataStore + `__. .. code-block:: python @@ -1028,22 +1036,26 @@ def sample_get_data_store(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.GetDataStoreRequest, dict]): The request object. Request message for - [DataStoreService.GetDataStore][google.cloud.discoveryengine.v1beta.DataStoreService.GetDataStore] + `DataStoreService.GetDataStore + `__ method. name (str): Required. Full resource name of - [DataStore][google.cloud.discoveryengine.v1beta.DataStore], + `DataStore + `__, such as ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}``. - If the caller does not have permission to access the - [DataStore][google.cloud.discoveryengine.v1beta.DataStore], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to access the `DataStore + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. - If the requested - [DataStore][google.cloud.discoveryengine.v1beta.DataStore] - does not exist, a NOT_FOUND error is returned. + If the requested `DataStore + `__ + does not exist, a NOT_FOUND error is + returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1117,8 +1129,8 @@ def list_data_stores( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListDataStoresPager: - r"""Lists all the - [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s + r"""Lists all the `DataStore + `__s associated with the project. .. code-block:: python @@ -1151,17 +1163,20 @@ def sample_list_data_stores(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.ListDataStoresRequest, dict]): The request object. Request message for - [DataStoreService.ListDataStores][google.cloud.discoveryengine.v1beta.DataStoreService.ListDataStores] + `DataStoreService.ListDataStores + `__ method. parent (str): - Required. The parent branch resource name, such as + Required. The parent branch resource + name, such as ``projects/{project}/locations/{location}/collections/{collection_id}``. - If the caller does not have permission to list - [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s - under this location, regardless of whether or not this - data store exists, a PERMISSION_DENIED error is - returned. + If the caller does not have permission + to list `DataStore + `__s + under this location, regardless of + whether or not this data store exists, a + PERMISSION_DENIED error is returned. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -1177,11 +1192,13 @@ def sample_list_data_stores(): Returns: google.cloud.discoveryengine_v1beta.services.data_store_service.pagers.ListDataStoresPager: Response message for - [DataStoreService.ListDataStores][google.cloud.discoveryengine.v1beta.DataStoreService.ListDataStores] - method. + `DataStoreService.ListDataStores + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -1252,8 +1269,8 @@ def delete_data_store( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: - r"""Deletes a - [DataStore][google.cloud.discoveryengine.v1beta.DataStore]. + r"""Deletes a `DataStore + `__. .. code-block:: python @@ -1288,22 +1305,26 @@ def sample_delete_data_store(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.DeleteDataStoreRequest, dict]): The request object. Request message for - [DataStoreService.DeleteDataStore][google.cloud.discoveryengine.v1beta.DataStoreService.DeleteDataStore] + `DataStoreService.DeleteDataStore + `__ method. name (str): Required. Full resource name of - [DataStore][google.cloud.discoveryengine.v1beta.DataStore], + `DataStore + `__, such as ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}``. - If the caller does not have permission to delete the - [DataStore][google.cloud.discoveryengine.v1beta.DataStore], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to delete the `DataStore + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. - If the - [DataStore][google.cloud.discoveryengine.v1beta.DataStore] - to delete does not exist, a NOT_FOUND error is returned. + If the `DataStore + `__ + to delete does not exist, a NOT_FOUND + error is returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1318,18 +1339,21 @@ def sample_delete_data_store(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.protobuf.empty_pb2.Empty` A generic empty message that you can re-use to avoid defining duplicated - empty messages in your APIs. A typical example is to - use it as the request or the response type of an API - method. For instance: - - service Foo { - rpc Bar(google.protobuf.Empty) returns - (google.protobuf.Empty); - - } + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.protobuf.empty_pb2.Empty` + A generic empty message that you can + re-use to avoid defining duplicated + empty messages in your APIs. A typical + example is to use it as the request or + the response type of an API method. For + instance: + + service Foo { + rpc Bar(google.protobuf.Empty) + returns (google.protobuf.Empty); } """ # Create or coerce a protobuf request object. @@ -1398,8 +1422,8 @@ def update_data_store( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> gcd_data_store.DataStore: - r"""Updates a - [DataStore][google.cloud.discoveryengine.v1beta.DataStore] + r"""Updates a `DataStore + `__ .. code-block:: python @@ -1433,32 +1457,37 @@ def sample_update_data_store(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.UpdateDataStoreRequest, dict]): The request object. Request message for - [DataStoreService.UpdateDataStore][google.cloud.discoveryengine.v1beta.DataStoreService.UpdateDataStore] + `DataStoreService.UpdateDataStore + `__ method. data_store (google.cloud.discoveryengine_v1beta.types.DataStore): - Required. The - [DataStore][google.cloud.discoveryengine.v1beta.DataStore] + Required. The `DataStore + `__ to update. - If the caller does not have permission to update the - [DataStore][google.cloud.discoveryengine.v1beta.DataStore], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to update the `DataStore + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. - If the - [DataStore][google.cloud.discoveryengine.v1beta.DataStore] - to update does not exist, a NOT_FOUND error is returned. + If the `DataStore + `__ + to update does not exist, a NOT_FOUND + error is returned. This corresponds to the ``data_store`` field on the ``request`` instance; if ``request`` is provided, this should not be set. update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided - [DataStore][google.cloud.discoveryengine.v1beta.DataStore] + `DataStore + `__ to update. - If an unsupported or unknown field is provided, an - INVALID_ARGUMENT error is returned. + If an unsupported or unknown field is + provided, an INVALID_ARGUMENT error is + returned. This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/data_store_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/data_store_service/transports/base.py index 16d1f574b1a1..f88070ea435e 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/data_store_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/data_store_service/transports/base.py @@ -86,8 +86,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -102,11 +100,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/data_store_service/transports/grpc.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/data_store_service/transports/grpc.py index 34171a829227..397b9c3e01b9 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/data_store_service/transports/grpc.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/data_store_service/transports/grpc.py @@ -115,7 +115,7 @@ class DataStoreServiceGrpcTransport(DataStoreServiceTransport): """gRPC backend transport for DataStoreService. Service for managing - [DataStore][google.cloud.discoveryengine.v1beta.DataStore] + `DataStore `__ configuration. This class defines the same methods as the primary client, so the @@ -352,14 +352,15 @@ def create_data_store( ]: r"""Return a callable for the create data store method over gRPC. - Creates a - [DataStore][google.cloud.discoveryengine.v1beta.DataStore]. - + Creates a `DataStore + `__. DataStore is for storing - [Documents][google.cloud.discoveryengine.v1beta.Document]. To - serve these documents for Search, or Recommendation use case, an - [Engine][google.cloud.discoveryengine.v1beta.Engine] needs to be - created separately. + `Documents + `__. To + serve these documents for Search, or Recommendation use + case, an `Engine + `__ needs to + be created separately. Returns: Callable[[~.CreateDataStoreRequest], @@ -385,8 +386,8 @@ def get_data_store( ) -> Callable[[data_store_service.GetDataStoreRequest], data_store.DataStore]: r"""Return a callable for the get data store method over gRPC. - Gets a - [DataStore][google.cloud.discoveryengine.v1beta.DataStore]. + Gets a `DataStore + `__. Returns: Callable[[~.GetDataStoreRequest], @@ -415,8 +416,8 @@ def list_data_stores( ]: r"""Return a callable for the list data stores method over gRPC. - Lists all the - [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s + Lists all the `DataStore + `__s associated with the project. Returns: @@ -445,8 +446,8 @@ def delete_data_store( ]: r"""Return a callable for the delete data store method over gRPC. - Deletes a - [DataStore][google.cloud.discoveryengine.v1beta.DataStore]. + Deletes a `DataStore + `__. Returns: Callable[[~.DeleteDataStoreRequest], @@ -474,8 +475,8 @@ def update_data_store( ]: r"""Return a callable for the update data store method over gRPC. - Updates a - [DataStore][google.cloud.discoveryengine.v1beta.DataStore] + Updates a `DataStore + `__ Returns: Callable[[~.UpdateDataStoreRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/data_store_service/transports/grpc_asyncio.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/data_store_service/transports/grpc_asyncio.py index 0230fe0f5c31..5c05850a93fb 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/data_store_service/transports/grpc_asyncio.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/data_store_service/transports/grpc_asyncio.py @@ -121,7 +121,7 @@ class DataStoreServiceGrpcAsyncIOTransport(DataStoreServiceTransport): """gRPC AsyncIO backend transport for DataStoreService. Service for managing - [DataStore][google.cloud.discoveryengine.v1beta.DataStore] + `DataStore `__ configuration. This class defines the same methods as the primary client, so the @@ -360,14 +360,15 @@ def create_data_store( ]: r"""Return a callable for the create data store method over gRPC. - Creates a - [DataStore][google.cloud.discoveryengine.v1beta.DataStore]. - + Creates a `DataStore + `__. DataStore is for storing - [Documents][google.cloud.discoveryengine.v1beta.Document]. To - serve these documents for Search, or Recommendation use case, an - [Engine][google.cloud.discoveryengine.v1beta.Engine] needs to be - created separately. + `Documents + `__. To + serve these documents for Search, or Recommendation use + case, an `Engine + `__ needs to + be created separately. Returns: Callable[[~.CreateDataStoreRequest], @@ -395,8 +396,8 @@ def get_data_store( ]: r"""Return a callable for the get data store method over gRPC. - Gets a - [DataStore][google.cloud.discoveryengine.v1beta.DataStore]. + Gets a `DataStore + `__. Returns: Callable[[~.GetDataStoreRequest], @@ -425,8 +426,8 @@ def list_data_stores( ]: r"""Return a callable for the list data stores method over gRPC. - Lists all the - [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s + Lists all the `DataStore + `__s associated with the project. Returns: @@ -455,8 +456,8 @@ def delete_data_store( ]: r"""Return a callable for the delete data store method over gRPC. - Deletes a - [DataStore][google.cloud.discoveryengine.v1beta.DataStore]. + Deletes a `DataStore + `__. Returns: Callable[[~.DeleteDataStoreRequest], @@ -484,8 +485,8 @@ def update_data_store( ]: r"""Return a callable for the update data store method over gRPC. - Updates a - [DataStore][google.cloud.discoveryengine.v1beta.DataStore] + Updates a `DataStore + `__ Returns: Callable[[~.UpdateDataStoreRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/data_store_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/data_store_service/transports/rest.py index 4801b5d48cac..c743bb8e5675 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/data_store_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/data_store_service/transports/rest.py @@ -454,7 +454,7 @@ class DataStoreServiceRestTransport(_BaseDataStoreServiceRestTransport): """REST backend synchronous transport for DataStoreService. Service for managing - [DataStore][google.cloud.discoveryengine.v1beta.DataStore] + `DataStore `__ configuration. This class defines the same methods as the primary client, so the @@ -740,7 +740,8 @@ def __call__( Args: request (~.data_store_service.CreateDataStoreRequest): The request object. Request for - [DataStoreService.CreateDataStore][google.cloud.discoveryengine.v1beta.DataStoreService.CreateDataStore] + `DataStoreService.CreateDataStore + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -895,7 +896,8 @@ def __call__( Args: request (~.data_store_service.DeleteDataStoreRequest): The request object. Request message for - [DataStoreService.DeleteDataStore][google.cloud.discoveryengine.v1beta.DataStoreService.DeleteDataStore] + `DataStoreService.DeleteDataStore + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1044,7 +1046,8 @@ def __call__( Args: request (~.data_store_service.GetDataStoreRequest): The request object. Request message for - [DataStoreService.GetDataStore][google.cloud.discoveryengine.v1beta.DataStoreService.GetDataStore] + `DataStoreService.GetDataStore + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1192,7 +1195,8 @@ def __call__( Args: request (~.data_store_service.ListDataStoresRequest): The request object. Request message for - [DataStoreService.ListDataStores][google.cloud.discoveryengine.v1beta.DataStoreService.ListDataStores] + `DataStoreService.ListDataStores + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1205,7 +1209,8 @@ def __call__( Returns: ~.data_store_service.ListDataStoresResponse: Response message for - [DataStoreService.ListDataStores][google.cloud.discoveryengine.v1beta.DataStoreService.ListDataStores] + `DataStoreService.ListDataStores + `__ method. """ @@ -1347,7 +1352,8 @@ def __call__( Args: request (~.data_store_service.UpdateDataStoreRequest): The request object. Request message for - [DataStoreService.UpdateDataStore][google.cloud.discoveryengine.v1beta.DataStoreService.UpdateDataStore] + `DataStoreService.UpdateDataStore + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/document_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/document_service/async_client.py index fe146fc67c62..771c910ec591 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/document_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/document_service/async_client.py @@ -77,8 +77,8 @@ class DocumentServiceAsyncClient: """Service for ingesting - [Document][google.cloud.discoveryengine.v1beta.Document] information - of the customer's website. + `Document `__ + information of the customer's website. """ _client: DocumentServiceClient @@ -323,7 +323,8 @@ async def get_document( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> document.Document: - r"""Gets a [Document][google.cloud.discoveryengine.v1beta.Document]. + r"""Gets a `Document + `__. .. code-block:: python @@ -354,22 +355,27 @@ async def sample_get_document(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.GetDocumentRequest, dict]]): The request object. Request message for - [DocumentService.GetDocument][google.cloud.discoveryengine.v1beta.DocumentService.GetDocument] + `DocumentService.GetDocument + `__ method. name (:class:`str`): Required. Full resource name of - [Document][google.cloud.discoveryengine.v1beta.Document], + `Document + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}``. - If the caller does not have permission to access the - [Document][google.cloud.discoveryengine.v1beta.Document], - regardless of whether or not it exists, a - ``PERMISSION_DENIED`` error is returned. + If the caller does not have permission + to access the `Document + `__, + regardless of whether or not it exists, + a ``PERMISSION_DENIED`` error is + returned. - If the requested - [Document][google.cloud.discoveryengine.v1beta.Document] - does not exist, a ``NOT_FOUND`` error is returned. + If the requested `Document + `__ + does not exist, a ``NOT_FOUND`` error is + returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -447,8 +453,8 @@ async def list_documents( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListDocumentsAsyncPager: - r"""Gets a list of - [Document][google.cloud.discoveryengine.v1beta.Document]s. + r"""Gets a list of `Document + `__s. .. code-block:: python @@ -480,19 +486,23 @@ async def sample_list_documents(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.ListDocumentsRequest, dict]]): The request object. Request message for - [DocumentService.ListDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments] + `DocumentService.ListDocuments + `__ method. parent (:class:`str`): - Required. The parent branch resource name, such as + Required. The parent branch resource + name, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}``. - Use ``default_branch`` as the branch ID, to list - documents under the default branch. - - If the caller does not have permission to list - [Document][google.cloud.discoveryengine.v1beta.Document]s - under this branch, regardless of whether or not this - branch exists, a ``PERMISSION_DENIED`` error is - returned. + Use ``default_branch`` as the branch ID, + to list documents under the default + branch. + + If the caller does not have permission + to list `Document + `__s + under this branch, regardless of whether + or not this branch exists, a + ``PERMISSION_DENIED`` error is returned. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -508,11 +518,13 @@ async def sample_list_documents(): Returns: google.cloud.discoveryengine_v1beta.services.document_service.pagers.ListDocumentsAsyncPager: Response message for - [DocumentService.ListDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments] - method. + `DocumentService.ListDocuments + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -586,8 +598,8 @@ async def create_document( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> gcd_document.Document: - r"""Creates a - [Document][google.cloud.discoveryengine.v1beta.Document]. + r"""Creates a `Document + `__. .. code-block:: python @@ -619,18 +631,20 @@ async def sample_create_document(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.CreateDocumentRequest, dict]]): The request object. Request message for - [DocumentService.CreateDocument][google.cloud.discoveryengine.v1beta.DocumentService.CreateDocument] + `DocumentService.CreateDocument + `__ method. parent (:class:`str`): - Required. The parent resource name, such as + Required. The parent resource name, such + as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. document (:class:`google.cloud.discoveryengine_v1beta.types.Document`): - Required. The - [Document][google.cloud.discoveryengine.v1beta.Document] + Required. The `Document + `__ to create. This corresponds to the ``document`` field @@ -638,25 +652,32 @@ async def sample_create_document(): should not be set. document_id (:class:`str`): Required. The ID to use for the - [Document][google.cloud.discoveryengine.v1beta.Document], + `Document + `__, which becomes the final component of the - [Document.name][google.cloud.discoveryengine.v1beta.Document.name]. - - If the caller does not have permission to create the - [Document][google.cloud.discoveryengine.v1beta.Document], - regardless of whether or not it exists, a - ``PERMISSION_DENIED`` error is returned. + `Document.name + `__. + + If the caller does not have permission + to create the `Document + `__, + regardless of whether or not it exists, + a ``PERMISSION_DENIED`` error is + returned. This field must be unique among all - [Document][google.cloud.discoveryengine.v1beta.Document]s - with the same - [parent][google.cloud.discoveryengine.v1beta.CreateDocumentRequest.parent]. - Otherwise, an ``ALREADY_EXISTS`` error is returned. - - This field must conform to - `RFC-1034 `__ - standard with a length limit of 63 characters. - Otherwise, an ``INVALID_ARGUMENT`` error is returned. + `Document + `__s + with the same `parent + `__. + Otherwise, an ``ALREADY_EXISTS`` error + is returned. + + This field must conform to `RFC-1034 + `__ + standard with a length limit of 63 + characters. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. This corresponds to the ``document_id`` field on the ``request`` instance; if ``request`` is provided, this @@ -739,8 +760,8 @@ async def update_document( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> gcd_document.Document: - r"""Updates a - [Document][google.cloud.discoveryengine.v1beta.Document]. + r"""Updates a `Document + `__. .. code-block:: python @@ -770,21 +791,26 @@ async def sample_update_document(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.UpdateDocumentRequest, dict]]): The request object. Request message for - [DocumentService.UpdateDocument][google.cloud.discoveryengine.v1beta.DocumentService.UpdateDocument] + `DocumentService.UpdateDocument + `__ method. document (:class:`google.cloud.discoveryengine_v1beta.types.Document`): Required. The document to update/create. - If the caller does not have permission to update the - [Document][google.cloud.discoveryengine.v1beta.Document], - regardless of whether or not it exists, a - ``PERMISSION_DENIED`` error is returned. + If the caller does not have permission + to update the `Document + `__, + regardless of whether or not it exists, + a ``PERMISSION_DENIED`` error is + returned. - If the - [Document][google.cloud.discoveryengine.v1beta.Document] + If the `Document + `__ to update does not exist and - [allow_missing][google.cloud.discoveryengine.v1beta.UpdateDocumentRequest.allow_missing] - is not set, a ``NOT_FOUND`` error is returned. + `allow_missing + `__ + is not set, a ``NOT_FOUND`` error is + returned. This corresponds to the ``document`` field on the ``request`` instance; if ``request`` is provided, this @@ -875,8 +901,8 @@ async def delete_document( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> None: - r"""Deletes a - [Document][google.cloud.discoveryengine.v1beta.Document]. + r"""Deletes a `Document + `__. .. code-block:: python @@ -904,24 +930,28 @@ async def sample_delete_document(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.DeleteDocumentRequest, dict]]): The request object. Request message for - [DocumentService.DeleteDocument][google.cloud.discoveryengine.v1beta.DocumentService.DeleteDocument] + `DocumentService.DeleteDocument + `__ method. name (:class:`str`): Required. Full resource name of - [Document][google.cloud.discoveryengine.v1beta.Document], + `Document + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}``. - If the caller does not have permission to delete the - [Document][google.cloud.discoveryengine.v1beta.Document], - regardless of whether or not it exists, a - ``PERMISSION_DENIED`` error is returned. - - If the - [Document][google.cloud.discoveryengine.v1beta.Document] - to delete does not exist, a ``NOT_FOUND`` error is + If the caller does not have permission + to delete the `Document + `__, + regardless of whether or not it exists, + a ``PERMISSION_DENIED`` error is returned. + If the `Document + `__ + to delete does not exist, a + ``NOT_FOUND`` error is returned. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -988,12 +1018,14 @@ async def import_documents( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: r"""Bulk import of multiple - [Document][google.cloud.discoveryengine.v1beta.Document]s. - Request processing may be synchronous. Non-existing items are - created. + `Document + `__s. + Request processing may be synchronous. Non-existing + items are created. Note: It is possible for a subset of the - [Document][google.cloud.discoveryengine.v1beta.Document]s to be + `Document + `__s to be successfully updated. .. code-block:: python @@ -1039,14 +1071,17 @@ async def sample_import_documents(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1beta.types.ImportDocumentsResponse` Response of the - [ImportDocumentsRequest][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest]. - If the long running operation is done, then this - message is returned by the - google.longrunning.Operations.response field if the - operation was successful. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1beta.types.ImportDocumentsResponse` + Response of the `ImportDocumentsRequest + `__. + If the long running operation is done, + then this message is returned by the + google.longrunning.Operations.response + field if the operation was successful. """ # Create or coerce a protobuf request object. @@ -1098,23 +1133,29 @@ async def purge_documents( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: r"""Permanently deletes all selected - [Document][google.cloud.discoveryengine.v1beta.Document]s in a + `Document + `__s in a branch. This process is asynchronous. Depending on the number of - [Document][google.cloud.discoveryengine.v1beta.Document]s to be - deleted, this operation can take hours to complete. Before the - delete operation completes, some - [Document][google.cloud.discoveryengine.v1beta.Document]s might + `Document + `__s to be + deleted, this operation can take hours to complete. + Before the delete operation completes, some `Document + `__s might still be returned by - [DocumentService.GetDocument][google.cloud.discoveryengine.v1beta.DocumentService.GetDocument] + `DocumentService.GetDocument + `__ or - [DocumentService.ListDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments]. + `DocumentService.ListDocuments + `__. To get a list of the - [Document][google.cloud.discoveryengine.v1beta.Document]s to be + `Document + `__s to be deleted, set - [PurgeDocumentsRequest.force][google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest.force] + `PurgeDocumentsRequest.force + `__ to false. .. code-block:: python @@ -1155,7 +1196,8 @@ async def sample_purge_documents(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.PurgeDocumentsRequest, dict]]): The request object. Request message for - [DocumentService.PurgeDocuments][google.cloud.discoveryengine.v1beta.DocumentService.PurgeDocuments] + `DocumentService.PurgeDocuments + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -1167,13 +1209,19 @@ async def sample_purge_documents(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1beta.types.PurgeDocumentsResponse` Response message for - [DocumentService.PurgeDocuments][google.cloud.discoveryengine.v1beta.DocumentService.PurgeDocuments] - method. If the long running operation is successfully - done, then this message is returned by the - google.longrunning.Operations.response field. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1beta.types.PurgeDocumentsResponse` + Response message for + `DocumentService.PurgeDocuments + `__ + method. If the long running operation is + successfully done, then this message is + returned by the + google.longrunning.Operations.response + field. """ # Create or coerce a protobuf request object. @@ -1228,7 +1276,8 @@ async def batch_get_documents_metadata( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> document_service.BatchGetDocumentsMetadataResponse: r"""Gets index freshness metadata for - [Document][google.cloud.discoveryengine.v1beta.Document]s. + `Document + `__s. Supported for website search only. .. code-block:: python @@ -1260,10 +1309,12 @@ async def sample_batch_get_documents_metadata(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.BatchGetDocumentsMetadataRequest, dict]]): The request object. Request message for - [DocumentService.BatchGetDocumentsMetadata][google.cloud.discoveryengine.v1beta.DocumentService.BatchGetDocumentsMetadata] + `DocumentService.BatchGetDocumentsMetadata + `__ method. parent (:class:`str`): - Required. The parent branch resource name, such as + Required. The parent branch resource + name, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}``. This corresponds to the ``parent`` field @@ -1280,8 +1331,9 @@ async def sample_batch_get_documents_metadata(): Returns: google.cloud.discoveryengine_v1beta.types.BatchGetDocumentsMetadataResponse: Response message for - [DocumentService.BatchGetDocumentsMetadata][google.cloud.discoveryengine.v1beta.DocumentService.BatchGetDocumentsMetadata] - method. + `DocumentService.BatchGetDocumentsMetadata + `__ + method. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/document_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/document_service/client.py index 7bfb3b3e365b..7fc01ae9cd20 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/document_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/document_service/client.py @@ -123,8 +123,8 @@ def get_transport_class( class DocumentServiceClient(metaclass=DocumentServiceClientMeta): """Service for ingesting - [Document][google.cloud.discoveryengine.v1beta.Document] information - of the customer's website. + `Document `__ + information of the customer's website. """ @staticmethod @@ -836,7 +836,8 @@ def get_document( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> document.Document: - r"""Gets a [Document][google.cloud.discoveryengine.v1beta.Document]. + r"""Gets a `Document + `__. .. code-block:: python @@ -867,22 +868,27 @@ def sample_get_document(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.GetDocumentRequest, dict]): The request object. Request message for - [DocumentService.GetDocument][google.cloud.discoveryengine.v1beta.DocumentService.GetDocument] + `DocumentService.GetDocument + `__ method. name (str): Required. Full resource name of - [Document][google.cloud.discoveryengine.v1beta.Document], + `Document + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}``. - If the caller does not have permission to access the - [Document][google.cloud.discoveryengine.v1beta.Document], - regardless of whether or not it exists, a - ``PERMISSION_DENIED`` error is returned. + If the caller does not have permission + to access the `Document + `__, + regardless of whether or not it exists, + a ``PERMISSION_DENIED`` error is + returned. - If the requested - [Document][google.cloud.discoveryengine.v1beta.Document] - does not exist, a ``NOT_FOUND`` error is returned. + If the requested `Document + `__ + does not exist, a ``NOT_FOUND`` error is + returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -957,8 +963,8 @@ def list_documents( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListDocumentsPager: - r"""Gets a list of - [Document][google.cloud.discoveryengine.v1beta.Document]s. + r"""Gets a list of `Document + `__s. .. code-block:: python @@ -990,19 +996,23 @@ def sample_list_documents(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.ListDocumentsRequest, dict]): The request object. Request message for - [DocumentService.ListDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments] + `DocumentService.ListDocuments + `__ method. parent (str): - Required. The parent branch resource name, such as + Required. The parent branch resource + name, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}``. - Use ``default_branch`` as the branch ID, to list - documents under the default branch. - - If the caller does not have permission to list - [Document][google.cloud.discoveryengine.v1beta.Document]s - under this branch, regardless of whether or not this - branch exists, a ``PERMISSION_DENIED`` error is - returned. + Use ``default_branch`` as the branch ID, + to list documents under the default + branch. + + If the caller does not have permission + to list `Document + `__s + under this branch, regardless of whether + or not this branch exists, a + ``PERMISSION_DENIED`` error is returned. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -1018,11 +1028,13 @@ def sample_list_documents(): Returns: google.cloud.discoveryengine_v1beta.services.document_service.pagers.ListDocumentsPager: Response message for - [DocumentService.ListDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments] - method. + `DocumentService.ListDocuments + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -1093,8 +1105,8 @@ def create_document( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> gcd_document.Document: - r"""Creates a - [Document][google.cloud.discoveryengine.v1beta.Document]. + r"""Creates a `Document + `__. .. code-block:: python @@ -1126,18 +1138,20 @@ def sample_create_document(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.CreateDocumentRequest, dict]): The request object. Request message for - [DocumentService.CreateDocument][google.cloud.discoveryengine.v1beta.DocumentService.CreateDocument] + `DocumentService.CreateDocument + `__ method. parent (str): - Required. The parent resource name, such as + Required. The parent resource name, such + as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. document (google.cloud.discoveryengine_v1beta.types.Document): - Required. The - [Document][google.cloud.discoveryengine.v1beta.Document] + Required. The `Document + `__ to create. This corresponds to the ``document`` field @@ -1145,25 +1159,32 @@ def sample_create_document(): should not be set. document_id (str): Required. The ID to use for the - [Document][google.cloud.discoveryengine.v1beta.Document], + `Document + `__, which becomes the final component of the - [Document.name][google.cloud.discoveryengine.v1beta.Document.name]. - - If the caller does not have permission to create the - [Document][google.cloud.discoveryengine.v1beta.Document], - regardless of whether or not it exists, a - ``PERMISSION_DENIED`` error is returned. + `Document.name + `__. + + If the caller does not have permission + to create the `Document + `__, + regardless of whether or not it exists, + a ``PERMISSION_DENIED`` error is + returned. This field must be unique among all - [Document][google.cloud.discoveryengine.v1beta.Document]s - with the same - [parent][google.cloud.discoveryengine.v1beta.CreateDocumentRequest.parent]. - Otherwise, an ``ALREADY_EXISTS`` error is returned. - - This field must conform to - `RFC-1034 `__ - standard with a length limit of 63 characters. - Otherwise, an ``INVALID_ARGUMENT`` error is returned. + `Document + `__s + with the same `parent + `__. + Otherwise, an ``ALREADY_EXISTS`` error + is returned. + + This field must conform to `RFC-1034 + `__ + standard with a length limit of 63 + characters. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. This corresponds to the ``document_id`` field on the ``request`` instance; if ``request`` is provided, this @@ -1243,8 +1264,8 @@ def update_document( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> gcd_document.Document: - r"""Updates a - [Document][google.cloud.discoveryengine.v1beta.Document]. + r"""Updates a `Document + `__. .. code-block:: python @@ -1274,21 +1295,26 @@ def sample_update_document(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.UpdateDocumentRequest, dict]): The request object. Request message for - [DocumentService.UpdateDocument][google.cloud.discoveryengine.v1beta.DocumentService.UpdateDocument] + `DocumentService.UpdateDocument + `__ method. document (google.cloud.discoveryengine_v1beta.types.Document): Required. The document to update/create. - If the caller does not have permission to update the - [Document][google.cloud.discoveryengine.v1beta.Document], - regardless of whether or not it exists, a - ``PERMISSION_DENIED`` error is returned. + If the caller does not have permission + to update the `Document + `__, + regardless of whether or not it exists, + a ``PERMISSION_DENIED`` error is + returned. - If the - [Document][google.cloud.discoveryengine.v1beta.Document] + If the `Document + `__ to update does not exist and - [allow_missing][google.cloud.discoveryengine.v1beta.UpdateDocumentRequest.allow_missing] - is not set, a ``NOT_FOUND`` error is returned. + `allow_missing + `__ + is not set, a ``NOT_FOUND`` error is + returned. This corresponds to the ``document`` field on the ``request`` instance; if ``request`` is provided, this @@ -1376,8 +1402,8 @@ def delete_document( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> None: - r"""Deletes a - [Document][google.cloud.discoveryengine.v1beta.Document]. + r"""Deletes a `Document + `__. .. code-block:: python @@ -1405,24 +1431,28 @@ def sample_delete_document(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.DeleteDocumentRequest, dict]): The request object. Request message for - [DocumentService.DeleteDocument][google.cloud.discoveryengine.v1beta.DocumentService.DeleteDocument] + `DocumentService.DeleteDocument + `__ method. name (str): Required. Full resource name of - [Document][google.cloud.discoveryengine.v1beta.Document], + `Document + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}``. - If the caller does not have permission to delete the - [Document][google.cloud.discoveryengine.v1beta.Document], - regardless of whether or not it exists, a - ``PERMISSION_DENIED`` error is returned. - - If the - [Document][google.cloud.discoveryengine.v1beta.Document] - to delete does not exist, a ``NOT_FOUND`` error is + If the caller does not have permission + to delete the `Document + `__, + regardless of whether or not it exists, + a ``PERMISSION_DENIED`` error is returned. + If the `Document + `__ + to delete does not exist, a + ``NOT_FOUND`` error is returned. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1486,12 +1516,14 @@ def import_documents( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: r"""Bulk import of multiple - [Document][google.cloud.discoveryengine.v1beta.Document]s. - Request processing may be synchronous. Non-existing items are - created. + `Document + `__s. + Request processing may be synchronous. Non-existing + items are created. Note: It is possible for a subset of the - [Document][google.cloud.discoveryengine.v1beta.Document]s to be + `Document + `__s to be successfully updated. .. code-block:: python @@ -1537,14 +1569,17 @@ def sample_import_documents(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1beta.types.ImportDocumentsResponse` Response of the - [ImportDocumentsRequest][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest]. - If the long running operation is done, then this - message is returned by the - google.longrunning.Operations.response field if the - operation was successful. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1beta.types.ImportDocumentsResponse` + Response of the `ImportDocumentsRequest + `__. + If the long running operation is done, + then this message is returned by the + google.longrunning.Operations.response + field if the operation was successful. """ # Create or coerce a protobuf request object. @@ -1594,23 +1629,29 @@ def purge_documents( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: r"""Permanently deletes all selected - [Document][google.cloud.discoveryengine.v1beta.Document]s in a + `Document + `__s in a branch. This process is asynchronous. Depending on the number of - [Document][google.cloud.discoveryengine.v1beta.Document]s to be - deleted, this operation can take hours to complete. Before the - delete operation completes, some - [Document][google.cloud.discoveryengine.v1beta.Document]s might + `Document + `__s to be + deleted, this operation can take hours to complete. + Before the delete operation completes, some `Document + `__s might still be returned by - [DocumentService.GetDocument][google.cloud.discoveryengine.v1beta.DocumentService.GetDocument] + `DocumentService.GetDocument + `__ or - [DocumentService.ListDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments]. + `DocumentService.ListDocuments + `__. To get a list of the - [Document][google.cloud.discoveryengine.v1beta.Document]s to be + `Document + `__s to be deleted, set - [PurgeDocumentsRequest.force][google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest.force] + `PurgeDocumentsRequest.force + `__ to false. .. code-block:: python @@ -1651,7 +1692,8 @@ def sample_purge_documents(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.PurgeDocumentsRequest, dict]): The request object. Request message for - [DocumentService.PurgeDocuments][google.cloud.discoveryengine.v1beta.DocumentService.PurgeDocuments] + `DocumentService.PurgeDocuments + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1663,13 +1705,19 @@ def sample_purge_documents(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1beta.types.PurgeDocumentsResponse` Response message for - [DocumentService.PurgeDocuments][google.cloud.discoveryengine.v1beta.DocumentService.PurgeDocuments] - method. If the long running operation is successfully - done, then this message is returned by the - google.longrunning.Operations.response field. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1beta.types.PurgeDocumentsResponse` + Response message for + `DocumentService.PurgeDocuments + `__ + method. If the long running operation is + successfully done, then this message is + returned by the + google.longrunning.Operations.response + field. """ # Create or coerce a protobuf request object. @@ -1722,7 +1770,8 @@ def batch_get_documents_metadata( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> document_service.BatchGetDocumentsMetadataResponse: r"""Gets index freshness metadata for - [Document][google.cloud.discoveryengine.v1beta.Document]s. + `Document + `__s. Supported for website search only. .. code-block:: python @@ -1754,10 +1803,12 @@ def sample_batch_get_documents_metadata(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.BatchGetDocumentsMetadataRequest, dict]): The request object. Request message for - [DocumentService.BatchGetDocumentsMetadata][google.cloud.discoveryengine.v1beta.DocumentService.BatchGetDocumentsMetadata] + `DocumentService.BatchGetDocumentsMetadata + `__ method. parent (str): - Required. The parent branch resource name, such as + Required. The parent branch resource + name, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}``. This corresponds to the ``parent`` field @@ -1774,8 +1825,9 @@ def sample_batch_get_documents_metadata(): Returns: google.cloud.discoveryengine_v1beta.types.BatchGetDocumentsMetadataResponse: Response message for - [DocumentService.BatchGetDocumentsMetadata][google.cloud.discoveryengine.v1beta.DocumentService.BatchGetDocumentsMetadata] - method. + `DocumentService.BatchGetDocumentsMetadata + `__ + method. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/document_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/document_service/transports/base.py index bba7dd8d66da..a720c2eb8d48 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/document_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/document_service/transports/base.py @@ -91,8 +91,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -107,11 +105,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/document_service/transports/grpc.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/document_service/transports/grpc.py index d433ba4b2b19..66752c737498 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/document_service/transports/grpc.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/document_service/transports/grpc.py @@ -120,8 +120,8 @@ class DocumentServiceGrpcTransport(DocumentServiceTransport): """gRPC backend transport for DocumentService. Service for ingesting - [Document][google.cloud.discoveryengine.v1beta.Document] information - of the customer's website. + `Document `__ + information of the customer's website. This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -355,7 +355,8 @@ def get_document( ) -> Callable[[document_service.GetDocumentRequest], document.Document]: r"""Return a callable for the get document method over gRPC. - Gets a [Document][google.cloud.discoveryengine.v1beta.Document]. + Gets a `Document + `__. Returns: Callable[[~.GetDocumentRequest], @@ -383,8 +384,8 @@ def list_documents( ]: r"""Return a callable for the list documents method over gRPC. - Gets a list of - [Document][google.cloud.discoveryengine.v1beta.Document]s. + Gets a list of `Document + `__s. Returns: Callable[[~.ListDocumentsRequest], @@ -410,8 +411,8 @@ def create_document( ) -> Callable[[document_service.CreateDocumentRequest], gcd_document.Document]: r"""Return a callable for the create document method over gRPC. - Creates a - [Document][google.cloud.discoveryengine.v1beta.Document]. + Creates a `Document + `__. Returns: Callable[[~.CreateDocumentRequest], @@ -437,8 +438,8 @@ def update_document( ) -> Callable[[document_service.UpdateDocumentRequest], gcd_document.Document]: r"""Return a callable for the update document method over gRPC. - Updates a - [Document][google.cloud.discoveryengine.v1beta.Document]. + Updates a `Document + `__. Returns: Callable[[~.UpdateDocumentRequest], @@ -464,8 +465,8 @@ def delete_document( ) -> Callable[[document_service.DeleteDocumentRequest], empty_pb2.Empty]: r"""Return a callable for the delete document method over gRPC. - Deletes a - [Document][google.cloud.discoveryengine.v1beta.Document]. + Deletes a `Document + `__. Returns: Callable[[~.DeleteDocumentRequest], @@ -492,12 +493,14 @@ def import_documents( r"""Return a callable for the import documents method over gRPC. Bulk import of multiple - [Document][google.cloud.discoveryengine.v1beta.Document]s. - Request processing may be synchronous. Non-existing items are - created. + `Document + `__s. + Request processing may be synchronous. Non-existing + items are created. Note: It is possible for a subset of the - [Document][google.cloud.discoveryengine.v1beta.Document]s to be + `Document + `__s to be successfully updated. Returns: @@ -525,23 +528,29 @@ def purge_documents( r"""Return a callable for the purge documents method over gRPC. Permanently deletes all selected - [Document][google.cloud.discoveryengine.v1beta.Document]s in a + `Document + `__s in a branch. This process is asynchronous. Depending on the number of - [Document][google.cloud.discoveryengine.v1beta.Document]s to be - deleted, this operation can take hours to complete. Before the - delete operation completes, some - [Document][google.cloud.discoveryengine.v1beta.Document]s might + `Document + `__s to be + deleted, this operation can take hours to complete. + Before the delete operation completes, some `Document + `__s might still be returned by - [DocumentService.GetDocument][google.cloud.discoveryengine.v1beta.DocumentService.GetDocument] + `DocumentService.GetDocument + `__ or - [DocumentService.ListDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments]. + `DocumentService.ListDocuments + `__. To get a list of the - [Document][google.cloud.discoveryengine.v1beta.Document]s to be + `Document + `__s to be deleted, set - [PurgeDocumentsRequest.force][google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest.force] + `PurgeDocumentsRequest.force + `__ to false. Returns: @@ -572,7 +581,8 @@ def batch_get_documents_metadata( r"""Return a callable for the batch get documents metadata method over gRPC. Gets index freshness metadata for - [Document][google.cloud.discoveryengine.v1beta.Document]s. + `Document + `__s. Supported for website search only. Returns: diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/document_service/transports/grpc_asyncio.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/document_service/transports/grpc_asyncio.py index e49316923f5f..916c2883cc25 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/document_service/transports/grpc_asyncio.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/document_service/transports/grpc_asyncio.py @@ -126,8 +126,8 @@ class DocumentServiceGrpcAsyncIOTransport(DocumentServiceTransport): """gRPC AsyncIO backend transport for DocumentService. Service for ingesting - [Document][google.cloud.discoveryengine.v1beta.Document] information - of the customer's website. + `Document `__ + information of the customer's website. This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -363,7 +363,8 @@ def get_document( ) -> Callable[[document_service.GetDocumentRequest], Awaitable[document.Document]]: r"""Return a callable for the get document method over gRPC. - Gets a [Document][google.cloud.discoveryengine.v1beta.Document]. + Gets a `Document + `__. Returns: Callable[[~.GetDocumentRequest], @@ -392,8 +393,8 @@ def list_documents( ]: r"""Return a callable for the list documents method over gRPC. - Gets a list of - [Document][google.cloud.discoveryengine.v1beta.Document]s. + Gets a list of `Document + `__s. Returns: Callable[[~.ListDocumentsRequest], @@ -421,8 +422,8 @@ def create_document( ]: r"""Return a callable for the create document method over gRPC. - Creates a - [Document][google.cloud.discoveryengine.v1beta.Document]. + Creates a `Document + `__. Returns: Callable[[~.CreateDocumentRequest], @@ -450,8 +451,8 @@ def update_document( ]: r"""Return a callable for the update document method over gRPC. - Updates a - [Document][google.cloud.discoveryengine.v1beta.Document]. + Updates a `Document + `__. Returns: Callable[[~.UpdateDocumentRequest], @@ -477,8 +478,8 @@ def delete_document( ) -> Callable[[document_service.DeleteDocumentRequest], Awaitable[empty_pb2.Empty]]: r"""Return a callable for the delete document method over gRPC. - Deletes a - [Document][google.cloud.discoveryengine.v1beta.Document]. + Deletes a `Document + `__. Returns: Callable[[~.DeleteDocumentRequest], @@ -507,12 +508,14 @@ def import_documents( r"""Return a callable for the import documents method over gRPC. Bulk import of multiple - [Document][google.cloud.discoveryengine.v1beta.Document]s. - Request processing may be synchronous. Non-existing items are - created. + `Document + `__s. + Request processing may be synchronous. Non-existing + items are created. Note: It is possible for a subset of the - [Document][google.cloud.discoveryengine.v1beta.Document]s to be + `Document + `__s to be successfully updated. Returns: @@ -542,23 +545,29 @@ def purge_documents( r"""Return a callable for the purge documents method over gRPC. Permanently deletes all selected - [Document][google.cloud.discoveryengine.v1beta.Document]s in a + `Document + `__s in a branch. This process is asynchronous. Depending on the number of - [Document][google.cloud.discoveryengine.v1beta.Document]s to be - deleted, this operation can take hours to complete. Before the - delete operation completes, some - [Document][google.cloud.discoveryengine.v1beta.Document]s might + `Document + `__s to be + deleted, this operation can take hours to complete. + Before the delete operation completes, some `Document + `__s might still be returned by - [DocumentService.GetDocument][google.cloud.discoveryengine.v1beta.DocumentService.GetDocument] + `DocumentService.GetDocument + `__ or - [DocumentService.ListDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments]. + `DocumentService.ListDocuments + `__. To get a list of the - [Document][google.cloud.discoveryengine.v1beta.Document]s to be + `Document + `__s to be deleted, set - [PurgeDocumentsRequest.force][google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest.force] + `PurgeDocumentsRequest.force + `__ to false. Returns: @@ -589,7 +598,8 @@ def batch_get_documents_metadata( r"""Return a callable for the batch get documents metadata method over gRPC. Gets index freshness metadata for - [Document][google.cloud.discoveryengine.v1beta.Document]s. + `Document + `__s. Supported for website search only. Returns: diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/document_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/document_service/transports/rest.py index 8353af5ec1e1..b17cc68f3052 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/document_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/document_service/transports/rest.py @@ -586,8 +586,8 @@ class DocumentServiceRestTransport(_BaseDocumentServiceRestTransport): """REST backend synchronous transport for DocumentService. Service for ingesting - [Document][google.cloud.discoveryengine.v1beta.Document] information - of the customer's website. + `Document `__ + information of the customer's website. This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -872,7 +872,8 @@ def __call__( Args: request (~.document_service.BatchGetDocumentsMetadataRequest): The request object. Request message for - [DocumentService.BatchGetDocumentsMetadata][google.cloud.discoveryengine.v1beta.DocumentService.BatchGetDocumentsMetadata] + `DocumentService.BatchGetDocumentsMetadata + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -885,7 +886,8 @@ def __call__( Returns: ~.document_service.BatchGetDocumentsMetadataResponse: Response message for - [DocumentService.BatchGetDocumentsMetadata][google.cloud.discoveryengine.v1beta.DocumentService.BatchGetDocumentsMetadata] + `DocumentService.BatchGetDocumentsMetadata + `__ method. """ @@ -1030,7 +1032,8 @@ def __call__( Args: request (~.document_service.CreateDocumentRequest): The request object. Request message for - [DocumentService.CreateDocument][google.cloud.discoveryengine.v1beta.DocumentService.CreateDocument] + `DocumentService.CreateDocument + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1184,7 +1187,8 @@ def __call__( Args: request (~.document_service.DeleteDocumentRequest): The request object. Request message for - [DocumentService.DeleteDocument][google.cloud.discoveryengine.v1beta.DocumentService.DeleteDocument] + `DocumentService.DeleteDocument + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1292,7 +1296,8 @@ def __call__( Args: request (~.document_service.GetDocumentRequest): The request object. Request message for - [DocumentService.GetDocument][google.cloud.discoveryengine.v1beta.DocumentService.GetDocument] + `DocumentService.GetDocument + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1594,7 +1599,8 @@ def __call__( Args: request (~.document_service.ListDocumentsRequest): The request object. Request message for - [DocumentService.ListDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments] + `DocumentService.ListDocuments + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1607,7 +1613,8 @@ def __call__( Returns: ~.document_service.ListDocumentsResponse: Response message for - [DocumentService.ListDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments] + `DocumentService.ListDocuments + `__ method. """ @@ -1746,7 +1753,8 @@ def __call__( Args: request (~.purge_config.PurgeDocumentsRequest): The request object. Request message for - [DocumentService.PurgeDocuments][google.cloud.discoveryengine.v1beta.DocumentService.PurgeDocuments] + `DocumentService.PurgeDocuments + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1899,7 +1907,8 @@ def __call__( Args: request (~.document_service.UpdateDocumentRequest): The request object. Request message for - [DocumentService.UpdateDocument][google.cloud.discoveryengine.v1beta.DocumentService.UpdateDocument] + `DocumentService.UpdateDocument + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/engine_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/engine_service/async_client.py index 61cebfea2d44..73251f1855b7 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/engine_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/engine_service/async_client.py @@ -73,8 +73,8 @@ class EngineServiceAsyncClient: - """Service for managing - [Engine][google.cloud.discoveryengine.v1beta.Engine] configuration. + """Service for managing `Engine + `__ configuration. """ _client: EngineServiceClient @@ -313,7 +313,8 @@ async def create_engine( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: - r"""Creates a [Engine][google.cloud.discoveryengine.v1beta.Engine]. + r"""Creates a `Engine + `__. .. code-block:: python @@ -354,34 +355,40 @@ async def sample_create_engine(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.CreateEngineRequest, dict]]): The request object. Request for - [EngineService.CreateEngine][google.cloud.discoveryengine.v1beta.EngineService.CreateEngine] + `EngineService.CreateEngine + `__ method. parent (:class:`str`): - Required. The parent resource name, such as + Required. The parent resource name, such + as ``projects/{project}/locations/{location}/collections/{collection}``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. engine (:class:`google.cloud.discoveryengine_v1beta.types.Engine`): - Required. The - [Engine][google.cloud.discoveryengine.v1beta.Engine] to - create. + Required. The `Engine + `__ + to create. This corresponds to the ``engine`` field on the ``request`` instance; if ``request`` is provided, this should not be set. engine_id (:class:`str`): Required. The ID to use for the - [Engine][google.cloud.discoveryengine.v1beta.Engine], - which will become the final component of the - [Engine][google.cloud.discoveryengine.v1beta.Engine]'s + `Engine + `__, + which will become the final component of + the + `Engine + `__'s resource name. - This field must conform to - `RFC-1034 `__ - standard with a length limit of 63 characters. - Otherwise, an INVALID_ARGUMENT error is returned. + This field must conform to `RFC-1034 + `__ + standard with a length limit of 63 + characters. Otherwise, an + INVALID_ARGUMENT error is returned. This corresponds to the ``engine_id`` field on the ``request`` instance; if ``request`` is provided, this @@ -396,10 +403,14 @@ async def sample_create_engine(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1beta.types.Engine` Metadata that describes the training and serving parameters of an - [Engine][google.cloud.discoveryengine.v1beta.Engine]. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1beta.types.Engine` + Metadata that describes the training and + serving parameters of an `Engine + `__. """ # Create or coerce a protobuf request object. @@ -472,7 +483,8 @@ async def delete_engine( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: - r"""Deletes a [Engine][google.cloud.discoveryengine.v1beta.Engine]. + r"""Deletes a `Engine + `__. .. code-block:: python @@ -507,22 +519,26 @@ async def sample_delete_engine(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.DeleteEngineRequest, dict]]): The request object. Request message for - [EngineService.DeleteEngine][google.cloud.discoveryengine.v1beta.EngineService.DeleteEngine] + `EngineService.DeleteEngine + `__ method. name (:class:`str`): Required. Full resource name of - [Engine][google.cloud.discoveryengine.v1beta.Engine], + `Engine + `__, such as ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}``. - If the caller does not have permission to delete the - [Engine][google.cloud.discoveryengine.v1beta.Engine], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to delete the `Engine + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. - If the - [Engine][google.cloud.discoveryengine.v1beta.Engine] to - delete does not exist, a NOT_FOUND error is returned. + If the `Engine + `__ + to delete does not exist, a NOT_FOUND + error is returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -537,18 +553,21 @@ async def sample_delete_engine(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.protobuf.empty_pb2.Empty` A generic empty message that you can re-use to avoid defining duplicated - empty messages in your APIs. A typical example is to - use it as the request or the response type of an API - method. For instance: - - service Foo { - rpc Bar(google.protobuf.Empty) returns - (google.protobuf.Empty); - - } + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.protobuf.empty_pb2.Empty` + A generic empty message that you can + re-use to avoid defining duplicated + empty messages in your APIs. A typical + example is to use it as the request or + the response type of an API method. For + instance: + + service Foo { + rpc Bar(google.protobuf.Empty) + returns (google.protobuf.Empty); } """ # Create or coerce a protobuf request object. @@ -618,7 +637,8 @@ async def update_engine( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> gcd_engine.Engine: - r"""Updates an [Engine][google.cloud.discoveryengine.v1beta.Engine] + r"""Updates an `Engine + `__ .. code-block:: python @@ -653,32 +673,37 @@ async def sample_update_engine(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.UpdateEngineRequest, dict]]): The request object. Request message for - [EngineService.UpdateEngine][google.cloud.discoveryengine.v1beta.EngineService.UpdateEngine] + `EngineService.UpdateEngine + `__ method. engine (:class:`google.cloud.discoveryengine_v1beta.types.Engine`): - Required. The - [Engine][google.cloud.discoveryengine.v1beta.Engine] to - update. + Required. The `Engine + `__ + to update. - If the caller does not have permission to update the - [Engine][google.cloud.discoveryengine.v1beta.Engine], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to update the `Engine + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. - If the - [Engine][google.cloud.discoveryengine.v1beta.Engine] to - update does not exist, a NOT_FOUND error is returned. + If the `Engine + `__ + to update does not exist, a NOT_FOUND + error is returned. This corresponds to the ``engine`` field on the ``request`` instance; if ``request`` is provided, this should not be set. update_mask (:class:`google.protobuf.field_mask_pb2.FieldMask`): Indicates which fields in the provided - [Engine][google.cloud.discoveryengine.v1beta.Engine] to - update. + `Engine + `__ + to update. - If an unsupported or unknown field is provided, an - INVALID_ARGUMENT error is returned. + If an unsupported or unknown field is + provided, an INVALID_ARGUMENT error is + returned. This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this @@ -693,8 +718,9 @@ async def sample_update_engine(): Returns: google.cloud.discoveryengine_v1beta.types.Engine: - Metadata that describes the training and serving parameters of an - [Engine][google.cloud.discoveryengine.v1beta.Engine]. + Metadata that describes the training and + serving parameters of an `Engine + `__. """ # Create or coerce a protobuf request object. @@ -759,7 +785,8 @@ async def get_engine( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> engine.Engine: - r"""Gets a [Engine][google.cloud.discoveryengine.v1beta.Engine]. + r"""Gets a `Engine + `__. .. code-block:: python @@ -790,11 +817,13 @@ async def sample_get_engine(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.GetEngineRequest, dict]]): The request object. Request message for - [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine] + `EngineService.GetEngine + `__ method. name (:class:`str`): Required. Full resource name of - [Engine][google.cloud.discoveryengine.v1beta.Engine], + `Engine + `__, such as ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}``. @@ -811,8 +840,9 @@ async def sample_get_engine(): Returns: google.cloud.discoveryengine_v1beta.types.Engine: - Metadata that describes the training and serving parameters of an - [Engine][google.cloud.discoveryengine.v1beta.Engine]. + Metadata that describes the training and + serving parameters of an `Engine + `__. """ # Create or coerce a protobuf request object. @@ -873,9 +903,9 @@ async def list_engines( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListEnginesAsyncPager: - r"""Lists all the - [Engine][google.cloud.discoveryengine.v1beta.Engine]s associated - with the project. + r"""Lists all the `Engine + `__s + associated with the project. .. code-block:: python @@ -907,10 +937,12 @@ async def sample_list_engines(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.ListEnginesRequest, dict]]): The request object. Request message for - [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines] + `EngineService.ListEngines + `__ method. parent (:class:`str`): - Required. The parent resource name, such as + Required. The parent resource name, such + as ``projects/{project}/locations/{location}/collections/{collection_id}``. This corresponds to the ``parent`` field @@ -927,11 +959,13 @@ async def sample_list_engines(): Returns: google.cloud.discoveryengine_v1beta.services.engine_service.pagers.ListEnginesAsyncPager: Response message for - [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines] - method. + `EngineService.ListEngines + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -1003,10 +1037,11 @@ async def pause_engine( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> engine.Engine: - r"""Pauses the training of an existing engine. Only applicable if - [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] - is - [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. + r"""Pauses the training of an existing engine. Only + applicable if `SolutionType + `__ is + `SOLUTION_TYPE_RECOMMENDATION + `__. .. code-block:: python @@ -1039,7 +1074,9 @@ async def sample_pause_engine(): The request object. Request for pausing training of an engine. name (:class:`str`): - Required. The name of the engine to pause. Format: + Required. The name of the engine to + pause. Format: + ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`` This corresponds to the ``name`` field @@ -1055,8 +1092,9 @@ async def sample_pause_engine(): Returns: google.cloud.discoveryengine_v1beta.types.Engine: - Metadata that describes the training and serving parameters of an - [Engine][google.cloud.discoveryengine.v1beta.Engine]. + Metadata that describes the training and + serving parameters of an `Engine + `__. """ # Create or coerce a protobuf request object. @@ -1117,10 +1155,11 @@ async def resume_engine( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> engine.Engine: - r"""Resumes the training of an existing engine. Only applicable if - [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] - is - [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. + r"""Resumes the training of an existing engine. Only + applicable if `SolutionType + `__ is + `SOLUTION_TYPE_RECOMMENDATION + `__. .. code-block:: python @@ -1153,7 +1192,9 @@ async def sample_resume_engine(): The request object. Request for resuming training of an engine. name (:class:`str`): - Required. The name of the engine to resume. Format: + Required. The name of the engine to + resume. Format: + ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`` This corresponds to the ``name`` field @@ -1169,8 +1210,9 @@ async def sample_resume_engine(): Returns: google.cloud.discoveryengine_v1beta.types.Engine: - Metadata that describes the training and serving parameters of an - [Engine][google.cloud.discoveryengine.v1beta.Engine]. + Metadata that describes the training and + serving parameters of an `Engine + `__. """ # Create or coerce a protobuf request object. @@ -1232,9 +1274,10 @@ async def tune_engine( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: r"""Tunes an existing engine. Only applicable if - [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] - is - [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. + `SolutionType + `__ is + `SOLUTION_TYPE_RECOMMENDATION + `__. .. code-block:: python @@ -1273,8 +1316,9 @@ async def sample_tune_engine(): periodically scheduled tuning to happen). name (:class:`str`): - Required. The resource name of the engine to tune. - Format: + Required. The resource name of the + engine to tune. Format: + ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`` This corresponds to the ``name`` field @@ -1290,11 +1334,13 @@ async def sample_tune_engine(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be + An object representing a long-running + operation. + The result type for the operation will + be :class:`google.cloud.discoveryengine_v1beta.types.TuneEngineResponse` - Response associated with a tune operation. + Response associated with a tune + operation. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/engine_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/engine_service/client.py index b85fe59bd397..df1a941bd5a9 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/engine_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/engine_service/client.py @@ -117,8 +117,8 @@ def get_transport_class( class EngineServiceClient(metaclass=EngineServiceClientMeta): - """Service for managing - [Engine][google.cloud.discoveryengine.v1beta.Engine] configuration. + """Service for managing `Engine + `__ configuration. """ @staticmethod @@ -776,7 +776,8 @@ def create_engine( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: - r"""Creates a [Engine][google.cloud.discoveryengine.v1beta.Engine]. + r"""Creates a `Engine + `__. .. code-block:: python @@ -817,34 +818,40 @@ def sample_create_engine(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.CreateEngineRequest, dict]): The request object. Request for - [EngineService.CreateEngine][google.cloud.discoveryengine.v1beta.EngineService.CreateEngine] + `EngineService.CreateEngine + `__ method. parent (str): - Required. The parent resource name, such as + Required. The parent resource name, such + as ``projects/{project}/locations/{location}/collections/{collection}``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. engine (google.cloud.discoveryengine_v1beta.types.Engine): - Required. The - [Engine][google.cloud.discoveryengine.v1beta.Engine] to - create. + Required. The `Engine + `__ + to create. This corresponds to the ``engine`` field on the ``request`` instance; if ``request`` is provided, this should not be set. engine_id (str): Required. The ID to use for the - [Engine][google.cloud.discoveryengine.v1beta.Engine], - which will become the final component of the - [Engine][google.cloud.discoveryengine.v1beta.Engine]'s + `Engine + `__, + which will become the final component of + the + `Engine + `__'s resource name. - This field must conform to - `RFC-1034 `__ - standard with a length limit of 63 characters. - Otherwise, an INVALID_ARGUMENT error is returned. + This field must conform to `RFC-1034 + `__ + standard with a length limit of 63 + characters. Otherwise, an + INVALID_ARGUMENT error is returned. This corresponds to the ``engine_id`` field on the ``request`` instance; if ``request`` is provided, this @@ -859,10 +866,14 @@ def sample_create_engine(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1beta.types.Engine` Metadata that describes the training and serving parameters of an - [Engine][google.cloud.discoveryengine.v1beta.Engine]. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1beta.types.Engine` + Metadata that describes the training and + serving parameters of an `Engine + `__. """ # Create or coerce a protobuf request object. @@ -932,7 +943,8 @@ def delete_engine( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: - r"""Deletes a [Engine][google.cloud.discoveryengine.v1beta.Engine]. + r"""Deletes a `Engine + `__. .. code-block:: python @@ -967,22 +979,26 @@ def sample_delete_engine(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.DeleteEngineRequest, dict]): The request object. Request message for - [EngineService.DeleteEngine][google.cloud.discoveryengine.v1beta.EngineService.DeleteEngine] + `EngineService.DeleteEngine + `__ method. name (str): Required. Full resource name of - [Engine][google.cloud.discoveryengine.v1beta.Engine], + `Engine + `__, such as ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}``. - If the caller does not have permission to delete the - [Engine][google.cloud.discoveryengine.v1beta.Engine], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to delete the `Engine + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. - If the - [Engine][google.cloud.discoveryengine.v1beta.Engine] to - delete does not exist, a NOT_FOUND error is returned. + If the `Engine + `__ + to delete does not exist, a NOT_FOUND + error is returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -997,18 +1013,21 @@ def sample_delete_engine(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.protobuf.empty_pb2.Empty` A generic empty message that you can re-use to avoid defining duplicated - empty messages in your APIs. A typical example is to - use it as the request or the response type of an API - method. For instance: - - service Foo { - rpc Bar(google.protobuf.Empty) returns - (google.protobuf.Empty); - - } + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.protobuf.empty_pb2.Empty` + A generic empty message that you can + re-use to avoid defining duplicated + empty messages in your APIs. A typical + example is to use it as the request or + the response type of an API method. For + instance: + + service Foo { + rpc Bar(google.protobuf.Empty) + returns (google.protobuf.Empty); } """ # Create or coerce a protobuf request object. @@ -1075,7 +1094,8 @@ def update_engine( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> gcd_engine.Engine: - r"""Updates an [Engine][google.cloud.discoveryengine.v1beta.Engine] + r"""Updates an `Engine + `__ .. code-block:: python @@ -1110,32 +1130,37 @@ def sample_update_engine(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.UpdateEngineRequest, dict]): The request object. Request message for - [EngineService.UpdateEngine][google.cloud.discoveryengine.v1beta.EngineService.UpdateEngine] + `EngineService.UpdateEngine + `__ method. engine (google.cloud.discoveryengine_v1beta.types.Engine): - Required. The - [Engine][google.cloud.discoveryengine.v1beta.Engine] to - update. + Required. The `Engine + `__ + to update. - If the caller does not have permission to update the - [Engine][google.cloud.discoveryengine.v1beta.Engine], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to update the `Engine + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. - If the - [Engine][google.cloud.discoveryengine.v1beta.Engine] to - update does not exist, a NOT_FOUND error is returned. + If the `Engine + `__ + to update does not exist, a NOT_FOUND + error is returned. This corresponds to the ``engine`` field on the ``request`` instance; if ``request`` is provided, this should not be set. update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided - [Engine][google.cloud.discoveryengine.v1beta.Engine] to - update. + `Engine + `__ + to update. - If an unsupported or unknown field is provided, an - INVALID_ARGUMENT error is returned. + If an unsupported or unknown field is + provided, an INVALID_ARGUMENT error is + returned. This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this @@ -1150,8 +1175,9 @@ def sample_update_engine(): Returns: google.cloud.discoveryengine_v1beta.types.Engine: - Metadata that describes the training and serving parameters of an - [Engine][google.cloud.discoveryengine.v1beta.Engine]. + Metadata that describes the training and + serving parameters of an `Engine + `__. """ # Create or coerce a protobuf request object. @@ -1213,7 +1239,8 @@ def get_engine( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> engine.Engine: - r"""Gets a [Engine][google.cloud.discoveryengine.v1beta.Engine]. + r"""Gets a `Engine + `__. .. code-block:: python @@ -1244,11 +1271,13 @@ def sample_get_engine(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.GetEngineRequest, dict]): The request object. Request message for - [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine] + `EngineService.GetEngine + `__ method. name (str): Required. Full resource name of - [Engine][google.cloud.discoveryengine.v1beta.Engine], + `Engine + `__, such as ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}``. @@ -1265,8 +1294,9 @@ def sample_get_engine(): Returns: google.cloud.discoveryengine_v1beta.types.Engine: - Metadata that describes the training and serving parameters of an - [Engine][google.cloud.discoveryengine.v1beta.Engine]. + Metadata that describes the training and + serving parameters of an `Engine + `__. """ # Create or coerce a protobuf request object. @@ -1324,9 +1354,9 @@ def list_engines( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListEnginesPager: - r"""Lists all the - [Engine][google.cloud.discoveryengine.v1beta.Engine]s associated - with the project. + r"""Lists all the `Engine + `__s + associated with the project. .. code-block:: python @@ -1358,10 +1388,12 @@ def sample_list_engines(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.ListEnginesRequest, dict]): The request object. Request message for - [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines] + `EngineService.ListEngines + `__ method. parent (str): - Required. The parent resource name, such as + Required. The parent resource name, such + as ``projects/{project}/locations/{location}/collections/{collection_id}``. This corresponds to the ``parent`` field @@ -1378,11 +1410,13 @@ def sample_list_engines(): Returns: google.cloud.discoveryengine_v1beta.services.engine_service.pagers.ListEnginesPager: Response message for - [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines] - method. + `EngineService.ListEngines + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -1451,10 +1485,11 @@ def pause_engine( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> engine.Engine: - r"""Pauses the training of an existing engine. Only applicable if - [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] - is - [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. + r"""Pauses the training of an existing engine. Only + applicable if `SolutionType + `__ is + `SOLUTION_TYPE_RECOMMENDATION + `__. .. code-block:: python @@ -1487,7 +1522,9 @@ def sample_pause_engine(): The request object. Request for pausing training of an engine. name (str): - Required. The name of the engine to pause. Format: + Required. The name of the engine to + pause. Format: + ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`` This corresponds to the ``name`` field @@ -1503,8 +1540,9 @@ def sample_pause_engine(): Returns: google.cloud.discoveryengine_v1beta.types.Engine: - Metadata that describes the training and serving parameters of an - [Engine][google.cloud.discoveryengine.v1beta.Engine]. + Metadata that describes the training and + serving parameters of an `Engine + `__. """ # Create or coerce a protobuf request object. @@ -1562,10 +1600,11 @@ def resume_engine( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> engine.Engine: - r"""Resumes the training of an existing engine. Only applicable if - [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] - is - [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. + r"""Resumes the training of an existing engine. Only + applicable if `SolutionType + `__ is + `SOLUTION_TYPE_RECOMMENDATION + `__. .. code-block:: python @@ -1598,7 +1637,9 @@ def sample_resume_engine(): The request object. Request for resuming training of an engine. name (str): - Required. The name of the engine to resume. Format: + Required. The name of the engine to + resume. Format: + ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`` This corresponds to the ``name`` field @@ -1614,8 +1655,9 @@ def sample_resume_engine(): Returns: google.cloud.discoveryengine_v1beta.types.Engine: - Metadata that describes the training and serving parameters of an - [Engine][google.cloud.discoveryengine.v1beta.Engine]. + Metadata that describes the training and + serving parameters of an `Engine + `__. """ # Create or coerce a protobuf request object. @@ -1674,9 +1716,10 @@ def tune_engine( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: r"""Tunes an existing engine. Only applicable if - [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] - is - [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. + `SolutionType + `__ is + `SOLUTION_TYPE_RECOMMENDATION + `__. .. code-block:: python @@ -1715,8 +1758,9 @@ def sample_tune_engine(): periodically scheduled tuning to happen). name (str): - Required. The resource name of the engine to tune. - Format: + Required. The resource name of the + engine to tune. Format: + ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`` This corresponds to the ``name`` field @@ -1732,11 +1776,13 @@ def sample_tune_engine(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be + An object representing a long-running + operation. + The result type for the operation will + be :class:`google.cloud.discoveryengine_v1beta.types.TuneEngineResponse` - Response associated with a tune operation. + Response associated with a tune + operation. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/engine_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/engine_service/transports/base.py index ef2757af7ad4..7bdb2ca65d25 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/engine_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/engine_service/transports/base.py @@ -86,8 +86,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -102,11 +100,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/engine_service/transports/grpc.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/engine_service/transports/grpc.py index 5870795ef656..887f7b120abb 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/engine_service/transports/grpc.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/engine_service/transports/grpc.py @@ -114,8 +114,8 @@ def intercept_unary_unary(self, continuation, client_call_details, request): class EngineServiceGrpcTransport(EngineServiceTransport): """gRPC backend transport for EngineService. - Service for managing - [Engine][google.cloud.discoveryengine.v1beta.Engine] configuration. + Service for managing `Engine + `__ configuration. This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -349,7 +349,8 @@ def create_engine( ) -> Callable[[engine_service.CreateEngineRequest], operations_pb2.Operation]: r"""Return a callable for the create engine method over gRPC. - Creates a [Engine][google.cloud.discoveryengine.v1beta.Engine]. + Creates a `Engine + `__. Returns: Callable[[~.CreateEngineRequest], @@ -375,7 +376,8 @@ def delete_engine( ) -> Callable[[engine_service.DeleteEngineRequest], operations_pb2.Operation]: r"""Return a callable for the delete engine method over gRPC. - Deletes a [Engine][google.cloud.discoveryengine.v1beta.Engine]. + Deletes a `Engine + `__. Returns: Callable[[~.DeleteEngineRequest], @@ -401,7 +403,8 @@ def update_engine( ) -> Callable[[engine_service.UpdateEngineRequest], gcd_engine.Engine]: r"""Return a callable for the update engine method over gRPC. - Updates an [Engine][google.cloud.discoveryengine.v1beta.Engine] + Updates an `Engine + `__ Returns: Callable[[~.UpdateEngineRequest], @@ -425,7 +428,8 @@ def update_engine( def get_engine(self) -> Callable[[engine_service.GetEngineRequest], engine.Engine]: r"""Return a callable for the get engine method over gRPC. - Gets a [Engine][google.cloud.discoveryengine.v1beta.Engine]. + Gets a `Engine + `__. Returns: Callable[[~.GetEngineRequest], @@ -453,9 +457,9 @@ def list_engines( ]: r"""Return a callable for the list engines method over gRPC. - Lists all the - [Engine][google.cloud.discoveryengine.v1beta.Engine]s associated - with the project. + Lists all the `Engine + `__s + associated with the project. Returns: Callable[[~.ListEnginesRequest], @@ -481,10 +485,11 @@ def pause_engine( ) -> Callable[[engine_service.PauseEngineRequest], engine.Engine]: r"""Return a callable for the pause engine method over gRPC. - Pauses the training of an existing engine. Only applicable if - [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] - is - [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. + Pauses the training of an existing engine. Only + applicable if `SolutionType + `__ is + `SOLUTION_TYPE_RECOMMENDATION + `__. Returns: Callable[[~.PauseEngineRequest], @@ -510,10 +515,11 @@ def resume_engine( ) -> Callable[[engine_service.ResumeEngineRequest], engine.Engine]: r"""Return a callable for the resume engine method over gRPC. - Resumes the training of an existing engine. Only applicable if - [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] - is - [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. + Resumes the training of an existing engine. Only + applicable if `SolutionType + `__ is + `SOLUTION_TYPE_RECOMMENDATION + `__. Returns: Callable[[~.ResumeEngineRequest], @@ -540,9 +546,10 @@ def tune_engine( r"""Return a callable for the tune engine method over gRPC. Tunes an existing engine. Only applicable if - [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] - is - [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. + `SolutionType + `__ is + `SOLUTION_TYPE_RECOMMENDATION + `__. Returns: Callable[[~.TuneEngineRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/engine_service/transports/grpc_asyncio.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/engine_service/transports/grpc_asyncio.py index d9b75c05f3c8..7e21ada1c688 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/engine_service/transports/grpc_asyncio.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/engine_service/transports/grpc_asyncio.py @@ -120,8 +120,8 @@ async def intercept_unary_unary(self, continuation, client_call_details, request class EngineServiceGrpcAsyncIOTransport(EngineServiceTransport): """gRPC AsyncIO backend transport for EngineService. - Service for managing - [Engine][google.cloud.discoveryengine.v1beta.Engine] configuration. + Service for managing `Engine + `__ configuration. This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -359,7 +359,8 @@ def create_engine( ]: r"""Return a callable for the create engine method over gRPC. - Creates a [Engine][google.cloud.discoveryengine.v1beta.Engine]. + Creates a `Engine + `__. Returns: Callable[[~.CreateEngineRequest], @@ -387,7 +388,8 @@ def delete_engine( ]: r"""Return a callable for the delete engine method over gRPC. - Deletes a [Engine][google.cloud.discoveryengine.v1beta.Engine]. + Deletes a `Engine + `__. Returns: Callable[[~.DeleteEngineRequest], @@ -413,7 +415,8 @@ def update_engine( ) -> Callable[[engine_service.UpdateEngineRequest], Awaitable[gcd_engine.Engine]]: r"""Return a callable for the update engine method over gRPC. - Updates an [Engine][google.cloud.discoveryengine.v1beta.Engine] + Updates an `Engine + `__ Returns: Callable[[~.UpdateEngineRequest], @@ -439,7 +442,8 @@ def get_engine( ) -> Callable[[engine_service.GetEngineRequest], Awaitable[engine.Engine]]: r"""Return a callable for the get engine method over gRPC. - Gets a [Engine][google.cloud.discoveryengine.v1beta.Engine]. + Gets a `Engine + `__. Returns: Callable[[~.GetEngineRequest], @@ -468,9 +472,9 @@ def list_engines( ]: r"""Return a callable for the list engines method over gRPC. - Lists all the - [Engine][google.cloud.discoveryengine.v1beta.Engine]s associated - with the project. + Lists all the `Engine + `__s + associated with the project. Returns: Callable[[~.ListEnginesRequest], @@ -496,10 +500,11 @@ def pause_engine( ) -> Callable[[engine_service.PauseEngineRequest], Awaitable[engine.Engine]]: r"""Return a callable for the pause engine method over gRPC. - Pauses the training of an existing engine. Only applicable if - [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] - is - [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. + Pauses the training of an existing engine. Only + applicable if `SolutionType + `__ is + `SOLUTION_TYPE_RECOMMENDATION + `__. Returns: Callable[[~.PauseEngineRequest], @@ -525,10 +530,11 @@ def resume_engine( ) -> Callable[[engine_service.ResumeEngineRequest], Awaitable[engine.Engine]]: r"""Return a callable for the resume engine method over gRPC. - Resumes the training of an existing engine. Only applicable if - [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] - is - [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. + Resumes the training of an existing engine. Only + applicable if `SolutionType + `__ is + `SOLUTION_TYPE_RECOMMENDATION + `__. Returns: Callable[[~.ResumeEngineRequest], @@ -557,9 +563,10 @@ def tune_engine( r"""Return a callable for the tune engine method over gRPC. Tunes an existing engine. Only applicable if - [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] - is - [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. + `SolutionType + `__ is + `SOLUTION_TYPE_RECOMMENDATION + `__. Returns: Callable[[~.TuneEngineRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/engine_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/engine_service/transports/rest.py index 887e62d08bd5..b04f5c85c235 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/engine_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/engine_service/transports/rest.py @@ -602,8 +602,8 @@ class EngineServiceRestStub: class EngineServiceRestTransport(_BaseEngineServiceRestTransport): """REST backend synchronous transport for EngineService. - Service for managing - [Engine][google.cloud.discoveryengine.v1beta.Engine] configuration. + Service for managing `Engine + `__ configuration. This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -887,7 +887,8 @@ def __call__( Args: request (~.engine_service.CreateEngineRequest): The request object. Request for - [EngineService.CreateEngine][google.cloud.discoveryengine.v1beta.EngineService.CreateEngine] + `EngineService.CreateEngine + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1039,7 +1040,8 @@ def __call__( Args: request (~.engine_service.DeleteEngineRequest): The request object. Request message for - [EngineService.DeleteEngine][google.cloud.discoveryengine.v1beta.EngineService.DeleteEngine] + `EngineService.DeleteEngine + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1186,7 +1188,8 @@ def __call__( Args: request (~.engine_service.GetEngineRequest): The request object. Request message for - [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine] + `EngineService.GetEngine + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1198,9 +1201,9 @@ def __call__( Returns: ~.engine.Engine: - Metadata that describes the training and serving - parameters of an - [Engine][google.cloud.discoveryengine.v1beta.Engine]. + Metadata that describes the training and + serving parameters of an `Engine + `__. """ @@ -1339,7 +1342,8 @@ def __call__( Args: request (~.engine_service.ListEnginesRequest): The request object. Request message for - [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines] + `EngineService.ListEngines + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1352,7 +1356,8 @@ def __call__( Returns: ~.engine_service.ListEnginesResponse: Response message for - [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines] + `EngineService.ListEngines + `__ method. """ @@ -1504,9 +1509,9 @@ def __call__( Returns: ~.engine.Engine: - Metadata that describes the training and serving - parameters of an - [Engine][google.cloud.discoveryengine.v1beta.Engine]. + Metadata that describes the training and + serving parameters of an `Engine + `__. """ @@ -1662,9 +1667,9 @@ def __call__( Returns: ~.engine.Engine: - Metadata that describes the training and serving - parameters of an - [Engine][google.cloud.discoveryengine.v1beta.Engine]. + Metadata that describes the training and + serving parameters of an `Engine + `__. """ @@ -1965,7 +1970,8 @@ def __call__( Args: request (~.engine_service.UpdateEngineRequest): The request object. Request message for - [EngineService.UpdateEngine][google.cloud.discoveryengine.v1beta.EngineService.UpdateEngine] + `EngineService.UpdateEngine + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1977,9 +1983,9 @@ def __call__( Returns: ~.gcd_engine.Engine: - Metadata that describes the training and serving - parameters of an - [Engine][google.cloud.discoveryengine.v1beta.Engine]. + Metadata that describes the training and + serving parameters of an `Engine + `__. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/evaluation_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/evaluation_service/async_client.py index 43947eb1ca8f..ef930322a82e 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/evaluation_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/evaluation_service/async_client.py @@ -72,7 +72,8 @@ class EvaluationServiceAsyncClient: """Service for managing - [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation]s, + `Evaluation + `__s, """ _client: EvaluationServiceClient @@ -331,8 +332,8 @@ async def get_evaluation( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> evaluation.Evaluation: - r"""Gets a - [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation]. + r"""Gets a `Evaluation + `__. .. code-block:: python @@ -363,22 +364,27 @@ async def sample_get_evaluation(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.GetEvaluationRequest, dict]]): The request object. Request message for - [EvaluationService.GetEvaluation][google.cloud.discoveryengine.v1beta.EvaluationService.GetEvaluation] + `EvaluationService.GetEvaluation + `__ method. name (:class:`str`): Required. Full resource name of - [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation], + `Evaluation + `__, such as ``projects/{project}/locations/{location}/evaluations/{evaluation}``. - If the caller does not have permission to access the - [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to access the `Evaluation + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. If the requested - [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation] - does not exist, a NOT_FOUND error is returned. + `Evaluation + `__ + does not exist, a NOT_FOUND error is + returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -460,7 +466,8 @@ async def list_evaluations( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListEvaluationsAsyncPager: r"""Gets a list of - [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation]s. + `Evaluation + `__s. .. code-block:: python @@ -492,17 +499,20 @@ async def sample_list_evaluations(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.ListEvaluationsRequest, dict]]): The request object. Request message for - [EvaluationService.ListEvaluations][google.cloud.discoveryengine.v1beta.EvaluationService.ListEvaluations] + `EvaluationService.ListEvaluations + `__ method. parent (:class:`str`): - Required. The parent location resource name, such as + Required. The parent location resource + name, such as ``projects/{project}/locations/{location}``. - If the caller does not have permission to list - [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation]s - under this location, regardless of whether or not this - location exists, a ``PERMISSION_DENIED`` error is - returned. + If the caller does not have permission + to list `Evaluation + `__s + under this location, regardless of + whether or not this location exists, a + ``PERMISSION_DENIED`` error is returned. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -518,11 +528,13 @@ async def sample_list_evaluations(): Returns: google.cloud.discoveryengine_v1beta.services.evaluation_service.pagers.ListEvaluationsAsyncPager: Response message for - [EvaluationService.ListEvaluations][google.cloud.discoveryengine.v1beta.EvaluationService.ListEvaluations] - method. + `EvaluationService.ListEvaluations + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -597,11 +609,10 @@ async def create_evaluation( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: - r"""Creates a - [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation]. - - Upon creation, the evaluation will be automatically triggered - and begin execution. + r"""Creates a `Evaluation + `__. + Upon creation, the evaluation will be automatically + triggered and begin execution. .. code-block:: python @@ -641,18 +652,20 @@ async def sample_create_evaluation(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.CreateEvaluationRequest, dict]]): The request object. Request message for - [EvaluationService.CreateEvaluation][google.cloud.discoveryengine.v1beta.EvaluationService.CreateEvaluation] + `EvaluationService.CreateEvaluation + `__ method. parent (:class:`str`): - Required. The parent resource name, such as + Required. The parent resource name, such + as ``projects/{project}/locations/{location}``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. evaluation (:class:`google.cloud.discoveryengine_v1beta.types.Evaluation`): - Required. The - [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation] + Required. The `Evaluation + `__ to create. This corresponds to the ``evaluation`` field @@ -668,11 +681,15 @@ async def sample_create_evaluation(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1beta.types.Evaluation` An evaluation is a single execution (or run) of an evaluation process. It - encapsulates the state of the evaluation and the - resulting data. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1beta.types.Evaluation` + An evaluation is a single execution (or + run) of an evaluation process. It + encapsulates the state of the evaluation + and the resulting data. """ # Create or coerce a protobuf request object. @@ -746,7 +763,8 @@ async def list_evaluation_results( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListEvaluationResultsAsyncPager: r"""Gets a list of results for a given a - [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation]. + `Evaluation + `__. .. code-block:: python @@ -778,15 +796,18 @@ async def sample_list_evaluation_results(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.ListEvaluationResultsRequest, dict]]): The request object. Request message for - [EvaluationService.ListEvaluationResults][google.cloud.discoveryengine.v1beta.EvaluationService.ListEvaluationResults] + `EvaluationService.ListEvaluationResults + `__ method. evaluation (:class:`str`): - Required. The evaluation resource name, such as + Required. The evaluation resource name, + such as ``projects/{project}/locations/{location}/evaluations/{evaluation}``. - If the caller does not have permission to list - [EvaluationResult][] under this evaluation, regardless - of whether or not this evaluation set exists, a + If the caller does not have permission + to list [EvaluationResult][] under this + evaluation, regardless of whether or not + this evaluation set exists, a ``PERMISSION_DENIED`` error is returned. This corresponds to the ``evaluation`` field @@ -803,11 +824,13 @@ async def sample_list_evaluation_results(): Returns: google.cloud.discoveryengine_v1beta.services.evaluation_service.pagers.ListEvaluationResultsAsyncPager: Response message for - [EvaluationService.ListEvaluationResults][google.cloud.discoveryengine.v1beta.EvaluationService.ListEvaluationResults] - method. + `EvaluationService.ListEvaluationResults + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/evaluation_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/evaluation_service/client.py index 9d0c17cc15cc..f9da6f21226b 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/evaluation_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/evaluation_service/client.py @@ -118,7 +118,8 @@ def get_transport_class( class EvaluationServiceClient(metaclass=EvaluationServiceClientMeta): """Service for managing - [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation]s, + `Evaluation + `__s, """ @staticmethod @@ -912,8 +913,8 @@ def get_evaluation( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> evaluation.Evaluation: - r"""Gets a - [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation]. + r"""Gets a `Evaluation + `__. .. code-block:: python @@ -944,22 +945,27 @@ def sample_get_evaluation(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.GetEvaluationRequest, dict]): The request object. Request message for - [EvaluationService.GetEvaluation][google.cloud.discoveryengine.v1beta.EvaluationService.GetEvaluation] + `EvaluationService.GetEvaluation + `__ method. name (str): Required. Full resource name of - [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation], + `Evaluation + `__, such as ``projects/{project}/locations/{location}/evaluations/{evaluation}``. - If the caller does not have permission to access the - [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to access the `Evaluation + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. If the requested - [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation] - does not exist, a NOT_FOUND error is returned. + `Evaluation + `__ + does not exist, a NOT_FOUND error is + returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1038,7 +1044,8 @@ def list_evaluations( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListEvaluationsPager: r"""Gets a list of - [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation]s. + `Evaluation + `__s. .. code-block:: python @@ -1070,17 +1077,20 @@ def sample_list_evaluations(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.ListEvaluationsRequest, dict]): The request object. Request message for - [EvaluationService.ListEvaluations][google.cloud.discoveryengine.v1beta.EvaluationService.ListEvaluations] + `EvaluationService.ListEvaluations + `__ method. parent (str): - Required. The parent location resource name, such as + Required. The parent location resource + name, such as ``projects/{project}/locations/{location}``. - If the caller does not have permission to list - [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation]s - under this location, regardless of whether or not this - location exists, a ``PERMISSION_DENIED`` error is - returned. + If the caller does not have permission + to list `Evaluation + `__s + under this location, regardless of + whether or not this location exists, a + ``PERMISSION_DENIED`` error is returned. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -1096,11 +1106,13 @@ def sample_list_evaluations(): Returns: google.cloud.discoveryengine_v1beta.services.evaluation_service.pagers.ListEvaluationsPager: Response message for - [EvaluationService.ListEvaluations][google.cloud.discoveryengine.v1beta.EvaluationService.ListEvaluations] - method. + `EvaluationService.ListEvaluations + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -1172,11 +1184,10 @@ def create_evaluation( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: - r"""Creates a - [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation]. - - Upon creation, the evaluation will be automatically triggered - and begin execution. + r"""Creates a `Evaluation + `__. + Upon creation, the evaluation will be automatically + triggered and begin execution. .. code-block:: python @@ -1216,18 +1227,20 @@ def sample_create_evaluation(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.CreateEvaluationRequest, dict]): The request object. Request message for - [EvaluationService.CreateEvaluation][google.cloud.discoveryengine.v1beta.EvaluationService.CreateEvaluation] + `EvaluationService.CreateEvaluation + `__ method. parent (str): - Required. The parent resource name, such as + Required. The parent resource name, such + as ``projects/{project}/locations/{location}``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. evaluation (google.cloud.discoveryengine_v1beta.types.Evaluation): - Required. The - [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation] + Required. The `Evaluation + `__ to create. This corresponds to the ``evaluation`` field @@ -1243,11 +1256,15 @@ def sample_create_evaluation(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1beta.types.Evaluation` An evaluation is a single execution (or run) of an evaluation process. It - encapsulates the state of the evaluation and the - resulting data. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1beta.types.Evaluation` + An evaluation is a single execution (or + run) of an evaluation process. It + encapsulates the state of the evaluation + and the resulting data. """ # Create or coerce a protobuf request object. @@ -1318,7 +1335,8 @@ def list_evaluation_results( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListEvaluationResultsPager: r"""Gets a list of results for a given a - [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation]. + `Evaluation + `__. .. code-block:: python @@ -1350,15 +1368,18 @@ def sample_list_evaluation_results(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.ListEvaluationResultsRequest, dict]): The request object. Request message for - [EvaluationService.ListEvaluationResults][google.cloud.discoveryengine.v1beta.EvaluationService.ListEvaluationResults] + `EvaluationService.ListEvaluationResults + `__ method. evaluation (str): - Required. The evaluation resource name, such as + Required. The evaluation resource name, + such as ``projects/{project}/locations/{location}/evaluations/{evaluation}``. - If the caller does not have permission to list - [EvaluationResult][] under this evaluation, regardless - of whether or not this evaluation set exists, a + If the caller does not have permission + to list [EvaluationResult][] under this + evaluation, regardless of whether or not + this evaluation set exists, a ``PERMISSION_DENIED`` error is returned. This corresponds to the ``evaluation`` field @@ -1375,11 +1396,13 @@ def sample_list_evaluation_results(): Returns: google.cloud.discoveryengine_v1beta.services.evaluation_service.pagers.ListEvaluationResultsPager: Response message for - [EvaluationService.ListEvaluationResults][google.cloud.discoveryengine.v1beta.EvaluationService.ListEvaluationResults] - method. + `EvaluationService.ListEvaluationResults + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/evaluation_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/evaluation_service/transports/base.py index ecb3b1f1aa7f..fdd1ffc19c35 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/evaluation_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/evaluation_service/transports/base.py @@ -84,8 +84,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -100,11 +98,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/evaluation_service/transports/grpc.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/evaluation_service/transports/grpc.py index eab8f572169b..2350e005e7b2 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/evaluation_service/transports/grpc.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/evaluation_service/transports/grpc.py @@ -113,7 +113,8 @@ class EvaluationServiceGrpcTransport(EvaluationServiceTransport): """gRPC backend transport for EvaluationService. Service for managing - [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation]s, + `Evaluation + `__s, This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -347,8 +348,8 @@ def get_evaluation( ) -> Callable[[evaluation_service.GetEvaluationRequest], evaluation.Evaluation]: r"""Return a callable for the get evaluation method over gRPC. - Gets a - [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation]. + Gets a `Evaluation + `__. Returns: Callable[[~.GetEvaluationRequest], @@ -378,7 +379,8 @@ def list_evaluations( r"""Return a callable for the list evaluations method over gRPC. Gets a list of - [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation]s. + `Evaluation + `__s. Returns: Callable[[~.ListEvaluationsRequest], @@ -406,11 +408,10 @@ def create_evaluation( ]: r"""Return a callable for the create evaluation method over gRPC. - Creates a - [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation]. - - Upon creation, the evaluation will be automatically triggered - and begin execution. + Creates a `Evaluation + `__. + Upon creation, the evaluation will be automatically + triggered and begin execution. Returns: Callable[[~.CreateEvaluationRequest], @@ -440,7 +441,8 @@ def list_evaluation_results( r"""Return a callable for the list evaluation results method over gRPC. Gets a list of results for a given a - [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation]. + `Evaluation + `__. Returns: Callable[[~.ListEvaluationResultsRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/evaluation_service/transports/grpc_asyncio.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/evaluation_service/transports/grpc_asyncio.py index f1d611ceb6af..24d7db484608 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/evaluation_service/transports/grpc_asyncio.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/evaluation_service/transports/grpc_asyncio.py @@ -119,7 +119,8 @@ class EvaluationServiceGrpcAsyncIOTransport(EvaluationServiceTransport): """gRPC AsyncIO backend transport for EvaluationService. Service for managing - [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation]s, + `Evaluation + `__s, This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -357,8 +358,8 @@ def get_evaluation( ]: r"""Return a callable for the get evaluation method over gRPC. - Gets a - [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation]. + Gets a `Evaluation + `__. Returns: Callable[[~.GetEvaluationRequest], @@ -388,7 +389,8 @@ def list_evaluations( r"""Return a callable for the list evaluations method over gRPC. Gets a list of - [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation]s. + `Evaluation + `__s. Returns: Callable[[~.ListEvaluationsRequest], @@ -417,11 +419,10 @@ def create_evaluation( ]: r"""Return a callable for the create evaluation method over gRPC. - Creates a - [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation]. - - Upon creation, the evaluation will be automatically triggered - and begin execution. + Creates a `Evaluation + `__. + Upon creation, the evaluation will be automatically + triggered and begin execution. Returns: Callable[[~.CreateEvaluationRequest], @@ -451,7 +452,8 @@ def list_evaluation_results( r"""Return a callable for the list evaluation results method over gRPC. Gets a list of results for a given a - [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation]. + `Evaluation + `__. Returns: Callable[[~.ListEvaluationResultsRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/evaluation_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/evaluation_service/transports/rest.py index 54e4267e7cd7..3c0ba9b5fccf 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/evaluation_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/evaluation_service/transports/rest.py @@ -398,7 +398,8 @@ class EvaluationServiceRestTransport(_BaseEvaluationServiceRestTransport): """REST backend synchronous transport for EvaluationService. Service for managing - [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation]s, + `Evaluation + `__s, This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -683,7 +684,8 @@ def __call__( Args: request (~.evaluation_service.CreateEvaluationRequest): The request object. Request message for - [EvaluationService.CreateEvaluation][google.cloud.discoveryengine.v1beta.EvaluationService.CreateEvaluation] + `EvaluationService.CreateEvaluation + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -838,7 +840,8 @@ def __call__( Args: request (~.evaluation_service.GetEvaluationRequest): The request object. Request message for - [EvaluationService.GetEvaluation][google.cloud.discoveryengine.v1beta.EvaluationService.GetEvaluation] + `EvaluationService.GetEvaluation + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -989,7 +992,8 @@ def __call__( Args: request (~.evaluation_service.ListEvaluationResultsRequest): The request object. Request message for - [EvaluationService.ListEvaluationResults][google.cloud.discoveryengine.v1beta.EvaluationService.ListEvaluationResults] + `EvaluationService.ListEvaluationResults + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1002,7 +1006,8 @@ def __call__( Returns: ~.evaluation_service.ListEvaluationResultsResponse: Response message for - [EvaluationService.ListEvaluationResults][google.cloud.discoveryengine.v1beta.EvaluationService.ListEvaluationResults] + `EvaluationService.ListEvaluationResults + `__ method. """ @@ -1147,7 +1152,8 @@ def __call__( Args: request (~.evaluation_service.ListEvaluationsRequest): The request object. Request message for - [EvaluationService.ListEvaluations][google.cloud.discoveryengine.v1beta.EvaluationService.ListEvaluations] + `EvaluationService.ListEvaluations + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1160,7 +1166,8 @@ def __call__( Returns: ~.evaluation_service.ListEvaluationsResponse: Response message for - [EvaluationService.ListEvaluations][google.cloud.discoveryengine.v1beta.EvaluationService.ListEvaluations] + `EvaluationService.ListEvaluations + `__ method. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/grounded_generation_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/grounded_generation_service/async_client.py index c65372ddc526..d614726cd2a5 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/grounded_generation_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/grounded_generation_service/async_client.py @@ -374,8 +374,8 @@ def request_generator(): Args: requests (AsyncIterator[`google.cloud.discoveryengine_v1beta.types.GenerateGroundedContentRequest`]): - The request object AsyncIterator. Top-level message sent by the client for the - ``GenerateGroundedContent`` method. + The request object AsyncIterator. Top-level message sent by the client for + the ``GenerateGroundedContent`` method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -386,7 +386,9 @@ def request_generator(): Returns: AsyncIterable[google.cloud.discoveryengine_v1beta.types.GenerateGroundedContentResponse]: - Response for the GenerateGroundedContent method. + Response for the + ``GenerateGroundedContent`` method. + """ # Wrap the RPC method; this adds retry and timeout information, @@ -453,8 +455,8 @@ async def sample_generate_grounded_content(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.GenerateGroundedContentRequest, dict]]): - The request object. Top-level message sent by the client for the - ``GenerateGroundedContent`` method. + The request object. Top-level message sent by the client for + the ``GenerateGroundedContent`` method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -465,7 +467,9 @@ async def sample_generate_grounded_content(): Returns: google.cloud.discoveryengine_v1beta.types.GenerateGroundedContentResponse: - Response for the GenerateGroundedContent method. + Response for the + ``GenerateGroundedContent`` method. + """ # Create or coerce a protobuf request object. # - Use the request object if provided (there's no risk of modifying the input as @@ -544,7 +548,8 @@ async def sample_check_grounding(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.CheckGroundingRequest, dict]]): The request object. Request message for - [GroundedGenerationService.CheckGrounding][google.cloud.discoveryengine.v1beta.GroundedGenerationService.CheckGrounding] + `GroundedGenerationService.CheckGrounding + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -557,8 +562,9 @@ async def sample_check_grounding(): Returns: google.cloud.discoveryengine_v1beta.types.CheckGroundingResponse: Response message for the - [GroundedGenerationService.CheckGrounding][google.cloud.discoveryengine.v1beta.GroundedGenerationService.CheckGrounding] - method. + `GroundedGenerationService.CheckGrounding + `__ + method. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/grounded_generation_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/grounded_generation_service/client.py index 81d3454d19a3..cc6107d9345f 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/grounded_generation_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/grounded_generation_service/client.py @@ -836,8 +836,8 @@ def request_generator(): Args: requests (Iterator[google.cloud.discoveryengine_v1beta.types.GenerateGroundedContentRequest]): - The request object iterator. Top-level message sent by the client for the - ``GenerateGroundedContent`` method. + The request object iterator. Top-level message sent by the client for + the ``GenerateGroundedContent`` method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -848,7 +848,9 @@ def request_generator(): Returns: Iterable[google.cloud.discoveryengine_v1beta.types.GenerateGroundedContentResponse]: - Response for the GenerateGroundedContent method. + Response for the + ``GenerateGroundedContent`` method. + """ # Wrap the RPC method; this adds retry and timeout information, @@ -915,8 +917,8 @@ def sample_generate_grounded_content(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.GenerateGroundedContentRequest, dict]): - The request object. Top-level message sent by the client for the - ``GenerateGroundedContent`` method. + The request object. Top-level message sent by the client for + the ``GenerateGroundedContent`` method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -927,7 +929,9 @@ def sample_generate_grounded_content(): Returns: google.cloud.discoveryengine_v1beta.types.GenerateGroundedContentResponse: - Response for the GenerateGroundedContent method. + Response for the + ``GenerateGroundedContent`` method. + """ # Create or coerce a protobuf request object. # - Use the request object if provided (there's no risk of modifying the input as @@ -1006,7 +1010,8 @@ def sample_check_grounding(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.CheckGroundingRequest, dict]): The request object. Request message for - [GroundedGenerationService.CheckGrounding][google.cloud.discoveryengine.v1beta.GroundedGenerationService.CheckGrounding] + `GroundedGenerationService.CheckGrounding + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1019,8 +1024,9 @@ def sample_check_grounding(): Returns: google.cloud.discoveryengine_v1beta.types.CheckGroundingResponse: Response message for the - [GroundedGenerationService.CheckGrounding][google.cloud.discoveryengine.v1beta.GroundedGenerationService.CheckGrounding] - method. + `GroundedGenerationService.CheckGrounding + `__ + method. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/grounded_generation_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/grounded_generation_service/transports/base.py index b4558b69cab9..3208bacde8bf 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/grounded_generation_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/grounded_generation_service/transports/base.py @@ -84,8 +84,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -100,11 +98,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/grounded_generation_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/grounded_generation_service/transports/rest.py index 4f218f7971e9..5c7a4e1098e9 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/grounded_generation_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/grounded_generation_service/transports/rest.py @@ -406,7 +406,8 @@ def __call__( Args: request (~.grounded_generation_service.CheckGroundingRequest): The request object. Request message for - [GroundedGenerationService.CheckGrounding][google.cloud.discoveryengine.v1beta.GroundedGenerationService.CheckGrounding] + `GroundedGenerationService.CheckGrounding + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -419,7 +420,8 @@ def __call__( Returns: ~.grounded_generation_service.CheckGroundingResponse: Response message for the - [GroundedGenerationService.CheckGrounding][google.cloud.discoveryengine.v1beta.GroundedGenerationService.CheckGrounding] + `GroundedGenerationService.CheckGrounding + `__ method. """ @@ -569,8 +571,8 @@ def __call__( Args: request (~.grounded_generation_service.GenerateGroundedContentRequest): - The request object. Top-level message sent by the client for the - ``GenerateGroundedContent`` method. + The request object. Top-level message sent by the client for + the ``GenerateGroundedContent`` method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -581,7 +583,9 @@ def __call__( Returns: ~.grounded_generation_service.GenerateGroundedContentResponse: - Response for the ``GenerateGroundedContent`` method. + Response for the + ``GenerateGroundedContent`` method. + """ http_options = ( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/project_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/project_service/async_client.py index 552a89a63156..a42758a74931 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/project_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/project_service/async_client.py @@ -67,7 +67,7 @@ class ProjectServiceAsyncClient: """Service for operations on the - [Project][google.cloud.discoveryengine.v1beta.Project]. + `Project `__. """ _client: ProjectServiceClient @@ -302,13 +302,14 @@ async def provision_project( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: - r"""Provisions the project resource. During the process, related - systems will get prepared and initialized. + r"""Provisions the project resource. During the + process, related systems will get prepared and + initialized. Caller must read the `Terms for data - use `__, and - optionally specify in request to provide consent to that service - terms. + use `__, + and optionally specify in request to provide consent to + that service terms. .. code-block:: python @@ -345,12 +346,15 @@ async def sample_provision_project(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.ProvisionProjectRequest, dict]]): The request object. Request for - [ProjectService.ProvisionProject][google.cloud.discoveryengine.v1beta.ProjectService.ProvisionProject] + `ProjectService.ProvisionProject + `__ method. name (:class:`str`): Required. Full resource name of a - [Project][google.cloud.discoveryengine.v1beta.Project], - such as ``projects/{project_id_or_number}``. + `Project + `__, + such as + ``projects/{project_id_or_number}``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -365,12 +369,13 @@ async def sample_provision_project(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be + An object representing a long-running + operation. + The result type for the operation will + be :class:`google.cloud.discoveryengine_v1beta.types.Project` - Metadata and configurations for a Google Cloud project - in the service. + Metadata and configurations for a Google + Cloud project in the service. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/project_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/project_service/client.py index ffeb87807c23..16068ce20eb4 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/project_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/project_service/client.py @@ -113,7 +113,7 @@ def get_transport_class( class ProjectServiceClient(metaclass=ProjectServiceClientMeta): """Service for operations on the - [Project][google.cloud.discoveryengine.v1beta.Project]. + `Project `__. """ @staticmethod @@ -736,13 +736,14 @@ def provision_project( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: - r"""Provisions the project resource. During the process, related - systems will get prepared and initialized. + r"""Provisions the project resource. During the + process, related systems will get prepared and + initialized. Caller must read the `Terms for data - use `__, and - optionally specify in request to provide consent to that service - terms. + use `__, + and optionally specify in request to provide consent to + that service terms. .. code-block:: python @@ -779,12 +780,15 @@ def sample_provision_project(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.ProvisionProjectRequest, dict]): The request object. Request for - [ProjectService.ProvisionProject][google.cloud.discoveryengine.v1beta.ProjectService.ProvisionProject] + `ProjectService.ProvisionProject + `__ method. name (str): Required. Full resource name of a - [Project][google.cloud.discoveryengine.v1beta.Project], - such as ``projects/{project_id_or_number}``. + `Project + `__, + such as + ``projects/{project_id_or_number}``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -799,12 +803,13 @@ def sample_provision_project(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be + An object representing a long-running + operation. + The result type for the operation will + be :class:`google.cloud.discoveryengine_v1beta.types.Project` - Metadata and configurations for a Google Cloud project - in the service. + Metadata and configurations for a Google + Cloud project in the service. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/project_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/project_service/transports/base.py index e2901ae363a5..c760a8cdc784 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/project_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/project_service/transports/base.py @@ -84,8 +84,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -100,11 +98,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/project_service/transports/grpc.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/project_service/transports/grpc.py index 06508f0203a3..00c8201eb037 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/project_service/transports/grpc.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/project_service/transports/grpc.py @@ -113,7 +113,7 @@ class ProjectServiceGrpcTransport(ProjectServiceTransport): """gRPC backend transport for ProjectService. Service for operations on the - [Project][google.cloud.discoveryengine.v1beta.Project]. + `Project `__. This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -347,13 +347,14 @@ def provision_project( ) -> Callable[[project_service.ProvisionProjectRequest], operations_pb2.Operation]: r"""Return a callable for the provision project method over gRPC. - Provisions the project resource. During the process, related - systems will get prepared and initialized. + Provisions the project resource. During the + process, related systems will get prepared and + initialized. Caller must read the `Terms for data - use `__, and - optionally specify in request to provide consent to that service - terms. + use `__, + and optionally specify in request to provide consent to + that service terms. Returns: Callable[[~.ProvisionProjectRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/project_service/transports/grpc_asyncio.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/project_service/transports/grpc_asyncio.py index d1bdfde6cdd3..8912403ceebd 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/project_service/transports/grpc_asyncio.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/project_service/transports/grpc_asyncio.py @@ -119,7 +119,7 @@ class ProjectServiceGrpcAsyncIOTransport(ProjectServiceTransport): """gRPC AsyncIO backend transport for ProjectService. Service for operations on the - [Project][google.cloud.discoveryengine.v1beta.Project]. + `Project `__. This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -357,13 +357,14 @@ def provision_project( ]: r"""Return a callable for the provision project method over gRPC. - Provisions the project resource. During the process, related - systems will get prepared and initialized. + Provisions the project resource. During the + process, related systems will get prepared and + initialized. Caller must read the `Terms for data - use `__, and - optionally specify in request to provide consent to that service - terms. + use `__, + and optionally specify in request to provide consent to + that service terms. Returns: Callable[[~.ProvisionProjectRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/project_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/project_service/transports/rest.py index e0f89fde21a5..5cc477268e8b 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/project_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/project_service/transports/rest.py @@ -221,7 +221,7 @@ class ProjectServiceRestTransport(_BaseProjectServiceRestTransport): """REST backend synchronous transport for ProjectService. Service for operations on the - [Project][google.cloud.discoveryengine.v1beta.Project]. + `Project `__. This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -505,7 +505,8 @@ def __call__( Args: request (~.project_service.ProvisionProjectRequest): The request object. Request for - [ProjectService.ProvisionProject][google.cloud.discoveryengine.v1beta.ProjectService.ProvisionProject] + `ProjectService.ProvisionProject + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/rank_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/rank_service/async_client.py index 2c45bd54afed..a30e7602586d 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/rank_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/rank_service/async_client.py @@ -327,7 +327,8 @@ async def sample_rank(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.RankRequest, dict]]): The request object. Request message for - [RankService.Rank][google.cloud.discoveryengine.v1beta.RankService.Rank] + `RankService.Rank + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -340,8 +341,9 @@ async def sample_rank(): Returns: google.cloud.discoveryengine_v1beta.types.RankResponse: Response message for - [RankService.Rank][google.cloud.discoveryengine.v1beta.RankService.Rank] - method. + `RankService.Rank + `__ + method. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/rank_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/rank_service/client.py index eed42b34cda3..e10652bcd7de 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/rank_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/rank_service/client.py @@ -765,7 +765,8 @@ def sample_rank(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.RankRequest, dict]): The request object. Request message for - [RankService.Rank][google.cloud.discoveryengine.v1beta.RankService.Rank] + `RankService.Rank + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -778,8 +779,9 @@ def sample_rank(): Returns: google.cloud.discoveryengine_v1beta.types.RankResponse: Response message for - [RankService.Rank][google.cloud.discoveryengine.v1beta.RankService.Rank] - method. + `RankService.Rank + `__ + method. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/rank_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/rank_service/transports/base.py index 43cd21f0f407..a703e7356aa8 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/rank_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/rank_service/transports/base.py @@ -84,8 +84,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -100,11 +98,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/rank_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/rank_service/transports/rest.py index 6f230c8ce341..c79fc7405c07 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/rank_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/rank_service/transports/rest.py @@ -335,7 +335,8 @@ def __call__( Args: request (~.rank_service.RankRequest): The request object. Request message for - [RankService.Rank][google.cloud.discoveryengine.v1beta.RankService.Rank] + `RankService.Rank + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -348,7 +349,8 @@ def __call__( Returns: ~.rank_service.RankResponse: Response message for - [RankService.Rank][google.cloud.discoveryengine.v1beta.RankService.Rank] + `RankService.Rank + `__ method. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/recommendation_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/recommendation_service/transports/base.py index cd61f83a3dcf..f8d46f6a2c6a 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/recommendation_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/recommendation_service/transports/base.py @@ -84,8 +84,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -100,11 +98,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/sample_query_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/sample_query_service/async_client.py index 9b267d313d5c..bdfd349f3e92 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/sample_query_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/sample_query_service/async_client.py @@ -73,7 +73,8 @@ class SampleQueryServiceAsyncClient: """Service for managing - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s, + `SampleQuery + `__s, """ _client: SampleQueryServiceClient @@ -320,8 +321,8 @@ async def get_sample_query( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> sample_query.SampleQuery: - r"""Gets a - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]. + r"""Gets a `SampleQuery + `__. .. code-block:: python @@ -352,22 +353,27 @@ async def sample_get_sample_query(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.GetSampleQueryRequest, dict]]): The request object. Request message for - [SampleQueryService.GetSampleQuery][google.cloud.discoveryengine.v1beta.SampleQueryService.GetSampleQuery] + `SampleQueryService.GetSampleQuery + `__ method. name (:class:`str`): Required. Full resource name of - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery], + `SampleQuery + `__, such as ``projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}/sampleQueries/{sample_query}``. - If the caller does not have permission to access the - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to access the `SampleQuery + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. If the requested - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery] - does not exist, a NOT_FOUND error is returned. + `SampleQuery + `__ + does not exist, a NOT_FOUND error is + returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -447,7 +453,8 @@ async def list_sample_queries( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListSampleQueriesAsyncPager: r"""Gets a list of - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s. + `SampleQuery + `__s. .. code-block:: python @@ -479,18 +486,21 @@ async def sample_list_sample_queries(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.ListSampleQueriesRequest, dict]]): The request object. Request message for - [SampleQueryService.ListSampleQueries][google.cloud.discoveryengine.v1beta.SampleQueryService.ListSampleQueries] + `SampleQueryService.ListSampleQueries + `__ method. parent (:class:`str`): - Required. The parent sample query set resource name, - such as + Required. The parent sample query set + resource name, such as ``projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}``. - If the caller does not have permission to list - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s - under this sample query set, regardless of whether or - not this sample query set exists, a - ``PERMISSION_DENIED`` error is returned. + If the caller does not have permission + to list `SampleQuery + `__s + under this sample query set, regardless + of whether or not this sample query set + exists, a ``PERMISSION_DENIED`` error is + returned. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -506,11 +516,13 @@ async def sample_list_sample_queries(): Returns: google.cloud.discoveryengine_v1beta.services.sample_query_service.pagers.ListSampleQueriesAsyncPager: Response message for - [SampleQueryService.ListSampleQueries][google.cloud.discoveryengine.v1beta.SampleQueryService.ListSampleQueries] - method. + `SampleQueryService.ListSampleQueries + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -586,8 +598,8 @@ async def create_sample_query( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> gcd_sample_query.SampleQuery: - r"""Creates a - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery] + r"""Creates a `SampleQuery + `__ .. code-block:: python @@ -623,10 +635,12 @@ async def sample_create_sample_query(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.CreateSampleQueryRequest, dict]]): The request object. Request message for - [SampleQueryService.CreateSampleQuery][google.cloud.discoveryengine.v1beta.SampleQueryService.CreateSampleQuery] + `SampleQueryService.CreateSampleQuery + `__ method. parent (:class:`str`): - Required. The parent resource name, such as + Required. The parent resource name, such + as ``projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}``. This corresponds to the ``parent`` field @@ -634,7 +648,8 @@ async def sample_create_sample_query(): should not be set. sample_query (:class:`google.cloud.discoveryengine_v1beta.types.SampleQuery`): Required. The - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery] + `SampleQuery + `__ to create. This corresponds to the ``sample_query`` field @@ -642,25 +657,34 @@ async def sample_create_sample_query(): should not be set. sample_query_id (:class:`str`): Required. The ID to use for the - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery], - which will become the final component of the - [SampleQuery.name][google.cloud.discoveryengine.v1beta.SampleQuery.name]. - - If the caller does not have permission to create the - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery], - regardless of whether or not it exists, a - ``PERMISSION_DENIED`` error is returned. + `SampleQuery + `__, + which will become the final component of + the + `SampleQuery.name + `__. + + If the caller does not have permission + to create the `SampleQuery + `__, + regardless of whether or not it exists, + a ``PERMISSION_DENIED`` error is + returned. This field must be unique among all - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s + `SampleQuery + `__s with the same - [parent][google.cloud.discoveryengine.v1beta.CreateSampleQueryRequest.parent]. - Otherwise, an ``ALREADY_EXISTS`` error is returned. + `parent + `__. + Otherwise, an ``ALREADY_EXISTS`` error + is returned. - This field must conform to - `RFC-1034 `__ - standard with a length limit of 63 characters. - Otherwise, an ``INVALID_ARGUMENT`` error is returned. + This field must conform to `RFC-1034 + `__ + standard with a length limit of 63 + characters. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. This corresponds to the ``sample_query_id`` field on the ``request`` instance; if ``request`` is provided, this @@ -744,8 +768,8 @@ async def update_sample_query( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> gcd_sample_query.SampleQuery: - r"""Updates a - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]. + r"""Updates a `SampleQuery + `__. .. code-block:: python @@ -779,21 +803,24 @@ async def sample_update_sample_query(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.UpdateSampleQueryRequest, dict]]): The request object. Request message for - [SampleQueryService.UpdateSampleQuery][google.cloud.discoveryengine.v1beta.SampleQueryService.UpdateSampleQuery] + `SampleQueryService.UpdateSampleQuery + `__ method. sample_query (:class:`google.cloud.discoveryengine_v1beta.types.SampleQuery`): Required. The simple query to update. - If the caller does not have permission to update the - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery], - regardless of whether or not it exists, a - ``PERMISSION_DENIED`` error is returned. - - If the - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery] - to update does not exist a ``NOT_FOUND`` error is + If the caller does not have permission + to update the `SampleQuery + `__, + regardless of whether or not it exists, + a ``PERMISSION_DENIED`` error is returned. + If the `SampleQuery + `__ + to update does not exist a ``NOT_FOUND`` + error is returned. + This corresponds to the ``sample_query`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -884,8 +911,8 @@ async def delete_sample_query( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> None: - r"""Deletes a - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]. + r"""Deletes a `SampleQuery + `__. .. code-block:: python @@ -913,24 +940,28 @@ async def sample_delete_sample_query(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.DeleteSampleQueryRequest, dict]]): The request object. Request message for - [SampleQueryService.DeleteSampleQuery][google.cloud.discoveryengine.v1beta.SampleQueryService.DeleteSampleQuery] + `SampleQueryService.DeleteSampleQuery + `__ method. name (:class:`str`): Required. Full resource name of - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery], + `SampleQuery + `__, such as ``projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}/sampleQueries/{sample_query}``. - If the caller does not have permission to delete the - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery], - regardless of whether or not it exists, a - ``PERMISSION_DENIED`` error is returned. - - If the - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery] - to delete does not exist, a ``NOT_FOUND`` error is + If the caller does not have permission + to delete the `SampleQuery + `__, + regardless of whether or not it exists, + a ``PERMISSION_DENIED`` error is returned. + If the `SampleQuery + `__ + to delete does not exist, a + ``NOT_FOUND`` error is returned. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -997,12 +1028,14 @@ async def import_sample_queries( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: r"""Bulk import of multiple - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s. + `SampleQuery + `__s. Sample queries that already exist may be deleted. Note: It is possible for a subset of the - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s - to be successfully imported. + `SampleQuery + `__s to + be successfully imported. .. code-block:: python @@ -1041,7 +1074,8 @@ async def sample_import_sample_queries(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.ImportSampleQueriesRequest, dict]]): The request object. Request message for - [SampleQueryService.ImportSampleQueries][google.cloud.discoveryengine.v1beta.SampleQueryService.ImportSampleQueries] + `SampleQueryService.ImportSampleQueries + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -1053,14 +1087,18 @@ async def sample_import_sample_queries(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1beta.types.ImportSampleQueriesResponse` Response of the - [SampleQueryService.ImportSampleQueries][google.cloud.discoveryengine.v1beta.SampleQueryService.ImportSampleQueries] - method. If the long running operation is done, this - message is returned by the - google.longrunning.Operations.response field if the - operation is successful. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1beta.types.ImportSampleQueriesResponse` + Response of the + `SampleQueryService.ImportSampleQueries + `__ + method. If the long running operation is + done, this message is returned by the + google.longrunning.Operations.response + field if the operation is successful. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/sample_query_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/sample_query_service/client.py index 65aa4e379696..a085f6af941b 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/sample_query_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/sample_query_service/client.py @@ -119,7 +119,8 @@ def get_transport_class( class SampleQueryServiceClient(metaclass=SampleQueryServiceClientMeta): """Service for managing - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s, + `SampleQuery + `__s, """ @staticmethod @@ -780,8 +781,8 @@ def get_sample_query( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> sample_query.SampleQuery: - r"""Gets a - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]. + r"""Gets a `SampleQuery + `__. .. code-block:: python @@ -812,22 +813,27 @@ def sample_get_sample_query(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.GetSampleQueryRequest, dict]): The request object. Request message for - [SampleQueryService.GetSampleQuery][google.cloud.discoveryengine.v1beta.SampleQueryService.GetSampleQuery] + `SampleQueryService.GetSampleQuery + `__ method. name (str): Required. Full resource name of - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery], + `SampleQuery + `__, such as ``projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}/sampleQueries/{sample_query}``. - If the caller does not have permission to access the - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to access the `SampleQuery + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. If the requested - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery] - does not exist, a NOT_FOUND error is returned. + `SampleQuery + `__ + does not exist, a NOT_FOUND error is + returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -904,7 +910,8 @@ def list_sample_queries( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListSampleQueriesPager: r"""Gets a list of - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s. + `SampleQuery + `__s. .. code-block:: python @@ -936,18 +943,21 @@ def sample_list_sample_queries(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.ListSampleQueriesRequest, dict]): The request object. Request message for - [SampleQueryService.ListSampleQueries][google.cloud.discoveryengine.v1beta.SampleQueryService.ListSampleQueries] + `SampleQueryService.ListSampleQueries + `__ method. parent (str): - Required. The parent sample query set resource name, - such as + Required. The parent sample query set + resource name, such as ``projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}``. - If the caller does not have permission to list - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s - under this sample query set, regardless of whether or - not this sample query set exists, a - ``PERMISSION_DENIED`` error is returned. + If the caller does not have permission + to list `SampleQuery + `__s + under this sample query set, regardless + of whether or not this sample query set + exists, a ``PERMISSION_DENIED`` error is + returned. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -963,11 +973,13 @@ def sample_list_sample_queries(): Returns: google.cloud.discoveryengine_v1beta.services.sample_query_service.pagers.ListSampleQueriesPager: Response message for - [SampleQueryService.ListSampleQueries][google.cloud.discoveryengine.v1beta.SampleQueryService.ListSampleQueries] - method. + `SampleQueryService.ListSampleQueries + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -1040,8 +1052,8 @@ def create_sample_query( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> gcd_sample_query.SampleQuery: - r"""Creates a - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery] + r"""Creates a `SampleQuery + `__ .. code-block:: python @@ -1077,10 +1089,12 @@ def sample_create_sample_query(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.CreateSampleQueryRequest, dict]): The request object. Request message for - [SampleQueryService.CreateSampleQuery][google.cloud.discoveryengine.v1beta.SampleQueryService.CreateSampleQuery] + `SampleQueryService.CreateSampleQuery + `__ method. parent (str): - Required. The parent resource name, such as + Required. The parent resource name, such + as ``projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}``. This corresponds to the ``parent`` field @@ -1088,7 +1102,8 @@ def sample_create_sample_query(): should not be set. sample_query (google.cloud.discoveryengine_v1beta.types.SampleQuery): Required. The - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery] + `SampleQuery + `__ to create. This corresponds to the ``sample_query`` field @@ -1096,25 +1111,34 @@ def sample_create_sample_query(): should not be set. sample_query_id (str): Required. The ID to use for the - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery], - which will become the final component of the - [SampleQuery.name][google.cloud.discoveryengine.v1beta.SampleQuery.name]. - - If the caller does not have permission to create the - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery], - regardless of whether or not it exists, a - ``PERMISSION_DENIED`` error is returned. + `SampleQuery + `__, + which will become the final component of + the + `SampleQuery.name + `__. + + If the caller does not have permission + to create the `SampleQuery + `__, + regardless of whether or not it exists, + a ``PERMISSION_DENIED`` error is + returned. This field must be unique among all - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s + `SampleQuery + `__s with the same - [parent][google.cloud.discoveryengine.v1beta.CreateSampleQueryRequest.parent]. - Otherwise, an ``ALREADY_EXISTS`` error is returned. + `parent + `__. + Otherwise, an ``ALREADY_EXISTS`` error + is returned. - This field must conform to - `RFC-1034 `__ - standard with a length limit of 63 characters. - Otherwise, an ``INVALID_ARGUMENT`` error is returned. + This field must conform to `RFC-1034 + `__ + standard with a length limit of 63 + characters. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. This corresponds to the ``sample_query_id`` field on the ``request`` instance; if ``request`` is provided, this @@ -1195,8 +1219,8 @@ def update_sample_query( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> gcd_sample_query.SampleQuery: - r"""Updates a - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]. + r"""Updates a `SampleQuery + `__. .. code-block:: python @@ -1230,21 +1254,24 @@ def sample_update_sample_query(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.UpdateSampleQueryRequest, dict]): The request object. Request message for - [SampleQueryService.UpdateSampleQuery][google.cloud.discoveryengine.v1beta.SampleQueryService.UpdateSampleQuery] + `SampleQueryService.UpdateSampleQuery + `__ method. sample_query (google.cloud.discoveryengine_v1beta.types.SampleQuery): Required. The simple query to update. - If the caller does not have permission to update the - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery], - regardless of whether or not it exists, a - ``PERMISSION_DENIED`` error is returned. - - If the - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery] - to update does not exist a ``NOT_FOUND`` error is + If the caller does not have permission + to update the `SampleQuery + `__, + regardless of whether or not it exists, + a ``PERMISSION_DENIED`` error is returned. + If the `SampleQuery + `__ + to update does not exist a ``NOT_FOUND`` + error is returned. + This corresponds to the ``sample_query`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1332,8 +1359,8 @@ def delete_sample_query( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> None: - r"""Deletes a - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]. + r"""Deletes a `SampleQuery + `__. .. code-block:: python @@ -1361,24 +1388,28 @@ def sample_delete_sample_query(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.DeleteSampleQueryRequest, dict]): The request object. Request message for - [SampleQueryService.DeleteSampleQuery][google.cloud.discoveryengine.v1beta.SampleQueryService.DeleteSampleQuery] + `SampleQueryService.DeleteSampleQuery + `__ method. name (str): Required. Full resource name of - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery], + `SampleQuery + `__, such as ``projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}/sampleQueries/{sample_query}``. - If the caller does not have permission to delete the - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery], - regardless of whether or not it exists, a - ``PERMISSION_DENIED`` error is returned. - - If the - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery] - to delete does not exist, a ``NOT_FOUND`` error is + If the caller does not have permission + to delete the `SampleQuery + `__, + regardless of whether or not it exists, + a ``PERMISSION_DENIED`` error is returned. + If the `SampleQuery + `__ + to delete does not exist, a + ``NOT_FOUND`` error is returned. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1442,12 +1473,14 @@ def import_sample_queries( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: r"""Bulk import of multiple - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s. + `SampleQuery + `__s. Sample queries that already exist may be deleted. Note: It is possible for a subset of the - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s - to be successfully imported. + `SampleQuery + `__s to + be successfully imported. .. code-block:: python @@ -1486,7 +1519,8 @@ def sample_import_sample_queries(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.ImportSampleQueriesRequest, dict]): The request object. Request message for - [SampleQueryService.ImportSampleQueries][google.cloud.discoveryengine.v1beta.SampleQueryService.ImportSampleQueries] + `SampleQueryService.ImportSampleQueries + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1498,14 +1532,18 @@ def sample_import_sample_queries(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1beta.types.ImportSampleQueriesResponse` Response of the - [SampleQueryService.ImportSampleQueries][google.cloud.discoveryengine.v1beta.SampleQueryService.ImportSampleQueries] - method. If the long running operation is done, this - message is returned by the - google.longrunning.Operations.response field if the - operation is successful. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1beta.types.ImportSampleQueriesResponse` + Response of the + `SampleQueryService.ImportSampleQueries + `__ + method. If the long running operation is + done, this message is returned by the + google.longrunning.Operations.response + field if the operation is successful. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/sample_query_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/sample_query_service/transports/base.py index cce4c52d8bfa..42acf58e303a 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/sample_query_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/sample_query_service/transports/base.py @@ -88,8 +88,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -104,11 +102,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/sample_query_service/transports/grpc.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/sample_query_service/transports/grpc.py index 6fe3b9e28646..514712b68c94 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/sample_query_service/transports/grpc.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/sample_query_service/transports/grpc.py @@ -117,7 +117,8 @@ class SampleQueryServiceGrpcTransport(SampleQueryServiceTransport): """gRPC backend transport for SampleQueryService. Service for managing - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s, + `SampleQuery + `__s, This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -353,8 +354,8 @@ def get_sample_query( ]: r"""Return a callable for the get sample query method over gRPC. - Gets a - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]. + Gets a `SampleQuery + `__. Returns: Callable[[~.GetSampleQueryRequest], @@ -384,7 +385,8 @@ def list_sample_queries( r"""Return a callable for the list sample queries method over gRPC. Gets a list of - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s. + `SampleQuery + `__s. Returns: Callable[[~.ListSampleQueriesRequest], @@ -412,8 +414,8 @@ def create_sample_query( ]: r"""Return a callable for the create sample query method over gRPC. - Creates a - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery] + Creates a `SampleQuery + `__ Returns: Callable[[~.CreateSampleQueryRequest], @@ -441,8 +443,8 @@ def update_sample_query( ]: r"""Return a callable for the update sample query method over gRPC. - Updates a - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]. + Updates a `SampleQuery + `__. Returns: Callable[[~.UpdateSampleQueryRequest], @@ -468,8 +470,8 @@ def delete_sample_query( ) -> Callable[[sample_query_service.DeleteSampleQueryRequest], empty_pb2.Empty]: r"""Return a callable for the delete sample query method over gRPC. - Deletes a - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]. + Deletes a `SampleQuery + `__. Returns: Callable[[~.DeleteSampleQueryRequest], @@ -496,12 +498,14 @@ def import_sample_queries( r"""Return a callable for the import sample queries method over gRPC. Bulk import of multiple - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s. + `SampleQuery + `__s. Sample queries that already exist may be deleted. Note: It is possible for a subset of the - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s - to be successfully imported. + `SampleQuery + `__s to + be successfully imported. Returns: Callable[[~.ImportSampleQueriesRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/sample_query_service/transports/grpc_asyncio.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/sample_query_service/transports/grpc_asyncio.py index b1f8d05cbb30..f16056a29beb 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/sample_query_service/transports/grpc_asyncio.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/sample_query_service/transports/grpc_asyncio.py @@ -123,7 +123,8 @@ class SampleQueryServiceGrpcAsyncIOTransport(SampleQueryServiceTransport): """gRPC AsyncIO backend transport for SampleQueryService. Service for managing - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s, + `SampleQuery + `__s, This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -362,8 +363,8 @@ def get_sample_query( ]: r"""Return a callable for the get sample query method over gRPC. - Gets a - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]. + Gets a `SampleQuery + `__. Returns: Callable[[~.GetSampleQueryRequest], @@ -393,7 +394,8 @@ def list_sample_queries( r"""Return a callable for the list sample queries method over gRPC. Gets a list of - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s. + `SampleQuery + `__s. Returns: Callable[[~.ListSampleQueriesRequest], @@ -422,8 +424,8 @@ def create_sample_query( ]: r"""Return a callable for the create sample query method over gRPC. - Creates a - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery] + Creates a `SampleQuery + `__ Returns: Callable[[~.CreateSampleQueryRequest], @@ -452,8 +454,8 @@ def update_sample_query( ]: r"""Return a callable for the update sample query method over gRPC. - Updates a - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]. + Updates a `SampleQuery + `__. Returns: Callable[[~.UpdateSampleQueryRequest], @@ -481,8 +483,8 @@ def delete_sample_query( ]: r"""Return a callable for the delete sample query method over gRPC. - Deletes a - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]. + Deletes a `SampleQuery + `__. Returns: Callable[[~.DeleteSampleQueryRequest], @@ -511,12 +513,14 @@ def import_sample_queries( r"""Return a callable for the import sample queries method over gRPC. Bulk import of multiple - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s. + `SampleQuery + `__s. Sample queries that already exist may be deleted. Note: It is possible for a subset of the - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s - to be successfully imported. + `SampleQuery + `__s to + be successfully imported. Returns: Callable[[~.ImportSampleQueriesRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/sample_query_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/sample_query_service/transports/rest.py index ef6fbf5ee1f0..054b055c278e 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/sample_query_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/sample_query_service/transports/rest.py @@ -476,7 +476,8 @@ class SampleQueryServiceRestTransport(_BaseSampleQueryServiceRestTransport): """REST backend synchronous transport for SampleQueryService. Service for managing - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s, + `SampleQuery + `__s, This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -761,7 +762,8 @@ def __call__( Args: request (~.sample_query_service.CreateSampleQueryRequest): The request object. Request message for - [SampleQueryService.CreateSampleQuery][google.cloud.discoveryengine.v1beta.SampleQueryService.CreateSampleQuery] + `SampleQueryService.CreateSampleQuery + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -917,7 +919,8 @@ def __call__( Args: request (~.sample_query_service.DeleteSampleQueryRequest): The request object. Request message for - [SampleQueryService.DeleteSampleQuery][google.cloud.discoveryengine.v1beta.SampleQueryService.DeleteSampleQuery] + `SampleQueryService.DeleteSampleQuery + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1028,7 +1031,8 @@ def __call__( Args: request (~.sample_query_service.GetSampleQueryRequest): The request object. Request message for - [SampleQueryService.GetSampleQuery][google.cloud.discoveryengine.v1beta.SampleQueryService.GetSampleQuery] + `SampleQueryService.GetSampleQuery + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1180,7 +1184,8 @@ def __call__( Args: request (~.import_config.ImportSampleQueriesRequest): The request object. Request message for - [SampleQueryService.ImportSampleQueries][google.cloud.discoveryengine.v1beta.SampleQueryService.ImportSampleQueries] + `SampleQueryService.ImportSampleQueries + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1337,7 +1342,8 @@ def __call__( Args: request (~.sample_query_service.ListSampleQueriesRequest): The request object. Request message for - [SampleQueryService.ListSampleQueries][google.cloud.discoveryengine.v1beta.SampleQueryService.ListSampleQueries] + `SampleQueryService.ListSampleQueries + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1350,7 +1356,8 @@ def __call__( Returns: ~.sample_query_service.ListSampleQueriesResponse: Response message for - [SampleQueryService.ListSampleQueries][google.cloud.discoveryengine.v1beta.SampleQueryService.ListSampleQueries] + `SampleQueryService.ListSampleQueries + `__ method. """ @@ -1492,7 +1499,8 @@ def __call__( Args: request (~.sample_query_service.UpdateSampleQueryRequest): The request object. Request message for - [SampleQueryService.UpdateSampleQuery][google.cloud.discoveryengine.v1beta.SampleQueryService.UpdateSampleQuery] + `SampleQueryService.UpdateSampleQuery + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/sample_query_set_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/sample_query_set_service/async_client.py index f7068c5d8516..579a9f8037bb 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/sample_query_set_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/sample_query_set_service/async_client.py @@ -72,7 +72,8 @@ class SampleQuerySetServiceAsyncClient: """Service for managing - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet]s, + `SampleQuerySet + `__s, """ _client: SampleQuerySetServiceClient @@ -322,7 +323,8 @@ async def get_sample_query_set( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> sample_query_set.SampleQuerySet: r"""Gets a - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet]. + `SampleQuerySet + `__. .. code-block:: python @@ -353,22 +355,27 @@ async def sample_get_sample_query_set(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.GetSampleQuerySetRequest, dict]]): The request object. Request message for - [SampleQuerySetService.GetSampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySetService.GetSampleQuerySet] + `SampleQuerySetService.GetSampleQuerySet + `__ method. name (:class:`str`): Required. Full resource name of - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet], + `SampleQuerySet + `__, such as ``projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}``. - If the caller does not have permission to access the - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to access the `SampleQuerySet + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. If the requested - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet] - does not exist, a NOT_FOUND error is returned. + `SampleQuerySet + `__ + does not exist, a NOT_FOUND error is + returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -450,7 +457,8 @@ async def list_sample_query_sets( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListSampleQuerySetsAsyncPager: r"""Gets a list of - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet]s. + `SampleQuerySet + `__s. .. code-block:: python @@ -482,17 +490,20 @@ async def sample_list_sample_query_sets(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.ListSampleQuerySetsRequest, dict]]): The request object. Request message for - [SampleQuerySetService.ListSampleQuerySets][google.cloud.discoveryengine.v1beta.SampleQuerySetService.ListSampleQuerySets] + `SampleQuerySetService.ListSampleQuerySets + `__ method. parent (:class:`str`): - Required. The parent location resource name, such as + Required. The parent location resource + name, such as ``projects/{project}/locations/{location}``. - If the caller does not have permission to list - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet]s - under this location, regardless of whether or not this - location exists, a ``PERMISSION_DENIED`` error is - returned. + If the caller does not have permission + to list `SampleQuerySet + `__s + under this location, regardless of + whether or not this location exists, a + ``PERMISSION_DENIED`` error is returned. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -508,11 +519,13 @@ async def sample_list_sample_query_sets(): Returns: google.cloud.discoveryengine_v1beta.services.sample_query_set_service.pagers.ListSampleQuerySetsAsyncPager: Response message for - [SampleQuerySetService.ListSampleQuerySets][google.cloud.discoveryengine.v1beta.SampleQuerySetService.ListSampleQuerySets] - method. + `SampleQuerySetService.ListSampleQuerySets + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -589,7 +602,8 @@ async def create_sample_query_set( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> gcd_sample_query_set.SampleQuerySet: r"""Creates a - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet] + `SampleQuerySet + `__ .. code-block:: python @@ -625,10 +639,12 @@ async def sample_create_sample_query_set(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.CreateSampleQuerySetRequest, dict]]): The request object. Request message for - [SampleQuerySetService.CreateSampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySetService.CreateSampleQuerySet] + `SampleQuerySetService.CreateSampleQuerySet + `__ method. parent (:class:`str`): - Required. The parent resource name, such as + Required. The parent resource name, such + as ``projects/{project}/locations/{location}``. This corresponds to the ``parent`` field @@ -636,7 +652,8 @@ async def sample_create_sample_query_set(): should not be set. sample_query_set (:class:`google.cloud.discoveryengine_v1beta.types.SampleQuerySet`): Required. The - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet] + `SampleQuerySet + `__ to create. This corresponds to the ``sample_query_set`` field @@ -644,25 +661,34 @@ async def sample_create_sample_query_set(): should not be set. sample_query_set_id (:class:`str`): Required. The ID to use for the - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet], - which will become the final component of the - [SampleQuerySet.name][google.cloud.discoveryengine.v1beta.SampleQuerySet.name]. - - If the caller does not have permission to create the - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet], - regardless of whether or not it exists, a - ``PERMISSION_DENIED`` error is returned. + `SampleQuerySet + `__, + which will become the final component of + the + `SampleQuerySet.name + `__. + + If the caller does not have permission + to create the `SampleQuerySet + `__, + regardless of whether or not it exists, + a ``PERMISSION_DENIED`` error is + returned. This field must be unique among all - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet]s + `SampleQuerySet + `__s with the same - [parent][google.cloud.discoveryengine.v1beta.CreateSampleQuerySetRequest.parent]. - Otherwise, an ``ALREADY_EXISTS`` error is returned. + `parent + `__. + Otherwise, an ``ALREADY_EXISTS`` error + is returned. - This field must conform to - `RFC-1034 `__ - standard with a length limit of 63 characters. - Otherwise, an ``INVALID_ARGUMENT`` error is returned. + This field must conform to `RFC-1034 + `__ + standard with a length limit of 63 + characters. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. This corresponds to the ``sample_query_set_id`` field on the ``request`` instance; if ``request`` is provided, this @@ -751,7 +777,8 @@ async def update_sample_query_set( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> gcd_sample_query_set.SampleQuerySet: r"""Updates a - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet]. + `SampleQuerySet + `__. .. code-block:: python @@ -785,21 +812,24 @@ async def sample_update_sample_query_set(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.UpdateSampleQuerySetRequest, dict]]): The request object. Request message for - [SampleQuerySetService.UpdateSampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySetService.UpdateSampleQuerySet] + `SampleQuerySetService.UpdateSampleQuerySet + `__ method. sample_query_set (:class:`google.cloud.discoveryengine_v1beta.types.SampleQuerySet`): - Required. The sample query set to update. - - If the caller does not have permission to update the - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet], - regardless of whether or not it exists, a - ``PERMISSION_DENIED`` error is returned. - - If the - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet] - to update does not exist a ``NOT_FOUND`` error is + Required. The sample query set to + update. + If the caller does not have permission + to update the `SampleQuerySet + `__, + regardless of whether or not it exists, + a ``PERMISSION_DENIED`` error is returned. + If the `SampleQuerySet + `__ + to update does not exist a ``NOT_FOUND`` + error is returned. + This corresponds to the ``sample_query_set`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -895,7 +925,8 @@ async def delete_sample_query_set( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> None: r"""Deletes a - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet]. + `SampleQuerySet + `__. .. code-block:: python @@ -923,24 +954,28 @@ async def sample_delete_sample_query_set(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.DeleteSampleQuerySetRequest, dict]]): The request object. Request message for - [SampleQuerySetService.DeleteSampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySetService.DeleteSampleQuerySet] + `SampleQuerySetService.DeleteSampleQuerySet + `__ method. name (:class:`str`): Required. Full resource name of - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet], + `SampleQuerySet + `__, such as ``projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}``. - If the caller does not have permission to delete the - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet], - regardless of whether or not it exists, a - ``PERMISSION_DENIED`` error is returned. - - If the - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet] - to delete does not exist, a ``NOT_FOUND`` error is + If the caller does not have permission + to delete the `SampleQuerySet + `__, + regardless of whether or not it exists, + a ``PERMISSION_DENIED`` error is returned. + If the `SampleQuerySet + `__ + to delete does not exist, a + ``NOT_FOUND`` error is returned. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/sample_query_set_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/sample_query_set_service/client.py index 434f25c1a1d9..43451023542b 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/sample_query_set_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/sample_query_set_service/client.py @@ -118,7 +118,8 @@ def get_transport_class( class SampleQuerySetServiceClient(metaclass=SampleQuerySetServiceClientMeta): """Service for managing - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet]s, + `SampleQuerySet + `__s, """ @staticmethod @@ -775,7 +776,8 @@ def get_sample_query_set( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> sample_query_set.SampleQuerySet: r"""Gets a - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet]. + `SampleQuerySet + `__. .. code-block:: python @@ -806,22 +808,27 @@ def sample_get_sample_query_set(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.GetSampleQuerySetRequest, dict]): The request object. Request message for - [SampleQuerySetService.GetSampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySetService.GetSampleQuerySet] + `SampleQuerySetService.GetSampleQuerySet + `__ method. name (str): Required. Full resource name of - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet], + `SampleQuerySet + `__, such as ``projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}``. - If the caller does not have permission to access the - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to access the `SampleQuerySet + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. If the requested - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet] - does not exist, a NOT_FOUND error is returned. + `SampleQuerySet + `__ + does not exist, a NOT_FOUND error is + returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -900,7 +907,8 @@ def list_sample_query_sets( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListSampleQuerySetsPager: r"""Gets a list of - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet]s. + `SampleQuerySet + `__s. .. code-block:: python @@ -932,17 +940,20 @@ def sample_list_sample_query_sets(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.ListSampleQuerySetsRequest, dict]): The request object. Request message for - [SampleQuerySetService.ListSampleQuerySets][google.cloud.discoveryengine.v1beta.SampleQuerySetService.ListSampleQuerySets] + `SampleQuerySetService.ListSampleQuerySets + `__ method. parent (str): - Required. The parent location resource name, such as + Required. The parent location resource + name, such as ``projects/{project}/locations/{location}``. - If the caller does not have permission to list - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet]s - under this location, regardless of whether or not this - location exists, a ``PERMISSION_DENIED`` error is - returned. + If the caller does not have permission + to list `SampleQuerySet + `__s + under this location, regardless of + whether or not this location exists, a + ``PERMISSION_DENIED`` error is returned. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -958,11 +969,13 @@ def sample_list_sample_query_sets(): Returns: google.cloud.discoveryengine_v1beta.services.sample_query_set_service.pagers.ListSampleQuerySetsPager: Response message for - [SampleQuerySetService.ListSampleQuerySets][google.cloud.discoveryengine.v1beta.SampleQuerySetService.ListSampleQuerySets] - method. + `SampleQuerySetService.ListSampleQuerySets + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -1036,7 +1049,8 @@ def create_sample_query_set( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> gcd_sample_query_set.SampleQuerySet: r"""Creates a - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet] + `SampleQuerySet + `__ .. code-block:: python @@ -1072,10 +1086,12 @@ def sample_create_sample_query_set(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.CreateSampleQuerySetRequest, dict]): The request object. Request message for - [SampleQuerySetService.CreateSampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySetService.CreateSampleQuerySet] + `SampleQuerySetService.CreateSampleQuerySet + `__ method. parent (str): - Required. The parent resource name, such as + Required. The parent resource name, such + as ``projects/{project}/locations/{location}``. This corresponds to the ``parent`` field @@ -1083,7 +1099,8 @@ def sample_create_sample_query_set(): should not be set. sample_query_set (google.cloud.discoveryengine_v1beta.types.SampleQuerySet): Required. The - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet] + `SampleQuerySet + `__ to create. This corresponds to the ``sample_query_set`` field @@ -1091,25 +1108,34 @@ def sample_create_sample_query_set(): should not be set. sample_query_set_id (str): Required. The ID to use for the - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet], - which will become the final component of the - [SampleQuerySet.name][google.cloud.discoveryengine.v1beta.SampleQuerySet.name]. - - If the caller does not have permission to create the - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet], - regardless of whether or not it exists, a - ``PERMISSION_DENIED`` error is returned. + `SampleQuerySet + `__, + which will become the final component of + the + `SampleQuerySet.name + `__. + + If the caller does not have permission + to create the `SampleQuerySet + `__, + regardless of whether or not it exists, + a ``PERMISSION_DENIED`` error is + returned. This field must be unique among all - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet]s + `SampleQuerySet + `__s with the same - [parent][google.cloud.discoveryengine.v1beta.CreateSampleQuerySetRequest.parent]. - Otherwise, an ``ALREADY_EXISTS`` error is returned. + `parent + `__. + Otherwise, an ``ALREADY_EXISTS`` error + is returned. - This field must conform to - `RFC-1034 `__ - standard with a length limit of 63 characters. - Otherwise, an ``INVALID_ARGUMENT`` error is returned. + This field must conform to `RFC-1034 + `__ + standard with a length limit of 63 + characters. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. This corresponds to the ``sample_query_set_id`` field on the ``request`` instance; if ``request`` is provided, this @@ -1195,7 +1221,8 @@ def update_sample_query_set( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> gcd_sample_query_set.SampleQuerySet: r"""Updates a - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet]. + `SampleQuerySet + `__. .. code-block:: python @@ -1229,21 +1256,24 @@ def sample_update_sample_query_set(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.UpdateSampleQuerySetRequest, dict]): The request object. Request message for - [SampleQuerySetService.UpdateSampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySetService.UpdateSampleQuerySet] + `SampleQuerySetService.UpdateSampleQuerySet + `__ method. sample_query_set (google.cloud.discoveryengine_v1beta.types.SampleQuerySet): - Required. The sample query set to update. - - If the caller does not have permission to update the - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet], - regardless of whether or not it exists, a - ``PERMISSION_DENIED`` error is returned. - - If the - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet] - to update does not exist a ``NOT_FOUND`` error is + Required. The sample query set to + update. + If the caller does not have permission + to update the `SampleQuerySet + `__, + regardless of whether or not it exists, + a ``PERMISSION_DENIED`` error is returned. + If the `SampleQuerySet + `__ + to update does not exist a ``NOT_FOUND`` + error is returned. + This corresponds to the ``sample_query_set`` field on the ``request`` instance; if ``request`` is provided, this should not be set. @@ -1336,7 +1366,8 @@ def delete_sample_query_set( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> None: r"""Deletes a - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet]. + `SampleQuerySet + `__. .. code-block:: python @@ -1364,24 +1395,28 @@ def sample_delete_sample_query_set(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.DeleteSampleQuerySetRequest, dict]): The request object. Request message for - [SampleQuerySetService.DeleteSampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySetService.DeleteSampleQuerySet] + `SampleQuerySetService.DeleteSampleQuerySet + `__ method. name (str): Required. Full resource name of - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet], + `SampleQuerySet + `__, such as ``projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}``. - If the caller does not have permission to delete the - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet], - regardless of whether or not it exists, a - ``PERMISSION_DENIED`` error is returned. - - If the - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet] - to delete does not exist, a ``NOT_FOUND`` error is + If the caller does not have permission + to delete the `SampleQuerySet + `__, + regardless of whether or not it exists, + a ``PERMISSION_DENIED`` error is returned. + If the `SampleQuerySet + `__ + to delete does not exist, a + ``NOT_FOUND`` error is returned. + This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/sample_query_set_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/sample_query_set_service/transports/base.py index 0f9223c7aa91..f26d4d01c04d 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/sample_query_set_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/sample_query_set_service/transports/base.py @@ -89,8 +89,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -105,11 +103,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/sample_query_set_service/transports/grpc.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/sample_query_set_service/transports/grpc.py index 2040ee5d6e13..382b9d35f50c 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/sample_query_set_service/transports/grpc.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/sample_query_set_service/transports/grpc.py @@ -118,7 +118,8 @@ class SampleQuerySetServiceGrpcTransport(SampleQuerySetServiceTransport): """gRPC backend transport for SampleQuerySetService. Service for managing - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet]s, + `SampleQuerySet + `__s, This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -339,7 +340,8 @@ def get_sample_query_set( r"""Return a callable for the get sample query set method over gRPC. Gets a - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet]. + `SampleQuerySet + `__. Returns: Callable[[~.GetSampleQuerySetRequest], @@ -369,7 +371,8 @@ def list_sample_query_sets( r"""Return a callable for the list sample query sets method over gRPC. Gets a list of - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet]s. + `SampleQuerySet + `__s. Returns: Callable[[~.ListSampleQuerySetsRequest], @@ -399,7 +402,8 @@ def create_sample_query_set( r"""Return a callable for the create sample query set method over gRPC. Creates a - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet] + `SampleQuerySet + `__ Returns: Callable[[~.CreateSampleQuerySetRequest], @@ -429,7 +433,8 @@ def update_sample_query_set( r"""Return a callable for the update sample query set method over gRPC. Updates a - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet]. + `SampleQuerySet + `__. Returns: Callable[[~.UpdateSampleQuerySetRequest], @@ -458,7 +463,8 @@ def delete_sample_query_set( r"""Return a callable for the delete sample query set method over gRPC. Deletes a - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet]. + `SampleQuerySet + `__. Returns: Callable[[~.DeleteSampleQuerySetRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/sample_query_set_service/transports/grpc_asyncio.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/sample_query_set_service/transports/grpc_asyncio.py index 8c4096140d25..aef3e5831c42 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/sample_query_set_service/transports/grpc_asyncio.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/sample_query_set_service/transports/grpc_asyncio.py @@ -124,7 +124,8 @@ class SampleQuerySetServiceGrpcAsyncIOTransport(SampleQuerySetServiceTransport): """gRPC AsyncIO backend transport for SampleQuerySetService. Service for managing - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet]s, + `SampleQuerySet + `__s, This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -347,7 +348,8 @@ def get_sample_query_set( r"""Return a callable for the get sample query set method over gRPC. Gets a - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet]. + `SampleQuerySet + `__. Returns: Callable[[~.GetSampleQuerySetRequest], @@ -377,7 +379,8 @@ def list_sample_query_sets( r"""Return a callable for the list sample query sets method over gRPC. Gets a list of - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet]s. + `SampleQuerySet + `__s. Returns: Callable[[~.ListSampleQuerySetsRequest], @@ -407,7 +410,8 @@ def create_sample_query_set( r"""Return a callable for the create sample query set method over gRPC. Creates a - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet] + `SampleQuerySet + `__ Returns: Callable[[~.CreateSampleQuerySetRequest], @@ -437,7 +441,8 @@ def update_sample_query_set( r"""Return a callable for the update sample query set method over gRPC. Updates a - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet]. + `SampleQuerySet + `__. Returns: Callable[[~.UpdateSampleQuerySetRequest], @@ -467,7 +472,8 @@ def delete_sample_query_set( r"""Return a callable for the delete sample query set method over gRPC. Deletes a - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet]. + `SampleQuerySet + `__. Returns: Callable[[~.DeleteSampleQuerySetRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/sample_query_set_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/sample_query_set_service/transports/rest.py index 070b534d65a6..3d9f28ea2244 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/sample_query_set_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/sample_query_set_service/transports/rest.py @@ -426,7 +426,8 @@ class SampleQuerySetServiceRestTransport(_BaseSampleQuerySetServiceRestTransport """REST backend synchronous transport for SampleQuerySetService. Service for managing - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet]s, + `SampleQuerySet + `__s, This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -546,7 +547,8 @@ def __call__( Args: request (~.sample_query_set_service.CreateSampleQuerySetRequest): The request object. Request message for - [SampleQuerySetService.CreateSampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySetService.CreateSampleQuerySet] + `SampleQuerySetService.CreateSampleQuerySet + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -708,7 +710,8 @@ def __call__( Args: request (~.sample_query_set_service.DeleteSampleQuerySetRequest): The request object. Request message for - [SampleQuerySetService.DeleteSampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySetService.DeleteSampleQuerySet] + `SampleQuerySetService.DeleteSampleQuerySet + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -821,7 +824,8 @@ def __call__( Args: request (~.sample_query_set_service.GetSampleQuerySetRequest): The request object. Request message for - [SampleQuerySetService.GetSampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySetService.GetSampleQuerySet] + `SampleQuerySetService.GetSampleQuerySet + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -976,7 +980,8 @@ def __call__( Args: request (~.sample_query_set_service.ListSampleQuerySetsRequest): The request object. Request message for - [SampleQuerySetService.ListSampleQuerySets][google.cloud.discoveryengine.v1beta.SampleQuerySetService.ListSampleQuerySets] + `SampleQuerySetService.ListSampleQuerySets + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -989,7 +994,8 @@ def __call__( Returns: ~.sample_query_set_service.ListSampleQuerySetsResponse: Response message for - [SampleQuerySetService.ListSampleQuerySets][google.cloud.discoveryengine.v1beta.SampleQuerySetService.ListSampleQuerySets] + `SampleQuerySetService.ListSampleQuerySets + `__ method. """ @@ -1135,7 +1141,8 @@ def __call__( Args: request (~.sample_query_set_service.UpdateSampleQuerySetRequest): The request object. Request message for - [SampleQuerySetService.UpdateSampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySetService.UpdateSampleQuerySet] + `SampleQuerySetService.UpdateSampleQuerySet + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/schema_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/schema_service/async_client.py index 5b52e5dfa060..490af9ade21a 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/schema_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/schema_service/async_client.py @@ -71,8 +71,8 @@ class SchemaServiceAsyncClient: - """Service for managing - [Schema][google.cloud.discoveryengine.v1beta.Schema]s. + """Service for managing `Schema + `__s. """ _client: SchemaServiceClient @@ -309,7 +309,8 @@ async def get_schema( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> schema.Schema: - r"""Gets a [Schema][google.cloud.discoveryengine.v1beta.Schema]. + r"""Gets a `Schema + `__. .. code-block:: python @@ -340,11 +341,12 @@ async def sample_get_schema(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.GetSchemaRequest, dict]]): The request object. Request message for - [SchemaService.GetSchema][google.cloud.discoveryengine.v1beta.SchemaService.GetSchema] + `SchemaService.GetSchema + `__ method. name (:class:`str`): - Required. The full resource name of the schema, in the - format of + Required. The full resource name of the + schema, in the format of ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}``. This corresponds to the ``name`` field @@ -422,8 +424,8 @@ async def list_schemas( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListSchemasAsyncPager: - r"""Gets a list of - [Schema][google.cloud.discoveryengine.v1beta.Schema]s. + r"""Gets a list of `Schema + `__s. .. code-block:: python @@ -455,11 +457,12 @@ async def sample_list_schemas(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.ListSchemasRequest, dict]]): The request object. Request message for - [SchemaService.ListSchemas][google.cloud.discoveryengine.v1beta.SchemaService.ListSchemas] + `SchemaService.ListSchemas + `__ method. parent (:class:`str`): - Required. The parent data store resource name, in the - format of + Required. The parent data store resource + name, in the format of ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}``. This corresponds to the ``parent`` field @@ -476,11 +479,13 @@ async def sample_list_schemas(): Returns: google.cloud.discoveryengine_v1beta.services.schema_service.pagers.ListSchemasAsyncPager: Response message for - [SchemaService.ListSchemas][google.cloud.discoveryengine.v1beta.SchemaService.ListSchemas] - method. + `SchemaService.ListSchemas + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -554,7 +559,8 @@ async def create_schema( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: - r"""Creates a [Schema][google.cloud.discoveryengine.v1beta.Schema]. + r"""Creates a `Schema + `__. .. code-block:: python @@ -590,33 +596,38 @@ async def sample_create_schema(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.CreateSchemaRequest, dict]]): The request object. Request message for - [SchemaService.CreateSchema][google.cloud.discoveryengine.v1beta.SchemaService.CreateSchema] + `SchemaService.CreateSchema + `__ method. parent (:class:`str`): - Required. The parent data store resource name, in the - format of + Required. The parent data store resource + name, in the format of ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. schema (:class:`google.cloud.discoveryengine_v1beta.types.Schema`): - Required. The - [Schema][google.cloud.discoveryengine.v1beta.Schema] to - create. + Required. The `Schema + `__ + to create. This corresponds to the ``schema`` field on the ``request`` instance; if ``request`` is provided, this should not be set. schema_id (:class:`str`): Required. The ID to use for the - [Schema][google.cloud.discoveryengine.v1beta.Schema], + `Schema + `__, which becomes the final component of the - [Schema.name][google.cloud.discoveryengine.v1beta.Schema.name]. + `Schema.name + `__. This field should conform to - `RFC-1034 `__ - standard with a length limit of 63 characters. + `RFC-1034 + `__ + standard with a length limit of 63 + characters. This corresponds to the ``schema_id`` field on the ``request`` instance; if ``request`` is provided, this @@ -631,12 +642,13 @@ async def sample_create_schema(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be + An object representing a long-running + operation. + The result type for the operation will + be :class:`google.cloud.discoveryengine_v1beta.types.Schema` - Defines the structure and layout of a type of document - data. + Defines the structure and layout of a + type of document data. """ # Create or coerce a protobuf request object. @@ -708,7 +720,8 @@ async def update_schema( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: - r"""Updates a [Schema][google.cloud.discoveryengine.v1beta.Schema]. + r"""Updates a `Schema + `__. .. code-block:: python @@ -742,7 +755,8 @@ async def sample_update_schema(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.UpdateSchemaRequest, dict]]): The request object. Request message for - [SchemaService.UpdateSchema][google.cloud.discoveryengine.v1beta.SchemaService.UpdateSchema] + `SchemaService.UpdateSchema + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -754,12 +768,13 @@ async def sample_update_schema(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be + An object representing a long-running + operation. + The result type for the operation will + be :class:`google.cloud.discoveryengine_v1beta.types.Schema` - Defines the structure and layout of a type of document - data. + Defines the structure and layout of a + type of document data. """ # Create or coerce a protobuf request object. @@ -813,7 +828,8 @@ async def delete_schema( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: - r"""Deletes a [Schema][google.cloud.discoveryengine.v1beta.Schema]. + r"""Deletes a `Schema + `__. .. code-block:: python @@ -848,11 +864,12 @@ async def sample_delete_schema(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.DeleteSchemaRequest, dict]]): The request object. Request message for - [SchemaService.DeleteSchema][google.cloud.discoveryengine.v1beta.SchemaService.DeleteSchema] + `SchemaService.DeleteSchema + `__ method. name (:class:`str`): - Required. The full resource name of the schema, in the - format of + Required. The full resource name of the + schema, in the format of ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}``. This corresponds to the ``name`` field @@ -868,18 +885,21 @@ async def sample_delete_schema(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.protobuf.empty_pb2.Empty` A generic empty message that you can re-use to avoid defining duplicated - empty messages in your APIs. A typical example is to - use it as the request or the response type of an API - method. For instance: - - service Foo { - rpc Bar(google.protobuf.Empty) returns - (google.protobuf.Empty); - - } + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.protobuf.empty_pb2.Empty` + A generic empty message that you can + re-use to avoid defining duplicated + empty messages in your APIs. A typical + example is to use it as the request or + the response type of an API method. For + instance: + + service Foo { + rpc Bar(google.protobuf.Empty) + returns (google.protobuf.Empty); } """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/schema_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/schema_service/client.py index 42a6e0b83341..3015647f6d24 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/schema_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/schema_service/client.py @@ -115,8 +115,8 @@ def get_transport_class( class SchemaServiceClient(metaclass=SchemaServiceClientMeta): - """Service for managing - [Schema][google.cloud.discoveryengine.v1beta.Schema]s. + """Service for managing `Schema + `__s. """ @staticmethod @@ -770,7 +770,8 @@ def get_schema( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> schema.Schema: - r"""Gets a [Schema][google.cloud.discoveryengine.v1beta.Schema]. + r"""Gets a `Schema + `__. .. code-block:: python @@ -801,11 +802,12 @@ def sample_get_schema(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.GetSchemaRequest, dict]): The request object. Request message for - [SchemaService.GetSchema][google.cloud.discoveryengine.v1beta.SchemaService.GetSchema] + `SchemaService.GetSchema + `__ method. name (str): - Required. The full resource name of the schema, in the - format of + Required. The full resource name of the + schema, in the format of ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}``. This corresponds to the ``name`` field @@ -880,8 +882,8 @@ def list_schemas( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListSchemasPager: - r"""Gets a list of - [Schema][google.cloud.discoveryengine.v1beta.Schema]s. + r"""Gets a list of `Schema + `__s. .. code-block:: python @@ -913,11 +915,12 @@ def sample_list_schemas(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.ListSchemasRequest, dict]): The request object. Request message for - [SchemaService.ListSchemas][google.cloud.discoveryengine.v1beta.SchemaService.ListSchemas] + `SchemaService.ListSchemas + `__ method. parent (str): - Required. The parent data store resource name, in the - format of + Required. The parent data store resource + name, in the format of ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}``. This corresponds to the ``parent`` field @@ -934,11 +937,13 @@ def sample_list_schemas(): Returns: google.cloud.discoveryengine_v1beta.services.schema_service.pagers.ListSchemasPager: Response message for - [SchemaService.ListSchemas][google.cloud.discoveryengine.v1beta.SchemaService.ListSchemas] - method. + `SchemaService.ListSchemas + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -1009,7 +1014,8 @@ def create_schema( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: - r"""Creates a [Schema][google.cloud.discoveryengine.v1beta.Schema]. + r"""Creates a `Schema + `__. .. code-block:: python @@ -1045,33 +1051,38 @@ def sample_create_schema(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.CreateSchemaRequest, dict]): The request object. Request message for - [SchemaService.CreateSchema][google.cloud.discoveryengine.v1beta.SchemaService.CreateSchema] + `SchemaService.CreateSchema + `__ method. parent (str): - Required. The parent data store resource name, in the - format of + Required. The parent data store resource + name, in the format of ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. schema (google.cloud.discoveryengine_v1beta.types.Schema): - Required. The - [Schema][google.cloud.discoveryengine.v1beta.Schema] to - create. + Required. The `Schema + `__ + to create. This corresponds to the ``schema`` field on the ``request`` instance; if ``request`` is provided, this should not be set. schema_id (str): Required. The ID to use for the - [Schema][google.cloud.discoveryengine.v1beta.Schema], + `Schema + `__, which becomes the final component of the - [Schema.name][google.cloud.discoveryengine.v1beta.Schema.name]. + `Schema.name + `__. This field should conform to - `RFC-1034 `__ - standard with a length limit of 63 characters. + `RFC-1034 + `__ + standard with a length limit of 63 + characters. This corresponds to the ``schema_id`` field on the ``request`` instance; if ``request`` is provided, this @@ -1086,12 +1097,13 @@ def sample_create_schema(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be + An object representing a long-running + operation. + The result type for the operation will + be :class:`google.cloud.discoveryengine_v1beta.types.Schema` - Defines the structure and layout of a type of document - data. + Defines the structure and layout of a + type of document data. """ # Create or coerce a protobuf request object. @@ -1160,7 +1172,8 @@ def update_schema( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: - r"""Updates a [Schema][google.cloud.discoveryengine.v1beta.Schema]. + r"""Updates a `Schema + `__. .. code-block:: python @@ -1194,7 +1207,8 @@ def sample_update_schema(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.UpdateSchemaRequest, dict]): The request object. Request message for - [SchemaService.UpdateSchema][google.cloud.discoveryengine.v1beta.SchemaService.UpdateSchema] + `SchemaService.UpdateSchema + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1206,12 +1220,13 @@ def sample_update_schema(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be + An object representing a long-running + operation. + The result type for the operation will + be :class:`google.cloud.discoveryengine_v1beta.types.Schema` - Defines the structure and layout of a type of document - data. + Defines the structure and layout of a + type of document data. """ # Create or coerce a protobuf request object. @@ -1263,7 +1278,8 @@ def delete_schema( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: - r"""Deletes a [Schema][google.cloud.discoveryengine.v1beta.Schema]. + r"""Deletes a `Schema + `__. .. code-block:: python @@ -1298,11 +1314,12 @@ def sample_delete_schema(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.DeleteSchemaRequest, dict]): The request object. Request message for - [SchemaService.DeleteSchema][google.cloud.discoveryengine.v1beta.SchemaService.DeleteSchema] + `SchemaService.DeleteSchema + `__ method. name (str): - Required. The full resource name of the schema, in the - format of + Required. The full resource name of the + schema, in the format of ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}``. This corresponds to the ``name`` field @@ -1318,18 +1335,21 @@ def sample_delete_schema(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.protobuf.empty_pb2.Empty` A generic empty message that you can re-use to avoid defining duplicated - empty messages in your APIs. A typical example is to - use it as the request or the response type of an API - method. For instance: - - service Foo { - rpc Bar(google.protobuf.Empty) returns - (google.protobuf.Empty); - - } + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.protobuf.empty_pb2.Empty` + A generic empty message that you can + re-use to avoid defining duplicated + empty messages in your APIs. A typical + example is to use it as the request or + the response type of an API method. For + instance: + + service Foo { + rpc Bar(google.protobuf.Empty) + returns (google.protobuf.Empty); } """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/schema_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/schema_service/transports/base.py index ff00c1467071..39078257ffd7 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/schema_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/schema_service/transports/base.py @@ -84,8 +84,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -100,11 +98,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/schema_service/transports/grpc.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/schema_service/transports/grpc.py index 3bb625e3288e..154a10cd6fca 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/schema_service/transports/grpc.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/schema_service/transports/grpc.py @@ -112,8 +112,8 @@ def intercept_unary_unary(self, continuation, client_call_details, request): class SchemaServiceGrpcTransport(SchemaServiceTransport): """gRPC backend transport for SchemaService. - Service for managing - [Schema][google.cloud.discoveryengine.v1beta.Schema]s. + Service for managing `Schema + `__s. This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -345,7 +345,8 @@ def operations_client(self) -> operations_v1.OperationsClient: def get_schema(self) -> Callable[[schema_service.GetSchemaRequest], schema.Schema]: r"""Return a callable for the get schema method over gRPC. - Gets a [Schema][google.cloud.discoveryengine.v1beta.Schema]. + Gets a `Schema + `__. Returns: Callable[[~.GetSchemaRequest], @@ -373,8 +374,8 @@ def list_schemas( ]: r"""Return a callable for the list schemas method over gRPC. - Gets a list of - [Schema][google.cloud.discoveryengine.v1beta.Schema]s. + Gets a list of `Schema + `__s. Returns: Callable[[~.ListSchemasRequest], @@ -400,7 +401,8 @@ def create_schema( ) -> Callable[[schema_service.CreateSchemaRequest], operations_pb2.Operation]: r"""Return a callable for the create schema method over gRPC. - Creates a [Schema][google.cloud.discoveryengine.v1beta.Schema]. + Creates a `Schema + `__. Returns: Callable[[~.CreateSchemaRequest], @@ -426,7 +428,8 @@ def update_schema( ) -> Callable[[schema_service.UpdateSchemaRequest], operations_pb2.Operation]: r"""Return a callable for the update schema method over gRPC. - Updates a [Schema][google.cloud.discoveryengine.v1beta.Schema]. + Updates a `Schema + `__. Returns: Callable[[~.UpdateSchemaRequest], @@ -452,7 +455,8 @@ def delete_schema( ) -> Callable[[schema_service.DeleteSchemaRequest], operations_pb2.Operation]: r"""Return a callable for the delete schema method over gRPC. - Deletes a [Schema][google.cloud.discoveryengine.v1beta.Schema]. + Deletes a `Schema + `__. Returns: Callable[[~.DeleteSchemaRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/schema_service/transports/grpc_asyncio.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/schema_service/transports/grpc_asyncio.py index bf4829dc9442..ec9344516c29 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/schema_service/transports/grpc_asyncio.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/schema_service/transports/grpc_asyncio.py @@ -118,8 +118,8 @@ async def intercept_unary_unary(self, continuation, client_call_details, request class SchemaServiceGrpcAsyncIOTransport(SchemaServiceTransport): """gRPC AsyncIO backend transport for SchemaService. - Service for managing - [Schema][google.cloud.discoveryengine.v1beta.Schema]s. + Service for managing `Schema + `__s. This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -355,7 +355,8 @@ def get_schema( ) -> Callable[[schema_service.GetSchemaRequest], Awaitable[schema.Schema]]: r"""Return a callable for the get schema method over gRPC. - Gets a [Schema][google.cloud.discoveryengine.v1beta.Schema]. + Gets a `Schema + `__. Returns: Callable[[~.GetSchemaRequest], @@ -384,8 +385,8 @@ def list_schemas( ]: r"""Return a callable for the list schemas method over gRPC. - Gets a list of - [Schema][google.cloud.discoveryengine.v1beta.Schema]s. + Gets a list of `Schema + `__s. Returns: Callable[[~.ListSchemasRequest], @@ -413,7 +414,8 @@ def create_schema( ]: r"""Return a callable for the create schema method over gRPC. - Creates a [Schema][google.cloud.discoveryengine.v1beta.Schema]. + Creates a `Schema + `__. Returns: Callable[[~.CreateSchemaRequest], @@ -441,7 +443,8 @@ def update_schema( ]: r"""Return a callable for the update schema method over gRPC. - Updates a [Schema][google.cloud.discoveryengine.v1beta.Schema]. + Updates a `Schema + `__. Returns: Callable[[~.UpdateSchemaRequest], @@ -469,7 +472,8 @@ def delete_schema( ]: r"""Return a callable for the delete schema method over gRPC. - Deletes a [Schema][google.cloud.discoveryengine.v1beta.Schema]. + Deletes a `Schema + `__. Returns: Callable[[~.DeleteSchemaRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/schema_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/schema_service/transports/rest.py index 872adb10c4ac..c2b74ace904f 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/schema_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/schema_service/transports/rest.py @@ -442,8 +442,8 @@ class SchemaServiceRestStub: class SchemaServiceRestTransport(_BaseSchemaServiceRestTransport): """REST backend synchronous transport for SchemaService. - Service for managing - [Schema][google.cloud.discoveryengine.v1beta.Schema]s. + Service for managing `Schema + `__s. This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -727,7 +727,8 @@ def __call__( Args: request (~.schema_service.CreateSchemaRequest): The request object. Request message for - [SchemaService.CreateSchema][google.cloud.discoveryengine.v1beta.SchemaService.CreateSchema] + `SchemaService.CreateSchema + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -879,7 +880,8 @@ def __call__( Args: request (~.schema_service.DeleteSchemaRequest): The request object. Request message for - [SchemaService.DeleteSchema][google.cloud.discoveryengine.v1beta.SchemaService.DeleteSchema] + `SchemaService.DeleteSchema + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1026,7 +1028,8 @@ def __call__( Args: request (~.schema_service.GetSchemaRequest): The request object. Request message for - [SchemaService.GetSchema][google.cloud.discoveryengine.v1beta.SchemaService.GetSchema] + `SchemaService.GetSchema + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1178,7 +1181,8 @@ def __call__( Args: request (~.schema_service.ListSchemasRequest): The request object. Request message for - [SchemaService.ListSchemas][google.cloud.discoveryengine.v1beta.SchemaService.ListSchemas] + `SchemaService.ListSchemas + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1191,7 +1195,8 @@ def __call__( Returns: ~.schema_service.ListSchemasResponse: Response message for - [SchemaService.ListSchemas][google.cloud.discoveryengine.v1beta.SchemaService.ListSchemas] + `SchemaService.ListSchemas + `__ method. """ @@ -1332,7 +1337,8 @@ def __call__( Args: request (~.schema_service.UpdateSchemaRequest): The request object. Request message for - [SchemaService.UpdateSchema][google.cloud.discoveryengine.v1beta.SchemaService.UpdateSchema] + `SchemaService.UpdateSchema + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/search_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/search_service/async_client.py index 9152e7214767..77fa71dacc14 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/search_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/search_service/async_client.py @@ -342,7 +342,8 @@ async def sample_search(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.SearchRequest, dict]]): The request object. Request message for - [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] + `SearchService.Search + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -355,11 +356,13 @@ async def sample_search(): Returns: google.cloud.discoveryengine_v1beta.services.search_service.pagers.SearchAsyncPager: Response message for - [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] - method. + `SearchService.Search + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -414,20 +417,23 @@ async def search_lite( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.SearchLiteAsyncPager: r"""Performs a search. Similar to the - [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] + `SearchService.Search + `__ method, but a lite version that allows API key for - authentication, where OAuth and IAM checks are not required. + authentication, where OAuth and IAM checks are not + required. - Only public website search is supported by this method. If data - stores and engines not associated with public website search are - specified, a ``FAILED_PRECONDITION`` error is returned. + Only public website search is supported by this method. + If data stores and engines not associated with public + website search are specified, a ``FAILED_PRECONDITION`` + error is returned. - This method can be used for easy onboarding without having to - implement an authentication backend. However, it is strongly - recommended to use - [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] - instead with required OAuth and IAM checks to provide better - data security. + This method can be used for easy onboarding without + having to implement an authentication backend. However, + it is strongly recommended to use `SearchService.Search + `__ + instead with required OAuth and IAM checks to provide + better data security. .. code-block:: python @@ -459,7 +465,8 @@ async def sample_search_lite(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.SearchRequest, dict]]): The request object. Request message for - [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] + `SearchService.Search + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -472,11 +479,13 @@ async def sample_search_lite(): Returns: google.cloud.discoveryengine_v1beta.services.search_service.pagers.SearchLiteAsyncPager: Response message for - [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] - method. + `SearchService.Search + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/search_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/search_service/client.py index 730696c17933..be1b70b22ab1 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/search_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/search_service/client.py @@ -895,7 +895,8 @@ def sample_search(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.SearchRequest, dict]): The request object. Request message for - [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] + `SearchService.Search + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -908,11 +909,13 @@ def sample_search(): Returns: google.cloud.discoveryengine_v1beta.services.search_service.pagers.SearchPager: Response message for - [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] - method. + `SearchService.Search + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -967,20 +970,23 @@ def search_lite( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.SearchLitePager: r"""Performs a search. Similar to the - [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] + `SearchService.Search + `__ method, but a lite version that allows API key for - authentication, where OAuth and IAM checks are not required. + authentication, where OAuth and IAM checks are not + required. - Only public website search is supported by this method. If data - stores and engines not associated with public website search are - specified, a ``FAILED_PRECONDITION`` error is returned. + Only public website search is supported by this method. + If data stores and engines not associated with public + website search are specified, a ``FAILED_PRECONDITION`` + error is returned. - This method can be used for easy onboarding without having to - implement an authentication backend. However, it is strongly - recommended to use - [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] - instead with required OAuth and IAM checks to provide better - data security. + This method can be used for easy onboarding without + having to implement an authentication backend. However, + it is strongly recommended to use `SearchService.Search + `__ + instead with required OAuth and IAM checks to provide + better data security. .. code-block:: python @@ -1012,7 +1018,8 @@ def sample_search_lite(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.SearchRequest, dict]): The request object. Request message for - [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] + `SearchService.Search + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1025,11 +1032,13 @@ def sample_search_lite(): Returns: google.cloud.discoveryengine_v1beta.services.search_service.pagers.SearchLitePager: Response message for - [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] - method. + `SearchService.Search + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/search_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/search_service/transports/base.py index 4187306b54a8..c0d6ca633586 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/search_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/search_service/transports/base.py @@ -84,8 +84,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -100,11 +98,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/search_service/transports/grpc.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/search_service/transports/grpc.py index f19b576030c2..2af7b26b99f5 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/search_service/transports/grpc.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/search_service/transports/grpc.py @@ -356,20 +356,23 @@ def search_lite( r"""Return a callable for the search lite method over gRPC. Performs a search. Similar to the - [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] + `SearchService.Search + `__ method, but a lite version that allows API key for - authentication, where OAuth and IAM checks are not required. - - Only public website search is supported by this method. If data - stores and engines not associated with public website search are - specified, a ``FAILED_PRECONDITION`` error is returned. - - This method can be used for easy onboarding without having to - implement an authentication backend. However, it is strongly - recommended to use - [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] - instead with required OAuth and IAM checks to provide better - data security. + authentication, where OAuth and IAM checks are not + required. + + Only public website search is supported by this method. + If data stores and engines not associated with public + website search are specified, a ``FAILED_PRECONDITION`` + error is returned. + + This method can be used for easy onboarding without + having to implement an authentication backend. However, + it is strongly recommended to use `SearchService.Search + `__ + instead with required OAuth and IAM checks to provide + better data security. Returns: Callable[[~.SearchRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/search_service/transports/grpc_asyncio.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/search_service/transports/grpc_asyncio.py index c6e20c6cd93a..f00a2706e4cb 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/search_service/transports/grpc_asyncio.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/search_service/transports/grpc_asyncio.py @@ -368,20 +368,23 @@ def search_lite( r"""Return a callable for the search lite method over gRPC. Performs a search. Similar to the - [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] + `SearchService.Search + `__ method, but a lite version that allows API key for - authentication, where OAuth and IAM checks are not required. - - Only public website search is supported by this method. If data - stores and engines not associated with public website search are - specified, a ``FAILED_PRECONDITION`` error is returned. - - This method can be used for easy onboarding without having to - implement an authentication backend. However, it is strongly - recommended to use - [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] - instead with required OAuth and IAM checks to provide better - data security. + authentication, where OAuth and IAM checks are not + required. + + Only public website search is supported by this method. + If data stores and engines not associated with public + website search are specified, a ``FAILED_PRECONDITION`` + error is returned. + + This method can be used for easy onboarding without + having to implement an authentication backend. However, + it is strongly recommended to use `SearchService.Search + `__ + instead with required OAuth and IAM checks to provide + better data security. Returns: Callable[[~.SearchRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/search_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/search_service/transports/rest.py index c46e4a992fed..b342938fee26 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/search_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/search_service/transports/rest.py @@ -389,7 +389,8 @@ def __call__( Args: request (~.search_service.SearchRequest): The request object. Request message for - [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] + `SearchService.Search + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -402,7 +403,8 @@ def __call__( Returns: ~.search_service.SearchResponse: Response message for - [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] + `SearchService.Search + `__ method. """ @@ -548,7 +550,8 @@ def __call__( Args: request (~.search_service.SearchRequest): The request object. Request message for - [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] + `SearchService.Search + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -561,7 +564,8 @@ def __call__( Returns: ~.search_service.SearchResponse: Response message for - [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] + `SearchService.Search + `__ method. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/search_tuning_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/search_tuning_service/async_client.py index 1aa612514291..98e027e505c9 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/search_tuning_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/search_tuning_service/async_client.py @@ -351,7 +351,8 @@ async def sample_train_custom_model(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.TrainCustomModelRequest, dict]]): The request object. Request message for - [SearchTuningService.TrainCustomModel][google.cloud.discoveryengine.v1beta.SearchTuningService.TrainCustomModel] + `SearchTuningService.TrainCustomModel + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -363,12 +364,16 @@ async def sample_train_custom_model(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1beta.types.TrainCustomModelResponse` Response of the - [TrainCustomModelRequest][google.cloud.discoveryengine.v1beta.TrainCustomModelRequest]. - This message is returned by the - google.longrunning.Operations.response field. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1beta.types.TrainCustomModelResponse` + Response of the `TrainCustomModelRequest + `__. + This message is returned by the + google.longrunning.Operations.response + field. """ # Create or coerce a protobuf request object. @@ -454,7 +459,8 @@ async def sample_list_custom_models(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.ListCustomModelsRequest, dict]]): The request object. Request message for - [SearchTuningService.ListCustomModels][google.cloud.discoveryengine.v1beta.SearchTuningService.ListCustomModels] + `SearchTuningService.ListCustomModels + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -467,8 +473,9 @@ async def sample_list_custom_models(): Returns: google.cloud.discoveryengine_v1beta.types.ListCustomModelsResponse: Response message for - [SearchTuningService.ListCustomModels][google.cloud.discoveryengine.v1beta.SearchTuningService.ListCustomModels] - method. + `SearchTuningService.ListCustomModels + `__ + method. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/search_tuning_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/search_tuning_service/client.py index 98912cb401e2..10c741d24341 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/search_tuning_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/search_tuning_service/client.py @@ -809,7 +809,8 @@ def sample_train_custom_model(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.TrainCustomModelRequest, dict]): The request object. Request message for - [SearchTuningService.TrainCustomModel][google.cloud.discoveryengine.v1beta.SearchTuningService.TrainCustomModel] + `SearchTuningService.TrainCustomModel + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -821,12 +822,16 @@ def sample_train_custom_model(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1beta.types.TrainCustomModelResponse` Response of the - [TrainCustomModelRequest][google.cloud.discoveryengine.v1beta.TrainCustomModelRequest]. - This message is returned by the - google.longrunning.Operations.response field. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1beta.types.TrainCustomModelResponse` + Response of the `TrainCustomModelRequest + `__. + This message is returned by the + google.longrunning.Operations.response + field. """ # Create or coerce a protobuf request object. @@ -910,7 +915,8 @@ def sample_list_custom_models(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.ListCustomModelsRequest, dict]): The request object. Request message for - [SearchTuningService.ListCustomModels][google.cloud.discoveryengine.v1beta.SearchTuningService.ListCustomModels] + `SearchTuningService.ListCustomModels + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -923,8 +929,9 @@ def sample_list_custom_models(): Returns: google.cloud.discoveryengine_v1beta.types.ListCustomModelsResponse: Response message for - [SearchTuningService.ListCustomModels][google.cloud.discoveryengine.v1beta.SearchTuningService.ListCustomModels] - method. + `SearchTuningService.ListCustomModels + `__ + method. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/search_tuning_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/search_tuning_service/transports/base.py index 459fc70e6947..6bf9f9b79c8b 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/search_tuning_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/search_tuning_service/transports/base.py @@ -84,8 +84,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -100,11 +98,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/search_tuning_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/search_tuning_service/transports/rest.py index c55d14440fc4..cdbb9bf5ee5a 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/search_tuning_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/search_tuning_service/transports/rest.py @@ -565,7 +565,8 @@ def __call__( Args: request (~.search_tuning_service.ListCustomModelsRequest): The request object. Request message for - [SearchTuningService.ListCustomModels][google.cloud.discoveryengine.v1beta.SearchTuningService.ListCustomModels] + `SearchTuningService.ListCustomModels + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -578,7 +579,8 @@ def __call__( Returns: ~.search_tuning_service.ListCustomModelsResponse: Response message for - [SearchTuningService.ListCustomModels][google.cloud.discoveryengine.v1beta.SearchTuningService.ListCustomModels] + `SearchTuningService.ListCustomModels + `__ method. """ @@ -720,7 +722,8 @@ def __call__( Args: request (~.search_tuning_service.TrainCustomModelRequest): The request object. Request message for - [SearchTuningService.TrainCustomModel][google.cloud.discoveryengine.v1beta.SearchTuningService.TrainCustomModel] + `SearchTuningService.TrainCustomModel + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/serving_config_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/serving_config_service/async_client.py index f25cafc4960d..631e267a50bc 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/serving_config_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/serving_config_service/async_client.py @@ -73,7 +73,8 @@ class ServingConfigServiceAsyncClient: """Service for operations related to - [ServingConfig][google.cloud.discoveryengine.v1beta.ServingConfig]. + `ServingConfig + `__. """ _client: ServingConfigServiceClient @@ -319,7 +320,8 @@ async def update_serving_config( ) -> gcd_serving_config.ServingConfig: r"""Updates a ServingConfig. - Returns a NOT_FOUND error if the ServingConfig does not exist. + Returns a NOT_FOUND error if the ServingConfig does not + exist. .. code-block:: python @@ -365,12 +367,16 @@ async def sample_update_serving_config(): should not be set. update_mask (:class:`google.protobuf.field_mask_pb2.FieldMask`): Indicates which fields in the provided - [ServingConfig][google.cloud.discoveryengine.v1beta.ServingConfig] - to update. The following are NOT supported: + `ServingConfig + `__ + to update. The following are NOT + supported: - - [ServingConfig.name][google.cloud.discoveryengine.v1beta.ServingConfig.name] + * `ServingConfig.name + `__ - If not set, all supported fields are updated. + If not set, all supported fields are + updated. This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this @@ -492,8 +498,8 @@ async def sample_get_serving_config(): request (Optional[Union[google.cloud.discoveryengine_v1beta.types.GetServingConfigRequest, dict]]): The request object. Request for GetServingConfig method. name (:class:`str`): - Required. The resource name of the ServingConfig to get. - Format: + Required. The resource name of the + ServingConfig to get. Format: ``projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config_id}`` This corresponds to the ``name`` field @@ -611,8 +617,8 @@ async def sample_list_serving_configs(): The request object. Request for ListServingConfigs method. parent (:class:`str`): - Required. Full resource name of the parent resource. - Format: + Required. Full resource name of the + parent resource. Format: ``projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`` This corresponds to the ``parent`` field diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/serving_config_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/serving_config_service/client.py index 3589a839033a..b2ed177b40ac 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/serving_config_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/serving_config_service/client.py @@ -119,7 +119,8 @@ def get_transport_class( class ServingConfigServiceClient(metaclass=ServingConfigServiceClientMeta): """Service for operations related to - [ServingConfig][google.cloud.discoveryengine.v1beta.ServingConfig]. + `ServingConfig + `__. """ @staticmethod @@ -761,7 +762,8 @@ def update_serving_config( ) -> gcd_serving_config.ServingConfig: r"""Updates a ServingConfig. - Returns a NOT_FOUND error if the ServingConfig does not exist. + Returns a NOT_FOUND error if the ServingConfig does not + exist. .. code-block:: python @@ -807,12 +809,16 @@ def sample_update_serving_config(): should not be set. update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided - [ServingConfig][google.cloud.discoveryengine.v1beta.ServingConfig] - to update. The following are NOT supported: + `ServingConfig + `__ + to update. The following are NOT + supported: - - [ServingConfig.name][google.cloud.discoveryengine.v1beta.ServingConfig.name] + * `ServingConfig.name + `__ - If not set, all supported fields are updated. + If not set, all supported fields are + updated. This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this @@ -931,8 +937,8 @@ def sample_get_serving_config(): request (Union[google.cloud.discoveryengine_v1beta.types.GetServingConfigRequest, dict]): The request object. Request for GetServingConfig method. name (str): - Required. The resource name of the ServingConfig to get. - Format: + Required. The resource name of the + ServingConfig to get. Format: ``projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config_id}`` This corresponds to the ``name`` field @@ -1047,8 +1053,8 @@ def sample_list_serving_configs(): The request object. Request for ListServingConfigs method. parent (str): - Required. Full resource name of the parent resource. - Format: + Required. Full resource name of the + parent resource. Format: ``projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`` This corresponds to the ``parent`` field diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/serving_config_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/serving_config_service/transports/base.py index 06a1d4ddb0d7..58fc7641f93d 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/serving_config_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/serving_config_service/transports/base.py @@ -88,8 +88,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -104,11 +102,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/serving_config_service/transports/grpc.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/serving_config_service/transports/grpc.py index 4da66aaf6a85..2e9a39486078 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/serving_config_service/transports/grpc.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/serving_config_service/transports/grpc.py @@ -117,7 +117,8 @@ class ServingConfigServiceGrpcTransport(ServingConfigServiceTransport): """gRPC backend transport for ServingConfigService. Service for operations related to - [ServingConfig][google.cloud.discoveryengine.v1beta.ServingConfig]. + `ServingConfig + `__. This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -339,7 +340,8 @@ def update_serving_config( Updates a ServingConfig. - Returns a NOT_FOUND error if the ServingConfig does not exist. + Returns a NOT_FOUND error if the ServingConfig does not + exist. Returns: Callable[[~.UpdateServingConfigRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/serving_config_service/transports/grpc_asyncio.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/serving_config_service/transports/grpc_asyncio.py index f4a00d16bf7e..9a19af86b331 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/serving_config_service/transports/grpc_asyncio.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/serving_config_service/transports/grpc_asyncio.py @@ -123,7 +123,8 @@ class ServingConfigServiceGrpcAsyncIOTransport(ServingConfigServiceTransport): """gRPC AsyncIO backend transport for ServingConfigService. Service for operations related to - [ServingConfig][google.cloud.discoveryengine.v1beta.ServingConfig]. + `ServingConfig + `__. This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -347,7 +348,8 @@ def update_serving_config( Updates a ServingConfig. - Returns a NOT_FOUND error if the ServingConfig does not exist. + Returns a NOT_FOUND error if the ServingConfig does not + exist. Returns: Callable[[~.UpdateServingConfigRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/serving_config_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/serving_config_service/transports/rest.py index 8703bf54329f..ea5f8f5450a9 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/serving_config_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/serving_config_service/transports/rest.py @@ -345,7 +345,8 @@ class ServingConfigServiceRestTransport(_BaseServingConfigServiceRestTransport): """REST backend synchronous transport for ServingConfigService. Service for operations related to - [ServingConfig][google.cloud.discoveryengine.v1beta.ServingConfig]. + `ServingConfig + `__. This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/session_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/session_service/async_client.py index 3e1a745dab83..5cb64bd88e0d 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/session_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/session_service/async_client.py @@ -316,8 +316,10 @@ async def create_session( ) -> gcd_session.Session: r"""Creates a Session. - If the [Session][google.cloud.discoveryengine.v1beta.Session] to - create already exists, an ALREADY_EXISTS error is returned. + If the `Session + `__ to + create already exists, an ALREADY_EXISTS error is + returned. .. code-block:: python @@ -349,8 +351,8 @@ async def sample_create_session(): request (Optional[Union[google.cloud.discoveryengine_v1beta.types.CreateSessionRequest, dict]]): The request object. Request for CreateSession method. parent (:class:`str`): - Required. Full resource name of parent data store. - Format: + Required. Full resource name of parent + data store. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`` This corresponds to the ``parent`` field @@ -437,7 +439,8 @@ async def delete_session( ) -> None: r"""Deletes a Session. - If the [Session][google.cloud.discoveryengine.v1beta.Session] to + If the `Session + `__ to delete does not exist, a NOT_FOUND error is returned. .. code-block:: python @@ -467,8 +470,8 @@ async def sample_delete_session(): request (Optional[Union[google.cloud.discoveryengine_v1beta.types.DeleteSessionRequest, dict]]): The request object. Request for DeleteSession method. name (:class:`str`): - Required. The resource name of the Session to delete. - Format: + Required. The resource name of the + Session to delete. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`` This corresponds to the ``name`` field @@ -542,10 +545,11 @@ async def update_session( ) -> gcd_session.Session: r"""Updates a Session. - [Session][google.cloud.discoveryengine.v1beta.Session] action - type cannot be changed. If the - [Session][google.cloud.discoveryengine.v1beta.Session] to update - does not exist, a NOT_FOUND error is returned. + `Session + `__ action + type cannot be changed. If the `Session + `__ to + update does not exist, a NOT_FOUND error is returned. .. code-block:: python @@ -582,12 +586,16 @@ async def sample_update_session(): should not be set. update_mask (:class:`google.protobuf.field_mask_pb2.FieldMask`): Indicates which fields in the provided - [Session][google.cloud.discoveryengine.v1beta.Session] - to update. The following are NOT supported: + `Session + `__ + to update. The following are NOT + supported: - - [Session.name][google.cloud.discoveryengine.v1beta.Session.name] + * `Session.name + `__ - If not set or empty, all supported fields are updated. + If not set or empty, all supported + fields are updated. This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this @@ -700,8 +708,8 @@ async def sample_get_session(): request (Optional[Union[google.cloud.discoveryengine_v1beta.types.GetSessionRequest, dict]]): The request object. Request for GetSession method. name (:class:`str`): - Required. The resource name of the Session to get. - Format: + Required. The resource name of the + Session to get. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`` This corresponds to the ``name`` field @@ -780,7 +788,8 @@ async def list_sessions( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListSessionsAsyncPager: r"""Lists all Sessions by their parent - [DataStore][google.cloud.discoveryengine.v1beta.DataStore]. + `DataStore + `__. .. code-block:: python @@ -813,7 +822,8 @@ async def sample_list_sessions(): request (Optional[Union[google.cloud.discoveryengine_v1beta.types.ListSessionsRequest, dict]]): The request object. Request for ListSessions method. parent (:class:`str`): - Required. The data store resource name. Format: + Required. The data store resource name. + Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`` This corresponds to the ``parent`` field diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/session_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/session_service/client.py index b350a3af8a39..13dce7aae3f4 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/session_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/session_service/client.py @@ -853,8 +853,10 @@ def create_session( ) -> gcd_session.Session: r"""Creates a Session. - If the [Session][google.cloud.discoveryengine.v1beta.Session] to - create already exists, an ALREADY_EXISTS error is returned. + If the `Session + `__ to + create already exists, an ALREADY_EXISTS error is + returned. .. code-block:: python @@ -886,8 +888,8 @@ def sample_create_session(): request (Union[google.cloud.discoveryengine_v1beta.types.CreateSessionRequest, dict]): The request object. Request for CreateSession method. parent (str): - Required. Full resource name of parent data store. - Format: + Required. Full resource name of parent + data store. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`` This corresponds to the ``parent`` field @@ -971,7 +973,8 @@ def delete_session( ) -> None: r"""Deletes a Session. - If the [Session][google.cloud.discoveryengine.v1beta.Session] to + If the `Session + `__ to delete does not exist, a NOT_FOUND error is returned. .. code-block:: python @@ -1001,8 +1004,8 @@ def sample_delete_session(): request (Union[google.cloud.discoveryengine_v1beta.types.DeleteSessionRequest, dict]): The request object. Request for DeleteSession method. name (str): - Required. The resource name of the Session to delete. - Format: + Required. The resource name of the + Session to delete. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`` This corresponds to the ``name`` field @@ -1073,10 +1076,11 @@ def update_session( ) -> gcd_session.Session: r"""Updates a Session. - [Session][google.cloud.discoveryengine.v1beta.Session] action - type cannot be changed. If the - [Session][google.cloud.discoveryengine.v1beta.Session] to update - does not exist, a NOT_FOUND error is returned. + `Session + `__ action + type cannot be changed. If the `Session + `__ to + update does not exist, a NOT_FOUND error is returned. .. code-block:: python @@ -1113,12 +1117,16 @@ def sample_update_session(): should not be set. update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided - [Session][google.cloud.discoveryengine.v1beta.Session] - to update. The following are NOT supported: + `Session + `__ + to update. The following are NOT + supported: - - [Session.name][google.cloud.discoveryengine.v1beta.Session.name] + * `Session.name + `__ - If not set or empty, all supported fields are updated. + If not set or empty, all supported + fields are updated. This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this @@ -1228,8 +1236,8 @@ def sample_get_session(): request (Union[google.cloud.discoveryengine_v1beta.types.GetSessionRequest, dict]): The request object. Request for GetSession method. name (str): - Required. The resource name of the Session to get. - Format: + Required. The resource name of the + Session to get. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`` This corresponds to the ``name`` field @@ -1305,7 +1313,8 @@ def list_sessions( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListSessionsPager: r"""Lists all Sessions by their parent - [DataStore][google.cloud.discoveryengine.v1beta.DataStore]. + `DataStore + `__. .. code-block:: python @@ -1338,7 +1347,8 @@ def sample_list_sessions(): request (Union[google.cloud.discoveryengine_v1beta.types.ListSessionsRequest, dict]): The request object. Request for ListSessions method. parent (str): - Required. The data store resource name. Format: + Required. The data store resource name. + Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`` This corresponds to the ``parent`` field diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/session_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/session_service/transports/base.py index b1ab7e717b39..eba764842b14 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/session_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/session_service/transports/base.py @@ -87,8 +87,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -103,11 +101,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/session_service/transports/grpc.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/session_service/transports/grpc.py index 68804799730f..d90ede23b4d8 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/session_service/transports/grpc.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/session_service/transports/grpc.py @@ -336,8 +336,10 @@ def create_session( Creates a Session. - If the [Session][google.cloud.discoveryengine.v1beta.Session] to - create already exists, an ALREADY_EXISTS error is returned. + If the `Session + `__ to + create already exists, an ALREADY_EXISTS error is + returned. Returns: Callable[[~.CreateSessionRequest], @@ -367,7 +369,8 @@ def delete_session( Deletes a Session. - If the [Session][google.cloud.discoveryengine.v1beta.Session] to + If the `Session + `__ to delete does not exist, a NOT_FOUND error is returned. Returns: @@ -398,10 +401,11 @@ def update_session( Updates a Session. - [Session][google.cloud.discoveryengine.v1beta.Session] action - type cannot be changed. If the - [Session][google.cloud.discoveryengine.v1beta.Session] to update - does not exist, a NOT_FOUND error is returned. + `Session + `__ action + type cannot be changed. If the `Session + `__ to + update does not exist, a NOT_FOUND error is returned. Returns: Callable[[~.UpdateSessionRequest], @@ -457,7 +461,8 @@ def list_sessions( r"""Return a callable for the list sessions method over gRPC. Lists all Sessions by their parent - [DataStore][google.cloud.discoveryengine.v1beta.DataStore]. + `DataStore + `__. Returns: Callable[[~.ListSessionsRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/session_service/transports/grpc_asyncio.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/session_service/transports/grpc_asyncio.py index 7e0ce89dfce1..a1cd5cbc6cdd 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/session_service/transports/grpc_asyncio.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/session_service/transports/grpc_asyncio.py @@ -345,8 +345,10 @@ def create_session( Creates a Session. - If the [Session][google.cloud.discoveryengine.v1beta.Session] to - create already exists, an ALREADY_EXISTS error is returned. + If the `Session + `__ to + create already exists, an ALREADY_EXISTS error is + returned. Returns: Callable[[~.CreateSessionRequest], @@ -376,7 +378,8 @@ def delete_session( Deletes a Session. - If the [Session][google.cloud.discoveryengine.v1beta.Session] to + If the `Session + `__ to delete does not exist, a NOT_FOUND error is returned. Returns: @@ -408,10 +411,11 @@ def update_session( Updates a Session. - [Session][google.cloud.discoveryengine.v1beta.Session] action - type cannot be changed. If the - [Session][google.cloud.discoveryengine.v1beta.Session] to update - does not exist, a NOT_FOUND error is returned. + `Session + `__ action + type cannot be changed. If the `Session + `__ to + update does not exist, a NOT_FOUND error is returned. Returns: Callable[[~.UpdateSessionRequest], @@ -469,7 +473,8 @@ def list_sessions( r"""Return a callable for the list sessions method over gRPC. Lists all Sessions by their parent - [DataStore][google.cloud.discoveryengine.v1beta.DataStore]. + `DataStore + `__. Returns: Callable[[~.ListSessionsRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/site_search_engine_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/site_search_engine_service/async_client.py index 89b86b5877ec..4f1e3a4c1c48 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/site_search_engine_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/site_search_engine_service/async_client.py @@ -331,7 +331,8 @@ async def get_site_search_engine( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> site_search_engine.SiteSearchEngine: r"""Gets the - [SiteSearchEngine][google.cloud.discoveryengine.v1beta.SiteSearchEngine]. + `SiteSearchEngine + `__. .. code-block:: python @@ -362,17 +363,20 @@ async def sample_get_site_search_engine(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.GetSiteSearchEngineRequest, dict]]): The request object. Request message for - [SiteSearchEngineService.GetSiteSearchEngine][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.GetSiteSearchEngine] + `SiteSearchEngineService.GetSiteSearchEngine + `__ method. name (:class:`str`): Required. Resource name of - [SiteSearchEngine][google.cloud.discoveryengine.v1beta.SiteSearchEngine], + `SiteSearchEngine + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine``. - If the caller does not have permission to access the - [SiteSearchEngine], regardless of whether or not it - exists, a PERMISSION_DENIED error is returned. + If the caller does not have permission + to access the [SiteSearchEngine], + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -456,8 +460,8 @@ async def create_target_site( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: - r"""Creates a - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite]. + r"""Creates a `TargetSite + `__. .. code-block:: python @@ -496,11 +500,13 @@ async def sample_create_target_site(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.CreateTargetSiteRequest, dict]]): The request object. Request message for - [SiteSearchEngineService.CreateTargetSite][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.CreateTargetSite] + `SiteSearchEngineService.CreateTargetSite + `__ method. parent (:class:`str`): Required. Parent resource name of - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite], + `TargetSite + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine``. @@ -508,8 +514,8 @@ async def sample_create_target_site(): on the ``request`` instance; if ``request`` is provided, this should not be set. target_site (:class:`google.cloud.discoveryengine_v1beta.types.TargetSite`): - Required. The - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite] + Required. The `TargetSite + `__ to create. This corresponds to the ``target_site`` field @@ -525,9 +531,10 @@ async def sample_create_target_site(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be + An object representing a long-running + operation. + The result type for the operation will + be :class:`google.cloud.discoveryengine_v1beta.types.TargetSite` A target site for the SiteSearchEngine. @@ -601,9 +608,9 @@ async def batch_create_target_sites( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: - r"""Creates - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite] in - a batch. + r"""Creates `TargetSite + `__ in a + batch. .. code-block:: python @@ -643,7 +650,8 @@ async def sample_batch_create_target_sites(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.BatchCreateTargetSitesRequest, dict]]): The request object. Request message for - [SiteSearchEngineService.BatchCreateTargetSites][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.BatchCreateTargetSites] + `SiteSearchEngineService.BatchCreateTargetSites + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -655,11 +663,15 @@ async def sample_batch_create_target_sites(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1beta.types.BatchCreateTargetSitesResponse` Response message for - [SiteSearchEngineService.BatchCreateTargetSites][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.BatchCreateTargetSites] - method. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1beta.types.BatchCreateTargetSitesResponse` + Response message for + `SiteSearchEngineService.BatchCreateTargetSites + `__ + method. """ # Create or coerce a protobuf request object. @@ -715,8 +727,8 @@ async def get_target_site( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> site_search_engine.TargetSite: - r"""Gets a - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite]. + r"""Gets a `TargetSite + `__. .. code-block:: python @@ -747,22 +759,27 @@ async def sample_get_target_site(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.GetTargetSiteRequest, dict]]): The request object. Request message for - [SiteSearchEngineService.GetTargetSite][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.GetTargetSite] + `SiteSearchEngineService.GetTargetSite + `__ method. name (:class:`str`): Required. Full resource name of - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite], + `TargetSite + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}``. - If the caller does not have permission to access the - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to access the `TargetSite + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. If the requested - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite] - does not exist, a NOT_FOUND error is returned. + `TargetSite + `__ + does not exist, a NOT_FOUND error is + returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -841,8 +858,8 @@ async def update_target_site( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: - r"""Updates a - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite]. + r"""Updates a `TargetSite + `__. .. code-block:: python @@ -880,18 +897,21 @@ async def sample_update_target_site(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.UpdateTargetSiteRequest, dict]]): The request object. Request message for - [SiteSearchEngineService.UpdateTargetSite][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.UpdateTargetSite] + `SiteSearchEngineService.UpdateTargetSite + `__ method. target_site (:class:`google.cloud.discoveryengine_v1beta.types.TargetSite`): - Required. The target site to update. If the caller does - not have permission to update the - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. - - If the - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite] - to update does not exist, a NOT_FOUND error is returned. + Required. The target site to update. + If the caller does not have permission + to update the `TargetSite + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. + + If the `TargetSite + `__ + to update does not exist, a NOT_FOUND + error is returned. This corresponds to the ``target_site`` field on the ``request`` instance; if ``request`` is provided, this @@ -906,9 +926,10 @@ async def sample_update_target_site(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be + An object representing a long-running + operation. + The result type for the operation will + be :class:`google.cloud.discoveryengine_v1beta.types.TargetSite` A target site for the SiteSearchEngine. @@ -983,8 +1004,8 @@ async def delete_target_site( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: - r"""Deletes a - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite]. + r"""Deletes a `TargetSite + `__. .. code-block:: python @@ -1019,22 +1040,27 @@ async def sample_delete_target_site(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.DeleteTargetSiteRequest, dict]]): The request object. Request message for - [SiteSearchEngineService.DeleteTargetSite][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.DeleteTargetSite] + `SiteSearchEngineService.DeleteTargetSite + `__ method. name (:class:`str`): Required. Full resource name of - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite], + `TargetSite + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}``. - If the caller does not have permission to access the - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to access the `TargetSite + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. If the requested - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite] - does not exist, a NOT_FOUND error is returned. + `TargetSite + `__ + does not exist, a NOT_FOUND error is + returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1049,18 +1075,21 @@ async def sample_delete_target_site(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.protobuf.empty_pb2.Empty` A generic empty message that you can re-use to avoid defining duplicated - empty messages in your APIs. A typical example is to - use it as the request or the response type of an API - method. For instance: - - service Foo { - rpc Bar(google.protobuf.Empty) returns - (google.protobuf.Empty); - - } + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.protobuf.empty_pb2.Empty` + A generic empty message that you can + re-use to avoid defining duplicated + empty messages in your APIs. A typical + example is to use it as the request or + the response type of an API method. For + instance: + + service Foo { + rpc Bar(google.protobuf.Empty) + returns (google.protobuf.Empty); } """ # Create or coerce a protobuf request object. @@ -1132,7 +1161,8 @@ async def list_target_sites( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListTargetSitesAsyncPager: r"""Gets a list of - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite]s. + `TargetSite + `__s. .. code-block:: python @@ -1164,17 +1194,20 @@ async def sample_list_target_sites(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.ListTargetSitesRequest, dict]]): The request object. Request message for - [SiteSearchEngineService.ListTargetSites][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.ListTargetSites] + `SiteSearchEngineService.ListTargetSites + `__ method. parent (:class:`str`): - Required. The parent site search engine resource name, - such as + Required. The parent site search engine + resource name, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine``. - If the caller does not have permission to list - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite]s - under this site search engine, regardless of whether or - not this branch exists, a PERMISSION_DENIED error is + If the caller does not have permission + to list `TargetSite + `__s + under this site search engine, + regardless of whether or not this branch + exists, a PERMISSION_DENIED error is returned. This corresponds to the ``parent`` field @@ -1191,11 +1224,13 @@ async def sample_list_target_sites(): Returns: google.cloud.discoveryengine_v1beta.services.site_search_engine_service.pagers.ListTargetSitesAsyncPager: Response message for - [SiteSearchEngineService.ListTargetSites][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.ListTargetSites] - method. + `SiteSearchEngineService.ListTargetSites + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -1270,8 +1305,8 @@ async def create_sitemap( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: - r"""Creates a - [Sitemap][google.cloud.discoveryengine.v1beta.Sitemap]. + r"""Creates a `Sitemap + `__. .. code-block:: python @@ -1310,11 +1345,13 @@ async def sample_create_sitemap(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.CreateSitemapRequest, dict]]): The request object. Request message for - [SiteSearchEngineService.CreateSitemap][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.CreateSitemap] + `SiteSearchEngineService.CreateSitemap + `__ method. parent (:class:`str`): Required. Parent resource name of the - [SiteSearchEngine][google.cloud.discoveryengine.v1beta.SiteSearchEngine], + `SiteSearchEngine + `__, such as ``projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine``. @@ -1322,8 +1359,8 @@ async def sample_create_sitemap(): on the ``request`` instance; if ``request`` is provided, this should not be set. sitemap (:class:`google.cloud.discoveryengine_v1beta.types.Sitemap`): - Required. The - [Sitemap][google.cloud.discoveryengine.v1beta.Sitemap] + Required. The `Sitemap + `__ to create. This corresponds to the ``sitemap`` field @@ -1339,9 +1376,10 @@ async def sample_create_sitemap(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be + An object representing a long-running + operation. + The result type for the operation will + be :class:`google.cloud.discoveryengine_v1beta.types.Sitemap` A sitemap for the SiteSearchEngine. @@ -1416,8 +1454,8 @@ async def delete_sitemap( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: - r"""Deletes a - [Sitemap][google.cloud.discoveryengine.v1beta.Sitemap]. + r"""Deletes a `Sitemap + `__. .. code-block:: python @@ -1452,22 +1490,26 @@ async def sample_delete_sitemap(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.DeleteSitemapRequest, dict]]): The request object. Request message for - [SiteSearchEngineService.DeleteSitemap][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.DeleteSitemap] + `SiteSearchEngineService.DeleteSitemap + `__ method. name (:class:`str`): Required. Full resource name of - [Sitemap][google.cloud.discoveryengine.v1beta.Sitemap], + `Sitemap + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/sitemaps/{sitemap}``. - If the caller does not have permission to access the - [Sitemap][google.cloud.discoveryengine.v1beta.Sitemap], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to access the `Sitemap + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. - If the requested - [Sitemap][google.cloud.discoveryengine.v1beta.Sitemap] - does not exist, a NOT_FOUND error is returned. + If the requested `Sitemap + `__ + does not exist, a NOT_FOUND error is + returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1482,18 +1524,21 @@ async def sample_delete_sitemap(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.protobuf.empty_pb2.Empty` A generic empty message that you can re-use to avoid defining duplicated - empty messages in your APIs. A typical example is to - use it as the request or the response type of an API - method. For instance: - - service Foo { - rpc Bar(google.protobuf.Empty) returns - (google.protobuf.Empty); - - } + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.protobuf.empty_pb2.Empty` + A generic empty message that you can + re-use to avoid defining duplicated + empty messages in your APIs. A typical + example is to use it as the request or + the response type of an API method. For + instance: + + service Foo { + rpc Bar(google.protobuf.Empty) + returns (google.protobuf.Empty); } """ # Create or coerce a protobuf request object. @@ -1564,8 +1609,10 @@ async def fetch_sitemaps( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> site_search_engine_service.FetchSitemapsResponse: - r"""Fetch [Sitemap][google.cloud.discoveryengine.v1beta.Sitemap]s in - a [DataStore][google.cloud.discoveryengine.v1beta.DataStore]. + r"""Fetch `Sitemap + `__s in a + `DataStore + `__. .. code-block:: python @@ -1596,11 +1643,13 @@ async def sample_fetch_sitemaps(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.FetchSitemapsRequest, dict]]): The request object. Request message for - [SiteSearchEngineService.FetchSitemaps][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.FetchSitemaps] + `SiteSearchEngineService.FetchSitemaps + `__ method. parent (:class:`str`): Required. Parent resource name of the - [SiteSearchEngine][google.cloud.discoveryengine.v1beta.SiteSearchEngine], + `SiteSearchEngine + `__, such as ``projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine``. @@ -1618,8 +1667,9 @@ async def sample_fetch_sitemaps(): Returns: google.cloud.discoveryengine_v1beta.types.FetchSitemapsResponse: Response message for - [SiteSearchEngineService.FetchSitemaps][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.FetchSitemaps] - method. + `SiteSearchEngineService.FetchSitemaps + `__ + method. """ # Create or coerce a protobuf request object. @@ -1717,7 +1767,8 @@ async def sample_enable_advanced_site_search(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.EnableAdvancedSiteSearchRequest, dict]]): The request object. Request message for - [SiteSearchEngineService.EnableAdvancedSiteSearch][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.EnableAdvancedSiteSearch] + `SiteSearchEngineService.EnableAdvancedSiteSearch + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -1729,11 +1780,15 @@ async def sample_enable_advanced_site_search(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1beta.types.EnableAdvancedSiteSearchResponse` Response message for - [SiteSearchEngineService.EnableAdvancedSiteSearch][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.EnableAdvancedSiteSearch] - method. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1beta.types.EnableAdvancedSiteSearchResponse` + Response message for + `SiteSearchEngineService.EnableAdvancedSiteSearch + `__ + method. """ # Create or coerce a protobuf request object. @@ -1828,7 +1883,8 @@ async def sample_disable_advanced_site_search(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.DisableAdvancedSiteSearchRequest, dict]]): The request object. Request message for - [SiteSearchEngineService.DisableAdvancedSiteSearch][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.DisableAdvancedSiteSearch] + `SiteSearchEngineService.DisableAdvancedSiteSearch + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -1840,11 +1896,15 @@ async def sample_disable_advanced_site_search(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1beta.types.DisableAdvancedSiteSearchResponse` Response message for - [SiteSearchEngineService.DisableAdvancedSiteSearch][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.DisableAdvancedSiteSearch] - method. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1beta.types.DisableAdvancedSiteSearchResponse` + Response message for + `SiteSearchEngineService.DisableAdvancedSiteSearch + `__ + method. """ # Create or coerce a protobuf request object. @@ -1939,7 +1999,8 @@ async def sample_recrawl_uris(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.RecrawlUrisRequest, dict]]): The request object. Request message for - [SiteSearchEngineService.RecrawlUris][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.RecrawlUris] + `SiteSearchEngineService.RecrawlUris + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -1951,11 +2012,15 @@ async def sample_recrawl_uris(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1beta.types.RecrawlUrisResponse` Response message for - [SiteSearchEngineService.RecrawlUris][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.RecrawlUris] - method. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1beta.types.RecrawlUrisResponse` + Response message for + `SiteSearchEngineService.RecrawlUris + `__ + method. """ # Create or coerce a protobuf request object. @@ -2047,7 +2112,8 @@ async def sample_batch_verify_target_sites(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.BatchVerifyTargetSitesRequest, dict]]): The request object. Request message for - [SiteSearchEngineService.BatchVerifyTargetSites][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.BatchVerifyTargetSites] + `SiteSearchEngineService.BatchVerifyTargetSites + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -2059,11 +2125,15 @@ async def sample_batch_verify_target_sites(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1beta.types.BatchVerifyTargetSitesResponse` Response message for - [SiteSearchEngineService.BatchVerifyTargetSites][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.BatchVerifyTargetSites] - method. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1beta.types.BatchVerifyTargetSitesResponse` + Response message for + `SiteSearchEngineService.BatchVerifyTargetSites + `__ + method. """ # Create or coerce a protobuf request object. @@ -2118,9 +2188,10 @@ async def fetch_domain_verification_status( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.FetchDomainVerificationStatusAsyncPager: - r"""Returns list of target sites with its domain verification - status. This method can only be called under data store with - BASIC_SITE_SEARCH state at the moment. + r"""Returns list of target sites with its domain + verification status. This method can only be called + under data store with BASIC_SITE_SEARCH state at the + moment. .. code-block:: python @@ -2152,7 +2223,8 @@ async def sample_fetch_domain_verification_status(): Args: request (Optional[Union[google.cloud.discoveryengine_v1beta.types.FetchDomainVerificationStatusRequest, dict]]): The request object. Request message for - [SiteSearchEngineService.FetchDomainVerificationStatus][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.FetchDomainVerificationStatus] + `SiteSearchEngineService.FetchDomainVerificationStatus + `__ method. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -2165,11 +2237,13 @@ async def sample_fetch_domain_verification_status(): Returns: google.cloud.discoveryengine_v1beta.services.site_search_engine_service.pagers.FetchDomainVerificationStatusAsyncPager: Response message for - [SiteSearchEngineService.FetchDomainVerificationStatus][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.FetchDomainVerificationStatus] - method. + `SiteSearchEngineService.FetchDomainVerificationStatus + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/site_search_engine_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/site_search_engine_service/client.py index 9e8168d38ccb..cda7299f87f1 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/site_search_engine_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/site_search_engine_service/client.py @@ -809,7 +809,8 @@ def get_site_search_engine( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> site_search_engine.SiteSearchEngine: r"""Gets the - [SiteSearchEngine][google.cloud.discoveryengine.v1beta.SiteSearchEngine]. + `SiteSearchEngine + `__. .. code-block:: python @@ -840,17 +841,20 @@ def sample_get_site_search_engine(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.GetSiteSearchEngineRequest, dict]): The request object. Request message for - [SiteSearchEngineService.GetSiteSearchEngine][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.GetSiteSearchEngine] + `SiteSearchEngineService.GetSiteSearchEngine + `__ method. name (str): Required. Resource name of - [SiteSearchEngine][google.cloud.discoveryengine.v1beta.SiteSearchEngine], + `SiteSearchEngine + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine``. - If the caller does not have permission to access the - [SiteSearchEngine], regardless of whether or not it - exists, a PERMISSION_DENIED error is returned. + If the caller does not have permission + to access the [SiteSearchEngine], + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -931,8 +935,8 @@ def create_target_site( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: - r"""Creates a - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite]. + r"""Creates a `TargetSite + `__. .. code-block:: python @@ -971,11 +975,13 @@ def sample_create_target_site(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.CreateTargetSiteRequest, dict]): The request object. Request message for - [SiteSearchEngineService.CreateTargetSite][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.CreateTargetSite] + `SiteSearchEngineService.CreateTargetSite + `__ method. parent (str): Required. Parent resource name of - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite], + `TargetSite + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine``. @@ -983,8 +989,8 @@ def sample_create_target_site(): on the ``request`` instance; if ``request`` is provided, this should not be set. target_site (google.cloud.discoveryengine_v1beta.types.TargetSite): - Required. The - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite] + Required. The `TargetSite + `__ to create. This corresponds to the ``target_site`` field @@ -1000,9 +1006,10 @@ def sample_create_target_site(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be + An object representing a long-running + operation. + The result type for the operation will + be :class:`google.cloud.discoveryengine_v1beta.types.TargetSite` A target site for the SiteSearchEngine. @@ -1073,9 +1080,9 @@ def batch_create_target_sites( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: - r"""Creates - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite] in - a batch. + r"""Creates `TargetSite + `__ in a + batch. .. code-block:: python @@ -1115,7 +1122,8 @@ def sample_batch_create_target_sites(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.BatchCreateTargetSitesRequest, dict]): The request object. Request message for - [SiteSearchEngineService.BatchCreateTargetSites][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.BatchCreateTargetSites] + `SiteSearchEngineService.BatchCreateTargetSites + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1127,11 +1135,15 @@ def sample_batch_create_target_sites(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1beta.types.BatchCreateTargetSitesResponse` Response message for - [SiteSearchEngineService.BatchCreateTargetSites][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.BatchCreateTargetSites] - method. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1beta.types.BatchCreateTargetSitesResponse` + Response message for + `SiteSearchEngineService.BatchCreateTargetSites + `__ + method. """ # Create or coerce a protobuf request object. @@ -1187,8 +1199,8 @@ def get_target_site( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> site_search_engine.TargetSite: - r"""Gets a - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite]. + r"""Gets a `TargetSite + `__. .. code-block:: python @@ -1219,22 +1231,27 @@ def sample_get_target_site(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.GetTargetSiteRequest, dict]): The request object. Request message for - [SiteSearchEngineService.GetTargetSite][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.GetTargetSite] + `SiteSearchEngineService.GetTargetSite + `__ method. name (str): Required. Full resource name of - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite], + `TargetSite + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}``. - If the caller does not have permission to access the - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to access the `TargetSite + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. If the requested - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite] - does not exist, a NOT_FOUND error is returned. + `TargetSite + `__ + does not exist, a NOT_FOUND error is + returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1310,8 +1327,8 @@ def update_target_site( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: - r"""Updates a - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite]. + r"""Updates a `TargetSite + `__. .. code-block:: python @@ -1349,18 +1366,21 @@ def sample_update_target_site(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.UpdateTargetSiteRequest, dict]): The request object. Request message for - [SiteSearchEngineService.UpdateTargetSite][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.UpdateTargetSite] + `SiteSearchEngineService.UpdateTargetSite + `__ method. target_site (google.cloud.discoveryengine_v1beta.types.TargetSite): - Required. The target site to update. If the caller does - not have permission to update the - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. - - If the - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite] - to update does not exist, a NOT_FOUND error is returned. + Required. The target site to update. + If the caller does not have permission + to update the `TargetSite + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. + + If the `TargetSite + `__ + to update does not exist, a NOT_FOUND + error is returned. This corresponds to the ``target_site`` field on the ``request`` instance; if ``request`` is provided, this @@ -1375,9 +1395,10 @@ def sample_update_target_site(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be + An object representing a long-running + operation. + The result type for the operation will + be :class:`google.cloud.discoveryengine_v1beta.types.TargetSite` A target site for the SiteSearchEngine. @@ -1449,8 +1470,8 @@ def delete_target_site( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: - r"""Deletes a - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite]. + r"""Deletes a `TargetSite + `__. .. code-block:: python @@ -1485,22 +1506,27 @@ def sample_delete_target_site(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.DeleteTargetSiteRequest, dict]): The request object. Request message for - [SiteSearchEngineService.DeleteTargetSite][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.DeleteTargetSite] + `SiteSearchEngineService.DeleteTargetSite + `__ method. name (str): Required. Full resource name of - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite], + `TargetSite + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}``. - If the caller does not have permission to access the - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to access the `TargetSite + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. If the requested - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite] - does not exist, a NOT_FOUND error is returned. + `TargetSite + `__ + does not exist, a NOT_FOUND error is + returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1515,18 +1541,21 @@ def sample_delete_target_site(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.protobuf.empty_pb2.Empty` A generic empty message that you can re-use to avoid defining duplicated - empty messages in your APIs. A typical example is to - use it as the request or the response type of an API - method. For instance: - - service Foo { - rpc Bar(google.protobuf.Empty) returns - (google.protobuf.Empty); - - } + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.protobuf.empty_pb2.Empty` + A generic empty message that you can + re-use to avoid defining duplicated + empty messages in your APIs. A typical + example is to use it as the request or + the response type of an API method. For + instance: + + service Foo { + rpc Bar(google.protobuf.Empty) + returns (google.protobuf.Empty); } """ # Create or coerce a protobuf request object. @@ -1595,7 +1624,8 @@ def list_target_sites( metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListTargetSitesPager: r"""Gets a list of - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite]s. + `TargetSite + `__s. .. code-block:: python @@ -1627,17 +1657,20 @@ def sample_list_target_sites(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.ListTargetSitesRequest, dict]): The request object. Request message for - [SiteSearchEngineService.ListTargetSites][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.ListTargetSites] + `SiteSearchEngineService.ListTargetSites + `__ method. parent (str): - Required. The parent site search engine resource name, - such as + Required. The parent site search engine + resource name, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine``. - If the caller does not have permission to list - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite]s - under this site search engine, regardless of whether or - not this branch exists, a PERMISSION_DENIED error is + If the caller does not have permission + to list `TargetSite + `__s + under this site search engine, + regardless of whether or not this branch + exists, a PERMISSION_DENIED error is returned. This corresponds to the ``parent`` field @@ -1654,11 +1687,13 @@ def sample_list_target_sites(): Returns: google.cloud.discoveryengine_v1beta.services.site_search_engine_service.pagers.ListTargetSitesPager: Response message for - [SiteSearchEngineService.ListTargetSites][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.ListTargetSites] - method. + `SiteSearchEngineService.ListTargetSites + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -1730,8 +1765,8 @@ def create_sitemap( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: - r"""Creates a - [Sitemap][google.cloud.discoveryengine.v1beta.Sitemap]. + r"""Creates a `Sitemap + `__. .. code-block:: python @@ -1770,11 +1805,13 @@ def sample_create_sitemap(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.CreateSitemapRequest, dict]): The request object. Request message for - [SiteSearchEngineService.CreateSitemap][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.CreateSitemap] + `SiteSearchEngineService.CreateSitemap + `__ method. parent (str): Required. Parent resource name of the - [SiteSearchEngine][google.cloud.discoveryengine.v1beta.SiteSearchEngine], + `SiteSearchEngine + `__, such as ``projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine``. @@ -1782,8 +1819,8 @@ def sample_create_sitemap(): on the ``request`` instance; if ``request`` is provided, this should not be set. sitemap (google.cloud.discoveryengine_v1beta.types.Sitemap): - Required. The - [Sitemap][google.cloud.discoveryengine.v1beta.Sitemap] + Required. The `Sitemap + `__ to create. This corresponds to the ``sitemap`` field @@ -1799,9 +1836,10 @@ def sample_create_sitemap(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be + An object representing a long-running + operation. + The result type for the operation will + be :class:`google.cloud.discoveryengine_v1beta.types.Sitemap` A sitemap for the SiteSearchEngine. @@ -1873,8 +1911,8 @@ def delete_sitemap( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: - r"""Deletes a - [Sitemap][google.cloud.discoveryengine.v1beta.Sitemap]. + r"""Deletes a `Sitemap + `__. .. code-block:: python @@ -1909,22 +1947,26 @@ def sample_delete_sitemap(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.DeleteSitemapRequest, dict]): The request object. Request message for - [SiteSearchEngineService.DeleteSitemap][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.DeleteSitemap] + `SiteSearchEngineService.DeleteSitemap + `__ method. name (str): Required. Full resource name of - [Sitemap][google.cloud.discoveryengine.v1beta.Sitemap], + `Sitemap + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/sitemaps/{sitemap}``. - If the caller does not have permission to access the - [Sitemap][google.cloud.discoveryengine.v1beta.Sitemap], - regardless of whether or not it exists, a - PERMISSION_DENIED error is returned. + If the caller does not have permission + to access the `Sitemap + `__, + regardless of whether or not it exists, + a PERMISSION_DENIED error is returned. - If the requested - [Sitemap][google.cloud.discoveryengine.v1beta.Sitemap] - does not exist, a NOT_FOUND error is returned. + If the requested `Sitemap + `__ + does not exist, a NOT_FOUND error is + returned. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1939,18 +1981,21 @@ def sample_delete_sitemap(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.protobuf.empty_pb2.Empty` A generic empty message that you can re-use to avoid defining duplicated - empty messages in your APIs. A typical example is to - use it as the request or the response type of an API - method. For instance: - - service Foo { - rpc Bar(google.protobuf.Empty) returns - (google.protobuf.Empty); - - } + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.protobuf.empty_pb2.Empty` + A generic empty message that you can + re-use to avoid defining duplicated + empty messages in your APIs. A typical + example is to use it as the request or + the response type of an API method. For + instance: + + service Foo { + rpc Bar(google.protobuf.Empty) + returns (google.protobuf.Empty); } """ # Create or coerce a protobuf request object. @@ -2018,8 +2063,10 @@ def fetch_sitemaps( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> site_search_engine_service.FetchSitemapsResponse: - r"""Fetch [Sitemap][google.cloud.discoveryengine.v1beta.Sitemap]s in - a [DataStore][google.cloud.discoveryengine.v1beta.DataStore]. + r"""Fetch `Sitemap + `__s in a + `DataStore + `__. .. code-block:: python @@ -2050,11 +2097,13 @@ def sample_fetch_sitemaps(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.FetchSitemapsRequest, dict]): The request object. Request message for - [SiteSearchEngineService.FetchSitemaps][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.FetchSitemaps] + `SiteSearchEngineService.FetchSitemaps + `__ method. parent (str): Required. Parent resource name of the - [SiteSearchEngine][google.cloud.discoveryengine.v1beta.SiteSearchEngine], + `SiteSearchEngine + `__, such as ``projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine``. @@ -2072,8 +2121,9 @@ def sample_fetch_sitemaps(): Returns: google.cloud.discoveryengine_v1beta.types.FetchSitemapsResponse: Response message for - [SiteSearchEngineService.FetchSitemaps][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.FetchSitemaps] - method. + `SiteSearchEngineService.FetchSitemaps + `__ + method. """ # Create or coerce a protobuf request object. @@ -2168,7 +2218,8 @@ def sample_enable_advanced_site_search(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.EnableAdvancedSiteSearchRequest, dict]): The request object. Request message for - [SiteSearchEngineService.EnableAdvancedSiteSearch][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.EnableAdvancedSiteSearch] + `SiteSearchEngineService.EnableAdvancedSiteSearch + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -2180,11 +2231,15 @@ def sample_enable_advanced_site_search(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1beta.types.EnableAdvancedSiteSearchResponse` Response message for - [SiteSearchEngineService.EnableAdvancedSiteSearch][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.EnableAdvancedSiteSearch] - method. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1beta.types.EnableAdvancedSiteSearchResponse` + Response message for + `SiteSearchEngineService.EnableAdvancedSiteSearch + `__ + method. """ # Create or coerce a protobuf request object. @@ -2279,7 +2334,8 @@ def sample_disable_advanced_site_search(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.DisableAdvancedSiteSearchRequest, dict]): The request object. Request message for - [SiteSearchEngineService.DisableAdvancedSiteSearch][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.DisableAdvancedSiteSearch] + `SiteSearchEngineService.DisableAdvancedSiteSearch + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -2291,11 +2347,15 @@ def sample_disable_advanced_site_search(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1beta.types.DisableAdvancedSiteSearchResponse` Response message for - [SiteSearchEngineService.DisableAdvancedSiteSearch][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.DisableAdvancedSiteSearch] - method. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1beta.types.DisableAdvancedSiteSearchResponse` + Response message for + `SiteSearchEngineService.DisableAdvancedSiteSearch + `__ + method. """ # Create or coerce a protobuf request object. @@ -2390,7 +2450,8 @@ def sample_recrawl_uris(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.RecrawlUrisRequest, dict]): The request object. Request message for - [SiteSearchEngineService.RecrawlUris][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.RecrawlUris] + `SiteSearchEngineService.RecrawlUris + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -2402,11 +2463,15 @@ def sample_recrawl_uris(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1beta.types.RecrawlUrisResponse` Response message for - [SiteSearchEngineService.RecrawlUris][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.RecrawlUris] - method. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1beta.types.RecrawlUrisResponse` + Response message for + `SiteSearchEngineService.RecrawlUris + `__ + method. """ # Create or coerce a protobuf request object. @@ -2496,7 +2561,8 @@ def sample_batch_verify_target_sites(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.BatchVerifyTargetSitesRequest, dict]): The request object. Request message for - [SiteSearchEngineService.BatchVerifyTargetSites][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.BatchVerifyTargetSites] + `SiteSearchEngineService.BatchVerifyTargetSites + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -2508,11 +2574,15 @@ def sample_batch_verify_target_sites(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1beta.types.BatchVerifyTargetSitesResponse` Response message for - [SiteSearchEngineService.BatchVerifyTargetSites][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.BatchVerifyTargetSites] - method. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1beta.types.BatchVerifyTargetSitesResponse` + Response message for + `SiteSearchEngineService.BatchVerifyTargetSites + `__ + method. """ # Create or coerce a protobuf request object. @@ -2567,9 +2637,10 @@ def fetch_domain_verification_status( timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.FetchDomainVerificationStatusPager: - r"""Returns list of target sites with its domain verification - status. This method can only be called under data store with - BASIC_SITE_SEARCH state at the moment. + r"""Returns list of target sites with its domain + verification status. This method can only be called + under data store with BASIC_SITE_SEARCH state at the + moment. .. code-block:: python @@ -2601,7 +2672,8 @@ def sample_fetch_domain_verification_status(): Args: request (Union[google.cloud.discoveryengine_v1beta.types.FetchDomainVerificationStatusRequest, dict]): The request object. Request message for - [SiteSearchEngineService.FetchDomainVerificationStatus][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.FetchDomainVerificationStatus] + `SiteSearchEngineService.FetchDomainVerificationStatus + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -2614,11 +2686,13 @@ def sample_fetch_domain_verification_status(): Returns: google.cloud.discoveryengine_v1beta.services.site_search_engine_service.pagers.FetchDomainVerificationStatusPager: Response message for - [SiteSearchEngineService.FetchDomainVerificationStatus][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.FetchDomainVerificationStatus] - method. + `SiteSearchEngineService.FetchDomainVerificationStatus + `__ + method. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/site_search_engine_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/site_search_engine_service/transports/base.py index 3cccda29f9c1..8e10cca11b88 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/site_search_engine_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/site_search_engine_service/transports/base.py @@ -87,8 +87,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -103,11 +101,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/site_search_engine_service/transports/grpc.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/site_search_engine_service/transports/grpc.py index 529aa4ed06cf..2e6a195f3d1e 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/site_search_engine_service/transports/grpc.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/site_search_engine_service/transports/grpc.py @@ -353,7 +353,8 @@ def get_site_search_engine( r"""Return a callable for the get site search engine method over gRPC. Gets the - [SiteSearchEngine][google.cloud.discoveryengine.v1beta.SiteSearchEngine]. + `SiteSearchEngine + `__. Returns: Callable[[~.GetSiteSearchEngineRequest], @@ -381,8 +382,8 @@ def create_target_site( ]: r"""Return a callable for the create target site method over gRPC. - Creates a - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite]. + Creates a `TargetSite + `__. Returns: Callable[[~.CreateTargetSiteRequest], @@ -411,9 +412,9 @@ def batch_create_target_sites( ]: r"""Return a callable for the batch create target sites method over gRPC. - Creates - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite] in - a batch. + Creates `TargetSite + `__ in a + batch. Returns: Callable[[~.BatchCreateTargetSitesRequest], @@ -441,8 +442,8 @@ def get_target_site( ]: r"""Return a callable for the get target site method over gRPC. - Gets a - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite]. + Gets a `TargetSite + `__. Returns: Callable[[~.GetTargetSiteRequest], @@ -470,8 +471,8 @@ def update_target_site( ]: r"""Return a callable for the update target site method over gRPC. - Updates a - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite]. + Updates a `TargetSite + `__. Returns: Callable[[~.UpdateTargetSiteRequest], @@ -499,8 +500,8 @@ def delete_target_site( ]: r"""Return a callable for the delete target site method over gRPC. - Deletes a - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite]. + Deletes a `TargetSite + `__. Returns: Callable[[~.DeleteTargetSiteRequest], @@ -530,7 +531,8 @@ def list_target_sites( r"""Return a callable for the list target sites method over gRPC. Gets a list of - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite]s. + `TargetSite + `__s. Returns: Callable[[~.ListTargetSitesRequest], @@ -558,8 +560,8 @@ def create_sitemap( ]: r"""Return a callable for the create sitemap method over gRPC. - Creates a - [Sitemap][google.cloud.discoveryengine.v1beta.Sitemap]. + Creates a `Sitemap + `__. Returns: Callable[[~.CreateSitemapRequest], @@ -587,8 +589,8 @@ def delete_sitemap( ]: r"""Return a callable for the delete sitemap method over gRPC. - Deletes a - [Sitemap][google.cloud.discoveryengine.v1beta.Sitemap]. + Deletes a `Sitemap + `__. Returns: Callable[[~.DeleteSitemapRequest], @@ -617,8 +619,10 @@ def fetch_sitemaps( ]: r"""Return a callable for the fetch sitemaps method over gRPC. - Fetch [Sitemap][google.cloud.discoveryengine.v1beta.Sitemap]s in - a [DataStore][google.cloud.discoveryengine.v1beta.DataStore]. + Fetch `Sitemap + `__s in a + `DataStore + `__. Returns: Callable[[~.FetchSitemapsRequest], @@ -771,9 +775,10 @@ def fetch_domain_verification_status( r"""Return a callable for the fetch domain verification status method over gRPC. - Returns list of target sites with its domain verification - status. This method can only be called under data store with - BASIC_SITE_SEARCH state at the moment. + Returns list of target sites with its domain + verification status. This method can only be called + under data store with BASIC_SITE_SEARCH state at the + moment. Returns: Callable[[~.FetchDomainVerificationStatusRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/site_search_engine_service/transports/grpc_asyncio.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/site_search_engine_service/transports/grpc_asyncio.py index 3416e87016f7..ce7eea7a2ec5 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/site_search_engine_service/transports/grpc_asyncio.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/site_search_engine_service/transports/grpc_asyncio.py @@ -361,7 +361,8 @@ def get_site_search_engine( r"""Return a callable for the get site search engine method over gRPC. Gets the - [SiteSearchEngine][google.cloud.discoveryengine.v1beta.SiteSearchEngine]. + `SiteSearchEngine + `__. Returns: Callable[[~.GetSiteSearchEngineRequest], @@ -390,8 +391,8 @@ def create_target_site( ]: r"""Return a callable for the create target site method over gRPC. - Creates a - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite]. + Creates a `TargetSite + `__. Returns: Callable[[~.CreateTargetSiteRequest], @@ -420,9 +421,9 @@ def batch_create_target_sites( ]: r"""Return a callable for the batch create target sites method over gRPC. - Creates - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite] in - a batch. + Creates `TargetSite + `__ in a + batch. Returns: Callable[[~.BatchCreateTargetSitesRequest], @@ -451,8 +452,8 @@ def get_target_site( ]: r"""Return a callable for the get target site method over gRPC. - Gets a - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite]. + Gets a `TargetSite + `__. Returns: Callable[[~.GetTargetSiteRequest], @@ -481,8 +482,8 @@ def update_target_site( ]: r"""Return a callable for the update target site method over gRPC. - Updates a - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite]. + Updates a `TargetSite + `__. Returns: Callable[[~.UpdateTargetSiteRequest], @@ -511,8 +512,8 @@ def delete_target_site( ]: r"""Return a callable for the delete target site method over gRPC. - Deletes a - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite]. + Deletes a `TargetSite + `__. Returns: Callable[[~.DeleteTargetSiteRequest], @@ -542,7 +543,8 @@ def list_target_sites( r"""Return a callable for the list target sites method over gRPC. Gets a list of - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite]s. + `TargetSite + `__s. Returns: Callable[[~.ListTargetSitesRequest], @@ -571,8 +573,8 @@ def create_sitemap( ]: r"""Return a callable for the create sitemap method over gRPC. - Creates a - [Sitemap][google.cloud.discoveryengine.v1beta.Sitemap]. + Creates a `Sitemap + `__. Returns: Callable[[~.CreateSitemapRequest], @@ -601,8 +603,8 @@ def delete_sitemap( ]: r"""Return a callable for the delete sitemap method over gRPC. - Deletes a - [Sitemap][google.cloud.discoveryengine.v1beta.Sitemap]. + Deletes a `Sitemap + `__. Returns: Callable[[~.DeleteSitemapRequest], @@ -631,8 +633,10 @@ def fetch_sitemaps( ]: r"""Return a callable for the fetch sitemaps method over gRPC. - Fetch [Sitemap][google.cloud.discoveryengine.v1beta.Sitemap]s in - a [DataStore][google.cloud.discoveryengine.v1beta.DataStore]. + Fetch `Sitemap + `__s in a + `DataStore + `__. Returns: Callable[[~.FetchSitemapsRequest], @@ -786,9 +790,10 @@ def fetch_domain_verification_status( r"""Return a callable for the fetch domain verification status method over gRPC. - Returns list of target sites with its domain verification - status. This method can only be called under data store with - BASIC_SITE_SEARCH state at the moment. + Returns list of target sites with its domain + verification status. This method can only be called + under data store with BASIC_SITE_SEARCH state at the + moment. Returns: Callable[[~.FetchDomainVerificationStatusRequest], diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/site_search_engine_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/site_search_engine_service/transports/rest.py index cc9775658ae3..36aa8c1f65a3 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/site_search_engine_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/site_search_engine_service/transports/rest.py @@ -1318,7 +1318,8 @@ def __call__( Args: request (~.site_search_engine_service.BatchCreateTargetSitesRequest): The request object. Request message for - [SiteSearchEngineService.BatchCreateTargetSites][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.BatchCreateTargetSites] + `SiteSearchEngineService.BatchCreateTargetSites + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1474,7 +1475,8 @@ def __call__( Args: request (~.site_search_engine_service.BatchVerifyTargetSitesRequest): The request object. Request message for - [SiteSearchEngineService.BatchVerifyTargetSites][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.BatchVerifyTargetSites] + `SiteSearchEngineService.BatchVerifyTargetSites + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1630,7 +1632,8 @@ def __call__( Args: request (~.site_search_engine_service.CreateSitemapRequest): The request object. Request message for - [SiteSearchEngineService.CreateSitemap][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.CreateSitemap] + `SiteSearchEngineService.CreateSitemap + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1786,7 +1789,8 @@ def __call__( Args: request (~.site_search_engine_service.CreateTargetSiteRequest): The request object. Request message for - [SiteSearchEngineService.CreateTargetSite][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.CreateTargetSite] + `SiteSearchEngineService.CreateTargetSite + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1943,7 +1947,8 @@ def __call__( Args: request (~.site_search_engine_service.DeleteSitemapRequest): The request object. Request message for - [SiteSearchEngineService.DeleteSitemap][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.DeleteSitemap] + `SiteSearchEngineService.DeleteSitemap + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -2093,7 +2098,8 @@ def __call__( Args: request (~.site_search_engine_service.DeleteTargetSiteRequest): The request object. Request message for - [SiteSearchEngineService.DeleteTargetSite][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.DeleteTargetSite] + `SiteSearchEngineService.DeleteTargetSite + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -2249,7 +2255,8 @@ def __call__( Args: request (~.site_search_engine_service.DisableAdvancedSiteSearchRequest): The request object. Request message for - [SiteSearchEngineService.DisableAdvancedSiteSearch][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.DisableAdvancedSiteSearch] + `SiteSearchEngineService.DisableAdvancedSiteSearch + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -2406,7 +2413,8 @@ def __call__( Args: request (~.site_search_engine_service.EnableAdvancedSiteSearchRequest): The request object. Request message for - [SiteSearchEngineService.EnableAdvancedSiteSearch][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.EnableAdvancedSiteSearch] + `SiteSearchEngineService.EnableAdvancedSiteSearch + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -2564,7 +2572,8 @@ def __call__( Args: request (~.site_search_engine_service.FetchDomainVerificationStatusRequest): The request object. Request message for - [SiteSearchEngineService.FetchDomainVerificationStatus][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.FetchDomainVerificationStatus] + `SiteSearchEngineService.FetchDomainVerificationStatus + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -2577,7 +2586,8 @@ def __call__( Returns: ~.site_search_engine_service.FetchDomainVerificationStatusResponse: Response message for - [SiteSearchEngineService.FetchDomainVerificationStatus][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.FetchDomainVerificationStatus] + `SiteSearchEngineService.FetchDomainVerificationStatus + `__ method. """ @@ -2725,7 +2735,8 @@ def __call__( Args: request (~.site_search_engine_service.FetchSitemapsRequest): The request object. Request message for - [SiteSearchEngineService.FetchSitemaps][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.FetchSitemaps] + `SiteSearchEngineService.FetchSitemaps + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -2738,7 +2749,8 @@ def __call__( Returns: ~.site_search_engine_service.FetchSitemapsResponse: Response message for - [SiteSearchEngineService.FetchSitemaps][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.FetchSitemaps] + `SiteSearchEngineService.FetchSitemaps + `__ method. """ @@ -2881,7 +2893,8 @@ def __call__( Args: request (~.site_search_engine_service.GetSiteSearchEngineRequest): The request object. Request message for - [SiteSearchEngineService.GetSiteSearchEngine][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.GetSiteSearchEngine] + `SiteSearchEngineService.GetSiteSearchEngine + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -3038,7 +3051,8 @@ def __call__( Args: request (~.site_search_engine_service.GetTargetSiteRequest): The request object. Request message for - [SiteSearchEngineService.GetTargetSite][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.GetTargetSite] + `SiteSearchEngineService.GetTargetSite + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -3189,7 +3203,8 @@ def __call__( Args: request (~.site_search_engine_service.ListTargetSitesRequest): The request object. Request message for - [SiteSearchEngineService.ListTargetSites][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.ListTargetSites] + `SiteSearchEngineService.ListTargetSites + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -3202,7 +3217,8 @@ def __call__( Returns: ~.site_search_engine_service.ListTargetSitesResponse: Response message for - [SiteSearchEngineService.ListTargetSites][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.ListTargetSites] + `SiteSearchEngineService.ListTargetSites + `__ method. """ @@ -3348,7 +3364,8 @@ def __call__( Args: request (~.site_search_engine_service.RecrawlUrisRequest): The request object. Request message for - [SiteSearchEngineService.RecrawlUris][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.RecrawlUris] + `SiteSearchEngineService.RecrawlUris + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -3502,7 +3519,8 @@ def __call__( Args: request (~.site_search_engine_service.UpdateTargetSiteRequest): The request object. Request message for - [SiteSearchEngineService.UpdateTargetSite][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.UpdateTargetSite] + `SiteSearchEngineService.UpdateTargetSite + `__ method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/user_event_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/user_event_service/async_client.py index 44ca653a5bfc..325264cf77c8 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/user_event_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/user_event_service/async_client.py @@ -455,52 +455,61 @@ async def sample_collect_user_event(): Returns: google.api.httpbody_pb2.HttpBody: - Message that represents an arbitrary HTTP body. It should only be used for - payload formats that can't be represented as JSON, - such as raw binary or an HTML page. - - This message can be used both in streaming and - non-streaming API methods in the request as well as - the response. - - It can be used as a top-level request field, which is - convenient if one wants to extract parameters from - either the URL or HTTP template into the request - fields and also want access to the raw HTTP body. - - Example: - - message GetResourceRequest { - // A unique request id. string request_id = 1; - - // The raw HTTP body is bound to this field. - google.api.HttpBody http_body = 2; - - } - - service ResourceService { - rpc GetResource(GetResourceRequest) - returns (google.api.HttpBody); - - rpc UpdateResource(google.api.HttpBody) - returns (google.protobuf.Empty); - - } - - Example with streaming methods: - - service CaldavService { - rpc GetCalendar(stream google.api.HttpBody) - returns (stream google.api.HttpBody); - - rpc UpdateCalendar(stream google.api.HttpBody) - returns (stream google.api.HttpBody); - - } - - Use of this type only changes how the request and - response bodies are handled, all other features will - continue to work unchanged. + Message that represents an arbitrary + HTTP body. It should only be used for + payload formats that can't be + represented as JSON, such as raw binary + or an HTML page. + + This message can be used both in + streaming and non-streaming API methods + in the request as well as the response. + + It can be used as a top-level request + field, which is convenient if one wants + to extract parameters from either the + URL or HTTP template into the request + fields and also want access to the raw + HTTP body. + + Example: + + message GetResourceRequest { + // A unique request id. + string request_id = 1; + + // The raw HTTP body is bound to + this field. google.api.HttpBody + http_body = 2; + + } + + service ResourceService { + rpc + GetResource(GetResourceRequest) + returns (google.api.HttpBody); + rpc + UpdateResource(google.api.HttpBody) + returns (google.protobuf.Empty); + + } + + Example with streaming methods: + + service CaldavService { + rpc GetCalendar(stream + google.api.HttpBody) returns + (stream google.api.HttpBody); rpc + UpdateCalendar(stream + google.api.HttpBody) returns + (stream google.api.HttpBody); + + } + + Use of this type only changes how the + request and response bodies are handled, + all other features will continue to work + unchanged. """ # Create or coerce a protobuf request object. @@ -594,11 +603,17 @@ async def sample_purge_user_events(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1beta.types.PurgeUserEventsResponse` Response of the PurgeUserEventsRequest. If the long running operation is - successfully done, then this message is returned by - the google.longrunning.Operations.response field. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1beta.types.PurgeUserEventsResponse` + Response of the PurgeUserEventsRequest. + If the long running operation is + successfully done, then this message is + returned by the + google.longrunning.Operations.response + field. """ # Create or coerce a protobuf request object. @@ -707,13 +722,17 @@ async def sample_import_user_events(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1beta.types.ImportUserEventsResponse` Response of the ImportUserEventsRequest. If the long running - operation was successful, then this message is - returned by the - google.longrunning.Operations.response field if the - operation was successful. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1beta.types.ImportUserEventsResponse` + Response of the ImportUserEventsRequest. + If the long running operation was + successful, then this message is + returned by the + google.longrunning.Operations.response + field if the operation was successful. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/user_event_service/client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/user_event_service/client.py index d3a2f51c2f74..97bdc07393a8 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/user_event_service/client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/user_event_service/client.py @@ -941,52 +941,61 @@ def sample_collect_user_event(): Returns: google.api.httpbody_pb2.HttpBody: - Message that represents an arbitrary HTTP body. It should only be used for - payload formats that can't be represented as JSON, - such as raw binary or an HTML page. + Message that represents an arbitrary + HTTP body. It should only be used for + payload formats that can't be + represented as JSON, such as raw binary + or an HTML page. - This message can be used both in streaming and - non-streaming API methods in the request as well as - the response. + This message can be used both in + streaming and non-streaming API methods + in the request as well as the response. - It can be used as a top-level request field, which is - convenient if one wants to extract parameters from - either the URL or HTTP template into the request - fields and also want access to the raw HTTP body. + It can be used as a top-level request + field, which is convenient if one wants + to extract parameters from either the + URL or HTTP template into the request + fields and also want access to the raw + HTTP body. - Example: + Example: - message GetResourceRequest { - // A unique request id. string request_id = 1; + message GetResourceRequest { + // A unique request id. + string request_id = 1; - // The raw HTTP body is bound to this field. - google.api.HttpBody http_body = 2; + // The raw HTTP body is bound to + this field. google.api.HttpBody + http_body = 2; - } - - service ResourceService { - rpc GetResource(GetResourceRequest) - returns (google.api.HttpBody); - - rpc UpdateResource(google.api.HttpBody) - returns (google.protobuf.Empty); + } - } + service ResourceService { + rpc + GetResource(GetResourceRequest) + returns (google.api.HttpBody); + rpc + UpdateResource(google.api.HttpBody) + returns (google.protobuf.Empty); - Example with streaming methods: + } - service CaldavService { - rpc GetCalendar(stream google.api.HttpBody) - returns (stream google.api.HttpBody); + Example with streaming methods: - rpc UpdateCalendar(stream google.api.HttpBody) - returns (stream google.api.HttpBody); + service CaldavService { + rpc GetCalendar(stream + google.api.HttpBody) returns + (stream google.api.HttpBody); rpc + UpdateCalendar(stream + google.api.HttpBody) returns + (stream google.api.HttpBody); - } + } - Use of this type only changes how the request and - response bodies are handled, all other features will - continue to work unchanged. + Use of this type only changes how the + request and response bodies are handled, + all other features will continue to work + unchanged. """ # Create or coerce a protobuf request object. @@ -1078,11 +1087,17 @@ def sample_purge_user_events(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1beta.types.PurgeUserEventsResponse` Response of the PurgeUserEventsRequest. If the long running operation is - successfully done, then this message is returned by - the google.longrunning.Operations.response field. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1beta.types.PurgeUserEventsResponse` + Response of the PurgeUserEventsRequest. + If the long running operation is + successfully done, then this message is + returned by the + google.longrunning.Operations.response + field. """ # Create or coerce a protobuf request object. @@ -1189,13 +1204,17 @@ def sample_import_user_events(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.discoveryengine_v1beta.types.ImportUserEventsResponse` Response of the ImportUserEventsRequest. If the long running - operation was successful, then this message is - returned by the - google.longrunning.Operations.response field if the - operation was successful. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.discoveryengine_v1beta.types.ImportUserEventsResponse` + Response of the ImportUserEventsRequest. + If the long running operation was + successful, then this message is + returned by the + google.longrunning.Operations.response + field if the operation was successful. """ # Create or coerce a protobuf request object. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/user_event_service/transports/base.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/user_event_service/transports/base.py index 85d29ea872b5..96cd20ebb6b5 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/user_event_service/transports/base.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/user_event_service/transports/base.py @@ -90,8 +90,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -106,11 +104,16 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( - credentials_file, **scopes_kwargs, quota_project_id=quota_project_id + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: credentials, _ = google.auth.default( - **scopes_kwargs, quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/user_event_service/transports/rest.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/user_event_service/transports/rest.py index e95583803a34..4f98af23b3e6 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/user_event_service/transports/rest.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/user_event_service/transports/rest.py @@ -692,55 +692,61 @@ def __call__( Returns: ~.httpbody_pb2.HttpBody: - Message that represents an arbitrary HTTP body. It - should only be used for payload formats that can't be - represented as JSON, such as raw binary or an HTML page. - - This message can be used both in streaming and - non-streaming API methods in the request as well as the - response. - - It can be used as a top-level request field, which is - convenient if one wants to extract parameters from - either the URL or HTTP template into the request fields - and also want access to the raw HTTP body. + Message that represents an arbitrary + HTTP body. It should only be used for + payload formats that can't be + represented as JSON, such as raw binary + or an HTML page. + + This message can be used both in + streaming and non-streaming API methods + in the request as well as the response. + + It can be used as a top-level request + field, which is convenient if one wants + to extract parameters from either the + URL or HTTP template into the request + fields and also want access to the raw + HTTP body. Example: - :: - message GetResourceRequest { // A unique request id. string request_id = 1; - // The raw HTTP body is bound to this field. - google.api.HttpBody http_body = 2; + // The raw HTTP body is bound to + this field. google.api.HttpBody + http_body = 2; } service ResourceService { - rpc GetResource(GetResourceRequest) + rpc + GetResource(GetResourceRequest) returns (google.api.HttpBody); - rpc UpdateResource(google.api.HttpBody) - returns (google.protobuf.Empty); + rpc + UpdateResource(google.api.HttpBody) + returns (google.protobuf.Empty); } Example with streaming methods: - :: - service CaldavService { - rpc GetCalendar(stream google.api.HttpBody) - returns (stream google.api.HttpBody); - rpc UpdateCalendar(stream google.api.HttpBody) - returns (stream google.api.HttpBody); + rpc GetCalendar(stream + google.api.HttpBody) returns + (stream google.api.HttpBody); rpc + UpdateCalendar(stream + google.api.HttpBody) returns + (stream google.api.HttpBody); } - Use of this type only changes how the request and - response bodies are handled, all other features will - continue to work unchanged. + Use of this type only changes how the + request and response bodies are handled, + all other features will continue to work + unchanged. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/answer.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/answer.py index b4a969b6f684..163b33de1f48 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/answer.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/answer.py @@ -493,11 +493,11 @@ class SearchResult(proto.Message): title (str): Title. snippet_info (MutableSequence[google.cloud.discoveryengine_v1beta.types.Answer.Step.Action.Observation.SearchResult.SnippetInfo]): - If citation_type is DOCUMENT_LEVEL_CITATION, populate - document level snippets. + If citation_type is DOCUMENT_LEVEL_CITATION, + populate document level snippets. chunk_info (MutableSequence[google.cloud.discoveryengine_v1beta.types.Answer.Step.Action.Observation.SearchResult.ChunkInfo]): - If citation_type is CHUNK_LEVEL_CITATION and chunk mode is - on, populate chunk info. + If citation_type is CHUNK_LEVEL_CITATION and + chunk mode is on, populate chunk info. struct_data (google.protobuf.struct_pb2.Struct): Data representation. The structured JSON data for the document. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/chunk.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/chunk.py index 495c1b461a84..a295ec95bdab 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/chunk.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/chunk.py @@ -37,20 +37,24 @@ class Chunk(proto.Message): Attributes: name (str): - The full resource name of the chunk. Format: + The full resource name of the chunk. + Format: + ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}/chunks/{chunk_id}``. - This field must be a UTF-8 encoded string with a length - limit of 1024 characters. + This field must be a UTF-8 encoded string with a + length limit of 1024 characters. id (str): Unique chunk ID of the current chunk. content (str): Content is a string from a document (parsed content). relevance_score (float): - Output only. Represents the relevance score based on - similarity. Higher score indicates higher chunk relevance. - The score is in range [-1.0, 1.0]. Only populated on + Output only. Represents the relevance score + based on similarity. Higher score indicates + higher chunk relevance. The score is in range + [-1.0, 1.0]. + Only populated on [SearchService.SearchResponse][]. This field is a member of `oneof`_ ``_relevance_score``. @@ -58,8 +62,9 @@ class Chunk(proto.Message): Metadata of the document from the current chunk. derived_struct_data (google.protobuf.struct_pb2.Struct): - Output only. This field is OUTPUT_ONLY. It contains derived - data that are not in the original input document. + Output only. This field is OUTPUT_ONLY. + It contains derived data that are not in the + original input document. page_span (google.cloud.discoveryengine_v1beta.types.Chunk.PageSpan): Page span of the chunk. chunk_metadata (google.cloud.discoveryengine_v1beta.types.Chunk.ChunkMetadata): @@ -76,10 +81,11 @@ class DocumentMetadata(proto.Message): title (str): Title of the document. struct_data (google.protobuf.struct_pb2.Struct): - Data representation. The structured JSON data for the - document. It should conform to the registered - [Schema][google.cloud.discoveryengine.v1beta.Schema] or an - ``INVALID_ARGUMENT`` error is thrown. + Data representation. + The structured JSON data for the document. It + should conform to the registered `Schema + `__ + or an ``INVALID_ARGUMENT`` error is thrown. """ uri: str = proto.Field( @@ -117,23 +123,28 @@ class PageSpan(proto.Message): class ChunkMetadata(proto.Message): r"""Metadata of the current chunk. This field is only populated on - [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] + `SearchService.Search + `__ API. Attributes: previous_chunks (MutableSequence[google.cloud.discoveryengine_v1beta.types.Chunk]): - The previous chunks of the current chunk. The number is - controlled by - [SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks]. + The previous chunks of the current chunk. The + number is controlled by + `SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks + `__. This field is only populated on - [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] + `SearchService.Search + `__ API. next_chunks (MutableSequence[google.cloud.discoveryengine_v1beta.types.Chunk]): - The next chunks of the current chunk. The number is - controlled by - [SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks]. + The next chunks of the current chunk. The number + is controlled by + `SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks + `__. This field is only populated on - [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] + `SearchService.Search + `__ API. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/common.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/common.py index 77a3ec8f1d3f..209fa4c13a3e 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/common.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/common.py @@ -38,7 +38,7 @@ class IndustryVertical(proto.Enum): r"""The industry vertical associated with the - [DataStore][google.cloud.discoveryengine.v1beta.DataStore]. + `DataStore `__. Values: INDUSTRY_VERTICAL_UNSPECIFIED (0): @@ -71,10 +71,10 @@ class SolutionType(proto.Enum): Used for use cases related to the Generative AI agent. SOLUTION_TYPE_GENERATIVE_CHAT (4): - Used for use cases related to the Generative Chat agent. - It's used for Generative chat engine only, the associated - data stores must enrolled with ``SOLUTION_TYPE_CHAT`` - solution. + Used for use cases related to the Generative + Chat agent. It's used for Generative chat engine + only, the associated data stores must enrolled + with ``SOLUTION_TYPE_CHAT`` solution. """ SOLUTION_TYPE_UNSPECIFIED = 0 SOLUTION_TYPE_RECOMMENDATION = 1 @@ -84,19 +84,22 @@ class SolutionType(proto.Enum): class SearchUseCase(proto.Enum): - r"""Defines a further subdivision of ``SolutionType``. Specifically - applies to - [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH]. + r"""Defines a further subdivision of ``SolutionType``. + Specifically applies to + `SOLUTION_TYPE_SEARCH + `__. Values: SEARCH_USE_CASE_UNSPECIFIED (0): Value used when unset. Will not occur in CSS. SEARCH_USE_CASE_SEARCH (1): - Search use case. Expects the traffic has a non-empty - [query][google.cloud.discoveryengine.v1beta.SearchRequest.query]. + Search use case. Expects the traffic has a + non-empty `query + `__. SEARCH_USE_CASE_BROWSE (2): - Browse use case. Expects the traffic has an empty - [query][google.cloud.discoveryengine.v1beta.SearchRequest.query]. + Browse use case. Expects the traffic has an + empty `query + `__. """ SEARCH_USE_CASE_UNSPECIFIED = 0 SEARCH_USE_CASE_SEARCH = 1 @@ -189,32 +192,39 @@ class Interval(proto.Message): class CustomAttribute(proto.Message): r"""A custom attribute that is not explicitly modeled in a resource, - e.g. [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent]. + e.g. `UserEvent + `__. Attributes: text (MutableSequence[str]): - The textual values of this custom attribute. For example, - ``["yellow", "green"]`` when the key is "color". + The textual values of this custom attribute. For + example, ``["yellow", "green"]`` when the key is + "color". Empty string is not allowed. Otherwise, an ``INVALID_ARGUMENT`` error is returned. Exactly one of - [CustomAttribute.text][google.cloud.discoveryengine.v1beta.CustomAttribute.text] + `CustomAttribute.text + `__ or - [CustomAttribute.numbers][google.cloud.discoveryengine.v1beta.CustomAttribute.numbers] - should be set. Otherwise, an ``INVALID_ARGUMENT`` error is - returned. + `CustomAttribute.numbers + `__ + should be set. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. numbers (MutableSequence[float]): - The numerical values of this custom attribute. For example, - ``[2.3, 15.4]`` when the key is "lengths_cm". + The numerical values of this custom attribute. + For example, ``[2.3, 15.4]`` when the key is + "lengths_cm". Exactly one of - [CustomAttribute.text][google.cloud.discoveryengine.v1beta.CustomAttribute.text] + `CustomAttribute.text + `__ or - [CustomAttribute.numbers][google.cloud.discoveryengine.v1beta.CustomAttribute.numbers] - should be set. Otherwise, an ``INVALID_ARGUMENT`` error is - returned. + `CustomAttribute.numbers + `__ + should be set. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. """ text: MutableSequence[str] = proto.RepeatedField( @@ -232,31 +242,35 @@ class UserInfo(proto.Message): Attributes: user_id (str): - Highly recommended for logged-in users. Unique identifier - for logged-in user, such as a user name. Don't set for - anonymous users. + Highly recommended for logged-in users. Unique + identifier for logged-in user, such as a user + name. Don't set for anonymous users. Always use a hashed value for this ID. - Don't set the field to the same fixed ID for different - users. This mixes the event history of those users together, - which results in degraded model quality. + Don't set the field to the same fixed ID for + different users. This mixes the event history of + those users together, which results in degraded + model quality. - The field must be a UTF-8 encoded string with a length limit - of 128 characters. Otherwise, an ``INVALID_ARGUMENT`` error - is returned. + The field must be a UTF-8 encoded string with a + length limit of 128 characters. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. user_agent (str): User agent as included in the HTTP header. - The field must be a UTF-8 encoded string with a length limit - of 1,000 characters. Otherwise, an ``INVALID_ARGUMENT`` - error is returned. + The field must be a UTF-8 encoded string with a + length limit of 1,000 characters. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. - This should not be set when using the client side event - reporting with GTM or JavaScript tag in - [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1beta.UserEventService.CollectUserEvent] + This should not be set when using the client + side event reporting with GTM or JavaScript tag + in + `UserEventService.CollectUserEvent + `__ or if - [UserEvent.direct_user_request][google.cloud.discoveryengine.v1beta.UserEvent.direct_user_request] + `UserEvent.direct_user_request + `__ is set. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/completion.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/completion.py index 0a8b684bf6a3..88fa88fd0f41 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/completion.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/completion.py @@ -49,10 +49,11 @@ class MatchOperator(proto.Enum): MATCH_OPERATOR_UNSPECIFIED (0): Default value. Should not be used EXACT_MATCH (1): - If the suggestion is an exact match to the block_phrase, - then block it. + If the suggestion is an exact match to the + block_phrase, then block it. CONTAINS (2): - If the suggestion contains the block_phrase, then block it. + If the suggestion contains the block_phrase, + then block it. """ MATCH_OPERATOR_UNSPECIFIED = 0 EXACT_MATCH = 1 diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/completion_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/completion_service.py index e577c83b84f4..84dee5a8ffe7 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/completion_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/completion_service.py @@ -36,58 +36,65 @@ class CompleteQueryRequest(proto.Message): r"""Request message for - [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1beta.CompletionService.CompleteQuery] + `CompletionService.CompleteQuery + `__ method. Attributes: data_store (str): - Required. The parent data store resource name for which the - completion is performed, such as + Required. The parent data store resource name + for which the completion is performed, such as ``projects/*/locations/global/collections/default_collection/dataStores/default_data_store``. query (str): Required. The typeahead input used to fetch suggestions. Maximum length is 128 characters. query_model (str): - Specifies the autocomplete data model. This overrides any - model specified in the Configuration > Autocomplete section - of the Cloud console. Currently supported values: - - - ``document`` - Using suggestions generated from - user-imported documents. - - ``search-history`` - Using suggestions generated from the - past history of - [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] - API calls. Do not use it when there is no traffic for - Search API. - - ``user-event`` - Using suggestions generated from - user-imported search events. - - ``document-completable`` - Using suggestions taken - directly from user-imported document fields marked as - completable. + Specifies the autocomplete data model. This + overrides any model specified in the + Configuration > Autocomplete section of the + Cloud console. Currently supported values: + + * ``document`` - Using suggestions generated + from user-imported documents. * + ``search-history`` - Using suggestions generated + from the past history of `SearchService.Search + `__ + API calls. Do not use it when there is no + traffic for Search API. + + * ``user-event`` - Using suggestions generated + from user-imported search events. + + * ``document-completable`` - Using suggestions + taken directly from user-imported document + fields marked as completable. Default values: - - ``document`` is the default model for regular dataStores. - - ``search-history`` is the default model for site search - dataStores. + * ``document`` is the default model for regular + dataStores. * ``search-history`` is the default + model for site search dataStores. user_pseudo_id (str): - A unique identifier for tracking visitors. For example, this - could be implemented with an HTTP cookie, which should be - able to uniquely identify a visitor on a single device. This - unique identifier should not change if the visitor logs in - or out of the website. + A unique identifier for tracking visitors. For + example, this could be implemented with an HTTP + cookie, which should be able to uniquely + identify a visitor on a single device. This + unique identifier should not change if the + visitor logs in or out of the website. This field should NOT have a fixed value such as ``unknown_visitor``. This should be the same identifier as - [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id] + `UserEvent.user_pseudo_id + `__ and - [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.SearchRequest.user_pseudo_id]. + `SearchRequest.user_pseudo_id + `__. - The field must be a UTF-8 encoded string with a length limit - of 128 characters. Otherwise, an ``INVALID_ARGUMENT`` error - is returned. + The field must be a UTF-8 encoded string with a + length limit of 128 characters. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. include_tail_suggestions (bool): Indicates if tail suggestions should be returned if there are no suggestions that match @@ -121,7 +128,8 @@ class CompleteQueryRequest(proto.Message): class CompleteQueryResponse(proto.Message): r"""Response message for - [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1beta.CompletionService.CompleteQuery] + `CompletionService.CompleteQuery + `__ method. Attributes: @@ -130,11 +138,12 @@ class CompleteQueryResponse(proto.Message): result list is ordered and the first result is a top suggestion. tail_match_triggered (bool): - True if the returned suggestions are all tail suggestions. - - For tail matching to be triggered, include_tail_suggestions - in the request must be true and there must be no suggestions - that match the full query. + True if the returned suggestions are all tail + suggestions. + For tail matching to be triggered, + include_tail_suggestions in the request must be + true and there must be no suggestions that match + the full query. """ class QuerySuggestion(proto.Message): @@ -174,73 +183,85 @@ class QuerySuggestion(proto.Message): class AdvancedCompleteQueryRequest(proto.Message): r"""Request message for - [CompletionService.AdvancedCompleteQuery][google.cloud.discoveryengine.v1beta.CompletionService.AdvancedCompleteQuery] - method. . + `CompletionService.AdvancedCompleteQuery + `__ + method. + . Attributes: completion_config (str): - Required. The completion_config of the parent dataStore or - engine resource name for which the completion is performed, - such as + Required. The completion_config of the parent + dataStore or engine resource name for which the + completion is performed, such as ``projects/*/locations/global/collections/default_collection/dataStores/*/completionConfig`` ``projects/*/locations/global/collections/default_collection/engines/*/completionConfig``. query (str): - Required. The typeahead input used to fetch suggestions. - Maximum length is 128 characters. - - The query can not be empty for most of the suggestion types. - If it is empty, an ``INVALID_ARGUMENT`` error is returned. - The exception is when the suggestion_types contains only the - type ``RECENT_SEARCH``, the query can be an empty string. - The is called "zero prefix" feature, which returns user's - recently searched queries given the empty query. + Required. The typeahead input used to fetch + suggestions. Maximum length is 128 characters. + + The query can not be empty for most of the + suggestion types. If it is empty, an + ``INVALID_ARGUMENT`` error is returned. The + exception is when the suggestion_types contains + only the type ``RECENT_SEARCH``, the query can + be an empty string. The is called "zero prefix" + feature, which returns user's recently searched + queries given the empty query. query_model (str): - Specifies the autocomplete data model. This overrides any - model specified in the Configuration > Autocomplete section - of the Cloud console. Currently supported values: - - - ``document`` - Using suggestions generated from - user-imported documents. - - ``search-history`` - Using suggestions generated from the - past history of - [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] - API calls. Do not use it when there is no traffic for - Search API. - - ``user-event`` - Using suggestions generated from - user-imported search events. - - ``document-completable`` - Using suggestions taken - directly from user-imported document fields marked as - completable. + Specifies the autocomplete data model. This + overrides any model specified in the + Configuration > Autocomplete section of the + Cloud console. Currently supported values: + + * ``document`` - Using suggestions generated + from user-imported documents. * + ``search-history`` - Using suggestions generated + from the past history of `SearchService.Search + `__ + API calls. Do not use it when there is no + traffic for Search API. + + * ``user-event`` - Using suggestions generated + from user-imported search events. + + * ``document-completable`` - Using suggestions + taken directly from user-imported document + fields marked as completable. Default values: - - ``document`` is the default model for regular dataStores. - - ``search-history`` is the default model for site search - dataStores. + * ``document`` is the default model for regular + dataStores. * ``search-history`` is the default + model for site search dataStores. user_pseudo_id (str): - A unique identifier for tracking visitors. For example, this - could be implemented with an HTTP cookie, which should be - able to uniquely identify a visitor on a single device. This - unique identifier should not change if the visitor logs in - or out of the website. + A unique identifier for tracking visitors. For + example, this could be implemented with an HTTP + cookie, which should be able to uniquely + identify a visitor on a single device. This + unique identifier should not change if the + visitor logs in or out of the website. This field should NOT have a fixed value such as ``unknown_visitor``. This should be the same identifier as - [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id] + `UserEvent.user_pseudo_id + `__ and - [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.SearchRequest.user_pseudo_id]. + `SearchRequest.user_pseudo_id + `__. - The field must be a UTF-8 encoded string with a length limit - of 128 + The field must be a UTF-8 encoded string with a + length limit of 128 user_info (google.cloud.discoveryengine_v1beta.types.UserInfo): Optional. Information about the end user. - This should be the same identifier information as - [UserEvent.user_info][google.cloud.discoveryengine.v1beta.UserEvent.user_info] + This should be the same identifier information + as `UserEvent.user_info + `__ and - [SearchRequest.user_info][google.cloud.discoveryengine.v1beta.SearchRequest.user_info]. + `SearchRequest.user_info + `__. include_tail_suggestions (bool): Indicates if tail suggestions should be returned if there are no suggestions that match @@ -304,30 +325,35 @@ class ConditionBoostSpec(proto.Message): Attributes: condition (str): - An expression which specifies a boost condition. The syntax - is the same as `filter expression - syntax `__. - Currently, the only supported condition is a list of BCP-47 - lang codes. + An expression which specifies a boost condition. + The syntax is the same as `filter expression + syntax + `__. + Currently, the only supported condition is a + list of BCP-47 lang codes. Example: - - To boost suggestions in languages ``en`` or ``fr``: - ``(lang_code: ANY("en", "fr"))`` + * To boost suggestions in languages ``en`` or + ``fr``: + + ``(lang_code: ANY("en", "fr"))`` boost (float): - Strength of the boost, which should be in [-1, 1]. Negative - boost means demotion. Default is 0.0. + Strength of the boost, which should be in [-1, + 1]. Negative boost means demotion. Default is + 0.0. - Setting to 1.0 gives the suggestions a big promotion. - However, it does not necessarily mean that the top result - will be a boosted suggestion. + Setting to 1.0 gives the suggestions a big + promotion. However, it does not necessarily mean + that the top result will be a boosted + suggestion. - Setting to -1.0 gives the suggestions a big demotion. - However, other suggestions that are relevant might still be - shown. + Setting to -1.0 gives the suggestions a big + demotion. However, other suggestions that are + relevant might still be shown. - Setting to 0.0 means no boost applied. The boosting - condition is ignored. + Setting to 0.0 means no boost applied. The + boosting condition is ignored. """ condition: str = proto.Field( @@ -386,7 +412,8 @@ class ConditionBoostSpec(proto.Message): class AdvancedCompleteQueryResponse(proto.Message): r"""Response message for - [CompletionService.AdvancedCompleteQuery][google.cloud.discoveryengine.v1beta.CompletionService.AdvancedCompleteQuery] + `CompletionService.AdvancedCompleteQuery + `__ method. Attributes: @@ -395,11 +422,12 @@ class AdvancedCompleteQueryResponse(proto.Message): result list is ordered and the first result is a top suggestion. tail_match_triggered (bool): - True if the returned suggestions are all tail suggestions. - - For tail matching to be triggered, include_tail_suggestions - in the request must be true and there must be no suggestions - that match the full query. + True if the returned suggestions are all tail + suggestions. + For tail matching to be triggered, + include_tail_suggestions in the request must be + true and there must be no suggestions that match + the full query. people_suggestions (MutableSequence[google.cloud.discoveryengine_v1beta.types.AdvancedCompleteQueryResponse.PersonSuggestion]): Results of the matched people suggestions. The result list is ordered and the first result @@ -470,7 +498,8 @@ class PersonType(proto.Enum): CLOUD_IDENTITY (1): The suggestion is from a GOOGLE_IDENTITY source. THIRD_PARTY_IDENTITY (2): - The suggestion is from a THIRD_PARTY_IDENTITY source. + The suggestion is from a THIRD_PARTY_IDENTITY + source. """ PERSON_TYPE_UNSPECIFIED = 0 CLOUD_IDENTITY = 1 diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/control.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/control.py index 18f251314407..2414e45714a2 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/control.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/control.py @@ -37,9 +37,11 @@ class Condition(proto.Message): Attributes: query_terms (MutableSequence[google.cloud.discoveryengine_v1beta.types.Condition.QueryTerm]): - Search only A list of terms to match the query on. Cannot be - set when - [Condition.query_regex][google.cloud.discoveryengine.v1beta.Condition.query_regex] + Search only + A list of terms to match the query on. + Cannot be set when + `Condition.query_regex + `__ is set. Maximum of 10 query terms. @@ -48,10 +50,12 @@ class Condition(proto.Message): active. Maximum of 10 time ranges. query_regex (str): - Optional. Query regex to match the whole search query. - Cannot be set when - [Condition.query_terms][google.cloud.discoveryengine.v1beta.Condition.query_terms] - is set. This is currently supporting promotion use case. + Optional. Query regex to match the whole search + query. Cannot be set when + `Condition.query_terms + `__ + is set. This is currently supporting promotion + use case. """ class QueryTerm(proto.Message): @@ -61,9 +65,10 @@ class QueryTerm(proto.Message): value (str): The specific query value to match against - Must be lowercase, must be UTF-8. Can have at most 3 space - separated terms if full_match is true. Cannot be an empty - string. Maximum length of 5000 characters. + Must be lowercase, must be UTF-8. + Can have at most 3 space separated terms if + full_match is true. Cannot be an empty string. + Maximum length of 5000 characters. full_match (bool): Whether the search query needs to exactly match the query term. @@ -121,10 +126,11 @@ class TimeRange(proto.Message): class Control(proto.Message): - r"""Defines a conditioned behavior to employ during serving. Must be - attached to a - [ServingConfig][google.cloud.discoveryengine.v1beta.ServingConfig] - to be considered at serving time. Permitted actions dependent on + r"""Defines a conditioned behavior to employ during serving. + Must be attached to a + `ServingConfig + `__ to be + considered at serving time. Permitted actions dependent on ``SolutionType``. This message has `oneof`_ fields (mutually exclusive fields). @@ -164,21 +170,25 @@ class Control(proto.Message): error is thrown. associated_serving_config_ids (MutableSequence[str]): Output only. List of all - [ServingConfig][google.cloud.discoveryengine.v1beta.ServingConfig] - IDs this control is attached to. May take up to 10 minutes - to update after changes. + `ServingConfig + `__ + IDs this control is attached to. May take up to + 10 minutes to update after changes. solution_type (google.cloud.discoveryengine_v1beta.types.SolutionType): Required. Immutable. What solution the control belongs to. Must be compatible with vertical of resource. Otherwise an INVALID ARGUMENT error is thrown. use_cases (MutableSequence[google.cloud.discoveryengine_v1beta.types.SearchUseCase]): - Specifies the use case for the control. Affects what - condition fields can be set. Only applies to - [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH]. - Currently only allow one use case per control. Must be set - when solution_type is - [SolutionType.SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH]. + Specifies the use case for the control. + Affects what condition fields can be set. + Only applies to + `SOLUTION_TYPE_SEARCH + `__. + Currently only allow one use case per control. + Must be set when solution_type is + `SolutionType.SOLUTION_TYPE_SEARCH + `__. conditions (MutableSequence[google.cloud.discoveryengine_v1beta.types.Condition]): Determines when the associated action will trigger. @@ -193,8 +203,9 @@ class BoostAction(proto.Message): Attributes: boost (float): - Required. Strength of the boost, which should be in [-1, 1]. - Negative boost means demotion. Default is 0.0 (No-op). + Required. Strength of the boost, which should be + in [-1, 1]. Negative boost means demotion. + Default is 0.0 (No-op). filter (str): Required. Specifies which products to apply the boost to. @@ -205,8 +216,9 @@ class BoostAction(proto.Message): Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown. data_store (str): - Required. Specifies which data store's documents can be - boosted by this control. Full data store name e.g. + Required. Specifies which data store's documents + can be boosted by this control. Full data store + name e.g. projects/123/locations/global/collections/default_collection/dataStores/default_data_store """ @@ -238,8 +250,9 @@ class FilterAction(proto.Message): Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown. data_store (str): - Required. Specifies which data store's documents can be - filtered by this control. Full data store name e.g. + Required. Specifies which data store's documents + can be filtered by this control. Full data store + name e.g. projects/123/locations/global/collections/default_collection/dataStores/default_data_store """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/control_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/control_service.py index 0f75538cf8ef..5395ef31b8f1 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/control_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/control_service.py @@ -40,18 +40,20 @@ class CreateControlRequest(proto.Message): Attributes: parent (str): - Required. Full resource name of parent data store. Format: + Required. Full resource name of parent data + store. Format: ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`` or ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}``. control (google.cloud.discoveryengine_v1beta.types.Control): Required. The Control to create. control_id (str): - Required. The ID to use for the Control, which will become - the final component of the Control's resource name. + Required. The ID to use for the Control, which + will become the final component of the Control's + resource name. - This value must be within 1-63 characters. Valid characters - are /[a-z][0-9]-\_/. + This value must be within 1-63 characters. + Valid characters are /`a-z <0-9>`__-_/. """ parent: str = proto.Field( @@ -77,13 +79,17 @@ class UpdateControlRequest(proto.Message): Required. The Control to update. update_mask (google.protobuf.field_mask_pb2.FieldMask): Optional. Indicates which fields in the provided - [Control][google.cloud.discoveryengine.v1beta.Control] to - update. The following are NOT supported: + `Control + `__ + to update. The following are NOT supported: - - [Control.name][google.cloud.discoveryengine.v1beta.Control.name] - - [Control.solution_type][google.cloud.discoveryengine.v1beta.Control.solution_type] + * `Control.name + `__ + * `Control.solution_type + `__ - If not set or empty, all supported fields are updated. + If not set or empty, all supported fields are + updated. """ control: gcd_control.Control = proto.Field( @@ -103,8 +109,8 @@ class DeleteControlRequest(proto.Message): Attributes: name (str): - Required. The resource name of the Control to delete. - Format: + Required. The resource name of the Control to + delete. Format: ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`` """ @@ -119,7 +125,8 @@ class GetControlRequest(proto.Message): Attributes: name (str): - Required. The resource name of the Control to get. Format: + Required. The resource name of the Control to + get. Format: ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`` """ @@ -144,15 +151,15 @@ class ListControlsRequest(proto.Message): allowed value is 1000. page_token (str): Optional. A page token, received from a previous - ``ListControls`` call. Provide this to retrieve the - subsequent page. + ``ListControls`` call. Provide this to retrieve + the subsequent page. filter (str): - Optional. A filter to apply on the list results. Supported - features: - - - List all the products under the parent branch if - [filter][google.cloud.discoveryengine.v1beta.ListControlsRequest.filter] - is unset. Currently this field is unsupported. + Optional. A filter to apply on the list results. + Supported features: + * List all the products under the parent branch + if `filter + `__ + is unset. Currently this field is unsupported. """ parent: str = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/conversation.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/conversation.py index 55405fdd47db..386a512b18eb 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/conversation.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/conversation.py @@ -107,7 +107,8 @@ class Reply(proto.Message): Attributes: reply (str): - DEPRECATED: use ``summary`` instead. Text reply. + DEPRECATED: use ``summary`` instead. + Text reply. references (MutableSequence[google.cloud.discoveryengine_v1beta.types.Reply.Reference]): References in the reply. summary (google.cloud.discoveryengine_v1beta.types.SearchResponse.Summary): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/conversational_search_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/conversational_search_service.py index 17b66604760f..0616e9ad1833 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/conversational_search_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/conversational_search_service.py @@ -51,24 +51,28 @@ class ConverseConversationRequest(proto.Message): r"""Request message for - [ConversationalSearchService.ConverseConversation][google.cloud.discoveryengine.v1beta.ConversationalSearchService.ConverseConversation] + `ConversationalSearchService.ConverseConversation + `__ method. Attributes: name (str): - Required. The resource name of the Conversation to get. - Format: + Required. The resource name of the Conversation + to get. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}``. Use ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/-`` - to activate auto session mode, which automatically creates a - new conversation inside a ConverseConversation session. + to activate auto session mode, which + automatically creates a new conversation inside + a ConverseConversation session. query (google.cloud.discoveryengine_v1beta.types.TextInput): Required. Current user input. serving_config (str): - The resource name of the Serving Config to use. Format: + The resource name of the Serving Config to use. + Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/servingConfigs/{serving_config_id}`` - If this is not set, the default serving config will be used. + If this is not set, the default serving config + will be used. conversation (google.cloud.discoveryengine_v1beta.types.Conversation): The conversation to be used by auto session only. The name field will be ignored as we @@ -77,55 +81,66 @@ class ConverseConversationRequest(proto.Message): safe_search (bool): Whether to turn on safe search. user_labels (MutableMapping[str, str]): - The user labels applied to a resource must meet the - following requirements: - - - Each resource can have multiple labels, up to a maximum of - 64. - - Each label must be a key-value pair. - - Keys have a minimum length of 1 character and a maximum - length of 63 characters and cannot be empty. Values can be - empty and have a maximum length of 63 characters. - - Keys and values can contain only lowercase letters, - numeric characters, underscores, and dashes. All - characters must use UTF-8 encoding, and international - characters are allowed. - - The key portion of a label must be unique. However, you - can use the same key with multiple resources. - - Keys must start with a lowercase letter or international - character. + The user labels applied to a resource must meet + the following requirements: + * Each resource can have multiple labels, up to + a maximum of 64. + + * Each label must be a key-value pair. + * Keys have a minimum length of 1 character and + a maximum length of 63 characters and cannot + be empty. Values can be empty and have a maximum + length of 63 characters. + + * Keys and values can contain only lowercase + letters, numeric characters, underscores, and + dashes. All characters must use UTF-8 encoding, + and international characters are allowed. + + * The key portion of a label must be unique. + However, you can use the same key with + multiple resources. + + * Keys must start with a lowercase letter or + international character. See `Google Cloud - Document `__ + Document + `__ for more details. summary_spec (google.cloud.discoveryengine_v1beta.types.SearchRequest.ContentSearchSpec.SummarySpec): A specification for configuring the summary returned in the response. filter (str): - The filter syntax consists of an expression language for - constructing a predicate from one or more fields of the - documents being filtered. Filter expression is - case-sensitive. This will be used to filter search results - which may affect the summary response. - - If this field is unrecognizable, an ``INVALID_ARGUMENT`` is - returned. - - Filtering in Vertex AI Search is done by mapping the LHS - filter key to a key property defined in the Vertex AI Search - backend -- this mapping is defined by the customer in their - schema. For example a media customer might have a field - 'name' in their schema. In this case the filter would look - like this: filter --> name:'ANY("king kong")' - - For more information about filtering including syntax and - filter operators, see - `Filter `__ + The filter syntax consists of an expression + language for constructing a predicate from one + or more fields of the documents being filtered. + Filter expression is case-sensitive. This will + be used to filter search results which may + affect the summary response. + + If this field is unrecognizable, an + ``INVALID_ARGUMENT`` is returned. + + Filtering in Vertex AI Search is done by mapping + the LHS filter key to a key property defined in + the Vertex AI Search backend -- this mapping is + defined by the customer in their schema. For + example a media customer might have a field + 'name' in their schema. In this case the filter + would look like this: filter --> name:'ANY("king + kong")' + + For more information about filtering including + syntax and filter operators, see + `Filter + `__ boost_spec (google.cloud.discoveryengine_v1beta.types.SearchRequest.BoostSpec): - Boost specification to boost certain documents in search - results which may affect the converse response. For more - information on boosting, see - `Boosting `__ + Boost specification to boost certain documents + in search results which may affect the converse + response. For more information on boosting, see + `Boosting + `__ """ name: str = proto.Field( @@ -175,7 +190,8 @@ class ConverseConversationRequest(proto.Message): class ConverseConversationResponse(proto.Message): r"""Response message for - [ConversationalSearchService.ConverseConversation][google.cloud.discoveryengine.v1beta.ConversationalSearchService.ConverseConversation] + `ConversationalSearchService.ConverseConversation + `__ method. Attributes: @@ -217,7 +233,8 @@ class CreateConversationRequest(proto.Message): Attributes: parent (str): - Required. Full resource name of parent data store. Format: + Required. Full resource name of parent data + store. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`` conversation (google.cloud.discoveryengine_v1beta.types.Conversation): Required. The conversation to create. @@ -242,12 +259,15 @@ class UpdateConversationRequest(proto.Message): Required. The Conversation to update. update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided - [Conversation][google.cloud.discoveryengine.v1beta.Conversation] + `Conversation + `__ to update. The following are NOT supported: - - [Conversation.name][google.cloud.discoveryengine.v1beta.Conversation.name] + * `Conversation.name + `__ - If not set or empty, all supported fields are updated. + If not set or empty, all supported fields are + updated. """ conversation: gcd_conversation.Conversation = proto.Field( @@ -267,8 +287,8 @@ class DeleteConversationRequest(proto.Message): Attributes: name (str): - Required. The resource name of the Conversation to delete. - Format: + Required. The resource name of the Conversation + to delete. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`` """ @@ -283,8 +303,8 @@ class GetConversationRequest(proto.Message): Attributes: name (str): - Required. The resource name of the Conversation to get. - Format: + Required. The resource name of the Conversation + to get. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`` """ @@ -306,23 +326,30 @@ class ListConversationsRequest(proto.Message): unspecified, defaults to 50. Max allowed value is 1000. page_token (str): - A page token, received from a previous ``ListConversations`` - call. Provide this to retrieve the subsequent page. + A page token, received from a previous + ``ListConversations`` call. Provide this to + retrieve the subsequent page. filter (str): - A filter to apply on the list results. The supported - features are: user_pseudo_id, state. + A filter to apply on the list results. The + supported features are: user_pseudo_id, state. - Example: "user_pseudo_id = some_id". + Example: + + "user_pseudo_id = some_id". order_by (str): - A comma-separated list of fields to order by, sorted in - ascending order. Use "desc" after a field name for - descending. Supported fields: + A comma-separated list of fields to order by, + sorted in ascending order. Use "desc" after a + field name for descending. Supported fields: + + * ``update_time`` + * ``create_time`` + + * ``conversation_name`` - - ``update_time`` - - ``create_time`` - - ``conversation_name`` + Example: - Example: "update_time desc" "create_time". + "update_time desc" + "create_time". """ parent: str = proto.Field( @@ -375,29 +402,31 @@ def raw_page(self): class AnswerQueryRequest(proto.Message): r"""Request message for - [ConversationalSearchService.AnswerQuery][google.cloud.discoveryengine.v1beta.ConversationalSearchService.AnswerQuery] + `ConversationalSearchService.AnswerQuery + `__ method. Attributes: serving_config (str): - Required. The resource name of the Search serving config, - such as + Required. The resource name of the Search + serving config, such as ``projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config``, or ``projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config``. - This field is used to identify the serving configuration - name, set of models used to make the search. + This field is used to identify the serving + configuration name, set of models used to make + the search. query (google.cloud.discoveryengine_v1beta.types.Query): Required. Current user query. session (str): The session resource name. Not required. - When session field is not set, the API is in sessionless - mode. + When session field is not set, the API is in + sessionless mode. - We support auto session mode: users can use the wildcard - symbol ``-`` as session ID. A new ID will be automatically - generated and assigned. + We support auto session mode: users can use the + wildcard symbol ``-`` as session ID. A new ID + will be automatically generated and assigned. safety_spec (google.cloud.discoveryengine_v1beta.types.AnswerQueryRequest.SafetySpec): Model specification. related_questions_spec (google.cloud.discoveryengine_v1beta.types.AnswerQueryRequest.RelatedQuestionsSpec): @@ -411,53 +440,62 @@ class AnswerQueryRequest(proto.Message): query_understanding_spec (google.cloud.discoveryengine_v1beta.types.AnswerQueryRequest.QueryUnderstandingSpec): Query understanding specification. asynchronous_mode (bool): - Deprecated: This field is deprecated. Streaming Answer API - will be supported. + Deprecated: This field is deprecated. Streaming + Answer API will be supported. Asynchronous mode control. If enabled, the response will be returned with - answer/session resource name without final answer. The API - users need to do the polling to get the latest status of - answer/session by calling - [ConversationalSearchService.GetAnswer][google.cloud.discoveryengine.v1beta.ConversationalSearchService.GetAnswer] + answer/session resource name without final + answer. The API users need to do the polling to + get the latest status of answer/session by + calling `ConversationalSearchService.GetAnswer + `__ or - [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1beta.ConversationalSearchService.GetSession] + `ConversationalSearchService.GetSession + `__ method. user_pseudo_id (str): - A unique identifier for tracking visitors. For example, this - could be implemented with an HTTP cookie, which should be - able to uniquely identify a visitor on a single device. This - unique identifier should not change if the visitor logs in - or out of the website. + A unique identifier for tracking visitors. For + example, this could be implemented with an HTTP + cookie, which should be able to uniquely + identify a visitor on a single device. This + unique identifier should not change if the + visitor logs in or out of the website. This field should NOT have a fixed value such as ``unknown_visitor``. - The field must be a UTF-8 encoded string with a length limit - of 128 characters. Otherwise, an ``INVALID_ARGUMENT`` error - is returned. + The field must be a UTF-8 encoded string with a + length limit of 128 characters. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. user_labels (MutableMapping[str, str]): - The user labels applied to a resource must meet the - following requirements: - - - Each resource can have multiple labels, up to a maximum of - 64. - - Each label must be a key-value pair. - - Keys have a minimum length of 1 character and a maximum - length of 63 characters and cannot be empty. Values can be - empty and have a maximum length of 63 characters. - - Keys and values can contain only lowercase letters, - numeric characters, underscores, and dashes. All - characters must use UTF-8 encoding, and international - characters are allowed. - - The key portion of a label must be unique. However, you - can use the same key with multiple resources. - - Keys must start with a lowercase letter or international - character. + The user labels applied to a resource must meet + the following requirements: + * Each resource can have multiple labels, up to + a maximum of 64. + + * Each label must be a key-value pair. + * Keys have a minimum length of 1 character and + a maximum length of 63 characters and cannot + be empty. Values can be empty and have a maximum + length of 63 characters. + + * Keys and values can contain only lowercase + letters, numeric characters, underscores, and + dashes. All characters must use UTF-8 encoding, + and international characters are allowed. + + * The key portion of a label must be unique. + However, you can use the same key with + multiple resources. + + * Keys must start with a lowercase letter or + international character. See `Google Cloud - Document `__ + Document + `__ for more details. """ @@ -493,12 +531,13 @@ class GroundingSpec(proto.Message): Attributes: include_grounding_supports (bool): - Optional. Specifies whether to include grounding_supports in - the answer. The default value is ``false``. + Optional. Specifies whether to include + grounding_supports in the answer. The default + value is ``false``. - When this field is set to ``true``, returned answer will - have ``grounding_score`` and will contain GroundingSupports - for each claim. + When this field is set to ``true``, returned + answer will have ``grounding_score`` and will + contain GroundingSupports for each claim. filtering_level (google.cloud.discoveryengine_v1beta.types.AnswerQueryRequest.GroundingSpec.FilteringLevel): Optional. Specifies whether to enable the filtering based on grounding score and at what @@ -543,57 +582,65 @@ class AnswerGenerationSpec(proto.Message): prompt_spec (google.cloud.discoveryengine_v1beta.types.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec): Answer generation prompt specification. include_citations (bool): - Specifies whether to include citation metadata in the - answer. The default value is ``false``. + Specifies whether to include citation metadata + in the answer. The default value is ``false``. answer_language_code (str): - Language code for Answer. Use language tags defined by - `BCP47 `__. + Language code for Answer. Use language tags + defined by `BCP47 + `__. Note: This is an experimental feature. ignore_adversarial_query (bool): - Specifies whether to filter out adversarial queries. The - default value is ``false``. - - Google employs search-query classification to detect - adversarial queries. No answer is returned if the search - query is classified as an adversarial query. For example, a - user might ask a question regarding negative comments about - the company or submit a query designed to generate unsafe, - policy-violating output. If this field is set to ``true``, - we skip generating answers for adversarial queries and - return fallback messages instead. + Specifies whether to filter out adversarial + queries. The default value is ``false``. + + Google employs search-query classification to + detect adversarial queries. No answer is + returned if the search query is classified as an + adversarial query. For example, a user might ask + a question regarding negative comments about the + company or submit a query designed to generate + unsafe, policy-violating output. If this field + is set to ``true``, we skip generating answers + for adversarial queries and return fallback + messages instead. ignore_non_answer_seeking_query (bool): - Specifies whether to filter out queries that are not - answer-seeking. The default value is ``false``. - - Google employs search-query classification to detect - answer-seeking queries. No answer is returned if the search - query is classified as a non-answer seeking query. If this - field is set to ``true``, we skip generating answers for - non-answer seeking queries and return fallback messages - instead. + Specifies whether to filter out queries that are + not answer-seeking. The default value is + ``false``. + + Google employs search-query classification to + detect answer-seeking queries. No answer is + returned if the search query is classified as a + non-answer seeking query. If this field is set + to ``true``, we skip generating answers for + non-answer seeking queries and return fallback + messages instead. ignore_low_relevant_content (bool): - Specifies whether to filter out queries that have low - relevance. - - If this field is set to ``false``, all search results are - used regardless of relevance to generate answers. If set to - ``true`` or unset, the behavior will be determined - automatically by the service. + Specifies whether to filter out queries that + have low relevance. + If this field is set to ``false``, all search + results are used regardless of relevance to + generate answers. If set to ``true`` or unset, + the behavior will be determined automatically by + the service. This field is a member of `oneof`_ ``_ignore_low_relevant_content``. ignore_jail_breaking_query (bool): - Optional. Specifies whether to filter out jail-breaking - queries. The default value is ``false``. - - Google employs search-query classification to detect - jail-breaking queries. No summary is returned if the search - query is classified as a jail-breaking query. A user might - add instructions to the query to change the tone, style, - language, content of the answer, or ask the model to act as - a different entity, e.g. "Reply in the tone of a competing - company's CEO". If this field is set to ``true``, we skip - generating summaries for jail-breaking queries and return - fallback messages instead. + Optional. Specifies whether to filter out + jail-breaking queries. The default value is + ``false``. + + Google employs search-query classification to + detect jail-breaking queries. No summary is + returned if the search query is classified as a + jail-breaking query. A user might add + instructions to the query to change the tone, + style, language, content of the answer, or ask + the model to act as a different entity, e.g. + "Reply in the tone of a competing company's + CEO". If this field is set to ``true``, we skip + generating summaries for jail-breaking queries + and return fallback messages instead. """ class ModelSpec(proto.Message): @@ -689,45 +736,53 @@ class SearchParams(proto.Message): Number of search results to return. The default value is 10. filter (str): - The filter syntax consists of an expression language for - constructing a predicate from one or more fields of the - documents being filtered. Filter expression is - case-sensitive. This will be used to filter search results - which may affect the Answer response. - - If this field is unrecognizable, an ``INVALID_ARGUMENT`` is - returned. - - Filtering in Vertex AI Search is done by mapping the LHS - filter key to a key property defined in the Vertex AI Search - backend -- this mapping is defined by the customer in their - schema. For example a media customers might have a field - 'name' in their schema. In this case the filter would look - like this: filter --> name:'ANY("king kong")' - - For more information about filtering including syntax and - filter operators, see - `Filter `__ + The filter syntax consists of an expression + language for constructing a predicate from one + or more fields of the documents being filtered. + Filter expression is case-sensitive. This will + be used to filter search results which may + affect the Answer response. + + If this field is unrecognizable, an + ``INVALID_ARGUMENT`` is returned. + + Filtering in Vertex AI Search is done by mapping + the LHS filter key to a key property defined in + the Vertex AI Search backend -- this mapping is + defined by the customer in their schema. For + example a media customers might have a field + 'name' in their schema. In this case the filter + would look like this: filter --> name:'ANY("king + kong")' + + For more information about filtering including + syntax and filter operators, see + `Filter + `__ boost_spec (google.cloud.discoveryengine_v1beta.types.SearchRequest.BoostSpec): - Boost specification to boost certain documents in search - results which may affect the answer query response. For more - information on boosting, see - `Boosting `__ + Boost specification to boost certain documents + in search results which may affect the answer + query response. For more information on + boosting, see `Boosting + `__ order_by (str): - The order in which documents are returned. Documents can be - ordered by a field in an - [Document][google.cloud.discoveryengine.v1beta.Document] - object. Leave it unset if ordered by relevance. ``order_by`` - expression is case-sensitive. For more information on - ordering, see - `Ordering `__ - - If this field is unrecognizable, an ``INVALID_ARGUMENT`` is - returned. + The order in which documents are returned. + Documents can be ordered by a field in an + `Document + `__ + object. Leave it unset if ordered by relevance. + ``order_by`` expression is case-sensitive. For + more information on ordering, see `Ordering + `__ + + If this field is unrecognizable, an + ``INVALID_ARGUMENT`` is returned. search_result_mode (google.cloud.discoveryengine_v1beta.types.SearchRequest.ContentSearchSpec.SearchResultMode): - Specifies the search result mode. If unspecified, the search - result mode defaults to ``DOCUMENTS``. See `parse and chunk - documents `__ + Specifies the search result mode. If + unspecified, the search result mode defaults to + ``DOCUMENTS``. See `parse and chunk + documents + `__ data_store_specs (MutableSequence[google.cloud.discoveryengine_v1beta.types.SearchRequest.DataStoreSpec]): Specs defining dataStores to filter on in a search call and configurations for those @@ -823,9 +878,11 @@ class UnstructuredDocumentInfo(proto.Message): extractive_segments (MutableSequence[google.cloud.discoveryengine_v1beta.types.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment]): List of extractive segments. extractive_answers (MutableSequence[google.cloud.discoveryengine_v1beta.types.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer]): - Deprecated: This field is deprecated and will have no effect - on the Answer generation. Please use document_contexts and - extractive_segments fields. List of extractive answers. + Deprecated: This field is deprecated and will + have no effect on the Answer generation. + Please use document_contexts and + extractive_segments fields. List of extractive + answers. """ class DocumentContext(proto.Message): @@ -850,9 +907,10 @@ class DocumentContext(proto.Message): class ExtractiveSegment(proto.Message): r"""Extractive segment. - `Guide `__ - Answer generation will only use it if document_contexts is empty. - This is supposed to be shorter snippets. + `Guide + `__ + Answer generation will only use it if document_contexts is + empty. This is supposed to be shorter snippets. Attributes: page_identifier (str): @@ -872,7 +930,8 @@ class ExtractiveSegment(proto.Message): class ExtractiveAnswer(proto.Message): r"""Extractive answer. - `Guide `__ + `Guide + `__ Attributes: page_identifier (str): @@ -1149,22 +1208,28 @@ class QueryRephraserSpec(proto.Message): class AnswerQueryResponse(proto.Message): r"""Response message for - [ConversationalSearchService.AnswerQuery][google.cloud.discoveryengine.v1beta.ConversationalSearchService.AnswerQuery] + `ConversationalSearchService.AnswerQuery + `__ method. Attributes: answer (google.cloud.discoveryengine_v1beta.types.Answer): - Answer resource object. If - [AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.max_rephrase_steps][google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.max_rephrase_steps] + Answer resource object. + If + `AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.max_rephrase_steps + `__ is greater than 1, use - [Answer.name][google.cloud.discoveryengine.v1beta.Answer.name] + `Answer.name + `__ to fetch answer information using - [ConversationalSearchService.GetAnswer][google.cloud.discoveryengine.v1beta.ConversationalSearchService.GetAnswer] + `ConversationalSearchService.GetAnswer + `__ API. session (google.cloud.discoveryengine_v1beta.types.Session): - Session resource object. It will be only available when - session field is set and valid in the - [AnswerQueryRequest][google.cloud.discoveryengine.v1beta.AnswerQueryRequest] + Session resource object. + It will be only available when session field is + set and valid in the `AnswerQueryRequest + `__ request. answer_query_token (str): A global unique ID used for logging. @@ -1191,7 +1256,8 @@ class GetAnswerRequest(proto.Message): Attributes: name (str): - Required. The resource name of the Answer to get. Format: + Required. The resource name of the Answer to + get. Format: ``projects/{project}/locations/{location}/collections/{collection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`` """ @@ -1206,7 +1272,8 @@ class CreateSessionRequest(proto.Message): Attributes: parent (str): - Required. Full resource name of parent data store. Format: + Required. Full resource name of parent data + store. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`` session (google.cloud.discoveryengine_v1beta.types.Session): Required. The session to create. @@ -1231,12 +1298,15 @@ class UpdateSessionRequest(proto.Message): Required. The Session to update. update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided - [Session][google.cloud.discoveryengine.v1beta.Session] to - update. The following are NOT supported: + `Session + `__ + to update. The following are NOT supported: - - [Session.name][google.cloud.discoveryengine.v1beta.Session.name] + * `Session.name + `__ - If not set or empty, all supported fields are updated. + If not set or empty, all supported fields are + updated. """ session: gcd_session.Session = proto.Field( @@ -1256,8 +1326,8 @@ class DeleteSessionRequest(proto.Message): Attributes: name (str): - Required. The resource name of the Session to delete. - Format: + Required. The resource name of the Session to + delete. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`` """ @@ -1272,7 +1342,8 @@ class GetSessionRequest(proto.Message): Attributes: name (str): - Required. The resource name of the Session to get. Format: + Required. The resource name of the Session to + get. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`` include_answer_details (bool): Optional. If set to true, the full session @@ -1301,40 +1372,51 @@ class ListSessionsRequest(proto.Message): unspecified, defaults to 50. Max allowed value is 1000. page_token (str): - A page token, received from a previous ``ListSessions`` - call. Provide this to retrieve the subsequent page. + A page token, received from a previous + ``ListSessions`` call. Provide this to retrieve + the subsequent page. filter (str): - A comma-separated list of fields to filter by, in EBNF - grammar. The supported fields are: - - - ``user_pseudo_id`` - - ``state`` - - ``display_name`` - - ``starred`` - - ``is_pinned`` - - ``labels`` - - ``create_time`` - - ``update_time`` - - Examples: "user_pseudo_id = some_id" "display_name = - "some_name"" "starred = true" "is_pinned=true AND (NOT - labels:hidden)" "create_time > "1970-01-01T12:00:00Z"". + A comma-separated list of fields to filter by, + in EBNF grammar. The supported fields are: + + * ``user_pseudo_id`` + * ``state`` + + * ``display_name`` + * ``starred`` + + * ``is_pinned`` + * ``labels`` + + * ``create_time`` + * ``update_time`` + + Examples: + + "user_pseudo_id = some_id" + "display_name = \"some_name\"" + "starred = true" + "is_pinned=true AND (NOT labels:hidden)" + "create_time > \"1970-01-01T12:00:00Z\"". order_by (str): - A comma-separated list of fields to order by, sorted in - ascending order. Use "desc" after a field name for - descending. Supported fields: + A comma-separated list of fields to order by, + sorted in ascending order. Use "desc" after a + field name for descending. Supported fields: - - ``update_time`` - - ``create_time`` - - ``session_name`` - - ``is_pinned`` + * ``update_time`` + * ``create_time`` + + * ``session_name`` + * ``is_pinned`` Example: - - "update_time desc" - - "create_time" - - "is_pinned desc,update_time desc": list sessions by - is_pinned first, then by update_time. + * "update_time desc" + * "create_time" + + * "is_pinned desc,update_time desc": list + sessions by is_pinned first, then by + update_time. """ parent: str = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/custom_tuning_model.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/custom_tuning_model.py index 6f67d52fa25d..5cd4a04de4e6 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/custom_tuning_model.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/custom_tuning_model.py @@ -33,20 +33,21 @@ class CustomTuningModel(proto.Message): Attributes: name (str): - Required. The fully qualified resource name of the model. - + Required. The fully qualified resource name of + the model. Format: + ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/customTuningModels/{custom_tuning_model}``. - Model must be an alpha-numerical string with limit of 40 - characters. + Model must be an alpha-numerical string with + limit of 40 characters. display_name (str): The display name of the model. model_version (int): The version of the model. model_state (google.cloud.discoveryengine_v1beta.types.CustomTuningModel.ModelState): - The state that the model is in (e.g.\ ``TRAINING`` or - ``TRAINING_FAILED``). + The state that the model is in (e.g.``TRAINING`` + or ``TRAINING_FAILED``). create_time (google.protobuf.timestamp_pb2.Timestamp): Deprecated: Timestamp the Model was created at. @@ -55,8 +56,8 @@ class CustomTuningModel(proto.Message): metrics (MutableMapping[str, float]): The metrics of the trained model. error_message (str): - Currently this is only populated if the model state is - ``INPUT_VALIDATION_FAILED``. + Currently this is only populated if the model + state is ``INPUT_VALIDATION_FAILED``. """ class ModelState(proto.Enum): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/data_store.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/data_store.py index 76f64b5352c7..787bf278bcec 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/data_store.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/data_store.py @@ -43,40 +43,45 @@ class DataStore(proto.Message): Attributes: name (str): - Immutable. The full resource name of the data store. Format: + Immutable. The full resource name of the data + store. Format: + ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}``. - This field must be a UTF-8 encoded string with a length - limit of 1024 characters. + This field must be a UTF-8 encoded string with a + length limit of 1024 characters. display_name (str): Required. The data store display name. - This field must be a UTF-8 encoded string with a length - limit of 128 characters. Otherwise, an INVALID_ARGUMENT - error is returned. + This field must be a UTF-8 encoded string with a + length limit of 128 characters. Otherwise, an + INVALID_ARGUMENT error is returned. industry_vertical (google.cloud.discoveryengine_v1beta.types.IndustryVertical): Immutable. The industry vertical that the data store registers. solution_types (MutableSequence[google.cloud.discoveryengine_v1beta.types.SolutionType]): - The solutions that the data store enrolls. Available - solutions for each - [industry_vertical][google.cloud.discoveryengine.v1beta.DataStore.industry_vertical]: - - - ``MEDIA``: ``SOLUTION_TYPE_RECOMMENDATION`` and - ``SOLUTION_TYPE_SEARCH``. - - ``SITE_SEARCH``: ``SOLUTION_TYPE_SEARCH`` is automatically - enrolled. Other solutions cannot be enrolled. + The solutions that the data store enrolls. + Available solutions for each `industry_vertical + `__: + + * ``MEDIA``: ``SOLUTION_TYPE_RECOMMENDATION`` + and ``SOLUTION_TYPE_SEARCH``. * ``SITE_SEARCH``: + ``SOLUTION_TYPE_SEARCH`` is automatically + enrolled. Other solutions cannot be enrolled. default_schema_id (str): Output only. The id of the default - [Schema][google.cloud.discoveryengine.v1beta.Schema] + `Schema + `__ asscociated to this data store. content_config (google.cloud.discoveryengine_v1beta.types.DataStore.ContentConfig): - Immutable. The content config of the data store. If this - field is unset, the server behavior defaults to - [ContentConfig.NO_CONTENT][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.NO_CONTENT]. + Immutable. The content config of the data store. + If this field is unset, the server behavior + defaults to `ContentConfig.NO_CONTENT + `__. create_time (google.protobuf.timestamp_pb2.Timestamp): Output only. Timestamp the - [DataStore][google.cloud.discoveryengine.v1beta.DataStore] + `DataStore + `__ was created at. language_info (google.cloud.discoveryengine_v1beta.types.LanguageInfo): Language info for DataStore. @@ -87,32 +92,37 @@ class DataStore(proto.Message): Output only. Data size estimation for billing. workspace_config (google.cloud.discoveryengine_v1beta.types.WorkspaceConfig): - Config to store data store type configuration for workspace - data. This must be set when - [DataStore.content_config][google.cloud.discoveryengine.v1beta.DataStore.content_config] + Config to store data store type configuration + for workspace data. This must be set when + `DataStore.content_config + `__ is set as - [DataStore.ContentConfig.GOOGLE_WORKSPACE][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.GOOGLE_WORKSPACE]. + `DataStore.ContentConfig.GOOGLE_WORKSPACE + `__. document_processing_config (google.cloud.discoveryengine_v1beta.types.DocumentProcessingConfig): Configuration for Document understanding and enrichment. starting_schema (google.cloud.discoveryengine_v1beta.types.Schema): The start schema to use for this - [DataStore][google.cloud.discoveryengine.v1beta.DataStore] - when provisioning it. If unset, a default vertical - specialized schema will be used. - - This field is only used by [CreateDataStore][] API, and will - be ignored if used in other APIs. This field will be omitted - from all API responses including [CreateDataStore][] API. To - retrieve a schema of a - [DataStore][google.cloud.discoveryengine.v1beta.DataStore], - use - [SchemaService.GetSchema][google.cloud.discoveryengine.v1beta.SchemaService.GetSchema] + `DataStore + `__ + when provisioning it. If unset, a default + vertical specialized schema will be used. + + This field is only used by [CreateDataStore][] + API, and will be ignored if used in other APIs. + This field will be omitted from all API + responses including [CreateDataStore][] API. To + retrieve a schema of a `DataStore + `__, + use `SchemaService.GetSchema + `__ API instead. - The provided schema will be validated against certain rules - on schema. Learn more from `this - doc `__. + The provided schema will be validated against + certain rules on schema. Learn more from `this + doc + `__. serving_config_data_store (google.cloud.discoveryengine_v1beta.types.DataStore.ServingConfigDataStore): Optional. Stores serving config at DataStore level. @@ -126,17 +136,20 @@ class ContentConfig(proto.Enum): Default value. NO_CONTENT (1): Only contains documents without any - [Document.content][google.cloud.discoveryengine.v1beta.Document.content]. + `Document.content + `__. CONTENT_REQUIRED (2): Only contains documents with - [Document.content][google.cloud.discoveryengine.v1beta.Document.content]. + `Document.content + `__. PUBLIC_WEBSITE (3): The data store is used for public website search. GOOGLE_WORKSPACE (4): - The data store is used for workspace search. Details of - workspace data store are specified in the - [WorkspaceConfig][google.cloud.discoveryengine.v1beta.WorkspaceConfig]. + The data store is used for workspace search. + Details of workspace data store are specified in + the `WorkspaceConfig + `__. """ CONTENT_CONFIG_UNSPECIFIED = 0 NO_CONTENT = 1 @@ -283,17 +296,20 @@ class LanguageInfo(proto.Message): language_code (str): The language code for the DataStore. normalized_language_code (str): - Output only. This is the normalized form of language_code. - E.g.: language_code of ``en-GB``, ``en_GB``, ``en-UK`` or - ``en-gb`` will have normalized_language_code of ``en-GB``. + Output only. This is the normalized form of + language_code. E.g.: language_code of ``en-GB``, + ``en_GB``, ``en-UK`` or ``en-gb`` will have + normalized_language_code of ``en-GB``. language (str): - Output only. Language part of normalized_language_code. - E.g.: ``en-US`` -> ``en``, ``zh-Hans-HK`` -> ``zh``, ``en`` - -> ``en``. + Output only. Language part of + normalized_language_code. E.g.: ``en-US`` -> + ``en``, ``zh-Hans-HK`` -> ``zh``, ``en`` -> + ``en``. region (str): - Output only. Region part of normalized_language_code, if - present. E.g.: ``en-US`` -> ``US``, ``zh-Hans-HK`` -> - ``HK``, ``en`` -> \`\`. + Output only. Region part of + normalized_language_code, if present. E.g.: + ``en-US`` -> ``US``, ``zh-Hans-HK`` -> ``HK``, + ``en`` -> ``. """ language_code: str = proto.Field( @@ -319,9 +335,10 @@ class NaturalLanguageQueryUnderstandingConfig(proto.Message): Attributes: mode (google.cloud.discoveryengine_v1beta.types.NaturalLanguageQueryUnderstandingConfig.Mode): - Mode of Natural Language Query Understanding. If this field - is unset, the behavior defaults to - [NaturalLanguageQueryUnderstandingConfig.Mode.DISABLED][google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig.Mode.DISABLED]. + Mode of Natural Language Query Understanding. If + this field is unset, the behavior defaults to + `NaturalLanguageQueryUnderstandingConfig.Mode.DISABLED + `__. """ class Mode(proto.Enum): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/data_store_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/data_store_service.py index faf087d44736..910ec03627f1 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/data_store_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/data_store_service.py @@ -40,7 +40,8 @@ class CreateDataStoreRequest(proto.Message): r"""Request for - [DataStoreService.CreateDataStore][google.cloud.discoveryengine.v1beta.DataStoreService.CreateDataStore] + `DataStoreService.CreateDataStore + `__ method. Attributes: @@ -48,33 +49,40 @@ class CreateDataStoreRequest(proto.Message): Required. The parent resource name, such as ``projects/{project}/locations/{location}/collections/{collection}``. data_store (google.cloud.discoveryengine_v1beta.types.DataStore): - Required. The - [DataStore][google.cloud.discoveryengine.v1beta.DataStore] + Required. The `DataStore + `__ to create. data_store_id (str): Required. The ID to use for the - [DataStore][google.cloud.discoveryengine.v1beta.DataStore], + `DataStore + `__, which will become the final component of the - [DataStore][google.cloud.discoveryengine.v1beta.DataStore]'s + `DataStore + `__'s resource name. - This field must conform to - `RFC-1034 `__ standard - with a length limit of 63 characters. Otherwise, an - INVALID_ARGUMENT error is returned. + This field must conform to `RFC-1034 + `__ + standard with a length limit of 63 characters. + Otherwise, an INVALID_ARGUMENT error is + returned. create_advanced_site_search (bool): - A boolean flag indicating whether user want to directly - create an advanced data store for site search. If the data - store is not configured as site search (GENERIC vertical and - PUBLIC_WEBSITE content_config), this flag will be ignored. + A boolean flag indicating whether user want to + directly create an advanced data store for site + search. If the data store is not configured as + site + search (GENERIC vertical and PUBLIC_WEBSITE + content_config), this flag will be ignored. skip_default_schema_creation (bool): - A boolean flag indicating whether to skip the default schema - creation for the data store. Only enable this flag if you - are certain that the default schema is incompatible with - your use case. + A boolean flag indicating whether to skip the + default schema creation for the data store. Only + enable this flag if you are certain that the + default schema is incompatible with your use + case. - If set to true, you must manually create a schema for the - data store before any documents can be ingested. + If set to true, you must manually create a + schema for the data store before any documents + can be ingested. This flag cannot be specified if ``data_store.starting_schema`` is specified. @@ -105,23 +113,26 @@ class CreateDataStoreRequest(proto.Message): class GetDataStoreRequest(proto.Message): r"""Request message for - [DataStoreService.GetDataStore][google.cloud.discoveryengine.v1beta.DataStoreService.GetDataStore] + `DataStoreService.GetDataStore + `__ method. Attributes: name (str): Required. Full resource name of - [DataStore][google.cloud.discoveryengine.v1beta.DataStore], + `DataStore + `__, such as ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}``. - If the caller does not have permission to access the - [DataStore][google.cloud.discoveryengine.v1beta.DataStore], - regardless of whether or not it exists, a PERMISSION_DENIED - error is returned. + If the caller does not have permission to access + the `DataStore + `__, + regardless of whether or not it exists, a + PERMISSION_DENIED error is returned. - If the requested - [DataStore][google.cloud.discoveryengine.v1beta.DataStore] + If the requested `DataStore + `__ does not exist, a NOT_FOUND error is returned. """ @@ -133,7 +144,8 @@ class GetDataStoreRequest(proto.Message): class CreateDataStoreMetadata(proto.Message): r"""Metadata related to the progress of the - [DataStoreService.CreateDataStore][google.cloud.discoveryengine.v1beta.DataStoreService.CreateDataStore] + `DataStoreService.CreateDataStore + `__ operation. This will be returned by the google.longrunning.Operation.metadata field. @@ -159,39 +171,52 @@ class CreateDataStoreMetadata(proto.Message): class ListDataStoresRequest(proto.Message): r"""Request message for - [DataStoreService.ListDataStores][google.cloud.discoveryengine.v1beta.DataStoreService.ListDataStores] + `DataStoreService.ListDataStores + `__ method. Attributes: parent (str): - Required. The parent branch resource name, such as + Required. The parent branch resource name, such + as ``projects/{project}/locations/{location}/collections/{collection_id}``. If the caller does not have permission to list - [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s - under this location, regardless of whether or not this data - store exists, a PERMISSION_DENIED error is returned. + `DataStore + `__s + under this location, regardless of whether or + not this data store exists, a PERMISSION_DENIED + error is returned. page_size (int): Maximum number of - [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s - to return. If unspecified, defaults to 10. The maximum - allowed value is 50. Values above 50 will be coerced to 50. - - If this field is negative, an INVALID_ARGUMENT is returned. + `DataStore + `__s + to return. If unspecified, defaults to 10. The + maximum allowed value is 50. Values above 50 + will be coerced to 50. + + If this field is negative, an INVALID_ARGUMENT + is returned. page_token (str): A page token - [ListDataStoresResponse.next_page_token][google.cloud.discoveryengine.v1beta.ListDataStoresResponse.next_page_token], + `ListDataStoresResponse.next_page_token + `__, received from a previous - [DataStoreService.ListDataStores][google.cloud.discoveryengine.v1beta.DataStoreService.ListDataStores] - call. Provide this to retrieve the subsequent page. - - When paginating, all other parameters provided to - [DataStoreService.ListDataStores][google.cloud.discoveryengine.v1beta.DataStoreService.ListDataStores] - must match the call that provided the page token. Otherwise, - an INVALID_ARGUMENT error is returned. + `DataStoreService.ListDataStores + `__ + call. Provide this to retrieve the subsequent + page. + + When paginating, all other parameters provided + to `DataStoreService.ListDataStores + `__ + must match the call that provided the page + token. Otherwise, an INVALID_ARGUMENT error is + returned. filter (str): - Filter by solution type . For example: - ``filter = 'solution_type:SOLUTION_TYPE_SEARCH'`` + Filter by solution type . + For example: ``filter = + 'solution_type:SOLUTION_TYPE_SEARCH'`` """ parent: str = proto.Field( @@ -214,18 +239,21 @@ class ListDataStoresRequest(proto.Message): class ListDataStoresResponse(proto.Message): r"""Response message for - [DataStoreService.ListDataStores][google.cloud.discoveryengine.v1beta.DataStoreService.ListDataStores] + `DataStoreService.ListDataStores + `__ method. Attributes: data_stores (MutableSequence[google.cloud.discoveryengine_v1beta.types.DataStore]): All the customer's - [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s. + `DataStore + `__s. next_page_token (str): A token that can be sent as - [ListDataStoresRequest.page_token][google.cloud.discoveryengine.v1beta.ListDataStoresRequest.page_token] - to retrieve the next page. If this field is omitted, there - are no subsequent pages. + `ListDataStoresRequest.page_token + `__ + to retrieve the next page. If this field is + omitted, there are no subsequent pages. """ @property @@ -245,24 +273,28 @@ def raw_page(self): class DeleteDataStoreRequest(proto.Message): r"""Request message for - [DataStoreService.DeleteDataStore][google.cloud.discoveryengine.v1beta.DataStoreService.DeleteDataStore] + `DataStoreService.DeleteDataStore + `__ method. Attributes: name (str): Required. Full resource name of - [DataStore][google.cloud.discoveryengine.v1beta.DataStore], + `DataStore + `__, such as ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}``. - If the caller does not have permission to delete the - [DataStore][google.cloud.discoveryengine.v1beta.DataStore], - regardless of whether or not it exists, a PERMISSION_DENIED - error is returned. + If the caller does not have permission to delete + the `DataStore + `__, + regardless of whether or not it exists, a + PERMISSION_DENIED error is returned. - If the - [DataStore][google.cloud.discoveryengine.v1beta.DataStore] - to delete does not exist, a NOT_FOUND error is returned. + If the `DataStore + `__ + to delete does not exist, a NOT_FOUND error is + returned. """ name: str = proto.Field( @@ -273,30 +305,34 @@ class DeleteDataStoreRequest(proto.Message): class UpdateDataStoreRequest(proto.Message): r"""Request message for - [DataStoreService.UpdateDataStore][google.cloud.discoveryengine.v1beta.DataStoreService.UpdateDataStore] + `DataStoreService.UpdateDataStore + `__ method. Attributes: data_store (google.cloud.discoveryengine_v1beta.types.DataStore): - Required. The - [DataStore][google.cloud.discoveryengine.v1beta.DataStore] + Required. The `DataStore + `__ to update. - If the caller does not have permission to update the - [DataStore][google.cloud.discoveryengine.v1beta.DataStore], - regardless of whether or not it exists, a PERMISSION_DENIED - error is returned. + If the caller does not have permission to update + the `DataStore + `__, + regardless of whether or not it exists, a + PERMISSION_DENIED error is returned. - If the - [DataStore][google.cloud.discoveryengine.v1beta.DataStore] - to update does not exist, a NOT_FOUND error is returned. + If the `DataStore + `__ + to update does not exist, a NOT_FOUND error is + returned. update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided - [DataStore][google.cloud.discoveryengine.v1beta.DataStore] + `DataStore + `__ to update. - If an unsupported or unknown field is provided, an - INVALID_ARGUMENT error is returned. + If an unsupported or unknown field is provided, + an INVALID_ARGUMENT error is returned. """ data_store: gcd_data_store.DataStore = proto.Field( @@ -313,7 +349,8 @@ class UpdateDataStoreRequest(proto.Message): class DeleteDataStoreMetadata(proto.Message): r"""Metadata related to the progress of the - [DataStoreService.DeleteDataStore][google.cloud.discoveryengine.v1beta.DataStoreService.DeleteDataStore] + `DataStoreService.DeleteDataStore + `__ operation. This will be returned by the google.longrunning.Operation.metadata field. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/document.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/document.py index d673a125fca2..134322edc26e 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/document.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/document.py @@ -43,63 +43,69 @@ class Document(proto.Message): Attributes: struct_data (google.protobuf.struct_pb2.Struct): - The structured JSON data for the document. It should conform - to the registered - [Schema][google.cloud.discoveryengine.v1beta.Schema] or an - ``INVALID_ARGUMENT`` error is thrown. + The structured JSON data for the document. It + should conform to the registered `Schema + `__ + or an ``INVALID_ARGUMENT`` error is thrown. This field is a member of `oneof`_ ``data``. json_data (str): - The JSON string representation of the document. It should - conform to the registered - [Schema][google.cloud.discoveryengine.v1beta.Schema] or an - ``INVALID_ARGUMENT`` error is thrown. + The JSON string representation of the document. + It should conform to the registered `Schema + `__ + or an ``INVALID_ARGUMENT`` error is thrown. This field is a member of `oneof`_ ``data``. name (str): - Immutable. The full resource name of the document. Format: + Immutable. The full resource name of the + document. Format: + ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}``. - This field must be a UTF-8 encoded string with a length - limit of 1024 characters. + This field must be a UTF-8 encoded string with a + length limit of 1024 characters. id (str): Immutable. The identifier of the document. - Id should conform to - `RFC-1034 `__ standard - with a length limit of 63 characters. + Id should conform to `RFC-1034 + `__ + standard with a length limit of 63 characters. schema_id (str): The identifier of the schema located in the same data store. content (google.cloud.discoveryengine_v1beta.types.Document.Content): - The unstructured data linked to this document. Content must - be set if this document is under a ``CONTENT_REQUIRED`` data - store. + The unstructured data linked to this document. + Content must be set if this document is under a + ``CONTENT_REQUIRED`` data store. parent_document_id (str): - The identifier of the parent document. Currently supports at - most two level document hierarchy. + The identifier of the parent document. Currently + supports at most two level document hierarchy. - Id should conform to - `RFC-1034 `__ standard - with a length limit of 63 characters. + Id should conform to `RFC-1034 + `__ + standard with a length limit of 63 characters. derived_struct_data (google.protobuf.struct_pb2.Struct): - Output only. This field is OUTPUT_ONLY. It contains derived - data that are not in the original input document. + Output only. This field is OUTPUT_ONLY. + It contains derived data that are not in the + original input document. index_time (google.protobuf.timestamp_pb2.Timestamp): - Output only. The last time the document was indexed. If this - field is set, the document could be returned in search - results. + Output only. The last time the document was + indexed. If this field is set, the document + could be returned in search results. - This field is OUTPUT_ONLY. If this field is not populated, - it means the document has never been indexed. + This field is OUTPUT_ONLY. If this field is not + populated, it means the document has never been + indexed. index_status (google.cloud.discoveryengine_v1beta.types.Document.IndexStatus): Output only. The index status of the document. - - If document is indexed successfully, the index_time field - is populated. - - Otherwise, if document is not indexed due to errors, the - error_samples field is populated. - - Otherwise, index_status is unset. + * If document is indexed successfully, the + index_time field is populated. + + * Otherwise, if document is not indexed due to + errors, the error_samples field is populated. + + * Otherwise, index_status is unset. """ class Content(proto.Message): @@ -114,35 +120,40 @@ class Content(proto.Message): Attributes: raw_bytes (bytes): - The content represented as a stream of bytes. The maximum - length is 1,000,000 bytes (1 MB / ~0.95 MiB). - - Note: As with all ``bytes`` fields, this field is - represented as pure binary in Protocol Buffers and - base64-encoded string in JSON. For example, - ``abc123!?$*&()'-=@~`` should be represented as - ``YWJjMTIzIT8kKiYoKSctPUB+`` in JSON. See + The content represented as a stream of bytes. + The maximum length is 1,000,000 bytes (1 MB / + ~0.95 MiB). + + Note: As with all ``bytes`` fields, this field + is represented as pure binary in Protocol + Buffers and base64-encoded string in JSON. For + example, ``abc123!?$*&()'-=@~`` should be + represented as ``YWJjMTIzIT8kKiYoKSctPUB+`` in + JSON. See https://developers.google.com/protocol-buffers/docs/proto3#json. This field is a member of `oneof`_ ``content``. uri (str): - The URI of the content. Only Cloud Storage URIs (e.g. - ``gs://bucket-name/path/to/file``) are supported. The - maximum file size is 2.5 MB for text-based formats, 200 MB - for other formats. + The URI of the content. Only Cloud Storage URIs + (e.g. ``gs://bucket-name/path/to/file``) are + supported. The maximum file size is 2.5 MB for + text-based formats, 200 MB for other formats. This field is a member of `oneof`_ ``content``. mime_type (str): The MIME type of the content. Supported types: - - ``application/pdf`` (PDF, only native PDFs are supported - for now) - - ``text/html`` (HTML) - - ``application/vnd.openxmlformats-officedocument.wordprocessingml.document`` - (DOCX) - - ``application/vnd.openxmlformats-officedocument.presentationml.presentation`` - (PPTX) - - ``text/plain`` (TXT) + * ``application/pdf`` (PDF, only native PDFs are + supported for now) + + * ``text/html`` (HTML) + * + ``application/vnd.openxmlformats-officedocument.wordprocessingml.document`` + (DOCX) + + * + ``application/vnd.openxmlformats-officedocument.presentationml.presentation`` + (PPTX) * ``text/plain`` (TXT) See https://www.iana.org/assignments/media-types/media-types.xhtml. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/document_processing_config.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/document_processing_config.py index d5840f2ac08f..1f865b1c094a 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/document_processing_config.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/document_processing_config.py @@ -29,18 +29,20 @@ class DocumentProcessingConfig(proto.Message): r"""A singleton resource of - [DataStore][google.cloud.discoveryengine.v1beta.DataStore]. If it's - empty when - [DataStore][google.cloud.discoveryengine.v1beta.DataStore] is - created and - [DataStore][google.cloud.discoveryengine.v1beta.DataStore] is set to - [DataStore.ContentConfig.CONTENT_REQUIRED][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.CONTENT_REQUIRED], + `DataStore `__. + If it's empty when `DataStore + `__ is created + and `DataStore + `__ is set to + `DataStore.ContentConfig.CONTENT_REQUIRED + `__, the default parser will default to digital parser. Attributes: name (str): - The full resource name of the Document Processing Config. - Format: + The full resource name of the Document + Processing Config. Format: + ``projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig``. chunking_config (google.cloud.discoveryengine_v1beta.types.DocumentProcessingConfig.ChunkingConfig): Whether chunking mode is enabled. @@ -51,22 +53,33 @@ class DocumentProcessingConfig(proto.Message): parsing config will be applied to all file types for Document parsing. parsing_config_overrides (MutableMapping[str, google.cloud.discoveryengine_v1beta.types.DocumentProcessingConfig.ParsingConfig]): - Map from file type to override the default parsing - configuration based on the file type. Supported keys: - - - ``pdf``: Override parsing config for PDF files, either - digital parsing, ocr parsing or layout parsing is - supported. - - ``html``: Override parsing config for HTML files, only - digital parsing and layout parsing are supported. - - ``docx``: Override parsing config for DOCX files, only - digital parsing and layout parsing are supported. - - ``pptx``: Override parsing config for PPTX files, only - digital parsing and layout parsing are supported. - - ``xlsm``: Override parsing config for XLSM files, only - digital parsing and layout parsing are supported. - - ``xlsx``: Override parsing config for XLSX files, only - digital parsing and layout parsing are supported. + Map from file type to override the default + parsing configuration based on the file type. + Supported keys: + + * ``pdf``: Override parsing config for PDF + files, either digital parsing, ocr parsing or + layout parsing is supported. + + * ``html``: Override parsing config for HTML + files, only digital parsing and layout parsing + are supported. + + * ``docx``: Override parsing config for DOCX + files, only digital parsing and layout parsing + are supported. + + * ``pptx``: Override parsing config for PPTX + files, only digital parsing and layout parsing + are supported. + + * ``xlsm``: Override parsing config for XLSM + files, only digital parsing and layout parsing + are supported. + + * ``xlsx``: Override parsing config for XLSX + files, only digital parsing and layout parsing + are supported. """ class ChunkingConfig(proto.Message): @@ -149,8 +162,9 @@ class OcrParsingConfig(proto.Message): Attributes: enhanced_document_elements (MutableSequence[str]): - [DEPRECATED] This field is deprecated. To use the additional - enhanced document elements processing, please switch to + [DEPRECATED] This field is deprecated. To use + the additional enhanced document elements + processing, please switch to ``layout_parsing_config``. use_native_text (bool): If true, will use native text instead of OCR diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/document_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/document_service.py index 35a4e549e55b..25644771f39b 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/document_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/document_service.py @@ -40,24 +40,28 @@ class GetDocumentRequest(proto.Message): r"""Request message for - [DocumentService.GetDocument][google.cloud.discoveryengine.v1beta.DocumentService.GetDocument] + `DocumentService.GetDocument + `__ method. Attributes: name (str): Required. Full resource name of - [Document][google.cloud.discoveryengine.v1beta.Document], + `Document + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}``. - If the caller does not have permission to access the - [Document][google.cloud.discoveryengine.v1beta.Document], + If the caller does not have permission to access + the `Document + `__, regardless of whether or not it exists, a ``PERMISSION_DENIED`` error is returned. - If the requested - [Document][google.cloud.discoveryengine.v1beta.Document] - does not exist, a ``NOT_FOUND`` error is returned. + If the requested `Document + `__ + does not exist, a ``NOT_FOUND`` error is + returned. """ name: str = proto.Field( @@ -68,39 +72,49 @@ class GetDocumentRequest(proto.Message): class ListDocumentsRequest(proto.Message): r"""Request message for - [DocumentService.ListDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments] + `DocumentService.ListDocuments + `__ method. Attributes: parent (str): - Required. The parent branch resource name, such as + Required. The parent branch resource name, such + as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}``. - Use ``default_branch`` as the branch ID, to list documents - under the default branch. + Use ``default_branch`` as the branch ID, to list + documents under the default branch. If the caller does not have permission to list - [Document][google.cloud.discoveryengine.v1beta.Document]s - under this branch, regardless of whether or not this branch - exists, a ``PERMISSION_DENIED`` error is returned. + `Document + `__s + under this branch, regardless of whether or not + this branch exists, a ``PERMISSION_DENIED`` + error is returned. page_size (int): - Maximum number of - [Document][google.cloud.discoveryengine.v1beta.Document]s to - return. If unspecified, defaults to 100. The maximum allowed - value is 1000. Values above 1000 are set to 1000. + Maximum number of `Document + `__s + to return. If unspecified, defaults to 100. The + maximum allowed value is + 1000. Values above 1000 are set to 1000. - If this field is negative, an ``INVALID_ARGUMENT`` error is - returned. + If this field is negative, an + ``INVALID_ARGUMENT`` error is returned. page_token (str): A page token - [ListDocumentsResponse.next_page_token][google.cloud.discoveryengine.v1beta.ListDocumentsResponse.next_page_token], + `ListDocumentsResponse.next_page_token + `__, received from a previous - [DocumentService.ListDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments] - call. Provide this to retrieve the subsequent page. - - When paginating, all other parameters provided to - [DocumentService.ListDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments] - must match the call that provided the page token. Otherwise, - an ``INVALID_ARGUMENT`` error is returned. + `DocumentService.ListDocuments + `__ + call. Provide this to retrieve the subsequent + page. + + When paginating, all other parameters provided + to `DocumentService.ListDocuments + `__ + must match the call that provided the page + token. Otherwise, an ``INVALID_ARGUMENT`` error + is returned. """ parent: str = proto.Field( @@ -119,18 +133,20 @@ class ListDocumentsRequest(proto.Message): class ListDocumentsResponse(proto.Message): r"""Response message for - [DocumentService.ListDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments] + `DocumentService.ListDocuments + `__ method. Attributes: documents (MutableSequence[google.cloud.discoveryengine_v1beta.types.Document]): - The - [Document][google.cloud.discoveryengine.v1beta.Document]s. + The `Document + `__s. next_page_token (str): A token that can be sent as - [ListDocumentsRequest.page_token][google.cloud.discoveryengine.v1beta.ListDocumentsRequest.page_token] - to retrieve the next page. If this field is omitted, there - are no subsequent pages. + `ListDocumentsRequest.page_token + `__ + to retrieve the next page. If this field is + omitted, there are no subsequent pages. """ @property @@ -150,7 +166,8 @@ def raw_page(self): class CreateDocumentRequest(proto.Message): r"""Request message for - [DocumentService.CreateDocument][google.cloud.discoveryengine.v1beta.DocumentService.CreateDocument] + `DocumentService.CreateDocument + `__ method. Attributes: @@ -158,30 +175,36 @@ class CreateDocumentRequest(proto.Message): Required. The parent resource name, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}``. document (google.cloud.discoveryengine_v1beta.types.Document): - Required. The - [Document][google.cloud.discoveryengine.v1beta.Document] to - create. + Required. The `Document + `__ + to create. document_id (str): Required. The ID to use for the - [Document][google.cloud.discoveryengine.v1beta.Document], + `Document + `__, which becomes the final component of the - [Document.name][google.cloud.discoveryengine.v1beta.Document.name]. + `Document.name + `__. - If the caller does not have permission to create the - [Document][google.cloud.discoveryengine.v1beta.Document], + If the caller does not have permission to create + the `Document + `__, regardless of whether or not it exists, a ``PERMISSION_DENIED`` error is returned. This field must be unique among all - [Document][google.cloud.discoveryengine.v1beta.Document]s - with the same - [parent][google.cloud.discoveryengine.v1beta.CreateDocumentRequest.parent]. - Otherwise, an ``ALREADY_EXISTS`` error is returned. - - This field must conform to - `RFC-1034 `__ standard - with a length limit of 63 characters. Otherwise, an - ``INVALID_ARGUMENT`` error is returned. + `Document + `__s + with the same `parent + `__. + Otherwise, an ``ALREADY_EXISTS`` error is + returned. + + This field must conform to `RFC-1034 + `__ + standard with a length limit of 63 characters. + Otherwise, an ``INVALID_ARGUMENT`` error is + returned. """ parent: str = proto.Field( @@ -201,29 +224,33 @@ class CreateDocumentRequest(proto.Message): class UpdateDocumentRequest(proto.Message): r"""Request message for - [DocumentService.UpdateDocument][google.cloud.discoveryengine.v1beta.DocumentService.UpdateDocument] + `DocumentService.UpdateDocument + `__ method. Attributes: document (google.cloud.discoveryengine_v1beta.types.Document): Required. The document to update/create. - If the caller does not have permission to update the - [Document][google.cloud.discoveryengine.v1beta.Document], + If the caller does not have permission to update + the `Document + `__, regardless of whether or not it exists, a ``PERMISSION_DENIED`` error is returned. - If the - [Document][google.cloud.discoveryengine.v1beta.Document] to - update does not exist and - [allow_missing][google.cloud.discoveryengine.v1beta.UpdateDocumentRequest.allow_missing] + If the `Document + `__ + to update does not exist and + `allow_missing + `__ is not set, a ``NOT_FOUND`` error is returned. allow_missing (bool): If set to ``true`` and the - [Document][google.cloud.discoveryengine.v1beta.Document] is - not found, a new - [Document][google.cloud.discoveryengine.v1beta.Document] is - be created. + `Document + `__ + is not found, a new `Document + `__ + is be created. update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided imported 'document' to update. If not set, by @@ -248,24 +275,28 @@ class UpdateDocumentRequest(proto.Message): class DeleteDocumentRequest(proto.Message): r"""Request message for - [DocumentService.DeleteDocument][google.cloud.discoveryengine.v1beta.DocumentService.DeleteDocument] + `DocumentService.DeleteDocument + `__ method. Attributes: name (str): Required. Full resource name of - [Document][google.cloud.discoveryengine.v1beta.Document], + `Document + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}``. - If the caller does not have permission to delete the - [Document][google.cloud.discoveryengine.v1beta.Document], + If the caller does not have permission to delete + the `Document + `__, regardless of whether or not it exists, a ``PERMISSION_DENIED`` error is returned. - If the - [Document][google.cloud.discoveryengine.v1beta.Document] to - delete does not exist, a ``NOT_FOUND`` error is returned. + If the `Document + `__ + to delete does not exist, a ``NOT_FOUND`` error + is returned. """ name: str = proto.Field( @@ -276,21 +307,24 @@ class DeleteDocumentRequest(proto.Message): class BatchGetDocumentsMetadataRequest(proto.Message): r"""Request message for - [DocumentService.BatchGetDocumentsMetadata][google.cloud.discoveryengine.v1beta.DocumentService.BatchGetDocumentsMetadata] + `DocumentService.BatchGetDocumentsMetadata + `__ method. Attributes: parent (str): - Required. The parent branch resource name, such as + Required. The parent branch resource name, such + as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}``. matcher (google.cloud.discoveryengine_v1beta.types.BatchGetDocumentsMetadataRequest.Matcher): Required. Matcher for the - [Document][google.cloud.discoveryengine.v1beta.Document]s. + `Document + `__s. """ class UrisMatcher(proto.Message): - r"""Matcher for the - [Document][google.cloud.discoveryengine.v1beta.Document]s by exact + r"""Matcher for the `Document + `__s by exact uris. Attributes: @@ -304,13 +338,15 @@ class UrisMatcher(proto.Message): ) class FhirMatcher(proto.Message): - r"""Matcher for the - [Document][google.cloud.discoveryengine.v1beta.Document]s by FHIR + r"""Matcher for the `Document + `__s by FHIR resource names. Attributes: fhir_resources (MutableSequence[str]): - Required. The FHIR resources to match by. Format: + Required. The FHIR resources to match by. + Format: + projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}/fhir/{resource_type}/{fhir_resource_id} """ @@ -320,8 +356,8 @@ class FhirMatcher(proto.Message): ) class Matcher(proto.Message): - r"""Matcher for the - [Document][google.cloud.discoveryengine.v1beta.Document]s. Currently + r"""Matcher for the `Document + `__s. Currently supports matching by exact URIs. This message has `oneof`_ fields (mutually exclusive fields). @@ -368,31 +404,37 @@ class Matcher(proto.Message): class BatchGetDocumentsMetadataResponse(proto.Message): r"""Response message for - [DocumentService.BatchGetDocumentsMetadata][google.cloud.discoveryengine.v1beta.DocumentService.BatchGetDocumentsMetadata] + `DocumentService.BatchGetDocumentsMetadata + `__ method. Attributes: documents_metadata (MutableSequence[google.cloud.discoveryengine_v1beta.types.BatchGetDocumentsMetadataResponse.DocumentMetadata]): The metadata of the - [Document][google.cloud.discoveryengine.v1beta.Document]s. + `Document + `__s. """ class State(proto.Enum): - r"""The state of the - [Document][google.cloud.discoveryengine.v1beta.Document]. + r"""The state of the `Document + `__. Values: STATE_UNSPECIFIED (0): Should never be set. INDEXED (1): - The [Document][google.cloud.discoveryengine.v1beta.Document] + The `Document + `__ is indexed. NOT_IN_TARGET_SITE (2): - The [Document][google.cloud.discoveryengine.v1beta.Document] + The `Document + `__ is not indexed because its URI is not in the - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite]. + `TargetSite + `__. NOT_IN_INDEX (3): - The [Document][google.cloud.discoveryengine.v1beta.Document] + The `Document + `__ is not indexed. """ STATE_UNSPECIFIED = 0 @@ -401,34 +443,36 @@ class State(proto.Enum): NOT_IN_INDEX = 3 class DocumentMetadata(proto.Message): - r"""The metadata of a - [Document][google.cloud.discoveryengine.v1beta.Document]. + r"""The metadata of a `Document + `__. Attributes: matcher_value (google.cloud.discoveryengine_v1beta.types.BatchGetDocumentsMetadataResponse.DocumentMetadata.MatcherValue): - The value of the matcher that was used to match the - [Document][google.cloud.discoveryengine.v1beta.Document]. + The value of the matcher that was used to match + the `Document + `__. state (google.cloud.discoveryengine_v1beta.types.BatchGetDocumentsMetadataResponse.State): The state of the document. last_refreshed_time (google.protobuf.timestamp_pb2.Timestamp): The timestamp of the last time the - [Document][google.cloud.discoveryengine.v1beta.Document] was - last indexed. + `Document + `__ + was last indexed. data_ingestion_source (str): The data ingestion source of the - [Document][google.cloud.discoveryengine.v1beta.Document]. + `Document + `__. Allowed values are: - - ``batch``: Data ingested via Batch API, e.g., - ImportDocuments. - - ``streaming`` Data ingested via Streaming API, e.g., FHIR - streaming. + * ``batch``: Data ingested via Batch API, e.g., + ImportDocuments. * ``streaming`` Data ingested + via Streaming API, e.g., FHIR streaming. """ class MatcherValue(proto.Message): r"""The value of the matcher that was used to match the - [Document][google.cloud.discoveryengine.v1beta.Document]. + `Document `__. This message has `oneof`_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. @@ -440,11 +484,13 @@ class MatcherValue(proto.Message): Attributes: uri (str): If match by URI, the URI of the - [Document][google.cloud.discoveryengine.v1beta.Document]. + `Document + `__. This field is a member of `oneof`_ ``matcher_value``. fhir_resource (str): Format: + projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}/fhir/{resource_type}/{fhir_resource_id} This field is a member of `oneof`_ ``matcher_value``. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/engine.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/engine.py index ae9bd23a98af..896d7fe52521 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/engine.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/engine.py @@ -31,8 +31,8 @@ class Engine(proto.Message): - r"""Metadata that describes the training and serving parameters of an - [Engine][google.cloud.discoveryengine.v1beta.Engine]. + r"""Metadata that describes the training and serving parameters of + an `Engine `__. This message has `oneof`_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. @@ -43,38 +43,46 @@ class Engine(proto.Message): Attributes: chat_engine_config (google.cloud.discoveryengine_v1beta.types.Engine.ChatEngineConfig): - Configurations for the Chat Engine. Only applicable if - [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type] + Configurations for the Chat Engine. Only + applicable if `solution_type + `__ is - [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT]. + `SOLUTION_TYPE_CHAT + `__. This field is a member of `oneof`_ ``engine_config``. search_engine_config (google.cloud.discoveryengine_v1beta.types.Engine.SearchEngineConfig): - Configurations for the Search Engine. Only applicable if - [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type] + Configurations for the Search Engine. Only + applicable if `solution_type + `__ is - [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH]. + `SOLUTION_TYPE_SEARCH + `__. This field is a member of `oneof`_ ``engine_config``. chat_engine_metadata (google.cloud.discoveryengine_v1beta.types.Engine.ChatEngineMetadata): - Output only. Additional information of the Chat Engine. Only - applicable if - [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type] + Output only. Additional information of the Chat + Engine. Only applicable if + `solution_type + `__ is - [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT]. + `SOLUTION_TYPE_CHAT + `__. This field is a member of `oneof`_ ``engine_metadata``. name (str): - Immutable. The fully qualified resource name of the engine. - - This field must be a UTF-8 encoded string with a length - limit of 1024 characters. + Immutable. The fully qualified resource name of + the engine. + This field must be a UTF-8 encoded string with a + length limit of 1024 characters. Format: + ``projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`` - engine should be 1-63 characters, and valid characters are - /[a-z0-9][a-z0-9-\_]*/. Otherwise, an INVALID_ARGUMENT error - is returned. + engine should be 1-63 characters, and valid + characters are /`a-z0-9 `__*/. + Otherwise, an INVALID_ARGUMENT error is + returned. display_name (str): Required. The display name of the engine. Should be human readable. UTF-8 encoded string @@ -89,34 +97,41 @@ class Engine(proto.Message): The data stores associated with this engine. For - [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH] + `SOLUTION_TYPE_SEARCH + `__ and - [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION] - type of engines, they can only associate with at most one - data store. + `SOLUTION_TYPE_RECOMMENDATION + `__ + type of engines, they can only associate with at + most one data store. If - [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type] + `solution_type + `__ is - [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT], - multiple - [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s - in the same - [Collection][google.cloud.discoveryengine.v1beta.Collection] + `SOLUTION_TYPE_CHAT + `__, + multiple `DataStore + `__s + in the same `Collection + `__ can be associated here. Note that when used in - [CreateEngineRequest][google.cloud.discoveryengine.v1beta.CreateEngineRequest], - one DataStore id must be provided as the system will use it - for necessary initializations. + `CreateEngineRequest + `__, + one DataStore id must be provided as the system + will use it for necessary initializations. solution_type (google.cloud.discoveryengine_v1beta.types.SolutionType): Required. The solutions of the engine. industry_vertical (google.cloud.discoveryengine_v1beta.types.IndustryVertical): - The industry vertical that the engine registers. The - restriction of the Engine industry vertical is based on - [DataStore][google.cloud.discoveryengine.v1beta.DataStore]: - If unspecified, default to ``GENERIC``. Vertical on Engine - has to match vertical of the DataStore linked to the engine. + The industry vertical that the engine registers. + The restriction of the Engine industry vertical + is based on `DataStore + `__: + If unspecified, default to ``GENERIC``. Vertical + on Engine has to match vertical of the DataStore + linked to the engine. common_config (google.cloud.discoveryengine_v1beta.types.Engine.CommonConfig): Common config spec that specifies the metadata of the engine. @@ -132,11 +147,13 @@ class SearchEngineConfig(proto.Message): search_tier (google.cloud.discoveryengine_v1beta.types.SearchTier): The search feature tier of this engine. - Different tiers might have different pricing. To learn more, - check the pricing documentation. + Different tiers might have different + pricing. To learn more, check the pricing + documentation. Defaults to - [SearchTier.SEARCH_TIER_STANDARD][google.cloud.discoveryengine.v1beta.SearchTier.SEARCH_TIER_STANDARD] + `SearchTier.SEARCH_TIER_STANDARD + `__ if not specified. search_add_ons (MutableSequence[google.cloud.discoveryengine_v1beta.types.SearchAddOn]): The add-on that this search engine enables. @@ -158,44 +175,53 @@ class ChatEngineConfig(proto.Message): Attributes: agent_creation_config (google.cloud.discoveryengine_v1beta.types.Engine.ChatEngineConfig.AgentCreationConfig): - The configurationt generate the Dialogflow agent that is - associated to this Engine. - - Note that these configurations are one-time consumed by and - passed to Dialogflow service. It means they cannot be - retrieved using - [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine] + The configurationt generate the Dialogflow agent + that is associated to this Engine. + + Note that these configurations are one-time + consumed by and passed to Dialogflow service. It + means they cannot be retrieved using + `EngineService.GetEngine + `__ or - [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines] + `EngineService.ListEngines + `__ API after engine creation. dialogflow_agent_to_link (str): - The resource name of an exist Dialogflow agent to link to - this Chat Engine. Customers can either provide - ``agent_creation_config`` to create agent or provide an - agent name that links the agent with the Chat engine. - - Format: - ``projects//locations//agents/``. - - Note that the ``dialogflow_agent_to_link`` are one-time - consumed by and passed to Dialogflow service. It means they - cannot be retrieved using - [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine] + The resource name of an exist Dialogflow agent + to link to this Chat Engine. Customers can + either provide ``agent_creation_config`` to + create agent or provide an agent name that links + the agent with the Chat engine. + + Format: ``projects//locations//agents/``. + + Note that the ``dialogflow_agent_to_link`` are + one-time consumed by and passed to Dialogflow + service. It means they cannot be retrieved using + `EngineService.GetEngine + `__ or - [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines] + `EngineService.ListEngines + `__ API after engine creation. Use - [ChatEngineMetadata.dialogflow_agent][google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata.dialogflow_agent] - for actual agent association after Engine is created. + `ChatEngineMetadata.dialogflow_agent + `__ + for actual agent association after Engine is + created. """ class AgentCreationConfig(proto.Message): r"""Configurations for generating a Dialogflow agent. - Note that these configurations are one-time consumed by and passed - to Dialogflow service. It means they cannot be retrieved using - [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine] + Note that these configurations are one-time consumed by and + passed to Dialogflow service. It means they cannot be retrieved + using `EngineService.GetEngine + `__ or - [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines] + `EngineService.ListEngines + `__ API after engine creation. Attributes: @@ -205,13 +231,16 @@ class AgentCreationConfig(proto.Message): knowledge connector LLM prompt and for knowledge search. default_language_code (str): - Required. The default language of the agent as a language - tag. See `Language - Support `__ - for a list of the currently supported language codes. + Required. The default language of the agent as a + language tag. See `Language + Support + `__ + for a list of the currently supported language + codes. time_zone (str): - Required. The time zone of the agent from the `time zone - database `__, e.g., + Required. The time zone of the agent from the + `time zone database + `__, e.g., America/New_York, Europe/Paris. location (str): Agent location for Agent creation, supported @@ -271,11 +300,11 @@ class ChatEngineMetadata(proto.Message): Attributes: dialogflow_agent (str): - The resource name of a Dialogflow agent, that this Chat - Engine refers to. + The resource name of a Dialogflow agent, that + this Chat Engine refers to. - Format: - ``projects//locations//agents/``. + Format: ``projects//locations//agents/``. """ dialogflow_agent: str = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/engine_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/engine_service.py index da3b04f82745..49fd104b4cde 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/engine_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/engine_service.py @@ -45,7 +45,8 @@ class CreateEngineRequest(proto.Message): r"""Request for - [EngineService.CreateEngine][google.cloud.discoveryengine.v1beta.EngineService.CreateEngine] + `EngineService.CreateEngine + `__ method. Attributes: @@ -53,20 +54,23 @@ class CreateEngineRequest(proto.Message): Required. The parent resource name, such as ``projects/{project}/locations/{location}/collections/{collection}``. engine (google.cloud.discoveryengine_v1beta.types.Engine): - Required. The - [Engine][google.cloud.discoveryengine.v1beta.Engine] to - create. + Required. The `Engine + `__ + to create. engine_id (str): Required. The ID to use for the - [Engine][google.cloud.discoveryengine.v1beta.Engine], which - will become the final component of the - [Engine][google.cloud.discoveryengine.v1beta.Engine]'s + `Engine + `__, + which will become the final component of the + `Engine + `__'s resource name. - This field must conform to - `RFC-1034 `__ standard - with a length limit of 63 characters. Otherwise, an - INVALID_ARGUMENT error is returned. + This field must conform to `RFC-1034 + `__ + standard with a length limit of 63 characters. + Otherwise, an INVALID_ARGUMENT error is + returned. """ parent: str = proto.Field( @@ -86,7 +90,8 @@ class CreateEngineRequest(proto.Message): class CreateEngineMetadata(proto.Message): r"""Metadata related to the progress of the - [EngineService.CreateEngine][google.cloud.discoveryengine.v1beta.EngineService.CreateEngine] + `EngineService.CreateEngine + `__ operation. This will be returned by the google.longrunning.Operation.metadata field. @@ -112,23 +117,28 @@ class CreateEngineMetadata(proto.Message): class DeleteEngineRequest(proto.Message): r"""Request message for - [EngineService.DeleteEngine][google.cloud.discoveryengine.v1beta.EngineService.DeleteEngine] + `EngineService.DeleteEngine + `__ method. Attributes: name (str): Required. Full resource name of - [Engine][google.cloud.discoveryengine.v1beta.Engine], such - as + `Engine + `__, + such as ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}``. - If the caller does not have permission to delete the - [Engine][google.cloud.discoveryengine.v1beta.Engine], - regardless of whether or not it exists, a PERMISSION_DENIED - error is returned. + If the caller does not have permission to delete + the `Engine + `__, + regardless of whether or not it exists, a + PERMISSION_DENIED error is returned. - If the [Engine][google.cloud.discoveryengine.v1beta.Engine] - to delete does not exist, a NOT_FOUND error is returned. + If the `Engine + `__ + to delete does not exist, a NOT_FOUND error is + returned. """ name: str = proto.Field( @@ -139,7 +149,8 @@ class DeleteEngineRequest(proto.Message): class DeleteEngineMetadata(proto.Message): r"""Metadata related to the progress of the - [EngineService.DeleteEngine][google.cloud.discoveryengine.v1beta.EngineService.DeleteEngine] + `EngineService.DeleteEngine + `__ operation. This will be returned by the google.longrunning.Operation.metadata field. @@ -165,14 +176,16 @@ class DeleteEngineMetadata(proto.Message): class GetEngineRequest(proto.Message): r"""Request message for - [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine] + `EngineService.GetEngine + `__ method. Attributes: name (str): Required. Full resource name of - [Engine][google.cloud.discoveryengine.v1beta.Engine], such - as + `Engine + `__, + such as ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}``. """ @@ -184,7 +197,8 @@ class GetEngineRequest(proto.Message): class ListEnginesRequest(proto.Message): r"""Request message for - [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines] + `EngineService.ListEngines + `__ method. Attributes: @@ -220,13 +234,14 @@ class ListEnginesRequest(proto.Message): class ListEnginesResponse(proto.Message): r"""Response message for - [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines] + `EngineService.ListEngines + `__ method. Attributes: engines (MutableSequence[google.cloud.discoveryengine_v1beta.types.Engine]): - All the customer's - [Engine][google.cloud.discoveryengine.v1beta.Engine]s. + All the customer's `Engine + `__s. next_page_token (str): Not supported. """ @@ -248,29 +263,34 @@ def raw_page(self): class UpdateEngineRequest(proto.Message): r"""Request message for - [EngineService.UpdateEngine][google.cloud.discoveryengine.v1beta.EngineService.UpdateEngine] + `EngineService.UpdateEngine + `__ method. Attributes: engine (google.cloud.discoveryengine_v1beta.types.Engine): - Required. The - [Engine][google.cloud.discoveryengine.v1beta.Engine] to - update. - - If the caller does not have permission to update the - [Engine][google.cloud.discoveryengine.v1beta.Engine], - regardless of whether or not it exists, a PERMISSION_DENIED - error is returned. - - If the [Engine][google.cloud.discoveryengine.v1beta.Engine] - to update does not exist, a NOT_FOUND error is returned. + Required. The `Engine + `__ + to update. + + If the caller does not have permission to update + the `Engine + `__, + regardless of whether or not it exists, a + PERMISSION_DENIED error is returned. + + If the `Engine + `__ + to update does not exist, a NOT_FOUND error is + returned. update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided - [Engine][google.cloud.discoveryengine.v1beta.Engine] to - update. + `Engine + `__ + to update. - If an unsupported or unknown field is provided, an - INVALID_ARGUMENT error is returned. + If an unsupported or unknown field is provided, + an INVALID_ARGUMENT error is returned. """ engine: gcd_engine.Engine = proto.Field( @@ -290,7 +310,9 @@ class PauseEngineRequest(proto.Message): Attributes: name (str): - Required. The name of the engine to pause. Format: + Required. The name of the engine to pause. + Format: + ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`` """ @@ -305,7 +327,9 @@ class ResumeEngineRequest(proto.Message): Attributes: name (str): - Required. The name of the engine to resume. Format: + Required. The name of the engine to resume. + Format: + ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`` """ @@ -321,7 +345,9 @@ class TuneEngineRequest(proto.Message): Attributes: name (str): - Required. The resource name of the engine to tune. Format: + Required. The resource name of the engine to + tune. Format: + ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`` """ @@ -336,8 +362,9 @@ class TuneEngineMetadata(proto.Message): Attributes: engine (str): - Required. The resource name of the engine that this tune - applies to. Format: + Required. The resource name of the engine that + this tune applies to. Format: + ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`` """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/evaluation.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/evaluation.py index 3eaa5a067c45..c3bdcddcb456 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/evaluation.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/evaluation.py @@ -40,23 +40,25 @@ class Evaluation(proto.Message): Attributes: name (str): Identifier. The full resource name of the - [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation], + `Evaluation + `__, in the format of ``projects/{project}/locations/{location}/evaluations/{evaluation}``. - This field must be a UTF-8 encoded string with a length - limit of 1024 characters. + This field must be a UTF-8 encoded string with a + length limit of 1024 characters. evaluation_spec (google.cloud.discoveryengine_v1beta.types.Evaluation.EvaluationSpec): Required. The specification of the evaluation. quality_metrics (google.cloud.discoveryengine_v1beta.types.QualityMetrics): - Output only. The metrics produced by the evaluation, - averaged across all - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s - in the - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet]. - - Only populated when the evaluation's state is SUCCEEDED. + Output only. The metrics produced by the + evaluation, averaged across all `SampleQuery + `__s + in the `SampleQuerySet + `__. + + Only populated when the evaluation's state is + SUCCEEDED. state (google.cloud.discoveryengine_v1beta.types.Evaluation.State): Output only. The state of the evaluation. error (google.rpc.status_pb2.Status): @@ -65,11 +67,13 @@ class Evaluation(proto.Message): state is FAILED. create_time (google.protobuf.timestamp_pb2.Timestamp): Output only. Timestamp the - [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation] + `Evaluation + `__ was created at. end_time (google.protobuf.timestamp_pb2.Timestamp): Output only. Timestamp the - [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation] + `Evaluation + `__ was completed at. error_samples (MutableSequence[google.rpc.status_pb2.Status]): Output only. A sample of errors encountered @@ -105,20 +109,29 @@ class EvaluationSpec(proto.Message): Attributes: search_request (google.cloud.discoveryengine_v1beta.types.SearchRequest): - Required. The search request that is used to perform the - evaluation. - - Only the following fields within SearchRequest are - supported; if any other fields are provided, an UNSUPPORTED - error will be returned: - - - [SearchRequest.serving_config][google.cloud.discoveryengine.v1beta.SearchRequest.serving_config] - - [SearchRequest.branch][google.cloud.discoveryengine.v1beta.SearchRequest.branch] - - [SearchRequest.canonical_filter][google.cloud.discoveryengine.v1beta.SearchRequest.canonical_filter] - - [SearchRequest.query_expansion_spec][google.cloud.discoveryengine.v1beta.SearchRequest.query_expansion_spec] - - [SearchRequest.spell_correction_spec][google.cloud.discoveryengine.v1beta.SearchRequest.spell_correction_spec] - - [SearchRequest.content_search_spec][google.cloud.discoveryengine.v1beta.SearchRequest.content_search_spec] - - [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.SearchRequest.user_pseudo_id] + Required. The search request that is used to + perform the evaluation. + Only the following fields within SearchRequest + are supported; if any other fields are provided, + an UNSUPPORTED error will be returned: + + * `SearchRequest.serving_config + `__ + * `SearchRequest.branch + `__ + + * `SearchRequest.canonical_filter + `__ + * `SearchRequest.query_expansion_spec + `__ + + * `SearchRequest.spell_correction_spec + `__ + * `SearchRequest.content_search_spec + `__ + + * `SearchRequest.user_pseudo_id + `__ This field is a member of `oneof`_ ``search_spec``. query_set_spec (google.cloud.discoveryengine_v1beta.types.Evaluation.EvaluationSpec.QuerySetSpec): @@ -131,7 +144,8 @@ class QuerySetSpec(proto.Message): Attributes: sample_query_set (str): Required. The full resource name of the - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet] + `SampleQuerySet + `__ used for the evaluation, in the format of ``projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}``. """ @@ -199,81 +213,98 @@ class QualityMetrics(proto.Message): Attributes: doc_recall (google.cloud.discoveryengine_v1beta.types.QualityMetrics.TopkMetrics): - Recall per document, at various top-k cutoff levels. - - Recall is the fraction of relevant documents retrieved out - of all relevant documents. + Recall per document, at various top-k cutoff + levels. + Recall is the fraction of relevant documents + retrieved out of all relevant documents. Example (top-5): - - For a single - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery], - If 3 out of 5 relevant documents are retrieved in the - top-5, recall@5 = 3/5 = 0.6 + * For a single + `SampleQuery + `__, + If 3 out of 5 relevant documents are retrieved + in the top-5, recall@5 = 3/5 = 0.6 doc_precision (google.cloud.discoveryengine_v1beta.types.QualityMetrics.TopkMetrics): - Precision per document, at various top-k cutoff levels. - - Precision is the fraction of retrieved documents that are - relevant. + Precision per document, at various top-k cutoff + levels. + Precision is the fraction of retrieved documents + that are relevant. Example (top-5): - - For a single - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery], - If 4 out of 5 retrieved documents in the top-5 are - relevant, precision@5 = 4/5 = 0.8 + * For a single + `SampleQuery + `__, + If 4 out of 5 retrieved documents in the top-5 + are relevant, precision@5 = 4/5 = 0.8 doc_ndcg (google.cloud.discoveryengine_v1beta.types.QualityMetrics.TopkMetrics): - Normalized discounted cumulative gain (NDCG) per document, - at various top-k cutoff levels. + Normalized discounted cumulative gain (NDCG) per + document, at various top-k cutoff levels. - NDCG measures the ranking quality, giving higher relevance - to top results. + NDCG measures the ranking quality, giving higher + relevance to top results. - Example (top-3): Suppose - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery] - with three retrieved documents (D1, D2, D3) and binary - relevance judgements (1 for relevant, 0 for not relevant): + Example (top-3): - Retrieved: [D3 (0), D1 (1), D2 (1)] Ideal: [D1 (1), D2 (1), - D3 (0)] + Suppose `SampleQuery + `__ + with three retrieved documents (D1, D2, D3) and + binary relevance judgements (1 for relevant, 0 + for not relevant): - Calculate NDCG@3 for each - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]: - \* DCG@3: 0/log2(1+1) + 1/log2(2+1) + 1/log2(3+1) = 1.13 \* - Ideal DCG@3: 1/log2(1+1) + 1/log2(2+1) + 0/log2(3+1) = 1.63 - \* NDCG@3: 1.13/1.63 = 0.693 + Retrieved: [D3 (0), D1 (1), D2 (1)] + Ideal: [D1 (1), D2 (1), D3 (0)] + + Calculate NDCG@3 for each + `SampleQuery + `__: + + * DCG@3: 0/log2(1+1) + 1/log2(2+1) + 1/log2(3+1) + = 1.13 * Ideal DCG@3: 1/log2(1+1) + + 1/log2(2+1) + 0/log2(3+1) = 1.63 + + * NDCG@3: 1.13/1.63 = 0.693 page_recall (google.cloud.discoveryengine_v1beta.types.QualityMetrics.TopkMetrics): Recall per page, at various top-k cutoff levels. - Recall is the fraction of relevant pages retrieved out of - all relevant pages. + Recall is the fraction of relevant pages + retrieved out of all relevant pages. Example (top-5): - - For a single - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery], - if 3 out of 5 relevant pages are retrieved in the top-5, - recall@5 = 3/5 = 0.6 + * For a single + `SampleQuery + `__, + if 3 out of 5 relevant pages are retrieved in + the top-5, recall@5 = 3/5 = 0.6 page_ndcg (google.cloud.discoveryengine_v1beta.types.QualityMetrics.TopkMetrics): - Normalized discounted cumulative gain (NDCG) per page, at - various top-k cutoff levels. + Normalized discounted cumulative gain (NDCG) per + page, at various top-k cutoff levels. + + NDCG measures the ranking quality, giving higher + relevance to top results. + + Example (top-3): + + Suppose `SampleQuery + `__ + with three retrieved pages (P1, P2, P3) and + binary relevance judgements (1 for relevant, 0 + for not relevant): - NDCG measures the ranking quality, giving higher relevance - to top results. + Retrieved: [P3 (0), P1 (1), P2 (1)] + Ideal: [P1 (1), P2 (1), P3 (0)] - Example (top-3): Suppose - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery] - with three retrieved pages (P1, P2, P3) and binary relevance - judgements (1 for relevant, 0 for not relevant): + Calculate NDCG@3 for + `SampleQuery + `__: - Retrieved: [P3 (0), P1 (1), P2 (1)] Ideal: [P1 (1), P2 (1), - P3 (0)] + * DCG@3: 0/log2(1+1) + 1/log2(2+1) + 1/log2(3+1) + = 1.13 * Ideal DCG@3: 1/log2(1+1) + + 1/log2(2+1) + 0/log2(3+1) = 1.63 - Calculate NDCG@3 for - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]: - \* DCG@3: 0/log2(1+1) + 1/log2(2+1) + 1/log2(3+1) = 1.13 \* - Ideal DCG@3: 1/log2(1+1) + 1/log2(2+1) + 0/log2(3+1) = 1.63 - \* NDCG@3: 1.13/1.63 = 0.693 + * NDCG@3: 1.13/1.63 = 0.693 """ class TopkMetrics(proto.Message): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/evaluation_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/evaluation_service.py index 5f46e95ab5ac..f8ebd158ca8f 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/evaluation_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/evaluation_service.py @@ -38,23 +38,27 @@ class GetEvaluationRequest(proto.Message): r"""Request message for - [EvaluationService.GetEvaluation][google.cloud.discoveryengine.v1beta.EvaluationService.GetEvaluation] + `EvaluationService.GetEvaluation + `__ method. Attributes: name (str): Required. Full resource name of - [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation], + `Evaluation + `__, such as ``projects/{project}/locations/{location}/evaluations/{evaluation}``. - If the caller does not have permission to access the - [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation], - regardless of whether or not it exists, a PERMISSION_DENIED - error is returned. + If the caller does not have permission to access + the `Evaluation + `__, + regardless of whether or not it exists, a + PERMISSION_DENIED error is returned. If the requested - [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation] + `Evaluation + `__ does not exist, a NOT_FOUND error is returned. """ @@ -66,38 +70,48 @@ class GetEvaluationRequest(proto.Message): class ListEvaluationsRequest(proto.Message): r"""Request message for - [EvaluationService.ListEvaluations][google.cloud.discoveryengine.v1beta.EvaluationService.ListEvaluations] + `EvaluationService.ListEvaluations + `__ method. Attributes: parent (str): - Required. The parent location resource name, such as + Required. The parent location resource name, + such as ``projects/{project}/locations/{location}``. If the caller does not have permission to list - [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation]s - under this location, regardless of whether or not this - location exists, a ``PERMISSION_DENIED`` error is returned. + `Evaluation + `__s + under this location, regardless of whether or + not this location exists, a + ``PERMISSION_DENIED`` error is returned. page_size (int): Maximum number of - [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation]s - to return. If unspecified, defaults to 100. The maximum - allowed value is 1000. Values above 1000 will be coerced to - 1000. - - If this field is negative, an ``INVALID_ARGUMENT`` error is - returned. + `Evaluation + `__s + to return. If unspecified, defaults to 100. The + maximum allowed value is 1000. Values above 1000 + will be coerced to 1000. + + If this field is negative, an + ``INVALID_ARGUMENT`` error is returned. page_token (str): A page token - [ListEvaluationsResponse.next_page_token][google.cloud.discoveryengine.v1beta.ListEvaluationsResponse.next_page_token], + `ListEvaluationsResponse.next_page_token + `__, received from a previous - [EvaluationService.ListEvaluations][google.cloud.discoveryengine.v1beta.EvaluationService.ListEvaluations] - call. Provide this to retrieve the subsequent page. - - When paginating, all other parameters provided to - [EvaluationService.ListEvaluations][google.cloud.discoveryengine.v1beta.EvaluationService.ListEvaluations] - must match the call that provided the page token. Otherwise, - an ``INVALID_ARGUMENT`` error is returned. + `EvaluationService.ListEvaluations + `__ + call. Provide this to retrieve the subsequent + page. + + When paginating, all other parameters provided + to `EvaluationService.ListEvaluations + `__ + must match the call that provided the page + token. Otherwise, an ``INVALID_ARGUMENT`` error + is returned. """ parent: str = proto.Field( @@ -116,18 +130,20 @@ class ListEvaluationsRequest(proto.Message): class ListEvaluationsResponse(proto.Message): r"""Response message for - [EvaluationService.ListEvaluations][google.cloud.discoveryengine.v1beta.EvaluationService.ListEvaluations] + `EvaluationService.ListEvaluations + `__ method. Attributes: evaluations (MutableSequence[google.cloud.discoveryengine_v1beta.types.Evaluation]): - The - [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation]s. + The `Evaluation + `__s. next_page_token (str): A token that can be sent as - [ListEvaluationsRequest.page_token][google.cloud.discoveryengine.v1beta.ListEvaluationsRequest.page_token] - to retrieve the next page. If this field is omitted, there - are no subsequent pages. + `ListEvaluationsRequest.page_token + `__ + to retrieve the next page. If this field is + omitted, there are no subsequent pages. """ @property @@ -147,7 +163,8 @@ def raw_page(self): class CreateEvaluationRequest(proto.Message): r"""Request message for - [EvaluationService.CreateEvaluation][google.cloud.discoveryengine.v1beta.EvaluationService.CreateEvaluation] + `EvaluationService.CreateEvaluation + `__ method. Attributes: @@ -155,8 +172,8 @@ class CreateEvaluationRequest(proto.Message): Required. The parent resource name, such as ``projects/{project}/locations/{location}``. evaluation (google.cloud.discoveryengine_v1beta.types.Evaluation): - Required. The - [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation] + Required. The `Evaluation + `__ to create. """ @@ -173,7 +190,8 @@ class CreateEvaluationRequest(proto.Message): class CreateEvaluationMetadata(proto.Message): r"""Metadata for - [EvaluationService.CreateEvaluation][google.cloud.discoveryengine.v1beta.EvaluationService.CreateEvaluation] + `EvaluationService.CreateEvaluation + `__ method. """ @@ -181,7 +199,8 @@ class CreateEvaluationMetadata(proto.Message): class ListEvaluationResultsRequest(proto.Message): r"""Request message for - [EvaluationService.ListEvaluationResults][google.cloud.discoveryengine.v1beta.EvaluationService.ListEvaluationResults] + `EvaluationService.ListEvaluationResults + `__ method. Attributes: @@ -190,27 +209,34 @@ class ListEvaluationResultsRequest(proto.Message): ``projects/{project}/locations/{location}/evaluations/{evaluation}``. If the caller does not have permission to list - [EvaluationResult][] under this evaluation, regardless of - whether or not this evaluation set exists, a - ``PERMISSION_DENIED`` error is returned. + [EvaluationResult][] under this evaluation, + regardless of whether or not this evaluation set + exists, a ``PERMISSION_DENIED`` error is + returned. page_size (int): - Maximum number of [EvaluationResult][] to return. If - unspecified, defaults to 100. The maximum allowed value is - 1000. Values above 1000 will be coerced to 1000. + Maximum number of [EvaluationResult][] to + return. If unspecified, defaults to 100. The + maximum allowed value is 1000. Values above 1000 + will be coerced to 1000. - If this field is negative, an ``INVALID_ARGUMENT`` error is - returned. + If this field is negative, an + ``INVALID_ARGUMENT`` error is returned. page_token (str): A page token - [ListEvaluationResultsResponse.next_page_token][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.next_page_token], + `ListEvaluationResultsResponse.next_page_token + `__, received from a previous - [EvaluationService.ListEvaluationResults][google.cloud.discoveryengine.v1beta.EvaluationService.ListEvaluationResults] - call. Provide this to retrieve the subsequent page. - - When paginating, all other parameters provided to - [EvaluationService.ListEvaluationResults][google.cloud.discoveryengine.v1beta.EvaluationService.ListEvaluationResults] - must match the call that provided the page token. Otherwise, - an ``INVALID_ARGUMENT`` error is returned. + `EvaluationService.ListEvaluationResults + `__ + call. Provide this to retrieve the subsequent + page. + + When paginating, all other parameters provided + to `EvaluationService.ListEvaluationResults + `__ + must match the call that provided the page + token. Otherwise, an ``INVALID_ARGUMENT`` error + is returned. """ evaluation: str = proto.Field( @@ -229,33 +255,38 @@ class ListEvaluationResultsRequest(proto.Message): class ListEvaluationResultsResponse(proto.Message): r"""Response message for - [EvaluationService.ListEvaluationResults][google.cloud.discoveryengine.v1beta.EvaluationService.ListEvaluationResults] + `EvaluationService.ListEvaluationResults + `__ method. Attributes: evaluation_results (MutableSequence[google.cloud.discoveryengine_v1beta.types.ListEvaluationResultsResponse.EvaluationResult]): The - [EvaluationResult][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.EvaluationResult]s. + `EvaluationResult + `__s. next_page_token (str): A token that can be sent as - [ListEvaluationResultsRequest.page_token][google.cloud.discoveryengine.v1beta.ListEvaluationResultsRequest.page_token] - to retrieve the next page. If this field is omitted, there - are no subsequent pages. + `ListEvaluationResultsRequest.page_token + `__ + to retrieve the next page. If this field is + omitted, there are no subsequent pages. """ class EvaluationResult(proto.Message): r"""Represents the results of an evaluation for a single - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]. + `SampleQuery + `__. Attributes: sample_query (google.cloud.discoveryengine_v1beta.types.SampleQuery): Output only. The - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery] + `SampleQuery + `__ that was evaluated. quality_metrics (google.cloud.discoveryengine_v1beta.types.QualityMetrics): - Output only. The metrics produced by the evaluation, for a - given - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]. + Output only. The metrics produced by the + evaluation, for a given `SampleQuery + `__. """ sample_query: gcd_sample_query.SampleQuery = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/grounded_generation_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/grounded_generation_service.py index e17521198310..5f209fe1a0c0 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/grounded_generation_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/grounded_generation_service.py @@ -40,13 +40,13 @@ class GroundedGenerationContent(proto.Message): Attributes: role (str): - Producer of the content. Must be either ``user`` or - ``model``. - - Intended to be used for multi-turn conversations. Otherwise, - it can be left unset. + Producer of the content. Must be either ``user`` + or ``model``. + Intended to be used for multi-turn + conversations. Otherwise, it can be left unset. parts (MutableSequence[google.cloud.discoveryengine_v1beta.types.GroundedGenerationContent.Part]): - Ordered ``Parts`` that constitute a single message. + Ordered ``Parts`` that constitute a single + message. """ class Part(proto.Message): @@ -86,7 +86,8 @@ class GenerateGroundedContentRequest(proto.Message): location (str): Required. Location resource. - Format: ``projects/{project}/locations/{location}``. + Format: + ``projects/{project}/locations/{location}``. system_instruction (google.cloud.discoveryengine_v1beta.types.GroundedGenerationContent): Content of the system instruction for the current API. @@ -105,26 +106,32 @@ class GenerateGroundedContentRequest(proto.Message): grounding_spec (google.cloud.discoveryengine_v1beta.types.GenerateGroundedContentRequest.GroundingSpec): Grounding specification. user_labels (MutableMapping[str, str]): - The user labels applied to a resource must meet the - following requirements: - - - Each resource can have multiple labels, up to a maximum of - 64. - - Each label must be a key-value pair. - - Keys have a minimum length of 1 character and a maximum - length of 63 characters and cannot be empty. Values can be - empty and have a maximum length of 63 characters. - - Keys and values can contain only lowercase letters, - numeric characters, underscores, and dashes. All - characters must use UTF-8 encoding, and international - characters are allowed. - - The key portion of a label must be unique. However, you - can use the same key with multiple resources. - - Keys must start with a lowercase letter or international - character. + The user labels applied to a resource must meet + the following requirements: + * Each resource can have multiple labels, up to + a maximum of 64. + + * Each label must be a key-value pair. + * Keys have a minimum length of 1 character and + a maximum length of 63 characters and cannot + be empty. Values can be empty and have a maximum + length of 63 characters. + + * Keys and values can contain only lowercase + letters, numeric characters, underscores, and + dashes. All characters must use UTF-8 encoding, + and international characters are allowed. + + * The key portion of a label must be unique. + However, you can use the same key with + multiple resources. + + * Keys must start with a lowercase letter or + international character. See `Google Cloud - Document `__ + Document + `__ for more details. """ @@ -138,8 +145,9 @@ class GenerationSpec(proto.Message): Specifies which Vertex model id to use for generation. language_code (str): - Language code for content. Use language tags defined by - `BCP47 `__. + Language code for content. Use language tags + defined by `BCP47 + `__. temperature (float): If specified, custom value for the temperature will be used. @@ -305,9 +313,10 @@ class InlineSource(proto.Message): attributes (MutableMapping[str, str]): Attributes associated with the content. - Common attributes include ``source`` (indicating where the - content was sourced from) and ``author`` (indicating the - author of the content). + Common attributes include ``source`` (indicating + where the content was sourced from) and + ``author`` (indicating the author of the + content). """ grounding_facts: MutableSequence[ @@ -331,6 +340,7 @@ class SearchSource(proto.Message): The resource name of the Engine to use. Format: + ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}`` max_result_count (int): Number of search results to return. @@ -341,7 +351,8 @@ class SearchSource(proto.Message): Filter expression to be applied to the search. The syntax is the same as - [SearchRequest.filter][google.cloud.discoveryengine.v1beta.SearchRequest.filter]. + `SearchRequest.filter + `__. safe_search (bool): If set, safe search is enabled in Vertex AI Search requests. @@ -468,8 +479,8 @@ class Candidate(proto.Message): content (google.cloud.discoveryengine_v1beta.types.GroundedGenerationContent): Content of the candidate. grounding_score (float): - The overall grounding score for the candidate, in the range - of [0, 1]. + The overall grounding score for the candidate, + in the range of [0, 1]. This field is a member of `oneof`_ ``_grounding_score``. grounding_metadata (google.cloud.discoveryengine_v1beta.types.GenerateGroundedContentResponse.Candidate.GroundingMetadata): @@ -570,12 +581,13 @@ class DynamicRetrievalPredictorMetadata(proto.Message): The version of the predictor which was used in dynamic retrieval. prediction (float): - The value of the predictor. This should be between [0, 1] - where a value of 0 means that the query would not benefit - from grounding, while a value of 1.0 means that the query - would benefit the most. In between values allow to - differentiate between different usefulness scores for - grounding. + The value of the predictor. This should be + between [0, 1] where a value of 0 means that the + query would not benefit from grounding, while a + value of 1.0 means that the query would benefit + the most. In between values allow to + differentiate between different usefulness + scores for grounding. This field is a member of `oneof`_ ``_prediction``. """ @@ -636,14 +648,17 @@ class GroundingSupport(proto.Message): Text for the claim in the candidate. Always provided when a support is found. support_chunk_indices (MutableSequence[int]): - A list of indices (into 'support_chunks') specifying the - citations associated with the claim. For instance [1,3,4] - means that support_chunks[1], support_chunks[3], - support_chunks[4] are the chunks attributed to the claim. + A list of indices (into 'support_chunks') + specifying the citations associated with the + claim. For instance [1,3,4] means that + support_chunks[1], support_chunks[3], + support_chunks[4] are the chunks attributed to + the claim. support_score (float): - A score in the range of [0, 1] describing how grounded is a - specific claim in the support chunks indicated. Higher value - means that the claim is better supported by the chunks. + A score in the range of [0, 1] describing how + grounded is a specific claim in the support + chunks indicated. Higher value means that the + claim is better supported by the chunks. This field is a member of `oneof`_ ``_support_score``. """ @@ -725,12 +740,13 @@ class CheckGroundingSpec(proto.Message): Attributes: citation_threshold (float): - The threshold (in [0,1]) used for determining whether a fact - must be cited for a claim in the answer candidate. Choosing - a higher threshold will lead to fewer but very strong - citations, while choosing a lower threshold may lead to more - but somewhat weaker citations. If unset, the threshold will - default to 0.6. + The threshold (in [0,1]) used for determining + whether a fact must be cited for a claim in the + answer candidate. Choosing a higher threshold + will lead to fewer but very strong citations, + while choosing a lower threshold may lead to + more but somewhat weaker citations. If unset, + the threshold will default to 0.6. This field is a member of `oneof`_ ``_citation_threshold``. """ @@ -744,12 +760,14 @@ class CheckGroundingSpec(proto.Message): class CheckGroundingRequest(proto.Message): r"""Request message for - [GroundedGenerationService.CheckGrounding][google.cloud.discoveryengine.v1beta.GroundedGenerationService.CheckGrounding] + `GroundedGenerationService.CheckGrounding + `__ method. Attributes: grounding_config (str): - Required. The resource name of the grounding config, such as + Required. The resource name of the grounding + config, such as ``projects/*/locations/global/groundingConfigs/default_grounding_config``. answer_candidate (str): Answer candidate to check. It can have a @@ -760,26 +778,32 @@ class CheckGroundingRequest(proto.Message): grounding_spec (google.cloud.discoveryengine_v1beta.types.CheckGroundingSpec): Configuration of the grounding check. user_labels (MutableMapping[str, str]): - The user labels applied to a resource must meet the - following requirements: - - - Each resource can have multiple labels, up to a maximum of - 64. - - Each label must be a key-value pair. - - Keys have a minimum length of 1 character and a maximum - length of 63 characters and cannot be empty. Values can be - empty and have a maximum length of 63 characters. - - Keys and values can contain only lowercase letters, - numeric characters, underscores, and dashes. All - characters must use UTF-8 encoding, and international - characters are allowed. - - The key portion of a label must be unique. However, you - can use the same key with multiple resources. - - Keys must start with a lowercase letter or international - character. + The user labels applied to a resource must meet + the following requirements: + * Each resource can have multiple labels, up to + a maximum of 64. + + * Each label must be a key-value pair. + * Keys have a minimum length of 1 character and + a maximum length of 63 characters and cannot + be empty. Values can be empty and have a maximum + length of 63 characters. + + * Keys and values can contain only lowercase + letters, numeric characters, underscores, and + dashes. All characters must use UTF-8 encoding, + and international characters are allowed. + + * The key portion of a label must be unique. + However, you can use the same key with + multiple resources. + + * Keys must start with a lowercase letter or + international character. See `Google Cloud - Document `__ + Document + `__ for more details. """ @@ -810,7 +834,8 @@ class CheckGroundingRequest(proto.Message): class CheckGroundingResponse(proto.Message): r"""Response message for the - [GroundedGenerationService.CheckGrounding][google.cloud.discoveryengine.v1beta.GroundedGenerationService.CheckGrounding] + `GroundedGenerationService.CheckGrounding + `__ method. @@ -873,21 +898,27 @@ class Claim(proto.Message): Always provided regardless of whether citations or anti-citations are found. citation_indices (MutableSequence[int]): - A list of indices (into 'cited_chunks') specifying the - citations associated with the claim. For instance [1,3,4] - means that cited_chunks[1], cited_chunks[3], cited_chunks[4] - are the facts cited supporting for the claim. A citation to - a fact indicates that the claim is supported by the fact. + A list of indices (into 'cited_chunks') + specifying the citations associated with the + claim. For instance [1,3,4] means that + cited_chunks[1], cited_chunks[3], + cited_chunks[4] are the facts cited supporting + for the claim. A citation to a fact indicates + that the claim is supported by the fact. grounding_check_required (bool): - Indicates that this claim required grounding check. When the - system decided this claim doesn't require - attribution/grounding check, this field will be set to - false. In that case, no grounding check was done for the - claim and therefore - [citation_indices][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.citation_indices], - [anti_citation_indices][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.anti_citation_indices], + Indicates that this claim required grounding + check. When the system decided this claim + doesn't require attribution/grounding check, + this field will be set to false. In that case, + no grounding check was done for the claim and + therefore + `citation_indices + `__, + `anti_citation_indices + `__, and - [score][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.score] + `score + `__ should not be returned. This field is a member of `oneof`_ ``_grounding_check_required``. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/grounding.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/grounding.py index c0a16c4c7d73..76515a064d96 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/grounding.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/grounding.py @@ -34,7 +34,8 @@ class GroundingConfig(proto.Message): Attributes: name (str): - Required. Name of the GroundingConfig, of the form + Required. Name of the GroundingConfig, of the + form ``projects/{project}/locations/{location}/groundingConfigs/{grounding_config}``. """ @@ -52,10 +53,10 @@ class GroundingFact(proto.Message): Text content of the fact. Can be at most 10K characters long. attributes (MutableMapping[str, str]): - Attributes associated with the fact. Common attributes - include ``source`` (indicating where the fact was sourced - from), ``author`` (indicating the author of the fact), and - so on. + Attributes associated with the fact. + Common attributes include ``source`` (indicating + where the fact was sourced from), ``author`` + (indicating the author of the fact), and so on. """ fact_text: str = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/import_config.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/import_config.py index c1458f15a46d..662d0ae0e6aa 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/import_config.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/import_config.py @@ -67,44 +67,56 @@ class GcsSource(proto.Message): Attributes: input_uris (MutableSequence[str]): - Required. Cloud Storage URIs to input files. Each URI can be - up to 2000 characters long. URIs can match the full object - path (for example, ``gs://bucket/directory/object.json``) or - a pattern matching one or more files, such as + Required. Cloud Storage URIs to input files. + Each URI can be up to 2000 characters long. URIs + can match the full object path (for example, + ``gs://bucket/directory/object.json``) or a + pattern matching one or more files, such as ``gs://bucket/directory/*.json``. - A request can contain at most 100 files (or 100,000 files if - ``data_schema`` is ``content``). Each file can be up to 2 GB - (or 100 MB if ``data_schema`` is ``content``). + A request can contain at most 100 files (or + 100,000 files if ``data_schema`` is + ``content``). Each file can be up to 2 GB (or + 100 MB if ``data_schema`` is ``content``). data_schema (str): - The schema to use when parsing the data from the source. - + The schema to use when parsing the data from the + source. Supported values for document imports: - - ``document`` (default): One JSON - [Document][google.cloud.discoveryengine.v1beta.Document] - per line. Each document must have a valid - [Document.id][google.cloud.discoveryengine.v1beta.Document.id]. - - ``content``: Unstructured data (e.g. PDF, HTML). Each file - matched by ``input_uris`` becomes a document, with the ID - set to the first 128 bits of SHA256(URI) encoded as a hex - string. - - ``custom``: One custom data JSON per row in arbitrary - format that conforms to the defined - [Schema][google.cloud.discoveryengine.v1beta.Schema] of - the data store. This can only be used by the GENERIC Data - Store vertical. - - ``csv``: A CSV file with header conforming to the defined - [Schema][google.cloud.discoveryengine.v1beta.Schema] of - the data store. Each entry after the header is imported as - a Document. This can only be used by the GENERIC Data - Store vertical. + * ``document`` (default): One JSON + `Document + `__ + per line. Each document must + have a valid + `Document.id + `__. + + * ``content``: Unstructured data (e.g. PDF, + HTML). Each file matched by ``input_uris`` + becomes a document, with the ID set to the first + 128 bits of SHA256(URI) encoded as a hex + string. + + * ``custom``: One custom data JSON per row in + arbitrary format that conforms to the defined + `Schema + `__ + of the data store. This can only be used by + the GENERIC Data Store vertical. + + * ``csv``: A CSV file with header conforming to + the defined `Schema + `__ + of the data store. Each entry after the header + is imported as a Document. This can only be + used by the GENERIC Data Store vertical. Supported values for user event imports: - - ``user_event`` (default): One JSON - [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] - per line. + * ``user_event`` (default): One JSON + `UserEvent + `__ + per line. """ input_uris: MutableSequence[str] = proto.RepeatedField( @@ -124,8 +136,8 @@ class BigQuerySource(proto.Message): Attributes: partition_date (google.type.date_pb2.Date): - BigQuery time partitioned table's \_PARTITIONDATE in - YYYY-MM-DD format. + BigQuery time partitioned table's _PARTITIONDATE + in YYYY-MM-DD format. This field is a member of `oneof`_ ``partition``. project_id (str): @@ -147,29 +159,36 @@ class BigQuerySource(proto.Message): have the BigQuery export to a specific Cloud Storage directory. data_schema (str): - The schema to use when parsing the data from the source. - + The schema to use when parsing the data from the + source. Supported values for user event imports: - - ``user_event`` (default): One - [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] - per row. + * ``user_event`` (default): One + `UserEvent + `__ + per row. Supported values for document imports: - - ``document`` (default): One - [Document][google.cloud.discoveryengine.v1beta.Document] - format per row. Each document must have a valid - [Document.id][google.cloud.discoveryengine.v1beta.Document.id] - and one of - [Document.json_data][google.cloud.discoveryengine.v1beta.Document.json_data] - or - [Document.struct_data][google.cloud.discoveryengine.v1beta.Document.struct_data]. - - ``custom``: One custom data per row in arbitrary format - that conforms to the defined - [Schema][google.cloud.discoveryengine.v1beta.Schema] of - the data store. This can only be used by the GENERIC Data - Store vertical. + * ``document`` (default): One + `Document + `__ + format per row. Each document must have a + valid + `Document.id + `__ + and one of `Document.json_data + `__ + or + `Document.struct_data + `__. + + * ``custom``: One custom data per row in + arbitrary format that conforms to the defined + `Schema + `__ + of the data store. This can only be used by + the GENERIC Data Store vertical. """ partition_date: date_pb2.Date = proto.Field( @@ -219,9 +238,10 @@ class SpannerSource(proto.Message): Required. The table name of the Spanner database that needs to be imported. enable_data_boost (bool): - Whether to apply data boost on Spanner export. Enabling this - option will incur additional cost. More info can be found - `here `__. + Whether to apply data boost on Spanner export. + Enabling this option will incur additional cost. + More info can be found `here + `__. """ project_id: str = proto.Field( @@ -252,9 +272,9 @@ class BigtableOptions(proto.Message): Attributes: key_field_name (str): - The field name used for saving row key value in the - document. The name has to match the pattern - ``[a-zA-Z0-9][a-zA-Z0-9-_]*``. + The field name used for saving row key value in + the document. The name has to match the pattern + ```a-zA-Z0-9 `__*``. families (MutableMapping[str, google.cloud.discoveryengine_v1beta.types.BigtableOptions.BigtableColumnFamily]): The mapping from family names to an object that contains column families level information @@ -263,9 +283,11 @@ class BigtableOptions(proto.Message): """ class Type(proto.Enum): - r"""The type of values in a Bigtable column or column family. The values - are expected to be encoded using `HBase - Bytes.toBytes `__ + r"""The type of values in a Bigtable column or column family. + The values are expected to be encoded using + `HBase + Bytes.toBytes + `__ function when the encoding value is set to ``BINARY``. Values: @@ -315,25 +337,28 @@ class BigtableColumnFamily(proto.Message): Attributes: field_name (str): - The field name to use for this column family in the - document. The name has to match the pattern - ``[a-zA-Z0-9][a-zA-Z0-9-_]*``. If not set, it is parsed from - the family name with best effort. However, due to different - naming patterns, field name collisions could happen, where - parsing behavior is undefined. + The field name to use for this column family in + the document. The name has to match the pattern + ```a-zA-Z0-9 `__*``. If not set, it + is parsed from the family name with best effort. + However, due to different naming patterns, field + name collisions could happen, where parsing + behavior is undefined. encoding (google.cloud.discoveryengine_v1beta.types.BigtableOptions.Encoding): - The encoding mode of the values when the type is not STRING. - Acceptable encoding values are: - - - ``TEXT``: indicates values are alphanumeric text strings. - - ``BINARY``: indicates values are encoded using - ``HBase Bytes.toBytes`` family of functions. This can be - overridden for a specific column by listing that column in - ``columns`` and specifying an encoding for it. + The encoding mode of the values when the type is + not STRING. Acceptable encoding values are: + + * ``TEXT``: indicates values are alphanumeric + text strings. * ``BINARY``: indicates values are + encoded using ``HBase Bytes.toBytes`` family of + functions. This can be overridden for a specific + column by listing that column in ``columns`` and + specifying an encoding for it. type_ (google.cloud.discoveryengine_v1beta.types.BigtableOptions.Type): - The type of values in this column family. The values are - expected to be encoded using ``HBase Bytes.toBytes`` - function when the encoding value is set to ``BINARY``. + The type of values in this column family. + The values are expected to be encoded using + ``HBase Bytes.toBytes`` function when the + encoding value is set to ``BINARY``. columns (MutableSequence[google.cloud.discoveryengine_v1beta.types.BigtableOptions.BigtableColumn]): The list of objects that contains column level information for each column. If a column @@ -371,25 +396,28 @@ class BigtableColumn(proto.Message): cannot be decoded with utf-8, use a base-64 encoded string instead. field_name (str): - The field name to use for this column in the document. The - name has to match the pattern ``[a-zA-Z0-9][a-zA-Z0-9-_]*``. - If not set, it is parsed from the qualifier bytes with best - effort. However, due to different naming patterns, field - name collisions could happen, where parsing behavior is - undefined. + The field name to use for this column in the + document. The name has to match the pattern + ```a-zA-Z0-9 `__*``. If not set, it + is parsed from the qualifier bytes with best + effort. However, due to different naming + patterns, field name collisions could happen, + where parsing behavior is undefined. encoding (google.cloud.discoveryengine_v1beta.types.BigtableOptions.Encoding): - The encoding mode of the values when the type is not - ``STRING``. Acceptable encoding values are: - - - ``TEXT``: indicates values are alphanumeric text strings. - - ``BINARY``: indicates values are encoded using - ``HBase Bytes.toBytes`` family of functions. This can be - overridden for a specific column by listing that column in - ``columns`` and specifying an encoding for it. + The encoding mode of the values when the type is + not ``STRING``. Acceptable encoding values are: + + * ``TEXT``: indicates values are alphanumeric + text strings. * ``BINARY``: indicates values are + encoded using ``HBase Bytes.toBytes`` family of + functions. This can be overridden for a specific + column by listing that column in ``columns`` and + specifying an encoding for it. type_ (google.cloud.discoveryengine_v1beta.types.BigtableOptions.Type): - The type of values in this column family. The values are - expected to be encoded using ``HBase Bytes.toBytes`` - function when the encoding value is set to ``BINARY``. + The type of values in this column family. + The values are expected to be encoded using + ``HBase Bytes.toBytes`` function when the + encoding value is set to ``BINARY``. """ qualifier: bytes = proto.Field( @@ -469,8 +497,8 @@ class FhirStoreSource(proto.Message): Attributes: fhir_store (str): - Required. The full resource name of the FHIR store to import - data from, in the format of + Required. The full resource name of the FHIR + store to import data from, in the format of ``projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}``. gcs_staging_dir (str): Intermediate Cloud Storage directory used for @@ -479,10 +507,12 @@ class FhirStoreSource(proto.Message): have the FhirStore export to a specific Cloud Storage directory. resource_types (MutableSequence[str]): - The FHIR resource types to import. The resource types should - be a subset of all `supported FHIR resource - types `__. - Default to all supported FHIR resource types if empty. + The FHIR resource types to import. The resource + types should be a subset of all `supported FHIR + resource types + `__. + Default to all supported FHIR resource types if + empty. """ fhir_store: str = proto.Field( @@ -528,9 +558,10 @@ class CloudSqlSource(proto.Message): the necessary Cloud Storage Admin permissions to access the specified Cloud Storage directory. offload (bool): - Option for serverless export. Enabling this option will - incur additional cost. More info can be found - `here `__. + Option for serverless export. Enabling this + option will incur additional cost. More info can + be found `here + `__. """ project_id: str = proto.Field( @@ -671,10 +702,11 @@ class ImportErrorConfig(proto.Message): Attributes: gcs_prefix (str): - Cloud Storage prefix for import errors. This must be an - empty, existing Cloud Storage directory. Import errors are - written to sharded files in this directory, one per line, as - a JSON-encoded ``google.rpc.Status`` message. + Cloud Storage prefix for import errors. This + must be an empty, existing Cloud Storage + directory. Import errors are written to sharded + files in this directory, one per line, as a + JSON-encoded ``google.rpc.Status`` message. This field is a member of `oneof`_ ``destination``. """ @@ -711,7 +743,8 @@ class ImportUserEventsRequest(proto.Message): This field is a member of `oneof`_ ``source``. parent (str): - Required. Parent DataStore resource name, of the form + Required. Parent DataStore resource name, of the + form ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`` error_config (google.cloud.discoveryengine_v1beta.types.ImportErrorConfig): The desired location of errors incurred @@ -939,92 +972,126 @@ class ImportDocumentsRequest(proto.Message): This field is a member of `oneof`_ ``source``. parent (str): - Required. The parent branch resource name, such as + Required. The parent branch resource name, such + as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}``. Requires create/update permission. error_config (google.cloud.discoveryengine_v1beta.types.ImportErrorConfig): The desired location of errors incurred during the Import. reconciliation_mode (google.cloud.discoveryengine_v1beta.types.ImportDocumentsRequest.ReconciliationMode): - The mode of reconciliation between existing documents and - the documents to be imported. Defaults to - [ReconciliationMode.INCREMENTAL][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode.INCREMENTAL]. + The mode of reconciliation between existing + documents and the documents to be imported. + Defaults to `ReconciliationMode.INCREMENTAL + `__. update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided imported documents to update. If not set, the default is to update all fields. auto_generate_ids (bool): - Whether to automatically generate IDs for the documents if - absent. - + Whether to automatically generate IDs for the + documents if absent. If set to ``true``, - [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s - are automatically generated based on the hash of the - payload, where IDs may not be consistent during multiple - imports. In which case - [ReconciliationMode.FULL][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode.FULL] - is highly recommended to avoid duplicate contents. If unset - or set to ``false``, - [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s + `Document.id + `__s + are automatically generated based on the hash of + the payload, where IDs may not be consistent + during multiple imports. In which case + `ReconciliationMode.FULL + `__ + is highly recommended to avoid duplicate + contents. If unset or set to ``false``, + `Document.id + `__s have to be specified using - [id_field][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.id_field], - otherwise, documents without IDs fail to be imported. + `id_field + `__, + otherwise, documents without IDs fail to be + imported. Supported data sources: - - [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource]. - [GcsSource.data_schema][google.cloud.discoveryengine.v1beta.GcsSource.data_schema] - must be ``custom`` or ``csv``. Otherwise, an - INVALID_ARGUMENT error is thrown. - - [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource]. - [BigQuerySource.data_schema][google.cloud.discoveryengine.v1beta.BigQuerySource.data_schema] - must be ``custom`` or ``csv``. Otherwise, an - INVALID_ARGUMENT error is thrown. - - [SpannerSource][google.cloud.discoveryengine.v1beta.SpannerSource]. - - [CloudSqlSource][google.cloud.discoveryengine.v1beta.CloudSqlSource]. - - [FirestoreSource][google.cloud.discoveryengine.v1beta.FirestoreSource]. - - [BigtableSource][google.cloud.discoveryengine.v1beta.BigtableSource]. + * `GcsSource + `__. + `GcsSource.data_schema + `__ + must be ``custom`` or ``csv``. Otherwise, an + INVALID_ARGUMENT error is thrown. + + * `BigQuerySource + `__. + `BigQuerySource.data_schema + `__ + must be ``custom`` or ``csv``. Otherwise, an + INVALID_ARGUMENT error is thrown. + + * `SpannerSource + `__. + * `CloudSqlSource + `__. + + * `FirestoreSource + `__. + * `BigtableSource + `__. id_field (str): - The field indicates the ID field or column to be used as - unique IDs of the documents. - - For - [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource] - it is the key of the JSON field. For instance, ``my_id`` for - JSON ``{"my_id": "some_uuid"}``. For others, it may be the - column name of the table where the unique ids are stored. - - The values of the JSON field or the table column are used as - the - [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s. - The JSON field or the table column must be of string type, - and the values must be set as valid strings conform to - `RFC-1034 `__ with 1-63 - characters. Otherwise, documents without valid IDs fail to - be imported. + The field indicates the ID field or column to be + used as unique IDs of the documents. + + For `GcsSource + `__ + it is the key of the JSON field. For instance, + ``my_id`` for JSON ``{"my_id": + + "some_uuid"}``. For others, it may be the column + name of the table where the unique ids are + stored. + + The values of the JSON field or the table column + are used as the `Document.id + `__s. + The JSON field or the table column must be of + string type, and the values must be set as valid + strings conform to + `RFC-1034 + `__ with + 1-63 characters. Otherwise, documents without + valid IDs fail to be imported. Only set this field when - [auto_generate_ids][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.auto_generate_ids] - is unset or set as ``false``. Otherwise, an INVALID_ARGUMENT - error is thrown. + `auto_generate_ids + `__ + is unset or set as ``false``. Otherwise, an + INVALID_ARGUMENT error is thrown. - If it is unset, a default value ``_id`` is used when - importing from the allowed data sources. + If it is unset, a default value ``_id`` is used + when importing from the allowed data sources. Supported data sources: - - [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource]. - [GcsSource.data_schema][google.cloud.discoveryengine.v1beta.GcsSource.data_schema] - must be ``custom`` or ``csv``. Otherwise, an - INVALID_ARGUMENT error is thrown. - - [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource]. - [BigQuerySource.data_schema][google.cloud.discoveryengine.v1beta.BigQuerySource.data_schema] - must be ``custom`` or ``csv``. Otherwise, an - INVALID_ARGUMENT error is thrown. - - [SpannerSource][google.cloud.discoveryengine.v1beta.SpannerSource]. - - [CloudSqlSource][google.cloud.discoveryengine.v1beta.CloudSqlSource]. - - [FirestoreSource][google.cloud.discoveryengine.v1beta.FirestoreSource]. - - [BigtableSource][google.cloud.discoveryengine.v1beta.BigtableSource]. + * `GcsSource + `__. + `GcsSource.data_schema + `__ + must be ``custom`` or ``csv``. Otherwise, an + INVALID_ARGUMENT error is thrown. + + * `BigQuerySource + `__. + `BigQuerySource.data_schema + `__ + must be ``custom`` or ``csv``. Otherwise, an + INVALID_ARGUMENT error is thrown. + + * `SpannerSource + `__. + * `CloudSqlSource + `__. + + * `FirestoreSource + `__. + * `BigtableSource + `__. """ class ReconciliationMode(proto.Enum): @@ -1053,9 +1120,9 @@ class InlineSource(proto.Message): Attributes: documents (MutableSequence[google.cloud.discoveryengine_v1beta.types.Document]): - Required. A list of documents to update/create. Each - document must have a valid - [Document.id][google.cloud.discoveryengine.v1beta.Document.id]. + Required. A list of documents to update/create. + Each document must have a valid `Document.id + `__. Recommended max of 100 items. """ @@ -1150,10 +1217,11 @@ class InlineSource(proto.Message): class ImportDocumentsResponse(proto.Message): r"""Response of the - [ImportDocumentsRequest][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest]. - If the long running operation is done, then this message is returned - by the google.longrunning.Operations.response field if the operation - was successful. + `ImportDocumentsRequest + `__. + If the long running operation is done, then this message is + returned by the google.longrunning.Operations.response field if + the operation was successful. Attributes: error_samples (MutableSequence[google.rpc.status_pb2.Status]): @@ -1178,7 +1246,8 @@ class ImportDocumentsResponse(proto.Message): class ImportSuggestionDenyListEntriesRequest(proto.Message): r"""Request message for - [CompletionService.ImportSuggestionDenyListEntries][google.cloud.discoveryengine.v1beta.CompletionService.ImportSuggestionDenyListEntries] + `CompletionService.ImportSuggestionDenyListEntries + `__ method. This message has `oneof`_ fields (mutually exclusive fields). @@ -1197,17 +1266,19 @@ class ImportSuggestionDenyListEntriesRequest(proto.Message): gcs_source (google.cloud.discoveryengine_v1beta.types.GcsSource): Cloud Storage location for the input content. - Only 1 file can be specified that contains all entries to - import. Supported values ``gcs_source.schema`` for - autocomplete suggestion deny list entry imports: + Only 1 file can be specified that contains all + entries to import. Supported values + ``gcs_source.schema`` for autocomplete + suggestion deny list entry imports: - - ``suggestion_deny_list`` (default): One JSON - [SuggestionDenyListEntry] per line. + * ``suggestion_deny_list`` (default): One JSON + [SuggestionDenyListEntry] per line. This field is a member of `oneof`_ ``source``. parent (str): - Required. The parent data store resource name for which to - import denylist entries. Follows pattern + Required. The parent data store resource name + for which to import denylist entries. Follows + pattern projects/*/locations/*/collections/*/dataStores/*. """ @@ -1248,7 +1319,8 @@ class InlineSource(proto.Message): class ImportSuggestionDenyListEntriesResponse(proto.Message): r"""Response message for - [CompletionService.ImportSuggestionDenyListEntries][google.cloud.discoveryengine.v1beta.CompletionService.ImportSuggestionDenyListEntries] + `CompletionService.ImportSuggestionDenyListEntries + `__ method. Attributes: @@ -1305,7 +1377,8 @@ class ImportSuggestionDenyListEntriesMetadata(proto.Message): class ImportCompletionSuggestionsRequest(proto.Message): r"""Request message for - [CompletionService.ImportCompletionSuggestions][google.cloud.discoveryengine.v1beta.CompletionService.ImportCompletionSuggestions] + `CompletionService.ImportCompletionSuggestions + `__ method. This message has `oneof`_ fields (mutually exclusive fields). @@ -1329,8 +1402,9 @@ class ImportCompletionSuggestionsRequest(proto.Message): This field is a member of `oneof`_ ``source``. parent (str): - Required. The parent data store resource name for which to - import customer autocomplete suggestions. + Required. The parent data store resource name + for which to import customer autocomplete + suggestions. Follows pattern ``projects/*/locations/*/collections/*/dataStores/*`` @@ -1387,10 +1461,11 @@ class InlineSource(proto.Message): class ImportCompletionSuggestionsResponse(proto.Message): r"""Response of the - [CompletionService.ImportCompletionSuggestions][google.cloud.discoveryengine.v1beta.CompletionService.ImportCompletionSuggestions] + `CompletionService.ImportCompletionSuggestions + `__ method. If the long running operation is done, this message is - returned by the google.longrunning.Operations.response field if the - operation is successful. + returned by the google.longrunning.Operations.response field if + the operation is successful. Attributes: error_samples (MutableSequence[google.rpc.status_pb2.Status]): @@ -1426,11 +1501,13 @@ class ImportCompletionSuggestionsMetadata(proto.Message): is done, this is also the finish time. success_count (int): Count of - [CompletionSuggestion][google.cloud.discoveryengine.v1beta.CompletionSuggestion]s + `CompletionSuggestion + `__s successfully imported. failure_count (int): Count of - [CompletionSuggestion][google.cloud.discoveryengine.v1beta.CompletionSuggestion]s + `CompletionSuggestion + `__s that failed to be imported. """ @@ -1456,7 +1533,8 @@ class ImportCompletionSuggestionsMetadata(proto.Message): class ImportSampleQueriesRequest(proto.Message): r"""Request message for - [SampleQueryService.ImportSampleQueries][google.cloud.discoveryengine.v1beta.SampleQueryService.ImportSampleQueries] + `SampleQueryService.ImportSampleQueries + `__ method. This message has `oneof`_ fields (mutually exclusive fields). @@ -1480,14 +1558,16 @@ class ImportSampleQueriesRequest(proto.Message): This field is a member of `oneof`_ ``source``. parent (str): - Required. The parent sample query set resource name, such as + Required. The parent sample query set resource + name, such as ``projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}``. If the caller does not have permission to list - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s - under this sample query set, regardless of whether or not - this sample query set exists, a ``PERMISSION_DENIED`` error - is returned. + `SampleQuery + `__s + under this sample query set, regardless of + whether or not this sample query set exists, a + ``PERMISSION_DENIED`` error is returned. error_config (google.cloud.discoveryengine_v1beta.types.ImportErrorConfig): The desired location of errors incurred during the Import. @@ -1495,12 +1575,14 @@ class ImportSampleQueriesRequest(proto.Message): class InlineSource(proto.Message): r"""The inline source for - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s. + `SampleQuery + `__s. Attributes: sample_queries (MutableSequence[google.cloud.discoveryengine_v1beta.types.SampleQuery]): Required. A list of - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s + `SampleQuery + `__s to import. Max of 1000 items. """ @@ -1541,10 +1623,11 @@ class InlineSource(proto.Message): class ImportSampleQueriesResponse(proto.Message): r"""Response of the - [SampleQueryService.ImportSampleQueries][google.cloud.discoveryengine.v1beta.SampleQueryService.ImportSampleQueries] + `SampleQueryService.ImportSampleQueries + `__ method. If the long running operation is done, this message is - returned by the google.longrunning.Operations.response field if the - operation is successful. + returned by the google.longrunning.Operations.response field if + the operation is successful. Attributes: error_samples (MutableSequence[google.rpc.status_pb2.Status]): @@ -1580,16 +1663,17 @@ class ImportSampleQueriesMetadata(proto.Message): time. If the operation is done, this is also the finish time. success_count (int): - Count of - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s + Count of `SampleQuery + `__s successfully imported. failure_count (int): - Count of - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s + Count of `SampleQuery + `__s that failed to be imported. total_count (int): Total count of - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s + `SampleQuery + `__s that were processed. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/project.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/project.py index 63d811e112e3..cdbe8f7d8d61 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/project.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/project.py @@ -34,9 +34,10 @@ class Project(proto.Message): Attributes: name (str): - Output only. Full resource name of the project, for example - ``projects/{project}``. Note that when making requests, - project number and project id are both acceptable, but the + Output only. Full resource name of the project, + for example ``projects/{project}``. + Note that when making requests, project number + and project id are both acceptable, but the server will always respond in project number. create_time (google.protobuf.timestamp_pb2.Timestamp): Output only. The timestamp when this project @@ -47,9 +48,9 @@ class Project(proto.Message): this project is still provisioning and is not ready for use. service_terms_map (MutableMapping[str, google.cloud.discoveryengine_v1beta.types.Project.ServiceTerms]): - Output only. A map of terms of services. The key is the - ``id`` of - [ServiceTerms][google.cloud.discoveryengine.v1beta.Project.ServiceTerms]. + Output only. A map of terms of services. The key + is the ``id`` of `ServiceTerms + `__. """ class ServiceTerms(proto.Message): @@ -57,18 +58,21 @@ class ServiceTerms(proto.Message): Attributes: id (str): - The unique identifier of this terms of service. Available - terms: + The unique identifier of this terms of service. + Available terms: - - ``GA_DATA_USE_TERMS``: `Terms for data - use `__. - When using this as ``id``, the acceptable - [version][google.cloud.discoveryengine.v1beta.Project.ServiceTerms.version] - to provide is ``2022-11-23``. + * ``GA_DATA_USE_TERMS``: `Terms for data + use + `__. + When using this as ``id``, the acceptable + `version + `__ + to provide is ``2022-11-23``. version (str): - The version string of the terms of service. For acceptable - values, see the comments for - [id][google.cloud.discoveryengine.v1beta.Project.ServiceTerms.id] + The version string of the terms of service. + For acceptable values, see the comments for + `id + `__ above. state (google.cloud.discoveryengine_v1beta.types.Project.ServiceTerms.State): Whether the project has accepted/rejected the diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/project_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/project_service.py index 45ddb4a7693e..9cff599f2e85 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/project_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/project_service.py @@ -30,25 +30,30 @@ class ProvisionProjectRequest(proto.Message): r"""Request for - [ProjectService.ProvisionProject][google.cloud.discoveryengine.v1beta.ProjectService.ProvisionProject] + `ProjectService.ProvisionProject + `__ method. Attributes: name (str): Required. Full resource name of a - [Project][google.cloud.discoveryengine.v1beta.Project], such - as ``projects/{project_id_or_number}``. + `Project + `__, + such as ``projects/{project_id_or_number}``. accept_data_use_terms (bool): - Required. Set to ``true`` to specify that caller has read - and would like to give consent to the `Terms for data - use `__. + Required. Set to ``true`` to specify that caller + has read and would like to give consent to the + `Terms for data use + `__. data_use_terms_version (str): Required. The version of the `Terms for data - use `__ that - caller has read and would like to give consent to. + use + `__ + that caller has read and would like to give + consent to. - Acceptable version is ``2022-11-23``, and this may change - over time. + Acceptable version is ``2022-11-23``, and this + may change over time. """ name: str = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/purge_config.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/purge_config.py index 56a18e79d469..a8db81523a32 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/purge_config.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/purge_config.py @@ -48,39 +48,59 @@ class PurgeUserEventsRequest(proto.Message): Attributes: parent (str): - Required. The resource name of the catalog under which the - events are created. The format is + Required. The resource name of the catalog under + which the events are created. The format is ``projects/{project}/locations/global/collections/{collection}/dataStores/{dataStore}``. filter (str): - Required. The filter string to specify the events to be - deleted with a length limit of 5,000 characters. The - eligible fields for filtering are: - - - ``eventType``: Double quoted - [UserEvent.event_type][google.cloud.discoveryengine.v1beta.UserEvent.event_type] - string. - - ``eventTime``: in ISO 8601 "zulu" format. - - ``userPseudoId``: Double quoted string. Specifying this - will delete all events associated with a visitor. - - ``userId``: Double quoted string. Specifying this will - delete all events associated with a user. + Required. The filter string to specify the + events to be deleted with a length limit of + 5,000 characters. The eligible fields for + filtering are: + + * ``eventType``: Double quoted + `UserEvent.event_type + `__ + string. + + * ``eventTime``: in ISO 8601 "zulu" format. + * ``userPseudoId``: Double quoted string. + Specifying this will delete all events + associated with a visitor. + + * ``userId``: Double quoted string. Specifying + this will delete all events associated with a + user. Examples: - - Deleting all events in a time range: - ``eventTime > "2012-04-23T18:25:43.511Z" eventTime < "2012-04-23T18:30:43.511Z"`` - - Deleting specific eventType: ``eventType = "search"`` - - Deleting all events for a specific visitor: + * Deleting all events in a time range: + + ``eventTime > "2012-04-23T18:25:43.511Z" + eventTime < "2012-04-23T18:30:43.511Z"`` + + * Deleting specific eventType: + + ``eventType = "search"`` + + * Deleting all events for a specific visitor: + ``userPseudoId = "visitor1024"`` - - Deleting all events inside a DataStore: ``*`` - The filtering fields are assumed to have an implicit AND. + * Deleting all events inside a DataStore: + + ``*`` + + The filtering fields are assumed to have an + implicit AND. force (bool): - The ``force`` field is currently not supported. Purge user - event requests will permanently delete all purgeable events. - Once the development is complete: If ``force`` is set to - false, the method will return the expected purge count - without deleting any user events. This field will default to + The ``force`` field is currently not supported. + Purge user event requests will permanently + delete all purgeable events. Once the + development is complete: + + If ``force`` is set to false, the method will + return the expected purge count without deleting + any user events. This field will default to false if not included in the request. """ @@ -161,10 +181,11 @@ class PurgeErrorConfig(proto.Message): Attributes: gcs_prefix (str): - Cloud Storage prefix for purge errors. This must be an - empty, existing Cloud Storage directory. Purge errors are - written to sharded files in this directory, one per line, as - a JSON-encoded ``google.rpc.Status`` message. + Cloud Storage prefix for purge errors. This must + be an empty, existing Cloud Storage directory. + Purge errors are written to sharded files in + this directory, one per line, as a JSON-encoded + ``google.rpc.Status`` message. This field is a member of `oneof`_ ``destination``. """ @@ -178,7 +199,8 @@ class PurgeErrorConfig(proto.Message): class PurgeDocumentsRequest(proto.Message): r"""Request message for - [DocumentService.PurgeDocuments][google.cloud.discoveryengine.v1beta.DocumentService.PurgeDocuments] + `DocumentService.PurgeDocuments + `__ method. This message has `oneof`_ fields (mutually exclusive fields). @@ -190,12 +212,13 @@ class PurgeDocumentsRequest(proto.Message): Attributes: gcs_source (google.cloud.discoveryengine_v1beta.types.GcsSource): - Cloud Storage location for the input content. Supported - ``data_schema``: + Cloud Storage location for the input content. + Supported ``data_schema``: - - ``document_id``: One valid - [Document.id][google.cloud.discoveryengine.v1beta.Document.id] - per line. + * ``document_id``: One valid + `Document.id + `__ + per line. This field is a member of `oneof`_ ``source``. inline_source (google.cloud.discoveryengine_v1beta.types.PurgeDocumentsRequest.InlineSource): @@ -207,26 +230,28 @@ class PurgeDocumentsRequest(proto.Message): Required. The parent resource name, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}``. filter (str): - Required. Filter matching documents to purge. Only currently - supported value is ``*`` (all items). + Required. Filter matching documents to purge. + Only currently supported value is + ``*`` (all items). error_config (google.cloud.discoveryengine_v1beta.types.PurgeErrorConfig): The desired location of errors incurred during the purge. force (bool): - Actually performs the purge. If ``force`` is set to false, - return the expected purge count without deleting any - documents. + Actually performs the purge. If ``force`` is set + to false, return the expected purge count + without deleting any documents. """ class InlineSource(proto.Message): r"""The inline source for the input config for - [DocumentService.PurgeDocuments][google.cloud.discoveryengine.v1beta.DocumentService.PurgeDocuments] + `DocumentService.PurgeDocuments + `__ method. Attributes: documents (MutableSequence[str]): - Required. A list of full resource name of documents to - purge. In the format + Required. A list of full resource name of + documents to purge. In the format ``projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*``. Recommended max of 100 items. """ @@ -269,7 +294,8 @@ class InlineSource(proto.Message): class PurgeDocumentsResponse(proto.Message): r"""Response message for - [DocumentService.PurgeDocuments][google.cloud.discoveryengine.v1beta.DocumentService.PurgeDocuments] + `DocumentService.PurgeDocuments + `__ method. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field. @@ -279,9 +305,10 @@ class PurgeDocumentsResponse(proto.Message): The total count of documents purged as a result of the operation. purge_sample (MutableSequence[str]): - A sample of document names that will be deleted. Only - populated if ``force`` is set to false. A max of 100 names - will be returned and the names are chosen at random. + A sample of document names that will be deleted. + Only populated if ``force`` is set to false. A + max of 100 names will be returned and the names + are chosen at random. """ purge_count: int = proto.Field( @@ -342,13 +369,15 @@ class PurgeDocumentsMetadata(proto.Message): class PurgeSuggestionDenyListEntriesRequest(proto.Message): r"""Request message for - [CompletionService.PurgeSuggestionDenyListEntries][google.cloud.discoveryengine.v1beta.CompletionService.PurgeSuggestionDenyListEntries] + `CompletionService.PurgeSuggestionDenyListEntries + `__ method. Attributes: parent (str): - Required. The parent data store resource name for which to - import denylist entries. Follows pattern + Required. The parent data store resource name + for which to import denylist entries. Follows + pattern projects/*/locations/*/collections/*/dataStores/*. """ @@ -360,7 +389,8 @@ class PurgeSuggestionDenyListEntriesRequest(proto.Message): class PurgeSuggestionDenyListEntriesResponse(proto.Message): r"""Response message for - [CompletionService.PurgeSuggestionDenyListEntries][google.cloud.discoveryengine.v1beta.CompletionService.PurgeSuggestionDenyListEntries] + `CompletionService.PurgeSuggestionDenyListEntries + `__ method. Attributes: @@ -410,13 +440,15 @@ class PurgeSuggestionDenyListEntriesMetadata(proto.Message): class PurgeCompletionSuggestionsRequest(proto.Message): r"""Request message for - [CompletionService.PurgeCompletionSuggestions][google.cloud.discoveryengine.v1beta.CompletionService.PurgeCompletionSuggestions] + `CompletionService.PurgeCompletionSuggestions + `__ method. Attributes: parent (str): - Required. The parent data store resource name for which to - purge completion suggestions. Follows pattern + Required. The parent data store resource name + for which to purge completion suggestions. + Follows pattern projects/*/locations/*/collections/*/dataStores/*. """ @@ -428,7 +460,8 @@ class PurgeCompletionSuggestionsRequest(proto.Message): class PurgeCompletionSuggestionsResponse(proto.Message): r"""Response message for - [CompletionService.PurgeCompletionSuggestions][google.cloud.discoveryengine.v1beta.CompletionService.PurgeCompletionSuggestions] + `CompletionService.PurgeCompletionSuggestions + `__ method. Attributes: diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/rank_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/rank_service.py index 8ef6ba5911c0..de153a694fab 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/rank_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/rank_service.py @@ -31,24 +31,31 @@ class RankingRecord(proto.Message): r"""Record message for - [RankService.Rank][google.cloud.discoveryengine.v1beta.RankService.Rank] + `RankService.Rank + `__ method. Attributes: id (str): The unique ID to represent the record. title (str): - The title of the record. Empty by default. At least one of - [title][google.cloud.discoveryengine.v1beta.RankingRecord.title] - or - [content][google.cloud.discoveryengine.v1beta.RankingRecord.content] - should be set otherwise an INVALID_ARGUMENT error is thrown. + The title of the record. Empty by default. + At least one of + `title + `__ + or `content + `__ + should be set otherwise an INVALID_ARGUMENT + error is thrown. content (str): - The content of the record. Empty by default. At least one of - [title][google.cloud.discoveryengine.v1beta.RankingRecord.title] - or - [content][google.cloud.discoveryengine.v1beta.RankingRecord.content] - should be set otherwise an INVALID_ARGUMENT error is thrown. + The content of the record. Empty by default. + At least one of + `title + `__ + or `content + `__ + should be set otherwise an INVALID_ARGUMENT + error is thrown. score (float): The score of this record based on the given query and selected model. @@ -74,22 +81,23 @@ class RankingRecord(proto.Message): class RankRequest(proto.Message): r"""Request message for - [RankService.Rank][google.cloud.discoveryengine.v1beta.RankService.Rank] + `RankService.Rank + `__ method. Attributes: ranking_config (str): - Required. The resource name of the rank service config, such - as + Required. The resource name of the rank service + config, such as ``projects/{project_num}/locations/{location}/rankingConfigs/default_ranking_config``. model (str): - The identifier of the model to use. It is one of: + The identifier of the model to use. It is one + of: + * ``semantic-ranker-512@latest``: Semantic + ranking model with maxiumn input token size 512. - - ``semantic-ranker-512@latest``: Semantic ranking model - with maxiumn input token size 512. - - It is set to ``semantic-ranker-512@latest`` by default if - unspecified. + It is set to ``semantic-ranker-512@latest`` by + default if unspecified. top_n (int): The number of results to return. If this is unset or no bigger than zero, returns all @@ -104,26 +112,32 @@ class RankRequest(proto.Message): record ID and score. By default, it is false, the response will contain record details. user_labels (MutableMapping[str, str]): - The user labels applied to a resource must meet the - following requirements: - - - Each resource can have multiple labels, up to a maximum of - 64. - - Each label must be a key-value pair. - - Keys have a minimum length of 1 character and a maximum - length of 63 characters and cannot be empty. Values can be - empty and have a maximum length of 63 characters. - - Keys and values can contain only lowercase letters, - numeric characters, underscores, and dashes. All - characters must use UTF-8 encoding, and international - characters are allowed. - - The key portion of a label must be unique. However, you - can use the same key with multiple resources. - - Keys must start with a lowercase letter or international - character. + The user labels applied to a resource must meet + the following requirements: + * Each resource can have multiple labels, up to + a maximum of 64. + + * Each label must be a key-value pair. + * Keys have a minimum length of 1 character and + a maximum length of 63 characters and cannot + be empty. Values can be empty and have a maximum + length of 63 characters. + + * Keys and values can contain only lowercase + letters, numeric characters, underscores, and + dashes. All characters must use UTF-8 encoding, + and international characters are allowed. + + * The key portion of a label must be unique. + However, you can use the same key with + multiple resources. + + * Keys must start with a lowercase letter or + international character. See `Google Cloud - Document `__ + Document + `__ for more details. """ @@ -161,7 +175,8 @@ class RankRequest(proto.Message): class RankResponse(proto.Message): r"""Response message for - [RankService.Rank][google.cloud.discoveryengine.v1beta.RankService.Rank] + `RankService.Rank + `__ method. Attributes: diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/recommendation_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/recommendation_service.py index 51d09981d87b..d90ed6720bd3 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/recommendation_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/recommendation_service.py @@ -38,38 +38,48 @@ class RecommendRequest(proto.Message): Attributes: serving_config (str): Required. Full resource name of a - [ServingConfig][google.cloud.discoveryengine.v1beta.ServingConfig]: + `ServingConfig + `__: + ``projects/*/locations/global/collections/*/engines/*/servingConfigs/*``, or ``projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*`` - One default serving config is created along with your - recommendation engine creation. The engine ID is used as the - ID of the default serving config. For example, for Engine + One default serving config is created along with + your recommendation engine creation. The engine + ID is used as the ID of the default serving + config. For example, for Engine ``projects/*/locations/global/collections/*/engines/my-engine``, you can use ``projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine`` for your - [RecommendationService.Recommend][google.cloud.discoveryengine.v1beta.RecommendationService.Recommend] + `RecommendationService.Recommend + `__ requests. user_event (google.cloud.discoveryengine_v1beta.types.UserEvent): - Required. Context about the user, what they are looking at - and what action they took to trigger the Recommend request. - Note that this user event detail won't be ingested to - userEvent logs. Thus, a separate userEvent write request is + Required. Context about the user, what they are + looking at and what action they took to trigger + the Recommend request. Note that this user event + detail won't be ingested to userEvent logs. + Thus, a separate userEvent write request is required for event logging. Don't set - [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id] + `UserEvent.user_pseudo_id + `__ or - [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1beta.UserInfo.user_id] - to the same fixed ID for different users. If you are trying - to receive non-personalized recommendations (not - recommended; this can negatively impact model performance), - instead set - [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id] + `UserEvent.user_info.user_id + `__ + to the same fixed ID for different users. If you + are trying to receive non-personalized + recommendations (not recommended; this can + negatively impact model performance), instead + set + `UserEvent.user_pseudo_id + `__ to a random unique ID and leave - [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1beta.UserInfo.user_id] + `UserEvent.user_info.user_id + `__ unset. page_size (int): Maximum number of results to return. Set this @@ -78,95 +88,120 @@ class RecommendRequest(proto.Message): reasonable default. The maximum allowed value is 100. Values above 100 are set to 100. filter (str): - Filter for restricting recommendation results with a length - limit of 5,000 characters. Currently, only filter - expressions on the ``filter_tags`` attribute is supported. + Filter for restricting recommendation results + with a length limit of 5,000 characters. + Currently, only filter expressions on the + ``filter_tags`` attribute is supported. Examples: - - ``(filter_tags: ANY("Red", "Blue") OR filter_tags: ANY("Hot", "Cold"))`` - - ``(filter_tags: ANY("Red", "Blue")) AND NOT (filter_tags: ANY("Green"))`` - - If ``attributeFilteringSyntax`` is set to true under the - ``params`` field, then attribute-based expressions are - expected instead of the above described tag-based syntax. - Examples: - - - (launguage: ANY("en", "es")) AND NOT (categories: - ANY("Movie")) - - (available: true) AND (launguage: ANY("en", "es")) OR - (categories: ANY("Movie")) - - If your filter blocks all results, the API returns generic - (unfiltered) popular Documents. If you only want results - strictly matching the filters, set ``strictFiltering`` to - ``true`` in - [RecommendRequest.params][google.cloud.discoveryengine.v1beta.RecommendRequest.params] + * ``(filter_tags: ANY("Red", "Blue") OR + filter_tags: ANY("Hot", "Cold"))`` * + ``(filter_tags: ANY("Red", "Blue")) AND NOT + (filter_tags: ANY("Green"))`` + + If ``attributeFilteringSyntax`` is set to true + under the ``params`` field, then attribute-based + expressions are expected instead of the above + described tag-based syntax. Examples: + + * (launguage: ANY("en", "es")) AND NOT + (categories: ANY("Movie")) * (available: true) + AND + (launguage: ANY("en", "es")) OR (categories: + ANY("Movie")) + + If your filter blocks all results, the API + returns generic (unfiltered) popular Documents. + If you only want results strictly matching the + filters, set ``strictFiltering`` to ``true`` in + `RecommendRequest.params + `__ to receive empty results instead. Note that the API never returns - [Document][google.cloud.discoveryengine.v1beta.Document]s - with ``storageStatus`` as ``EXPIRED`` or ``DELETED`` - regardless of filter choices. + `Document + `__s + with ``storageStatus`` as ``EXPIRED`` or + ``DELETED`` regardless of filter choices. validate_only (bool): - Use validate only mode for this recommendation query. If set - to ``true``, a fake model is used that returns arbitrary - Document IDs. Note that the validate only mode should only - be used for testing the API, or if the model is not ready. + Use validate only mode for this recommendation + query. If set to ``true``, a fake model is used + that returns arbitrary Document IDs. Note that + the validate only mode should only be used for + testing the API, or if the model is not ready. params (MutableMapping[str, google.protobuf.struct_pb2.Value]): Additional domain specific parameters for the recommendations. - Allowed values: - - ``returnDocument``: Boolean. If set to ``true``, the - associated Document object is returned in - [RecommendResponse.RecommendationResult.document][google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.document]. - - ``returnScore``: Boolean. If set to true, the - recommendation score corresponding to each returned - Document is set in - [RecommendResponse.RecommendationResult.metadata][google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.metadata]. - The given score indicates the probability of a Document - conversion given the user's context and history. - - ``strictFiltering``: Boolean. True by default. If set to - ``false``, the service returns generic (unfiltered) - popular Documents instead of empty if your filter blocks - all recommendation results. - - ``diversityLevel``: String. Default empty. If set to be - non-empty, then it needs to be one of: - - - ``no-diversity`` - - ``low-diversity`` - - ``medium-diversity`` - - ``high-diversity`` - - ``auto-diversity`` This gives request-level control and - adjusts recommendation results based on Document - category. - - - ``attributeFilteringSyntax``: Boolean. False by default. - If set to true, the ``filter`` field is interpreted - according to the new, attribute-based syntax. + * ``returnDocument``: Boolean. If set to + ``true``, the associated Document object is + returned in + `RecommendResponse.RecommendationResult.document + `__. + + * ``returnScore``: Boolean. If set to true, the + recommendation score corresponding to each + returned Document is set in + `RecommendResponse.RecommendationResult.metadata + `__. + The given score indicates the probability of a + Document conversion given the user's context + and history. + + * ``strictFiltering``: Boolean. True by default. + If set to ``false``, the service + returns generic (unfiltered) popular + Documents instead of empty if your filter + blocks all recommendation results. + + * ``diversityLevel``: String. Default empty. If + set to be non-empty, then it needs to be one + of: + + * ``no-diversity`` + * ``low-diversity`` + + * ``medium-diversity`` + * ``high-diversity`` + + * ``auto-diversity`` + This gives request-level control and adjusts + recommendation results based on Document + category. + + * ``attributeFilteringSyntax``: Boolean. False + by default. If set to true, the ``filter`` + field is interpreted according to the new, + attribute-based syntax. user_labels (MutableMapping[str, str]): - The user labels applied to a resource must meet the - following requirements: - - - Each resource can have multiple labels, up to a maximum of - 64. - - Each label must be a key-value pair. - - Keys have a minimum length of 1 character and a maximum - length of 63 characters and cannot be empty. Values can be - empty and have a maximum length of 63 characters. - - Keys and values can contain only lowercase letters, - numeric characters, underscores, and dashes. All - characters must use UTF-8 encoding, and international - characters are allowed. - - The key portion of a label must be unique. However, you - can use the same key with multiple resources. - - Keys must start with a lowercase letter or international - character. + The user labels applied to a resource must meet + the following requirements: + * Each resource can have multiple labels, up to + a maximum of 64. + + * Each label must be a key-value pair. + * Keys have a minimum length of 1 character and + a maximum length of 63 characters and cannot + be empty. Values can be empty and have a maximum + length of 63 characters. + + * Keys and values can contain only lowercase + letters, numeric characters, underscores, and + dashes. All characters must use UTF-8 encoding, + and international characters are allowed. + + * The key portion of a label must be unique. + However, you can use the same key with + multiple resources. + + * Keys must start with a lowercase letter or + international character. See `Requirements for - labels `__ + labels + `__ for more details. """ @@ -213,17 +248,20 @@ class RecommendResponse(proto.Message): represents the ranking (from the most relevant Document to the least). attribution_token (str): - A unique attribution token. This should be included in the - [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] - logs resulting from this recommendation, which enables - accurate attribution of recommendation model performance. + A unique attribution token. This should be + included in the `UserEvent + `__ + logs resulting from this recommendation, which + enables accurate attribution of recommendation + model performance. missing_ids (MutableSequence[str]): IDs of documents in the request that were missing from the default Branch associated with the requested ServingConfig. validate_only (bool): True if - [RecommendRequest.validate_only][google.cloud.discoveryengine.v1beta.RecommendRequest.validate_only] + `RecommendRequest.validate_only + `__ was set. """ @@ -236,15 +274,18 @@ class RecommendationResult(proto.Message): Resource ID of the recommended Document. document (google.cloud.discoveryengine_v1beta.types.Document): Set if ``returnDocument`` is set to true in - [RecommendRequest.params][google.cloud.discoveryengine.v1beta.RecommendRequest.params]. + `RecommendRequest.params + `__. metadata (MutableMapping[str, google.protobuf.struct_pb2.Value]): Additional Document metadata or annotations. Possible values: - - ``score``: Recommendation score in double value. Is set if - ``returnScore`` is set to true in - [RecommendRequest.params][google.cloud.discoveryengine.v1beta.RecommendRequest.params]. + * ``score``: Recommendation score in double + value. Is set if ``returnScore`` is set to + true in + `RecommendRequest.params + `__. """ id: str = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/sample_query.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/sample_query.py index 90d23995902d..8d69c24cf01a 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/sample_query.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/sample_query.py @@ -39,15 +39,16 @@ class SampleQuery(proto.Message): This field is a member of `oneof`_ ``content``. name (str): - Identifier. The full resource name of the sample query, in - the format of + Identifier. The full resource name of the sample + query, in the format of ``projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}/sampleQueries/{sample_query}``. - This field must be a UTF-8 encoded string with a length - limit of 1024 characters. + This field must be a UTF-8 encoded string with a + length limit of 1024 characters. create_time (google.protobuf.timestamp_pb2.Timestamp): Output only. Timestamp the - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery] + `SampleQuery + `__ was created at. """ @@ -71,10 +72,11 @@ class Target(proto.Message): uri (str): Expected uri of the target. - This field must be a UTF-8 encoded string with a length - limit of 2048 characters. + This field must be a UTF-8 encoded string with a + length limit of 2048 characters. - Example of valid uris: ``https://example.com/abc``, + Example of valid uris: + ``https://example.com/abc``, ``gcs://example/example.pdf``. page_numbers (MutableSequence[int]): Expected page numbers of the target. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/sample_query_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/sample_query_service.py index 44db4975b6ce..51b2d161e4a5 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/sample_query_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/sample_query_service.py @@ -37,23 +37,27 @@ class GetSampleQueryRequest(proto.Message): r"""Request message for - [SampleQueryService.GetSampleQuery][google.cloud.discoveryengine.v1beta.SampleQueryService.GetSampleQuery] + `SampleQueryService.GetSampleQuery + `__ method. Attributes: name (str): Required. Full resource name of - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery], + `SampleQuery + `__, such as ``projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}/sampleQueries/{sample_query}``. - If the caller does not have permission to access the - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery], - regardless of whether or not it exists, a PERMISSION_DENIED - error is returned. + If the caller does not have permission to access + the `SampleQuery + `__, + regardless of whether or not it exists, a + PERMISSION_DENIED error is returned. If the requested - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery] + `SampleQuery + `__ does not exist, a NOT_FOUND error is returned. """ @@ -65,39 +69,48 @@ class GetSampleQueryRequest(proto.Message): class ListSampleQueriesRequest(proto.Message): r"""Request message for - [SampleQueryService.ListSampleQueries][google.cloud.discoveryengine.v1beta.SampleQueryService.ListSampleQueries] + `SampleQueryService.ListSampleQueries + `__ method. Attributes: parent (str): - Required. The parent sample query set resource name, such as + Required. The parent sample query set resource + name, such as ``projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}``. If the caller does not have permission to list - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s - under this sample query set, regardless of whether or not - this sample query set exists, a ``PERMISSION_DENIED`` error - is returned. + `SampleQuery + `__s + under this sample query set, regardless of + whether or not this sample query set exists, a + ``PERMISSION_DENIED`` error is returned. page_size (int): Maximum number of - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s - to return. If unspecified, defaults to 100. The maximum - allowed value is 1000. Values above 1000 will be coerced to - 1000. + `SampleQuery + `__s + to return. If unspecified, defaults to 100. The + maximum allowed value is 1000. Values above 1000 + will be coerced to 1000. - If this field is negative, an ``INVALID_ARGUMENT`` error is - returned. + If this field is negative, an + ``INVALID_ARGUMENT`` error is returned. page_token (str): A page token - [ListSampleQueriesResponse.next_page_token][google.cloud.discoveryengine.v1beta.ListSampleQueriesResponse.next_page_token], + `ListSampleQueriesResponse.next_page_token + `__, received from a previous - [SampleQueryService.ListSampleQueries][google.cloud.discoveryengine.v1beta.SampleQueryService.ListSampleQueries] - call. Provide this to retrieve the subsequent page. - - When paginating, all other parameters provided to - [SampleQueryService.ListSampleQueries][google.cloud.discoveryengine.v1beta.SampleQueryService.ListSampleQueries] - must match the call that provided the page token. Otherwise, - an ``INVALID_ARGUMENT`` error is returned. + `SampleQueryService.ListSampleQueries + `__ + call. Provide this to retrieve the subsequent + page. + + When paginating, all other parameters provided + to `SampleQueryService.ListSampleQueries + `__ + must match the call that provided the page + token. Otherwise, an ``INVALID_ARGUMENT`` error + is returned. """ parent: str = proto.Field( @@ -116,18 +129,20 @@ class ListSampleQueriesRequest(proto.Message): class ListSampleQueriesResponse(proto.Message): r"""Response message for - [SampleQueryService.ListSampleQueries][google.cloud.discoveryengine.v1beta.SampleQueryService.ListSampleQueries] + `SampleQueryService.ListSampleQueries + `__ method. Attributes: sample_queries (MutableSequence[google.cloud.discoveryengine_v1beta.types.SampleQuery]): - The - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s. + The `SampleQuery + `__s. next_page_token (str): A token that can be sent as - [ListSampleQueriesRequest.page_token][google.cloud.discoveryengine.v1beta.ListSampleQueriesRequest.page_token] - to retrieve the next page. If this field is omitted, there - are no subsequent pages. + `ListSampleQueriesRequest.page_token + `__ + to retrieve the next page. If this field is + omitted, there are no subsequent pages. """ @property @@ -147,7 +162,8 @@ def raw_page(self): class CreateSampleQueryRequest(proto.Message): r"""Request message for - [SampleQueryService.CreateSampleQuery][google.cloud.discoveryengine.v1beta.SampleQueryService.CreateSampleQuery] + `SampleQueryService.CreateSampleQuery + `__ method. Attributes: @@ -156,29 +172,37 @@ class CreateSampleQueryRequest(proto.Message): ``projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}``. sample_query (google.cloud.discoveryengine_v1beta.types.SampleQuery): Required. The - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery] + `SampleQuery + `__ to create. sample_query_id (str): Required. The ID to use for the - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery], + `SampleQuery + `__, which will become the final component of the - [SampleQuery.name][google.cloud.discoveryengine.v1beta.SampleQuery.name]. + `SampleQuery.name + `__. - If the caller does not have permission to create the - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery], + If the caller does not have permission to create + the `SampleQuery + `__, regardless of whether or not it exists, a ``PERMISSION_DENIED`` error is returned. This field must be unique among all - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s + `SampleQuery + `__s with the same - [parent][google.cloud.discoveryengine.v1beta.CreateSampleQueryRequest.parent]. - Otherwise, an ``ALREADY_EXISTS`` error is returned. + `parent + `__. + Otherwise, an ``ALREADY_EXISTS`` error is + returned. - This field must conform to - `RFC-1034 `__ standard - with a length limit of 63 characters. Otherwise, an - ``INVALID_ARGUMENT`` error is returned. + This field must conform to `RFC-1034 + `__ + standard with a length limit of 63 characters. + Otherwise, an ``INVALID_ARGUMENT`` error is + returned. """ parent: str = proto.Field( @@ -198,21 +222,24 @@ class CreateSampleQueryRequest(proto.Message): class UpdateSampleQueryRequest(proto.Message): r"""Request message for - [SampleQueryService.UpdateSampleQuery][google.cloud.discoveryengine.v1beta.SampleQueryService.UpdateSampleQuery] + `SampleQueryService.UpdateSampleQuery + `__ method. Attributes: sample_query (google.cloud.discoveryengine_v1beta.types.SampleQuery): Required. The simple query to update. - If the caller does not have permission to update the - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery], + If the caller does not have permission to update + the `SampleQuery + `__, regardless of whether or not it exists, a ``PERMISSION_DENIED`` error is returned. - If the - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery] - to update does not exist a ``NOT_FOUND`` error is returned. + If the `SampleQuery + `__ + to update does not exist a ``NOT_FOUND`` error + is returned. update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided imported 'simple query' to update. If not set, @@ -233,24 +260,28 @@ class UpdateSampleQueryRequest(proto.Message): class DeleteSampleQueryRequest(proto.Message): r"""Request message for - [SampleQueryService.DeleteSampleQuery][google.cloud.discoveryengine.v1beta.SampleQueryService.DeleteSampleQuery] + `SampleQueryService.DeleteSampleQuery + `__ method. Attributes: name (str): Required. Full resource name of - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery], + `SampleQuery + `__, such as ``projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}/sampleQueries/{sample_query}``. - If the caller does not have permission to delete the - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery], + If the caller does not have permission to delete + the `SampleQuery + `__, regardless of whether or not it exists, a ``PERMISSION_DENIED`` error is returned. - If the - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery] - to delete does not exist, a ``NOT_FOUND`` error is returned. + If the `SampleQuery + `__ + to delete does not exist, a ``NOT_FOUND`` error + is returned. """ name: str = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/sample_query_set.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/sample_query_set.py index 83ae097221ad..0051d4e33441 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/sample_query_set.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/sample_query_set.py @@ -35,12 +35,13 @@ class SampleQuerySet(proto.Message): Attributes: name (str): Identifier. The full resource name of the - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet], + `SampleQuerySet + `__, in the format of ``projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}``. - This field must be a UTF-8 encoded string with a length - limit of 1024 characters. + This field must be a UTF-8 encoded string with a + length limit of 1024 characters. display_name (str): Required. The sample query set display name. @@ -48,11 +49,13 @@ class SampleQuerySet(proto.Message): length limit of 128 characters. create_time (google.protobuf.timestamp_pb2.Timestamp): Output only. Timestamp the - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet] + `SampleQuerySet + `__ was created at. description (str): The description of the - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet]. + `SampleQuerySet + `__. """ name: str = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/sample_query_set_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/sample_query_set_service.py index 1dab3c6377bd..ce705be33c6e 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/sample_query_set_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/sample_query_set_service.py @@ -39,23 +39,27 @@ class GetSampleQuerySetRequest(proto.Message): r"""Request message for - [SampleQuerySetService.GetSampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySetService.GetSampleQuerySet] + `SampleQuerySetService.GetSampleQuerySet + `__ method. Attributes: name (str): Required. Full resource name of - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet], + `SampleQuerySet + `__, such as ``projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}``. - If the caller does not have permission to access the - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet], - regardless of whether or not it exists, a PERMISSION_DENIED - error is returned. + If the caller does not have permission to access + the `SampleQuerySet + `__, + regardless of whether or not it exists, a + PERMISSION_DENIED error is returned. If the requested - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet] + `SampleQuerySet + `__ does not exist, a NOT_FOUND error is returned. """ @@ -67,38 +71,48 @@ class GetSampleQuerySetRequest(proto.Message): class ListSampleQuerySetsRequest(proto.Message): r"""Request message for - [SampleQuerySetService.ListSampleQuerySets][google.cloud.discoveryengine.v1beta.SampleQuerySetService.ListSampleQuerySets] + `SampleQuerySetService.ListSampleQuerySets + `__ method. Attributes: parent (str): - Required. The parent location resource name, such as + Required. The parent location resource name, + such as ``projects/{project}/locations/{location}``. If the caller does not have permission to list - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet]s - under this location, regardless of whether or not this - location exists, a ``PERMISSION_DENIED`` error is returned. + `SampleQuerySet + `__s + under this location, regardless of whether or + not this location exists, a + ``PERMISSION_DENIED`` error is returned. page_size (int): Maximum number of - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet]s - to return. If unspecified, defaults to 100. The maximum - allowed value is 1000. Values above 1000 will be coerced to - 1000. + `SampleQuerySet + `__s + to return. If unspecified, defaults to 100. The + maximum allowed value is 1000. Values above 1000 + will be coerced to 1000. - If this field is negative, an ``INVALID_ARGUMENT`` error is - returned. + If this field is negative, an + ``INVALID_ARGUMENT`` error is returned. page_token (str): A page token - [ListSampleQuerySetsResponse.next_page_token][google.cloud.discoveryengine.v1beta.ListSampleQuerySetsResponse.next_page_token], + `ListSampleQuerySetsResponse.next_page_token + `__, received from a previous - [SampleQuerySetService.ListSampleQuerySets][google.cloud.discoveryengine.v1beta.SampleQuerySetService.ListSampleQuerySets] - call. Provide this to retrieve the subsequent page. - - When paginating, all other parameters provided to - [SampleQuerySetService.ListSampleQuerySets][google.cloud.discoveryengine.v1beta.SampleQuerySetService.ListSampleQuerySets] - must match the call that provided the page token. Otherwise, - an ``INVALID_ARGUMENT`` error is returned. + `SampleQuerySetService.ListSampleQuerySets + `__ + call. Provide this to retrieve the subsequent + page. + + When paginating, all other parameters provided + to `SampleQuerySetService.ListSampleQuerySets + `__ + must match the call that provided the page + token. Otherwise, an ``INVALID_ARGUMENT`` error + is returned. """ parent: str = proto.Field( @@ -117,18 +131,20 @@ class ListSampleQuerySetsRequest(proto.Message): class ListSampleQuerySetsResponse(proto.Message): r"""Response message for - [SampleQuerySetService.ListSampleQuerySets][google.cloud.discoveryengine.v1beta.SampleQuerySetService.ListSampleQuerySets] + `SampleQuerySetService.ListSampleQuerySets + `__ method. Attributes: sample_query_sets (MutableSequence[google.cloud.discoveryengine_v1beta.types.SampleQuerySet]): - The - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet]s. + The `SampleQuerySet + `__s. next_page_token (str): A token that can be sent as - [ListSampleQuerySetsRequest.page_token][google.cloud.discoveryengine.v1beta.ListSampleQuerySetsRequest.page_token] - to retrieve the next page. If this field is omitted, there - are no subsequent pages. + `ListSampleQuerySetsRequest.page_token + `__ + to retrieve the next page. If this field is + omitted, there are no subsequent pages. """ @property @@ -150,7 +166,8 @@ def raw_page(self): class CreateSampleQuerySetRequest(proto.Message): r"""Request message for - [SampleQuerySetService.CreateSampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySetService.CreateSampleQuerySet] + `SampleQuerySetService.CreateSampleQuerySet + `__ method. Attributes: @@ -159,29 +176,37 @@ class CreateSampleQuerySetRequest(proto.Message): ``projects/{project}/locations/{location}``. sample_query_set (google.cloud.discoveryengine_v1beta.types.SampleQuerySet): Required. The - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet] + `SampleQuerySet + `__ to create. sample_query_set_id (str): Required. The ID to use for the - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet], + `SampleQuerySet + `__, which will become the final component of the - [SampleQuerySet.name][google.cloud.discoveryengine.v1beta.SampleQuerySet.name]. + `SampleQuerySet.name + `__. - If the caller does not have permission to create the - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet], + If the caller does not have permission to create + the `SampleQuerySet + `__, regardless of whether or not it exists, a ``PERMISSION_DENIED`` error is returned. This field must be unique among all - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet]s + `SampleQuerySet + `__s with the same - [parent][google.cloud.discoveryengine.v1beta.CreateSampleQuerySetRequest.parent]. - Otherwise, an ``ALREADY_EXISTS`` error is returned. + `parent + `__. + Otherwise, an ``ALREADY_EXISTS`` error is + returned. - This field must conform to - `RFC-1034 `__ standard - with a length limit of 63 characters. Otherwise, an - ``INVALID_ARGUMENT`` error is returned. + This field must conform to `RFC-1034 + `__ + standard with a length limit of 63 characters. + Otherwise, an ``INVALID_ARGUMENT`` error is + returned. """ parent: str = proto.Field( @@ -201,21 +226,24 @@ class CreateSampleQuerySetRequest(proto.Message): class UpdateSampleQuerySetRequest(proto.Message): r"""Request message for - [SampleQuerySetService.UpdateSampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySetService.UpdateSampleQuerySet] + `SampleQuerySetService.UpdateSampleQuerySet + `__ method. Attributes: sample_query_set (google.cloud.discoveryengine_v1beta.types.SampleQuerySet): Required. The sample query set to update. - If the caller does not have permission to update the - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet], + If the caller does not have permission to update + the `SampleQuerySet + `__, regardless of whether or not it exists, a ``PERMISSION_DENIED`` error is returned. - If the - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet] - to update does not exist a ``NOT_FOUND`` error is returned. + If the `SampleQuerySet + `__ + to update does not exist a ``NOT_FOUND`` error + is returned. update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided imported 'sample query set' to update. If not @@ -236,24 +264,28 @@ class UpdateSampleQuerySetRequest(proto.Message): class DeleteSampleQuerySetRequest(proto.Message): r"""Request message for - [SampleQuerySetService.DeleteSampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySetService.DeleteSampleQuerySet] + `SampleQuerySetService.DeleteSampleQuerySet + `__ method. Attributes: name (str): Required. Full resource name of - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet], + `SampleQuerySet + `__, such as ``projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}``. - If the caller does not have permission to delete the - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet], + If the caller does not have permission to delete + the `SampleQuerySet + `__, regardless of whether or not it exists, a ``PERMISSION_DENIED`` error is returned. - If the - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet] - to delete does not exist, a ``NOT_FOUND`` error is returned. + If the `SampleQuerySet + `__ + to delete does not exist, a ``NOT_FOUND`` error + is returned. """ name: str = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/schema.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/schema.py index 26a07ce369a8..6a89ca01f3a1 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/schema.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/schema.py @@ -48,12 +48,12 @@ class Schema(proto.Message): This field is a member of `oneof`_ ``schema``. name (str): - Immutable. The full resource name of the schema, in the - format of + Immutable. The full resource name of the schema, + in the format of ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}``. - This field must be a UTF-8 encoded string with a length - limit of 1024 characters. + This field must be a UTF-8 encoded string with a + length limit of 1024 characters. """ struct_schema: struct_pb2.Struct = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/schema_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/schema_service.py index 42437b4bf244..59dd7ec353f3 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/schema_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/schema_service.py @@ -40,13 +40,14 @@ class GetSchemaRequest(proto.Message): r"""Request message for - [SchemaService.GetSchema][google.cloud.discoveryengine.v1beta.SchemaService.GetSchema] + `SchemaService.GetSchema + `__ method. Attributes: name (str): - Required. The full resource name of the schema, in the - format of + Required. The full resource name of the schema, + in the format of ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}``. """ @@ -58,33 +59,40 @@ class GetSchemaRequest(proto.Message): class ListSchemasRequest(proto.Message): r"""Request message for - [SchemaService.ListSchemas][google.cloud.discoveryengine.v1beta.SchemaService.ListSchemas] + `SchemaService.ListSchemas + `__ method. Attributes: parent (str): - Required. The parent data store resource name, in the format - of + Required. The parent data store resource name, + in the format of ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}``. page_size (int): - The maximum number of - [Schema][google.cloud.discoveryengine.v1beta.Schema]s to - return. The service may return fewer than this value. + The maximum number of `Schema + `__s + to return. The service may return fewer than + this value. If unspecified, at most 100 - [Schema][google.cloud.discoveryengine.v1beta.Schema]s are - returned. + `Schema + `__s + are returned. - The maximum value is 1000; values above 1000 are set to - 1000. + The maximum value is 1000; values above 1000 are + set to 1000. page_token (str): A page token, received from a previous - [SchemaService.ListSchemas][google.cloud.discoveryengine.v1beta.SchemaService.ListSchemas] - call. Provide this to retrieve the subsequent page. - - When paginating, all other parameters provided to - [SchemaService.ListSchemas][google.cloud.discoveryengine.v1beta.SchemaService.ListSchemas] - must match the call that provided the page token. + `SchemaService.ListSchemas + `__ + call. Provide this to retrieve the subsequent + page. + + When paginating, all other parameters provided + to `SchemaService.ListSchemas + `__ + must match the call that provided the page + token. """ parent: str = proto.Field( @@ -103,17 +111,20 @@ class ListSchemasRequest(proto.Message): class ListSchemasResponse(proto.Message): r"""Response message for - [SchemaService.ListSchemas][google.cloud.discoveryengine.v1beta.SchemaService.ListSchemas] + `SchemaService.ListSchemas + `__ method. Attributes: schemas (MutableSequence[google.cloud.discoveryengine_v1beta.types.Schema]): - The [Schema][google.cloud.discoveryengine.v1beta.Schema]s. + The `Schema + `__s. next_page_token (str): A token that can be sent as - [ListSchemasRequest.page_token][google.cloud.discoveryengine.v1beta.ListSchemasRequest.page_token] - to retrieve the next page. If this field is omitted, there - are no subsequent pages. + `ListSchemasRequest.page_token + `__ + to retrieve the next page. If this field is + omitted, there are no subsequent pages. """ @property @@ -133,27 +144,31 @@ def raw_page(self): class CreateSchemaRequest(proto.Message): r"""Request message for - [SchemaService.CreateSchema][google.cloud.discoveryengine.v1beta.SchemaService.CreateSchema] + `SchemaService.CreateSchema + `__ method. Attributes: parent (str): - Required. The parent data store resource name, in the format - of + Required. The parent data store resource name, + in the format of ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}``. schema (google.cloud.discoveryengine_v1beta.types.Schema): - Required. The - [Schema][google.cloud.discoveryengine.v1beta.Schema] to - create. + Required. The `Schema + `__ + to create. schema_id (str): Required. The ID to use for the - [Schema][google.cloud.discoveryengine.v1beta.Schema], which - becomes the final component of the - [Schema.name][google.cloud.discoveryengine.v1beta.Schema.name]. + `Schema + `__, + which becomes the final component of the + `Schema.name + `__. This field should conform to - `RFC-1034 `__ standard - with a length limit of 63 characters. + `RFC-1034 + `__ + standard with a length limit of 63 characters. """ parent: str = proto.Field( @@ -173,20 +188,23 @@ class CreateSchemaRequest(proto.Message): class UpdateSchemaRequest(proto.Message): r"""Request message for - [SchemaService.UpdateSchema][google.cloud.discoveryengine.v1beta.SchemaService.UpdateSchema] + `SchemaService.UpdateSchema + `__ method. Attributes: schema (google.cloud.discoveryengine_v1beta.types.Schema): - Required. The - [Schema][google.cloud.discoveryengine.v1beta.Schema] to - update. + Required. The `Schema + `__ + to update. allow_missing (bool): If set to true, and the - [Schema][google.cloud.discoveryengine.v1beta.Schema] is not - found, a new - [Schema][google.cloud.discoveryengine.v1beta.Schema] is - created. In this situation, ``update_mask`` is ignored. + `Schema + `__ + is not found, a new `Schema + `__ + is created. In this situation, ``update_mask`` + is ignored. """ schema: gcd_schema.Schema = proto.Field( @@ -202,13 +220,14 @@ class UpdateSchemaRequest(proto.Message): class DeleteSchemaRequest(proto.Message): r"""Request message for - [SchemaService.DeleteSchema][google.cloud.discoveryengine.v1beta.SchemaService.DeleteSchema] + `SchemaService.DeleteSchema + `__ method. Attributes: name (str): - Required. The full resource name of the schema, in the - format of + Required. The full resource name of the schema, + in the format of ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}``. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/search_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/search_service.py index a8bd37079766..28da78a5b630 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/search_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/search_service.py @@ -35,63 +35,72 @@ class SearchRequest(proto.Message): r"""Request message for - [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] + `SearchService.Search + `__ method. Attributes: serving_config (str): - Required. The resource name of the Search serving config, - such as + Required. The resource name of the Search + serving config, such as ``projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config``, or ``projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config``. - This field is used to identify the serving configuration - name, set of models used to make the search. + This field is used to identify the serving + configuration name, set of models used to make + the search. branch (str): The branch resource name, such as ``projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0``. - Use ``default_branch`` as the branch ID or leave this field - empty, to search documents under the default branch. + Use ``default_branch`` as the branch ID or leave + this field empty, to search documents under the + default branch. query (str): Raw search query. image_query (google.cloud.discoveryengine_v1beta.types.SearchRequest.ImageQuery): Raw image query. page_size (int): - Maximum number of - [Document][google.cloud.discoveryengine.v1beta.Document]s to - return. The maximum allowed value depends on the data type. - Values above the maximum value are coerced to the maximum - value. - - - Websites with basic indexing: Default ``10``, Maximum - ``25``. - - Websites with advanced indexing: Default ``25``, Maximum - ``50``. - - Other: Default ``50``, Maximum ``100``. - - If this field is negative, an ``INVALID_ARGUMENT`` is - returned. + Maximum number of `Document + `__s + to return. The maximum allowed value depends on + the data type. Values above the maximum value + are coerced to the maximum value. + + * Websites with basic indexing: Default ``10``, + Maximum ``25``. * Websites with advanced + indexing: Default ``25``, Maximum ``50``. + + * Other: Default ``50``, Maximum ``100``. + + If this field is negative, an + ``INVALID_ARGUMENT`` is returned. page_token (str): A page token received from a previous - [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] - call. Provide this to retrieve the subsequent page. - - When paginating, all other parameters provided to - [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] - must match the call that provided the page token. Otherwise, - an ``INVALID_ARGUMENT`` error is returned. + `SearchService.Search + `__ + call. Provide this to retrieve the subsequent + page. + + When paginating, all other parameters provided + to `SearchService.Search + `__ + must match the call that provided the page + token. Otherwise, an ``INVALID_ARGUMENT`` + error is returned. offset (int): - A 0-indexed integer that specifies the current offset (that - is, starting result location, amongst the - [Document][google.cloud.discoveryengine.v1beta.Document]s - deemed by the API as relevant) in search results. This field - is only considered if - [page_token][google.cloud.discoveryengine.v1beta.SearchRequest.page_token] + A 0-indexed integer that specifies the current + offset (that is, starting result location, + amongst the `Document + `__s + deemed by the API as relevant) in search + results. This field is only considered if + `page_token + `__ is unset. - If this field is negative, an ``INVALID_ARGUMENT`` is - returned. + If this field is negative, an + ``INVALID_ARGUMENT`` is returned. one_box_page_size (int): The maximum number of results to return for OneBox. This applies to each OneBox type @@ -104,98 +113,115 @@ class SearchRequest(proto.Message): dataStore within an engine, they should use the specs at the top level. filter (str): - The filter syntax consists of an expression language for - constructing a predicate from one or more fields of the - documents being filtered. Filter expression is - case-sensitive. - - If this field is unrecognizable, an ``INVALID_ARGUMENT`` is - returned. - - Filtering in Vertex AI Search is done by mapping the LHS - filter key to a key property defined in the Vertex AI Search - backend -- this mapping is defined by the customer in their - schema. For example a media customer might have a field - 'name' in their schema. In this case the filter would look - like this: filter --> name:'ANY("king kong")' - - For more information about filtering including syntax and - filter operators, see - `Filter `__ + The filter syntax consists of an expression + language for constructing a predicate from one + or more fields of the documents being filtered. + Filter expression is case-sensitive. + + If this field is unrecognizable, an + ``INVALID_ARGUMENT`` is returned. + + Filtering in Vertex AI Search is done by mapping + the LHS filter key to a key property defined in + the Vertex AI Search backend -- this mapping is + defined by the customer in their schema. For + example a media customer might have a field + 'name' in their schema. In this case the filter + would look like this: filter --> name:'ANY("king + kong")' + + For more information about filtering including + syntax and filter operators, see + `Filter + `__ canonical_filter (str): - The default filter that is applied when a user performs a - search without checking any filters on the search page. - - The filter applied to every search request when quality - improvement such as query expansion is needed. In the case a - query does not have a sufficient amount of results this - filter will be used to determine whether or not to enable - the query expansion flow. The original filter will still be - used for the query expanded search. This field is strongly - recommended to achieve high search quality. + The default filter that is applied when a user + performs a search without checking any filters + on the search page. + + The filter applied to every search request when + quality improvement such as query expansion is + needed. In the case a query does not have a + sufficient amount of results this filter will be + used to determine whether or not to enable the + query expansion flow. The original filter will + still be used for the query expanded search. + This field is strongly recommended to achieve + high search quality. For more information about filter syntax, see - [SearchRequest.filter][google.cloud.discoveryengine.v1beta.SearchRequest.filter]. + `SearchRequest.filter + `__. order_by (str): - The order in which documents are returned. Documents can be - ordered by a field in an - [Document][google.cloud.discoveryengine.v1beta.Document] - object. Leave it unset if ordered by relevance. ``order_by`` - expression is case-sensitive. - - For more information on ordering the website search results, - see `Order web search - results `__. - For more information on ordering the healthcare search - results, see `Order healthcare search - results `__. - If this field is unrecognizable, an ``INVALID_ARGUMENT`` is - returned. + The order in which documents are returned. + Documents can be ordered by a field in an + `Document + `__ + object. Leave it unset if ordered by relevance. + ``order_by`` expression is case-sensitive. + + For more information on ordering the website + search results, see `Order web search + results + `__. + For more information on ordering the healthcare + search results, see `Order healthcare search + results + `__. + If this field is unrecognizable, an + ``INVALID_ARGUMENT`` is returned. user_info (google.cloud.discoveryengine_v1beta.types.UserInfo): - Information about the end user. Highly recommended for - analytics. - [UserInfo.user_agent][google.cloud.discoveryengine.v1beta.UserInfo.user_agent] + Information about the end user. + Highly recommended for analytics. + `UserInfo.user_agent + `__ is used to deduce ``device_type`` for analytics. language_code (str): - The BCP-47 language code, such as "en-US" or "sr-Latn". For - more information, see `Standard - fields `__. - This field helps to better interpret the query. If a value - isn't specified, the query language code is automatically - detected, which may not be accurate. + The BCP-47 language code, such as "en-US" or + "sr-Latn". For more information, see `Standard + fields + `__. + This field helps to better interpret the query. + If a value isn't specified, the query language + code is automatically detected, which may not be + accurate. region_code (str): - The Unicode country/region code (CLDR) of a location, such - as "US" and "419". For more information, see `Standard - fields `__. - If set, then results will be boosted based on the - region_code provided. + The Unicode country/region code (CLDR) of a + location, such as "US" and "419". For more + information, see `Standard fields + `__. + If set, then results will be boosted based on + the region_code provided. facet_specs (MutableSequence[google.cloud.discoveryengine_v1beta.types.SearchRequest.FacetSpec]): - Facet specifications for faceted search. If empty, no facets - are returned. - - A maximum of 100 values are allowed. Otherwise, an - ``INVALID_ARGUMENT`` error is returned. + Facet specifications for faceted search. If + empty, no facets are returned. + A maximum of 100 values are allowed. Otherwise, + an ``INVALID_ARGUMENT`` error is returned. boost_spec (google.cloud.discoveryengine_v1beta.types.SearchRequest.BoostSpec): - Boost specification to boost certain documents. For more - information on boosting, see - `Boosting `__ + Boost specification to boost certain documents. + For more information on boosting, see + `Boosting + `__ params (MutableMapping[str, google.protobuf.struct_pb2.Value]): Additional search parameters. - For public website search only, supported values are: + For public website search only, supported values + are: - - ``user_country_code``: string. Default empty. If set to - non-empty, results are restricted or boosted based on the - location provided. For example, - ``user_country_code: "au"`` + * ``user_country_code``: string. Default empty. + If set to non-empty, results are restricted + or boosted based on the location provided. + For example, ``user_country_code: "au"`` - For available codes see `Country - Codes `__ + For available codes see `Country + Codes + `__ - - ``search_type``: double. Default empty. Enables - non-webpage searching depending on the value. The only - valid non-default value is 1, which enables image - searching. For example, ``search_type: 1`` + * ``search_type``: double. Default empty. + Enables non-webpage searching depending on + the value. The only valid non-default value is + 1, which enables image searching. + For example, ``search_type: 1`` query_expansion_spec (google.cloud.discoveryengine_v1beta.types.SearchRequest.QueryExpansionSpec): The query expansion specification that specifies the conditions under which query @@ -205,68 +231,62 @@ class SearchRequest(proto.Message): specifies the mode under which spell correction takes effect. user_pseudo_id (str): - A unique identifier for tracking visitors. For example, this - could be implemented with an HTTP cookie, which should be - able to uniquely identify a visitor on a single device. This - unique identifier should not change if the visitor logs in - or out of the website. + A unique identifier for tracking visitors. For + example, this could be implemented with an HTTP + cookie, which should be able to uniquely + identify a visitor on a single device. This + unique identifier should not change if the + visitor logs in or out of the website. This field should NOT have a fixed value such as ``unknown_visitor``. This should be the same identifier as - [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id] + `UserEvent.user_pseudo_id + `__ and - [CompleteQueryRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.CompleteQueryRequest.user_pseudo_id] + `CompleteQueryRequest.user_pseudo_id + `__ - The field must be a UTF-8 encoded string with a length limit - of 128 characters. Otherwise, an ``INVALID_ARGUMENT`` error - is returned. + The field must be a UTF-8 encoded string with a + length limit of 128 characters. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. content_search_spec (google.cloud.discoveryengine_v1beta.types.SearchRequest.ContentSearchSpec): A specification for configuring the behavior of content search. embedding_spec (google.cloud.discoveryengine_v1beta.types.SearchRequest.EmbeddingSpec): - Uses the provided embedding to do additional semantic - document retrieval. The retrieval is based on the dot - product of - [SearchRequest.EmbeddingSpec.EmbeddingVector.vector][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.vector] + Uses the provided embedding to do additional + semantic document retrieval. The retrieval is + based on the dot product of + `SearchRequest.EmbeddingSpec.EmbeddingVector.vector + `__ and the document embedding that is provided in - [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path]. + `SearchRequest.EmbeddingSpec.EmbeddingVector.field_path + `__. If - [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path] + `SearchRequest.EmbeddingSpec.EmbeddingVector.field_path + `__ is not provided, it will use - [ServingConfig.EmbeddingConfig.field_path][google.cloud.discoveryengine.v1beta.ServingConfig.embedding_config]. + `ServingConfig.EmbeddingConfig.field_path + `__. ranking_expression (str): - The ranking expression controls the customized ranking on - retrieval documents. This overrides - [ServingConfig.ranking_expression][google.cloud.discoveryengine.v1beta.ServingConfig.ranking_expression]. - The syntax and supported features depend on the - ``ranking_expression_backend`` value. If - ``ranking_expression_backend`` is not provided, it defaults - to ``RANK_BY_EMBEDDING``. + The ranking expression controls the customized ranking on retrieval documents. This overrides [ServingConfig.ranking_expression][google.cloud.discoveryengine.v1beta.ServingConfig.ranking_expression]. The syntax and supported features depend on the ``ranking_expression_backend`` value. If ``ranking_expression_backend`` is not provided, it defaults to ``RANK_BY_EMBEDDING``. - If - [ranking_expression_backend][google.cloud.discoveryengine.v1beta.SearchRequest.ranking_expression_backend] - is not provided or set to ``RANK_BY_EMBEDDING``, it should - be a single function or multiple functions that are joined - by "+". + If [ranking_expression_backend][google.cloud.discoveryengine.v1beta.SearchRequest.ranking_expression_backend] is not provided or set to ``RANK_BY_EMBEDDING``, it should be a single function or multiple functions that are joined by "+". - - ranking_expression = function, { " + ", function }; + - ranking_expression = function, { " + ", function }; Supported functions: - - double \* relevance_score - - double \* dotProduct(embedding_field_path) + - double \* relevance_score + - double \* dotProduct(embedding_field_path) Function variables: - - ``relevance_score``: pre-defined keywords, used for - measure relevance between query and document. - - ``embedding_field_path``: the document embedding field - used with query embedding vector. - - ``dotProduct``: embedding function between - ``embedding_field_path`` and query embedding vector. + - ``relevance_score``: pre-defined keywords, used for measure relevance between query and document. + - ``embedding_field_path``: the document embedding field used with query embedding vector. + - ``dotProduct``: embedding function between ``embedding_field_path`` and query embedding vector. Example ranking expression: @@ -275,71 +295,34 @@ class SearchRequest(proto.Message): If document has an embedding field doc_embedding, the ranking expression could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`. - If - [ranking_expression_backend][google.cloud.discoveryengine.v1beta.SearchRequest.ranking_expression_backend] - is set to ``RANK_BY_FORMULA``, the following expression - types (and combinations of those chained using + or - - - operators) are supported: - - - ``double`` - - ``signal`` - - ``log(signal)`` - - ``exp(signal)`` - - ``rr(signal, double > 0)`` -- reciprocal rank - transformation with second argument being a denominator - constant. - - ``is_nan(signal)`` -- returns 0 if signal is NaN, 1 - otherwise. - - ``fill_nan(signal1, signal2 | double)`` -- if signal1 is - NaN, returns signal2 \| double, else returns signal1. - - Here are a few examples of ranking formulas that use the - supported ranking expression types: - - - ``0.2 * semantic_similarity_score + 0.8 * log(keyword_similarity_score)`` - -- mostly rank by the logarithm of - ``keyword_similarity_score`` with slight - ``semantic_smilarity_score`` adjustment. - - ``0.2 * exp(fill_nan(semantic_similarity_score, 0)) + 0.3 * is_nan(keyword_similarity_score)`` - -- rank by the exponent of ``semantic_similarity_score`` - filling the value with 0 if it's NaN, also add constant - 0.3 adjustment to the final score if - ``semantic_similarity_score`` is NaN. - - ``0.2 * rr(semantic_similarity_score, 16) + 0.8 * rr(keyword_similarity_score, 16)`` - -- mostly rank by the reciprocal rank of - ``keyword_similarity_score`` with slight adjustment of - reciprocal rank of ``semantic_smilarity_score``. + If [ranking_expression_backend][google.cloud.discoveryengine.v1beta.SearchRequest.ranking_expression_backend] is set to ``RANK_BY_FORMULA``, the following expression types (and combinations of those chained using + or + + - operators) are supported: + + - ``double`` + - ``signal`` + - ``log(signal)`` + - ``exp(signal)`` + - ``rr(signal, double > 0)`` -- reciprocal rank transformation with second argument being a denominator constant. + - ``is_nan(signal)`` -- returns 0 if signal is NaN, 1 otherwise. + - ``fill_nan(signal1, signal2 | double)`` -- if signal1 is NaN, returns signal2 \| double, else returns signal1. + + Here are a few examples of ranking formulas that use the supported ranking expression types: + + - ``0.2 * semantic_similarity_score + 0.8 * log(keyword_similarity_score)`` -- mostly rank by the logarithm of ``keyword_similarity_score`` with slight ``semantic_smilarity_score`` adjustment. + - ``0.2 * exp(fill_nan(semantic_similarity_score, 0)) + 0.3 * is_nan(keyword_similarity_score)`` -- rank by the exponent of ``semantic_similarity_score`` filling the value with 0 if it's NaN, also add constant 0.3 adjustment to the final score if ``semantic_similarity_score`` is NaN. + - ``0.2 * rr(semantic_similarity_score, 16) + 0.8 * rr(keyword_similarity_score, 16)`` -- mostly rank by the reciprocal rank of ``keyword_similarity_score`` with slight adjustment of reciprocal rank of ``semantic_smilarity_score``. The following signals are supported: - - ``semantic_similarity_score``: semantic similarity - adjustment that is calculated using the embeddings - generated by a proprietary Google model. This score - determines how semantically similar a search query is to a - document. - - ``keyword_similarity_score``: keyword match adjustment - uses the Best Match 25 (BM25) ranking function. This score - is calculated using a probabilistic model to estimate the - probability that a document is relevant to a given query. - - ``relevance_score``: semantic relevance adjustment that - uses a proprietary Google model to determine the meaning - and intent behind a user's query in context with the - content in the documents. - - ``pctr_rank``: predicted conversion rate adjustment as a - rank use predicted Click-through rate (pCTR) to gauge the - relevance and attractiveness of a search result from a - user's perspective. A higher pCTR suggests that the result - is more likely to satisfy the user's query and intent, - making it a valuable signal for ranking. - - ``freshness_rank``: freshness adjustment as a rank - - ``document_age``: The time in hours elapsed since the - document was last updated, a floating-point number (e.g., - 0.25 means 15 minutes). - - ``topicality_rank``: topicality adjustment as a rank. Uses - proprietary Google model to determine the keyword-based - overlap between the query and the document. - - ``base_rank``: the default rank of the result + - ``semantic_similarity_score``: semantic similarity adjustment that is calculated using the embeddings generated by a proprietary Google model. This score determines how semantically similar a search query is to a document. + - ``keyword_similarity_score``: keyword match adjustment uses the Best Match 25 (BM25) ranking function. This score is calculated using a probabilistic model to estimate the probability that a document is relevant to a given query. + - ``relevance_score``: semantic relevance adjustment that uses a proprietary Google model to determine the meaning and intent behind a user's query in context with the content in the documents. + - ``pctr_rank``: predicted conversion rate adjustment as a rank use predicted Click-through rate (pCTR) to gauge the relevance and attractiveness of a search result from a user's perspective. A higher pCTR suggests that the result is more likely to satisfy the user's query and intent, making it a valuable signal for ranking. + - ``freshness_rank``: freshness adjustment as a rank + - ``document_age``: The time in hours elapsed since the document was last updated, a floating-point number (e.g., 0.25 means 15 minutes). + - ``topicality_rank``: topicality adjustment as a rank. Uses proprietary Google model to determine the keyword-based overlap between the query and the document. + - ``base_rank``: the default rank of the result ranking_expression_backend (google.cloud.discoveryengine_v1beta.types.SearchRequest.RankingExpressionBackend): The backend to use for the ranking expression evaluation. @@ -347,34 +330,41 @@ class SearchRequest(proto.Message): Whether to turn on safe search. This is only supported for website search. user_labels (MutableMapping[str, str]): - The user labels applied to a resource must meet the - following requirements: - - - Each resource can have multiple labels, up to a maximum of - 64. - - Each label must be a key-value pair. - - Keys have a minimum length of 1 character and a maximum - length of 63 characters and cannot be empty. Values can be - empty and have a maximum length of 63 characters. - - Keys and values can contain only lowercase letters, - numeric characters, underscores, and dashes. All - characters must use UTF-8 encoding, and international - characters are allowed. - - The key portion of a label must be unique. However, you - can use the same key with multiple resources. - - Keys must start with a lowercase letter or international - character. + The user labels applied to a resource must meet + the following requirements: + * Each resource can have multiple labels, up to + a maximum of 64. + + * Each label must be a key-value pair. + * Keys have a minimum length of 1 character and + a maximum length of 63 characters and cannot + be empty. Values can be empty and have a maximum + length of 63 characters. + + * Keys and values can contain only lowercase + letters, numeric characters, underscores, and + dashes. All characters must use UTF-8 encoding, + and international characters are allowed. + + * The key portion of a label must be unique. + However, you can use the same key with + multiple resources. + + * Keys must start with a lowercase letter or + international character. See `Google Cloud - Document `__ + Document + `__ for more details. natural_language_query_understanding_spec (google.cloud.discoveryengine_v1beta.types.SearchRequest.NaturalLanguageQueryUnderstandingSpec): - If ``naturalLanguageQueryUnderstandingSpec`` is not - specified, no additional natural language query - understanding will be done. + If ``naturalLanguageQueryUnderstandingSpec`` is + not specified, no additional natural language + query understanding will be done. search_as_you_type_spec (google.cloud.discoveryengine_v1beta.types.SearchRequest.SearchAsYouTypeSpec): - Search as you type configuration. Only supported for the - [IndustryVertical.MEDIA][google.cloud.discoveryengine.v1beta.IndustryVertical.MEDIA] + Search as you type configuration. Only supported + for the `IndustryVertical.MEDIA + `__ vertical. session (str): The session resource name. Optional. @@ -421,13 +411,17 @@ class SearchRequest(proto.Message): The specification for personalization. Notice that if both - [ServingConfig.personalization_spec][google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec] + `ServingConfig.personalization_spec + `__ and - [SearchRequest.personalization_spec][google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec] + `SearchRequest.personalization_spec + `__ are set, - [SearchRequest.personalization_spec][google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec] + `SearchRequest.personalization_spec + `__ overrides - [ServingConfig.personalization_spec][google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec]. + `ServingConfig.personalization_spec + `__. """ class RelevanceThreshold(proto.Enum): @@ -498,14 +492,16 @@ class DataStoreSpec(proto.Message): Attributes: data_store (str): Required. Full resource name of - [DataStore][google.cloud.discoveryengine.v1beta.DataStore], + `DataStore + `__, such as ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}``. filter (str): - Optional. Filter specification to filter documents in the - data store specified by data_store field. For more - information on filtering, see - `Filtering `__ + Optional. Filter specification to filter + documents in the data store specified by + data_store field. For more information on + filtering, see `Filtering + `__ """ data_store: str = proto.Field( @@ -524,80 +520,91 @@ class FacetSpec(proto.Message): facet_key (google.cloud.discoveryengine_v1beta.types.SearchRequest.FacetSpec.FacetKey): Required. The facet key specification. limit (int): - Maximum facet values that are returned for this facet. If - unspecified, defaults to 20. The maximum allowed value is - 300. Values above 300 are coerced to 300. For aggregation in - healthcare search, when the [FacetKey.key] is - "healthcare_aggregation_key", the limit will be overridden - to 10,000 internally, regardless of the value set here. - - If this field is negative, an ``INVALID_ARGUMENT`` is - returned. + Maximum facet values that are returned for this + facet. If unspecified, defaults to 20. The + maximum allowed value is 300. Values above 300 + are coerced to 300. + For aggregation in healthcare search, when the + [FacetKey.key] is "healthcare_aggregation_key", + the limit will be overridden to 10,000 + internally, regardless of the value set here. + + If this field is negative, an + ``INVALID_ARGUMENT`` is returned. excluded_filter_keys (MutableSequence[str]): List of keys to exclude when faceting. By default, - [FacetKey.key][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.key] - is not excluded from the filter unless it is listed in this - field. - - Listing a facet key in this field allows its values to - appear as facet results, even when they are filtered out of - search results. Using this field does not affect what search - results are returned. - - For example, suppose there are 100 documents with the color - facet "Red" and 200 documents with the color facet "Blue". A - query containing the filter "color:ANY("Red")" and having - "color" as - [FacetKey.key][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.key] - would by default return only "Red" documents in the search - results, and also return "Red" with count 100 as the only - color facet. Although there are also blue documents - available, "Blue" would not be shown as an available facet - value. - - If "color" is listed in "excludedFilterKeys", then the query - returns the facet values "Red" with count 100 and "Blue" - with count 200, because the "color" key is now excluded from - the filter. Because this field doesn't affect search - results, the search results are still correctly filtered to - return only "Red" documents. - - A maximum of 100 values are allowed. Otherwise, an - ``INVALID_ARGUMENT`` error is returned. + `FacetKey.key + `__ + is not excluded from the filter unless it is + listed in this field. + + Listing a facet key in this field allows its + values to appear as facet results, even when + they are filtered out of search results. Using + this field does not affect what search results + are returned. + + For example, suppose there are 100 documents + with the color facet "Red" and 200 documents + with the color facet "Blue". A query containing + the filter "color:ANY("Red")" and having "color" + as `FacetKey.key + `__ + would by default return only "Red" documents in + the search results, and also return "Red" with + count 100 as the only color facet. Although + there are also blue documents available, "Blue" + would not be shown as an available facet value. + + If "color" is listed in "excludedFilterKeys", + then the query returns the facet values "Red" + with count 100 and "Blue" with count 200, + because the "color" key is now excluded from the + filter. Because this field doesn't affect search + results, the search results are still correctly + filtered to return only "Red" documents. + + A maximum of 100 values are allowed. Otherwise, + an ``INVALID_ARGUMENT`` error is returned. enable_dynamic_position (bool): - Enables dynamic position for this facet. If set to true, the - position of this facet among all facets in the response is - determined automatically. If dynamic facets are enabled, it - is ordered together. If set to false, the position of this - facet in the response is the same as in the request, and it - is ranked before the facets with dynamic position enable and - all dynamic facets. - - For example, you may always want to have rating facet - returned in the response, but it's not necessarily to always - display the rating facet at the top. In that case, you can - set enable_dynamic_position to true so that the position of - rating facet in response is determined automatically. - - Another example, assuming you have the following facets in - the request: - - - "rating", enable_dynamic_position = true - - - "price", enable_dynamic_position = false - - - "brands", enable_dynamic_position = false - - And also you have a dynamic facets enabled, which generates - a facet ``gender``. Then the final order of the facets in - the response can be ("price", "brands", "rating", "gender") - or ("price", "brands", "gender", "rating") depends on how - API orders "gender" and "rating" facets. However, notice - that "price" and "brands" are always ranked at first and - second position because their enable_dynamic_position is - false. + Enables dynamic position for this facet. If set + to true, the position of this facet among all + facets in the response is determined + automatically. If dynamic facets are enabled, it + is ordered together. If set to false, the + position of this facet in the response is the + same as in the request, and it is ranked before + the facets with dynamic position enable and all + dynamic facets. + + For example, you may always want to have rating + facet returned in the response, but it's not + necessarily to always display the rating facet + at the top. In that case, you can set + enable_dynamic_position to true so that the + position of rating facet in response is + determined automatically. + + Another example, assuming you have the following + facets in the request: + + * "rating", enable_dynamic_position = true + + * "price", enable_dynamic_position = false + + * "brands", enable_dynamic_position = false + + And also you have a dynamic facets enabled, + which generates a facet ``gender``. Then the + final order of the facets in the response can be + ("price", "brands", "rating", "gender") or + ("price", "brands", "gender", "rating") depends + on how API orders "gender" and "rating" facets. + However, notice that "price" and "brands" are + always ranked at first and second position + because their enable_dynamic_position is false. """ class FacetKey(proto.Message): @@ -605,21 +612,23 @@ class FacetKey(proto.Message): Attributes: key (str): - Required. Supported textual and numerical facet keys in - [Document][google.cloud.discoveryengine.v1beta.Document] - object, over which the facet values are computed. Facet key - is case-sensitive. + Required. Supported textual and numerical facet + keys in `Document + `__ + object, over which the facet values are + computed. Facet key is case-sensitive. intervals (MutableSequence[google.cloud.discoveryengine_v1beta.types.Interval]): Set only if values should be bucketed into intervals. Must be set for facets with numerical values. Must not be set for facet with text values. Maximum number of intervals is 30. restricted_values (MutableSequence[str]): - Only get facet for the given restricted values. Only - supported on textual fields. For example, suppose "category" - has three values "Action > 2022", "Action > 2021" and - "Sci-Fi > 2022". If set "restricted_values" to "Action > - 2022", the "category" facet only contains "Action > 2022". + Only get facet for the given restricted values. + Only supported on textual fields. For example, + suppose "category" has three values "Action > + 2022", "Action > 2021" and "Sci-Fi > 2022". If + set "restricted_values" to "Action > 2022", the + "category" facet only contains "Action > 2022". Only supported on textual fields. Maximum is 10. prefixes (MutableSequence[str]): Only get facet values that start with the @@ -647,18 +656,24 @@ class FacetKey(proto.Message): Allowed values are: - - "count desc", which means order by - [SearchResponse.Facet.values.count][google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue.count] - descending. - - - "value desc", which means order by - [SearchResponse.Facet.values.value][google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue.value] - descending. Only applies to textual facets. - - If not set, textual values are sorted in `natural - order `__; - numerical intervals are sorted in the order given by - [FacetSpec.FacetKey.intervals][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.intervals]. + * "count desc", which means order by + `SearchResponse.Facet.values.count + `__ + descending. + + * "value desc", which means order by + `SearchResponse.Facet.values.value + `__ + descending. + Only applies to textual facets. + + If not set, textual values are sorted in + `natural order + `__; + numerical intervals are sorted in the order + given by + `FacetSpec.FacetKey.intervals + `__. """ key: str = proto.Field( @@ -727,39 +742,46 @@ class ConditionBoostSpec(proto.Message): Attributes: condition (str): - An expression which specifies a boost condition. The syntax - and supported fields are the same as a filter expression. - See - [SearchRequest.filter][google.cloud.discoveryengine.v1beta.SearchRequest.filter] + An expression which specifies a boost condition. + The syntax and supported fields are the same as + a filter expression. See `SearchRequest.filter + `__ for detail syntax and limitations. Examples: - - To boost documents with document ID "doc_1" or "doc_2", - and color "Red" or "Blue": - ``(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))`` + * To boost documents with document ID "doc_1" or + "doc_2", and color "Red" or "Blue": + + ``(document_id: ANY("doc_1", "doc_2")) AND + (color: ANY("Red", "Blue"))`` boost (float): - Strength of the condition boost, which should be in [-1, 1]. - Negative boost means demotion. Default is 0.0. - - Setting to 1.0 gives the document a big promotion. However, - it does not necessarily mean that the boosted document will - be the top result at all times, nor that other documents - will be excluded. Results could still be shown even when - none of them matches the condition. And results that are - significantly more relevant to the search query can still - trump your heavily favored but irrelevant documents. - - Setting to -1.0 gives the document a big demotion. However, - results that are deeply relevant might still be shown. The - document will have an upstream battle to get a fairly high + Strength of the condition boost, which should be + in [-1, 1]. Negative boost means demotion. + Default is 0.0. + + Setting to 1.0 gives the document a big + promotion. However, it does not necessarily mean + that the boosted document will be the top result + at all times, nor that other documents will be + excluded. Results could still be shown even when + none of them matches the condition. And results + that are significantly more relevant to the + search query can still trump your heavily + favored but irrelevant documents. + + Setting to -1.0 gives the document a big + demotion. However, results that are deeply + relevant might still be shown. The document will + have an upstream battle to get a fairly high ranking, but it is not blocked out completely. - Setting to 0.0 means no boost applied. The boosting - condition is ignored. Only one of the (condition, boost) - combination or the boost_control_spec below are set. If both - are set then the global boost is ignored and the more - fine-grained boost_control_spec is applied. + Setting to 0.0 means no boost applied. The + boosting condition is ignored. Only one of the + (condition, boost) combination or the + boost_control_spec below are set. If both are + set then the global boost is ignored and the + more fine-grained boost_control_spec is applied. boost_control_spec (google.cloud.discoveryengine_v1beta.types.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec): Complex specification for custom ranking based on customer defined attribute value. @@ -775,19 +797,22 @@ class BoostControlSpec(proto.Message): The name of the field whose value will be used to determine the boost amount. attribute_type (google.cloud.discoveryengine_v1beta.types.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.AttributeType): - The attribute type to be used to determine the boost amount. - The attribute value can be derived from the field value of - the specified field_name. In the case of numerical it is + The attribute type to be used to determine the + boost amount. The attribute value can be derived + from the field value of the specified + field_name. In the case of numerical it is straightforward i.e. attribute_value = - numerical_field_value. In the case of freshness however, - attribute_value = (time.now() - datetime_field_value). + numerical_field_value. In the case of freshness + however, attribute_value = (time.now() - + datetime_field_value). interpolation_type (google.cloud.discoveryengine_v1beta.types.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.InterpolationType): The interpolation type to be applied to connect the control points listed below. control_points (MutableSequence[google.cloud.discoveryengine_v1beta.types.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint]): - The control points used to define the curve. The monotonic - function (defined through the interpolation_type above) - passes through the control points listed here. + The control points used to define the curve. The + monotonic function (defined through the + interpolation_type above) passes through the + control points listed here. """ class AttributeType(proto.Enum): @@ -798,19 +823,21 @@ class AttributeType(proto.Enum): ATTRIBUTE_TYPE_UNSPECIFIED (0): Unspecified AttributeType. NUMERICAL (1): - The value of the numerical field will be used to dynamically - update the boost amount. In this case, the attribute_value - (the x value) of the control point will be the actual value - of the numerical field for which the boost_amount is + The value of the numerical field will be used to + dynamically update the boost amount. In this + case, the attribute_value (the x value) of the + control point will be the actual value of the + numerical field for which the boost_amount is specified. FRESHNESS (2): - For the freshness use case the attribute value will be the - duration between the current time and the date in the - datetime field specified. The value must be formatted as an - XSD ``dayTimeDuration`` value (a restricted subset of an ISO - 8601 duration value). The pattern for this is: - ``[nD][T[nH][nM][nS]]``. For example, ``5D``, ``3DT12H30M``, - ``T24H``. + For the freshness use case the attribute value + will be the duration between the current time + and the date in the datetime field specified. + The value must be formatted as an XSD + ``dayTimeDuration`` value (a restricted subset + of an ISO 8601 duration value). The pattern for + this is: ```nD `__`nM `__]``. For + example, ``5D``, ``3DT12H30M``, ``T24H``. """ ATTRIBUTE_TYPE_UNSPECIFIED = 0 NUMERICAL = 1 @@ -841,13 +868,16 @@ class ControlPoint(proto.Message): Can be one of: 1. The numerical field value. - 2. The duration spec for freshness: The value must be - formatted as an XSD ``dayTimeDuration`` value (a - restricted subset of an ISO 8601 duration value). The - pattern for this is: ``[nD][T[nH][nM][nS]]``. + 2. The duration spec for freshness: + + The value must be formatted as an XSD + ``dayTimeDuration`` value (a restricted subset + of an ISO 8601 duration value). The pattern for + this is: ```nD `__`nM `__]``. boost_amount (float): - The value between -1 to 1 by which to boost the score if the - attribute_value evaluates to the value specified above. + The value between -1 to 1 by which to boost the + score if the attribute_value evaluates to the + value specified above. """ attribute_value: str = proto.Field( @@ -909,9 +939,9 @@ class QueryExpansionSpec(proto.Message): Attributes: condition (google.cloud.discoveryengine_v1beta.types.SearchRequest.QueryExpansionSpec.Condition): - The condition under which query expansion should occur. - Default to - [Condition.DISABLED][google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.Condition.DISABLED]. + The condition under which query expansion should + occur. Default to `Condition.DISABLED + `__. pin_unexpanded_results (bool): Whether to pin unexpanded results. If this field is set to true, unexpanded products are @@ -925,13 +955,15 @@ class Condition(proto.Enum): Values: CONDITION_UNSPECIFIED (0): - Unspecified query expansion condition. In this case, server - behavior defaults to - [Condition.DISABLED][google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.Condition.DISABLED]. + Unspecified query expansion condition. In this + case, server behavior defaults to + `Condition.DISABLED + `__. DISABLED (1): - Disabled query expansion. Only the exact search query is - used, even if - [SearchResponse.total_size][google.cloud.discoveryengine.v1beta.SearchResponse.total_size] + Disabled query expansion. Only the exact search + query is used, even if + `SearchResponse.total_size + `__ is zero. AUTO (2): Automatic query expansion built by the Search @@ -956,9 +988,10 @@ class SpellCorrectionSpec(proto.Message): Attributes: mode (google.cloud.discoveryengine_v1beta.types.SearchRequest.SpellCorrectionSpec.Mode): - The mode under which spell correction replaces the original - search query. Defaults to - [Mode.AUTO][google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.Mode.AUTO]. + The mode under which spell correction + replaces the original search query. Defaults to + `Mode.AUTO + `__. """ class Mode(proto.Enum): @@ -967,14 +1000,17 @@ class Mode(proto.Enum): Values: MODE_UNSPECIFIED (0): - Unspecified spell correction mode. In this case, server - behavior defaults to - [Mode.AUTO][google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.Mode.AUTO]. + Unspecified spell correction mode. In this case, + server behavior defaults to + `Mode.AUTO + `__. SUGGESTION_ONLY (1): - Search API tries to find a spelling suggestion. If a - suggestion is found, it is put in the - [SearchResponse.corrected_query][google.cloud.discoveryengine.v1beta.SearchResponse.corrected_query]. - The spelling suggestion won't be used as the search query. + Search API tries to find a spelling suggestion. + If a suggestion is found, it is put in the + `SearchResponse.corrected_query + `__. + The spelling suggestion won't be used as the + search query. AUTO (2): Automatic spell correction built by the Search API. Search will be based on the @@ -996,28 +1032,32 @@ class ContentSearchSpec(proto.Message): Attributes: snippet_spec (google.cloud.discoveryengine_v1beta.types.SearchRequest.ContentSearchSpec.SnippetSpec): - If ``snippetSpec`` is not specified, snippets are not - included in the search response. + If ``snippetSpec`` is not specified, snippets + are not included in the search response. summary_spec (google.cloud.discoveryengine_v1beta.types.SearchRequest.ContentSearchSpec.SummarySpec): - If ``summarySpec`` is not specified, summaries are not - included in the search response. + If ``summarySpec`` is not specified, summaries + are not included in the search response. extractive_content_spec (google.cloud.discoveryengine_v1beta.types.SearchRequest.ContentSearchSpec.ExtractiveContentSpec): - If there is no extractive_content_spec provided, there will - be no extractive answer in the search response. + If there is no extractive_content_spec provided, + there will be no extractive answer in the search + response. search_result_mode (google.cloud.discoveryengine_v1beta.types.SearchRequest.ContentSearchSpec.SearchResultMode): - Specifies the search result mode. If unspecified, the search - result mode defaults to ``DOCUMENTS``. + Specifies the search result mode. If + unspecified, the search result mode defaults to + ``DOCUMENTS``. chunk_spec (google.cloud.discoveryengine_v1beta.types.SearchRequest.ContentSearchSpec.ChunkSpec): - Specifies the chunk spec to be returned from the search - response. Only available if the - [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.search_result_mode] + Specifies the chunk spec to be returned from the + search response. Only available if the + `SearchRequest.ContentSearchSpec.search_result_mode + `__ is set to - [CHUNKS][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS] + `CHUNKS + `__ """ class SearchResultMode(proto.Enum): - r"""Specifies the search result mode. If unspecified, the search result - mode defaults to ``DOCUMENTS``. + r"""Specifies the search result mode. If unspecified, the + search result mode defaults to ``DOCUMENTS``. Values: SEARCH_RESULT_MODE_UNSPECIFIED (0): @@ -1025,9 +1065,10 @@ class SearchResultMode(proto.Enum): DOCUMENTS (1): Returns documents in the search result. CHUNKS (2): - Returns chunks in the search result. Only available if the - [DataStore.DocumentProcessingConfig.chunking_config][] is - specified. + Returns chunks in the search result. Only + available if the + [DataStore.DocumentProcessingConfig.chunking_config][] + is specified. """ SEARCH_RESULT_MODE_UNSPECIFIED = 0 DOCUMENTS = 1 @@ -1039,18 +1080,19 @@ class SnippetSpec(proto.Message): Attributes: max_snippet_count (int): - [DEPRECATED] This field is deprecated. To control snippet - return, use ``return_snippet`` field. For backwards - compatibility, we will return snippet if max_snippet_count > - 0. + [DEPRECATED] This field is deprecated. To + control snippet return, use ``return_snippet`` + field. For backwards compatibility, we will + return snippet if max_snippet_count > 0. reference_only (bool): - [DEPRECATED] This field is deprecated and will have no - affect on the snippet. + [DEPRECATED] This field is deprecated and will + have no affect on the snippet. return_snippet (bool): - If ``true``, then return snippet. If no snippet can be - generated, we return "No snippet is available for this - page." A ``snippet_status`` with ``SUCCESS`` or - ``NO_SNIPPET_AVAILABLE`` will also be returned. + If ``true``, then return snippet. If no snippet + can be generated, we return "No snippet is + available for this page." A ``snippet_status`` + with ``SUCCESS`` or ``NO_SNIPPET_AVAILABLE`` + will also be returned. """ max_snippet_count: int = proto.Field( @@ -1072,90 +1114,105 @@ class SummarySpec(proto.Message): Attributes: summary_result_count (int): - The number of top results to generate the summary from. If - the number of results returned is less than - ``summaryResultCount``, the summary is generated from all of - the results. - - At most 10 results for documents mode, or 50 for chunks - mode, can be used to generate a summary. The chunks mode is - used when - [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.search_result_mode] + The number of top results to generate the + summary from. If the number of results returned + is less than ``summaryResultCount``, the summary + is generated from all of the results. + + At most 10 results for documents mode, or 50 for + chunks mode, can be used to generate a summary. + The chunks mode is used when + `SearchRequest.ContentSearchSpec.search_result_mode + `__ is set to - [CHUNKS][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]. + `CHUNKS + `__. include_citations (bool): - Specifies whether to include citations in the summary. The - default value is ``false``. + Specifies whether to include citations in the + summary. The default value is ``false``. - When this field is set to ``true``, summaries include - in-line citation numbers. + When this field is set to ``true``, summaries + include in-line citation numbers. Example summary including citations: - BigQuery is Google Cloud's fully managed and completely - serverless enterprise data warehouse [1]. BigQuery supports - all data types, works across clouds, and has built-in - machine learning and business intelligence, all within a - unified platform [2, 3]. - - The citation numbers refer to the returned search results - and are 1-indexed. For example, [1] means that the sentence - is attributed to the first search result. [2, 3] means that - the sentence is attributed to both the second and third - search results. + BigQuery is Google Cloud's fully managed and + completely serverless enterprise data warehouse + [1]. BigQuery supports all data types, works + across clouds, and has built-in machine learning + and business intelligence, all within a unified + platform [2, 3]. + + The citation numbers refer to the returned + search results and are 1-indexed. For example, + [1] means that the sentence is attributed to the + first search result. [2, 3] means that the + sentence is attributed to both the second and + third search results. ignore_adversarial_query (bool): - Specifies whether to filter out adversarial queries. The - default value is ``false``. + Specifies whether to filter out adversarial + queries. The default value is ``false``. - Google employs search-query classification to detect - adversarial queries. No summary is returned if the search - query is classified as an adversarial query. For example, a - user might ask a question regarding negative comments about - the company or submit a query designed to generate unsafe, - policy-violating output. If this field is set to ``true``, - we skip generating summaries for adversarial queries and - return fallback messages instead. + Google employs search-query classification to + detect adversarial queries. No summary is + returned if the search query is classified as an + adversarial query. For example, a user might ask + a question regarding negative comments about the + company or submit a query designed to generate + unsafe, policy-violating output. If this field + is set to ``true``, we skip generating summaries + for adversarial queries and return fallback + messages instead. ignore_non_summary_seeking_query (bool): - Specifies whether to filter out queries that are not - summary-seeking. The default value is ``false``. - - Google employs search-query classification to detect - summary-seeking queries. No summary is returned if the - search query is classified as a non-summary seeking query. - For example, ``why is the sky blue`` and - ``Who is the best soccer player in the world?`` are - summary-seeking queries, but ``SFO airport`` and - ``world cup 2026`` are not. They are most likely - navigational queries. If this field is set to ``true``, we - skip generating summaries for non-summary seeking queries - and return fallback messages instead. + Specifies whether to filter out queries that are + not summary-seeking. The default value is + ``false``. + + Google employs search-query classification to + detect summary-seeking queries. No summary is + returned if the search query is classified as a + non-summary seeking query. For example, ``why is + the sky blue`` and ``Who is the best soccer + player in the world?`` are summary-seeking + queries, but ``SFO airport`` and ``world cup + 2026`` are not. They are most likely + navigational queries. If this field is set to + ``true``, we skip generating summaries for + non-summary seeking queries and return fallback + messages instead. ignore_low_relevant_content (bool): - Specifies whether to filter out queries that have low - relevance. The default value is ``false``. - - If this field is set to ``false``, all search results are - used regardless of relevance to generate answers. If set to - ``true``, only queries with high relevance search results - will generate answers. + Specifies whether to filter out queries that + have low relevance. The default value is + ``false``. + + If this field is set to ``false``, all search + results are used regardless of relevance to + generate answers. If set to ``true``, only + queries with high relevance search results will + generate answers. ignore_jail_breaking_query (bool): - Optional. Specifies whether to filter out jail-breaking - queries. The default value is ``false``. - - Google employs search-query classification to detect - jail-breaking queries. No summary is returned if the search - query is classified as a jail-breaking query. A user might - add instructions to the query to change the tone, style, - language, content of the answer, or ask the model to act as - a different entity, e.g. "Reply in the tone of a competing - company's CEO". If this field is set to ``true``, we skip - generating summaries for jail-breaking queries and return - fallback messages instead. + Optional. Specifies whether to filter out + jail-breaking queries. The default value is + ``false``. + + Google employs search-query classification to + detect jail-breaking queries. No summary is + returned if the search query is classified as a + jail-breaking query. A user might add + instructions to the query to change the tone, + style, language, content of the answer, or ask + the model to act as a different entity, e.g. + "Reply in the tone of a competing company's + CEO". If this field is set to ``true``, we skip + generating summaries for jail-breaking queries + and return fallback messages instead. model_prompt_spec (google.cloud.discoveryengine_v1beta.types.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec): If specified, the spec will be used to modify the prompt provided to the LLM. language_code (str): - Language code for Summary. Use language tags defined by - `BCP47 `__. + Language code for Summary. Use language tags + defined by `BCP47 + `__. Note: This is an experimental feature. model_spec (google.cloud.discoveryengine_v1beta.types.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec): If specified, the spec will be used to modify @@ -1195,15 +1252,19 @@ class ModelSpec(proto.Message): Supported values are: - - ``stable``: string. Default value when no value is - specified. Uses a generally available, fine-tuned model. - For more information, see `Answer generation model - versions and - lifecycle `__. - - ``preview``: string. (Public preview) Uses a preview - model. For more information, see `Answer generation model - versions and - lifecycle `__. + * ``stable``: string. Default value when no + value is specified. Uses a generally + available, fine-tuned model. For more + information, see `Answer generation model + versions and + lifecycle + `__. + + * ``preview``: string. (Public preview) Uses a + preview model. For more information, see + `Answer generation model versions and + lifecycle + `__. """ version: str = proto.Field( @@ -1262,53 +1323,63 @@ class ExtractiveContentSpec(proto.Message): Attributes: max_extractive_answer_count (int): - The maximum number of extractive answers returned in each - search result. + The maximum number of extractive answers + returned in each search result. - An extractive answer is a verbatim answer extracted from the - original document, which provides a precise and contextually - relevant answer to the search query. + An extractive answer is a verbatim answer + extracted from the original document, which + provides a precise and contextually relevant + answer to the search query. - If the number of matching answers is less than the - ``max_extractive_answer_count``, return all of the answers. - Otherwise, return the ``max_extractive_answer_count``. + If the number of matching answers is less than + the ``max_extractive_answer_count``, return all + of the answers. Otherwise, return the + ``max_extractive_answer_count``. At most five answers are returned for each - [SearchResult][google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult]. + `SearchResult + `__. max_extractive_segment_count (int): - The max number of extractive segments returned in each - search result. Only applied if the - [DataStore][google.cloud.discoveryengine.v1beta.DataStore] + The max number of extractive segments returned + in each search result. Only applied if the + `DataStore + `__ is set to - [DataStore.ContentConfig.CONTENT_REQUIRED][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.CONTENT_REQUIRED] + `DataStore.ContentConfig.CONTENT_REQUIRED + `__ or - [DataStore.solution_types][google.cloud.discoveryengine.v1beta.DataStore.solution_types] + `DataStore.solution_types + `__ is - [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT]. + `SOLUTION_TYPE_CHAT + `__. - An extractive segment is a text segment extracted from the - original document that is relevant to the search query, and, - in general, more verbose than an extractive answer. The - segment could then be used as input for LLMs to generate - summaries and answers. + An extractive segment is a text segment + extracted from the original document that is + relevant to the search query, and, in general, + more verbose than an extractive answer. The + segment could then be used as input for LLMs to + generate summaries and answers. If the number of matching segments is less than - ``max_extractive_segment_count``, return all of the - segments. Otherwise, return the + ``max_extractive_segment_count``, return all of + the segments. Otherwise, return the ``max_extractive_segment_count``. return_extractive_segment_score (bool): - Specifies whether to return the confidence score from the - extractive segments in each search result. This feature is - available only for new or allowlisted data stores. To - allowlist your data store, contact your Customer Engineer. - The default value is ``false``. + Specifies whether to return the confidence score + from the extractive segments in each search + result. This feature is available only for new + or allowlisted data stores. To allowlist your + data store, contact your Customer Engineer. The + default value is ``false``. num_previous_segments (int): - Specifies whether to also include the adjacent from each - selected segments. Return at most ``num_previous_segments`` + Specifies whether to also include the adjacent + from each selected segments. + Return at most ``num_previous_segments`` segments before each selected segments. num_next_segments (int): - Return at most ``num_next_segments`` segments after each - selected segments. + Return at most ``num_next_segments`` segments + after each selected segments. """ max_extractive_answer_count: int = proto.Field( @@ -1333,11 +1404,13 @@ class ExtractiveContentSpec(proto.Message): ) class ChunkSpec(proto.Message): - r"""Specifies the chunk spec to be returned from the search response. - Only available if the - [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.search_result_mode] + r"""Specifies the chunk spec to be returned from the search + response. Only available if the + `SearchRequest.ContentSearchSpec.search_result_mode + `__ is set to - [CHUNKS][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS] + `CHUNKS + `__ Attributes: num_previous_chunks (int): @@ -1432,16 +1505,19 @@ class NaturalLanguageQueryUnderstandingSpec(proto.Message): Attributes: filter_extraction_condition (google.cloud.discoveryengine_v1beta.types.SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition): - The condition under which filter extraction should occur. - Default to [Condition.DISABLED][]. + The condition under which filter extraction + should occur. Default to [Condition.DISABLED][]. geo_search_query_detection_field_names (MutableSequence[str]): - Field names used for location-based filtering, where - geolocation filters are detected in natural language search - queries. Only valid when the FilterExtractionCondition is - set to ``ENABLED``. - - If this field is set, it overrides the field names set in - [ServingConfig.geo_search_query_detection_field_names][google.cloud.discoveryengine.v1beta.ServingConfig.geo_search_query_detection_field_names]. + Field names used for location-based filtering, + where geolocation filters are detected in + natural language search queries. Only valid when + the FilterExtractionCondition is set to + ``ENABLED``. + + If this field is set, it overrides the field + names set in + `ServingConfig.geo_search_query_detection_field_names + `__. """ class FilterExtractionCondition(proto.Enum): @@ -1450,7 +1526,8 @@ class FilterExtractionCondition(proto.Enum): Values: CONDITION_UNSPECIFIED (0): - Server behavior defaults to [Condition.DISABLED][]. + Server behavior defaults to + [Condition.DISABLED][]. DISABLED (1): Disables NL filter extraction. ENABLED (2): @@ -1477,9 +1554,10 @@ class SearchAsYouTypeSpec(proto.Message): Attributes: condition (google.cloud.discoveryengine_v1beta.types.SearchRequest.SearchAsYouTypeSpec.Condition): - The condition under which search as you type should occur. - Default to - [Condition.DISABLED][google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition.DISABLED]. + The condition under which search as you type + should occur. Default to + `Condition.DISABLED + `__. """ class Condition(proto.Enum): @@ -1489,7 +1567,8 @@ class Condition(proto.Enum): Values: CONDITION_UNSPECIFIED (0): Server behavior defaults to - [Condition.DISABLED][google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition.DISABLED]. + `Condition.DISABLED + `__. DISABLED (1): Disables Search As You Type. ENABLED (2): @@ -1518,38 +1597,48 @@ class SessionSpec(proto.Message): Attributes: query_id (str): - If set, the search result gets stored to the "turn" - specified by this query ID. + If set, the search result gets stored to the + "turn" specified by this query ID. - Example: Let's say the session looks like this: session { - name: ".../sessions/xxx" turns { query { text: "What is - foo?" query_id: ".../questions/yyy" } answer: "Foo is ..." } - turns { query { text: "How about bar then?" query_id: - ".../questions/zzz" } } } + Example: Let's say the session looks like this: - The user can call /search API with a request like this: + session { + name: ".../sessions/xxx" + turns { + query { text: "What is foo?" query_id: + ".../questions/yyy" } answer: "Foo is ..." + } + turns { + query { text: "How about bar then?" + query_id: ".../questions/zzz" } } + } - :: + The user can call /search API with a request + like this: session: ".../sessions/xxx" - session_spec { query_id: ".../questions/zzz" } - - Then, the API stores the search result, associated with the - last turn. The stored search result can be used by a - subsequent /answer API call (with the session ID and the - query ID specified). Also, it is possible to call /search - and /answer in parallel with the same session ID & query ID. + session_spec { query_id: ".../questions/zzz" + } + + Then, the API stores the search result, + associated with the last turn. The stored search + result can be used by a subsequent /answer API + call (with the session ID and the query ID + specified). Also, it is possible to call /search + and /answer in parallel with the same session ID + & query ID. search_result_persistence_count (int): - The number of top search results to persist. The persisted - search results can be used for the subsequent /answer api - call. + The number of top search results to persist. The + persisted search results can be used for the + subsequent /answer api call. - This field is simliar to the ``summary_result_count`` field - in - [SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count]. + This field is simliar to the + ``summary_result_count`` field in + `SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count + `__. - At most 10 results for documents mode, or 50 for chunks - mode. + At most 10 results for documents mode, or 50 for + chunks mode. This field is a member of `oneof`_ ``_search_result_persistence_count``. """ @@ -1569,8 +1658,10 @@ class PersonalizationSpec(proto.Message): Attributes: mode (google.cloud.discoveryengine_v1beta.types.SearchRequest.PersonalizationSpec.Mode): - The personalization mode of the search request. Defaults to - [Mode.AUTO][google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode.AUTO]. + The personalization mode of the search request. + Defaults to + `Mode.AUTO + `__. """ class Mode(proto.Enum): @@ -1578,8 +1669,9 @@ class Mode(proto.Enum): Values: MODE_UNSPECIFIED (0): - Default value. In this case, server behavior defaults to - [Mode.AUTO][google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode.AUTO]. + Default value. In this case, server behavior + defaults to `Mode.AUTO + `__. AUTO (1): Personalization is enabled if data quality requirements are met. @@ -1752,7 +1844,8 @@ class Mode(proto.Enum): class SearchResponse(proto.Message): r"""Response message for - [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] + `SearchService.Search + `__ method. Attributes: @@ -1764,39 +1857,47 @@ class SearchResponse(proto.Message): guided_search_result (google.cloud.discoveryengine_v1beta.types.SearchResponse.GuidedSearchResult): Guided search result. total_size (int): - The estimated total count of matched items irrespective of - pagination. The count of - [results][google.cloud.discoveryengine.v1beta.SearchResponse.results] + The estimated total count of matched items + irrespective of pagination. The count of + `results + `__ returned by pagination may be less than the - [total_size][google.cloud.discoveryengine.v1beta.SearchResponse.total_size] + `total_size + `__ that matches. attribution_token (str): - A unique search token. This should be included in the - [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] - logs resulting from this search, which enables accurate - attribution of search model performance. This also helps to - identify a request during the customer support scenarios. + A unique search token. This should be included + in the `UserEvent + `__ + logs resulting from this search, which enables + accurate attribution of search model + performance. This also helps to identify a + request during the customer support scenarios. redirect_uri (str): - The URI of a customer-defined redirect page. If redirect - action is triggered, no search is performed, and only - [redirect_uri][google.cloud.discoveryengine.v1beta.SearchResponse.redirect_uri] + The URI of a customer-defined redirect page. If + redirect action is triggered, no search is + performed, and only `redirect_uri + `__ and - [attribution_token][google.cloud.discoveryengine.v1beta.SearchResponse.attribution_token] + `attribution_token + `__ are set in the response. next_page_token (str): A token that can be sent as - [SearchRequest.page_token][google.cloud.discoveryengine.v1beta.SearchRequest.page_token] - to retrieve the next page. If this field is omitted, there - are no subsequent pages. + `SearchRequest.page_token + `__ + to retrieve the next page. If this field is + omitted, there are no subsequent pages. corrected_query (str): - Contains the spell corrected query, if found. If the spell - correction type is AUTOMATIC, then the search results are - based on corrected_query. Otherwise the original query is - used for search. + Contains the spell corrected query, if found. If + the spell correction type is AUTOMATIC, then the + search results are based on corrected_query. + Otherwise the original query is used for search. summary (google.cloud.discoveryengine_v1beta.types.SearchResponse.Summary): - A summary as part of the search results. This field is only - returned if - [SearchRequest.ContentSearchSpec.summary_spec][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.summary_spec] + A summary as part of the search results. + This field is only returned if + `SearchRequest.ContentSearchSpec.summary_spec + `__ is set. applied_controls (MutableSequence[str]): Controls applied as part of the Control @@ -1813,8 +1914,10 @@ class SearchResponse(proto.Message): Session information. Only set if - [SearchRequest.session][google.cloud.discoveryengine.v1beta.SearchRequest.session] - is provided. See its description for more details. + `SearchRequest.session + `__ + is provided. See its description for more + details. one_box_results (MutableSequence[google.cloud.discoveryengine_v1beta.types.SearchResponse.OneBoxResult]): A list of One Box results. There can be multiple One Box results of different types. @@ -1825,17 +1928,21 @@ class SearchResult(proto.Message): Attributes: id (str): - [Document.id][google.cloud.discoveryengine.v1beta.Document.id] - of the searched - [Document][google.cloud.discoveryengine.v1beta.Document]. + `Document.id + `__ + of the searched `Document + `__. document (google.cloud.discoveryengine_v1beta.types.Document): - The document data snippet in the search response. Only - fields that are marked as ``retrievable`` are populated. + The document data snippet in the search + response. Only fields that are marked as + ``retrievable`` are populated. chunk (google.cloud.discoveryengine_v1beta.types.Chunk): The chunk data in the search response if the - [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.search_result_mode] + `SearchRequest.ContentSearchSpec.search_result_mode + `__ is set to - [CHUNKS][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]. + `CHUNKS + `__. model_scores (MutableMapping[str, google.cloud.discoveryengine_v1beta.types.DoubleList]): Google provided available scores. rank_signals (google.cloud.discoveryengine_v1beta.types.SearchResponse.SearchResult.RankSignals): @@ -1982,9 +2089,10 @@ class Facet(proto.Message): Attributes: key (str): - The key for this facet. For example, ``"colors"`` or - ``"price"``. It matches - [SearchRequest.FacetSpec.FacetKey.key][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.key]. + The key for this facet. For example, + ``"colors"`` or ``"price"``. It matches + `SearchRequest.FacetSpec.FacetKey.key + `__. values (MutableSequence[google.cloud.discoveryengine_v1beta.types.SearchResponse.Facet.FacetValue]): The facet values for this field. dynamic_facet (bool): @@ -2008,9 +2116,10 @@ class FacetValue(proto.Message): This field is a member of `oneof`_ ``facet_value``. interval (google.cloud.discoveryengine_v1beta.types.Interval): - Interval value for a facet, such as [10, 20) for facet - "price". It matches - [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.intervals]. + Interval value for a facet, such as `10, 20) for + facet "price". It matches + [SearchRequest.FacetSpec.FacetKey.intervals + `__. This field is a member of `oneof`_ ``facet_value``. count (int): @@ -2066,11 +2175,11 @@ class RefinementAttribute(proto.Message): Attributes: attribute_key (str): - Attribute key used to refine the results. For example, - ``"movie_type"``. + Attribute key used to refine the results. For + example, ``"movie_type"``. attribute_value (str): - Attribute value used to refine the results. For example, - ``"drama"``. + Attribute value used to refine the results. For + example, ``"drama"``. """ attribute_key: str = proto.Field( @@ -2123,14 +2232,16 @@ class SummarySkippedReason(proto.Enum): The adversarial query ignored case. Only used when - [SummarySpec.ignore_adversarial_query][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ignore_adversarial_query] + `SummarySpec.ignore_adversarial_query + `__ is set to ``true``. NON_SUMMARY_SEEKING_QUERY_IGNORED (2): The non-summary seeking query ignored case. - Google skips the summary if the query is chit chat. Only - used when - [SummarySpec.ignore_non_summary_seeking_query][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_summary_seeking_query] + Google skips the summary if the query is chit + chat. Only used when + `SummarySpec.ignore_non_summary_seeking_query + `__ is set to ``true``. OUT_OF_DOMAIN_QUERY_IGNORED (3): The out-of-domain query ignored case. @@ -2159,8 +2270,8 @@ class SummarySkippedReason(proto.Enum): JAIL_BREAKING_QUERY_IGNORED (7): The jail-breaking query ignored case. - For example, "Reply in the tone of a competing company's - CEO". Only used when + For example, "Reply in the tone of a competing + company's CEO". Only used when [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query] is set to ``true``. CUSTOMER_POLICY_VIOLATION (8): @@ -2172,8 +2283,8 @@ class SummarySkippedReason(proto.Enum): NON_SUMMARY_SEEKING_QUERY_IGNORED_V2 (9): The non-answer seeking query ignored case. - Google skips the summary if the query doesn't have clear - intent. Only used when + Google skips the summary if the query doesn't + have clear intent. Only used when [SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_answer_seeking_query] is set to ``true``. """ @@ -2263,9 +2374,9 @@ class CitationSource(proto.Message): Attributes: reference_index (int): Document reference index from - SummaryWithMetadata.references. It is 0-indexed and the - value will be zero if the reference_index is not set - explicitly. + SummaryWithMetadata.references. It is 0-indexed + and the value will be zero if the + reference_index is not set explicitly. """ reference_index: int = proto.Field( @@ -2281,9 +2392,10 @@ class Reference(proto.Message): Title of the document. document (str): Required. - [Document.name][google.cloud.discoveryengine.v1beta.Document.name] - of the document. Full resource name of the referenced - document, in the format + `Document.name + `__ + of the document. Full resource name of the + referenced document, in the format ``projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*``. uri (str): Cloud Storage or HTTP uri for the document. @@ -2414,9 +2526,10 @@ class QueryExpansionInfo(proto.Message): Bool describing whether query expansion has occurred. pinned_result_count (int): - Number of pinned results. This field will only be set when - expansion happens and - [SearchRequest.QueryExpansionSpec.pin_unexpanded_results][google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.pin_unexpanded_results] + Number of pinned results. This field will only + be set when expansion happens and + `SearchRequest.QueryExpansionSpec.pin_unexpanded_results + `__ is set to true. """ @@ -2522,7 +2635,8 @@ class Comparison(proto.Enum): LESS_THAN (3): Denotes less than ``<`` operator. GREATER_THAN_EQUALS (4): - Denotes greater than or equal to ``>=`` operator. + Denotes greater than or equal to ``>=`` + operator. GREATER_THAN (5): Denotes greater than ``>`` operator. """ @@ -2721,10 +2835,12 @@ class SessionInfo(proto.Message): Attributes: name (str): - Name of the session. If the auto-session mode is used (when - [SearchRequest.session][google.cloud.discoveryengine.v1beta.SearchRequest.session] - ends with "-"), this field holds the newly generated session - name. + Name of the session. + If the auto-session mode is used (when + `SearchRequest.session + `__ + ends with "-"), this field holds the newly + generated session name. query_id (str): Query ID that corresponds to this search API call. One session can have multiple turns, each diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/search_tuning_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/search_tuning_service.py index ca1b175ba108..afe0e18329c2 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/search_tuning_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/search_tuning_service.py @@ -37,16 +37,17 @@ class ListCustomModelsRequest(proto.Message): r"""Request message for - [SearchTuningService.ListCustomModels][google.cloud.discoveryengine.v1beta.SearchTuningService.ListCustomModels] + `SearchTuningService.ListCustomModels + `__ method. Attributes: data_store (str): - Required. The resource name of the parent Data Store, such - as + Required. The resource name of the parent Data + Store, such as ``projects/*/locations/global/collections/default_collection/dataStores/default_data_store``. - This field is used to identify the data store where to fetch - the models from. + This field is used to identify the data store + where to fetch the models from. """ data_store: str = proto.Field( @@ -57,7 +58,8 @@ class ListCustomModelsRequest(proto.Message): class ListCustomModelsResponse(proto.Message): r"""Response message for - [SearchTuningService.ListCustomModels][google.cloud.discoveryengine.v1beta.SearchTuningService.ListCustomModels] + `SearchTuningService.ListCustomModels + `__ method. Attributes: @@ -76,7 +78,8 @@ class ListCustomModelsResponse(proto.Message): class TrainCustomModelRequest(proto.Message): r"""Request message for - [SearchTuningService.TrainCustomModel][google.cloud.discoveryengine.v1beta.SearchTuningService.TrainCustomModel] + `SearchTuningService.TrainCustomModel + `__ method. @@ -88,15 +91,16 @@ class TrainCustomModelRequest(proto.Message): This field is a member of `oneof`_ ``training_input``. data_store (str): - Required. The resource name of the Data Store, such as + Required. The resource name of the Data Store, + such as ``projects/*/locations/global/collections/default_collection/dataStores/default_data_store``. - This field is used to identify the data store where to train - the models. + This field is used to identify the data store + where to train the models. model_type (str): Model to be trained. Supported values are: - - **search-tuning**: Fine tuning the search system based on - data provided. + * **search-tuning**: Fine tuning the search + system based on data provided. error_config (google.cloud.discoveryengine_v1beta.types.ImportErrorConfig): The desired location of errors incurred during the data ingestion and training. @@ -109,39 +113,45 @@ class GcsTrainingInput(proto.Message): Attributes: corpus_data_path (str): - The Cloud Storage corpus data which could be associated in - train data. The data path format is - ``gs:///``. A newline - delimited jsonl/ndjson file. + The Cloud Storage corpus data which could be + associated in train data. The data path format + is ``gs:///``. + A newline delimited jsonl/ndjson file. + + For search-tuning model, each line should have + the _id, title and text. Example: - For search-tuning model, each line should have the \_id, - title and text. Example: - ``{"_id": "doc1", title: "relevant doc", "text": "relevant text"}`` + ``{"_id": "doc1", title: "relevant doc", "text": + "relevant text"}`` query_data_path (str): - The gcs query data which could be associated in train data. - The data path format is - ``gs:///``. A newline - delimited jsonl/ndjson file. + The gcs query data which could be associated in + train data. The data path format is + ``gs:///``. A + newline delimited jsonl/ndjson file. - For search-tuning model, each line should have the \_id and - text. Example: {"\_id": "query1", "text": "example query"} + For search-tuning model, each line should have + the _id and text. Example: {"_id": "query1", + "text": "example query"} train_data_path (str): - Cloud Storage training data path whose format should be - ``gs:///``. The file should - be in tsv format. Each line should have the doc_id and - query_id and score (number). - - For search-tuning model, it should have the query-id - corpus-id score as tsv file header. The score should be a - number in ``[0, inf+)``. The larger the number is, the more - relevant the pair is. Example: - - - ``query-id\tcorpus-id\tscore`` - - ``query1\tdoc1\t1`` + Cloud Storage training data path whose format + should be + ``gs:///``. The + file should be in tsv format. Each line should + have the doc_id and query_id and score (number). + + For search-tuning model, it should have the + query-id corpus-id score as tsv file header. The + score should be a number in ``[0, inf+)``. The + larger the number is, the more relevant the pair + is. Example: + + * ``query-id\tcorpus-id\tscore`` + * ``query1\tdoc1\t1`` test_data_path (str): - Cloud Storage test data. Same format as train_data_path. If - not provided, a random 80/20 train/test split will be - performed on train_data_path. + Cloud Storage test data. Same format as + train_data_path. If not provided, a random 80/20 + train/test split will be performed on + train_data_path. """ corpus_data_path: str = proto.Field( @@ -188,7 +198,8 @@ class GcsTrainingInput(proto.Message): class TrainCustomModelResponse(proto.Message): r"""Response of the - [TrainCustomModelRequest][google.cloud.discoveryengine.v1beta.TrainCustomModelRequest]. + `TrainCustomModelRequest + `__. This message is returned by the google.longrunning.Operations.response field. @@ -202,15 +213,20 @@ class TrainCustomModelResponse(proto.Message): model_status (str): The trained model status. Possible values are: - - **bad-data**: The training data quality is bad. - - **no-improvement**: Tuning didn't improve performance. - Won't deploy. - - **in-progress**: Model training job creation is in - progress. - - **training**: Model is actively training. - - **evaluating**: The model is evaluating trained metrics. - - **indexing**: The model trained metrics are indexing. - - **ready**: The model is ready for serving. + * **bad-data**: The training data quality is + bad. + + * **no-improvement**: Tuning didn't improve + performance. Won't deploy. * **in-progress**: + Model training job creation is in progress. + + * **training**: Model is actively training. + * **evaluating**: The model is evaluating + trained metrics. + + * **indexing**: The model trained metrics are + indexing. * **ready**: The model is ready for + serving. metrics (MutableMapping[str, float]): The metrics of the trained model. model_name (str): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/serving_config.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/serving_config.py index c518f8a9b3f9..9a39033006e7 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/serving_config.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/serving_config.py @@ -57,89 +57,106 @@ class ServingConfig(proto.Message): Immutable. Fully qualified name ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}`` display_name (str): - Required. The human readable serving config display name. - Used in Discovery UI. + Required. The human readable serving config + display name. Used in Discovery UI. - This field must be a UTF-8 encoded string with a length - limit of 128 characters. Otherwise, an INVALID_ARGUMENT - error is returned. + This field must be a UTF-8 encoded string with a + length limit of 128 characters. Otherwise, an + INVALID_ARGUMENT error is returned. solution_type (google.cloud.discoveryengine_v1beta.types.SolutionType): Required. Immutable. Specifies the solution type that a serving config can be associated with. model_id (str): - The id of the model to use at serving time. Currently only - RecommendationModels are supported. Can be changed but only - to a compatible model (e.g. others-you-may-like CTR to - others-you-may-like CVR). + The id of the model to use at serving time. + Currently only RecommendationModels are + supported. Can be changed but only to a + compatible model (e.g. others-you-may-like CTR + to others-you-may-like CVR). Required when - [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] - is - [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. + `SolutionType + `__ + is `SOLUTION_TYPE_RECOMMENDATION + `__. diversity_level (str): - How much diversity to use in recommendation model results - e.g. ``medium-diversity`` or ``high-diversity``. Currently - supported values: + How much diversity to use in recommendation + model results e.g. ``medium-diversity`` or + ``high-diversity``. Currently supported values: - - ``no-diversity`` - - ``low-diversity`` - - ``medium-diversity`` - - ``high-diversity`` - - ``auto-diversity`` + * ``no-diversity`` + * ``low-diversity`` - If not specified, we choose default based on recommendation - model type. Default value: ``no-diversity``. + * ``medium-diversity`` + * ``high-diversity`` + + * ``auto-diversity`` + + If not specified, we choose default based on + recommendation model type. Default value: + ``no-diversity``. Can only be set if - [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] - is - [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. + `SolutionType + `__ + is `SOLUTION_TYPE_RECOMMENDATION + `__. embedding_config (google.cloud.discoveryengine_v1beta.types.EmbeddingConfig): - Bring your own embedding config. The config is used for - search semantic retrieval. The retrieval is based on the dot - product of - [SearchRequest.EmbeddingSpec.EmbeddingVector.vector][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.vector] - and the document embeddings that are provided by this - EmbeddingConfig. If - [SearchRequest.EmbeddingSpec.EmbeddingVector.vector][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.vector] + Bring your own embedding config. The config is + used for search semantic retrieval. The + retrieval is based on the dot product of + `SearchRequest.EmbeddingSpec.EmbeddingVector.vector + `__ + and the document embeddings that are provided by + this EmbeddingConfig. If + `SearchRequest.EmbeddingSpec.EmbeddingVector.vector + `__ is provided, it overrides this - [ServingConfig.embedding_config][google.cloud.discoveryengine.v1beta.ServingConfig.embedding_config]. + `ServingConfig.embedding_config + `__. ranking_expression (str): - The ranking expression controls the customized ranking on - retrieval documents. To leverage this, document embedding is - required. The ranking expression setting in ServingConfig - applies to all search requests served by the serving config. - However, if - [SearchRequest.ranking_expression][google.cloud.discoveryengine.v1beta.SearchRequest.ranking_expression] - is specified, it overrides the ServingConfig ranking - expression. - - The ranking expression is a single function or multiple - functions that are joined by "+". - - - ranking_expression = function, { " + ", function }; + The ranking expression controls the customized + ranking on retrieval documents. To leverage + this, document embedding is required. The + ranking expression setting in ServingConfig + applies to all search requests served by the + serving config. However, if + `SearchRequest.ranking_expression + `__ + is specified, it overrides the ServingConfig + ranking expression. + + The ranking expression is a single function or + multiple functions that are joined by "+". + + * ranking_expression = function, { " + ", + function }; Supported functions: - - double \* relevance_score - - double \* dotProduct(embedding_field_path) + * double * relevance_score + * double * dotProduct(embedding_field_path) Function variables: - - ``relevance_score``: pre-defined keywords, used for - measure relevance between query and document. - - ``embedding_field_path``: the document embedding field - used with query embedding vector. - - ``dotProduct``: embedding function between - embedding_field_path and query embedding vector. + * ``relevance_score``: pre-defined keywords, + used for measure relevance between query and + document. + + * ``embedding_field_path``: the document + embedding field used with query embedding + vector. - Example ranking expression: + * ``dotProduct``: embedding function between + embedding_field_path and query embedding + vector. - :: + Example ranking expression: - If document has an embedding field doc_embedding, the ranking expression - could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`. + If document has an embedding field + doc_embedding, the ranking expression could + be ``0.5 * relevance_score + 0.3 * + dotProduct(doc_embedding)``. create_time (google.protobuf.timestamp_pb2.Timestamp): Output only. ServingConfig created timestamp. update_time (google.protobuf.timestamp_pb2.Timestamp): @@ -157,52 +174,64 @@ class ServingConfig(proto.Message): the serving config. Maximum of 20 boost controls. redirect_control_ids (MutableSequence[str]): - IDs of the redirect controls. Only the first triggered - redirect action is applied, even if multiple apply. Maximum - number of specifications is 100. + IDs of the redirect controls. Only the first + triggered redirect action is applied, even if + multiple apply. Maximum number of specifications + is 100. Can only be set if - [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] - is - [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH]. + `SolutionType + `__ + is `SOLUTION_TYPE_SEARCH + `__. synonyms_control_ids (MutableSequence[str]): - Condition synonyms specifications. If multiple synonyms - conditions match, all matching synonyms controls in the list - will execute. Maximum number of specifications is 100. + Condition synonyms specifications. If multiple + synonyms conditions match, all matching synonyms + controls in the list will execute. Maximum + number of specifications is 100. Can only be set if - [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] - is - [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH]. + `SolutionType + `__ + is `SOLUTION_TYPE_SEARCH + `__. oneway_synonyms_control_ids (MutableSequence[str]): - Condition oneway synonyms specifications. If multiple oneway - synonyms conditions match, all matching oneway synonyms - controls in the list will execute. Maximum number of - specifications is 100. + Condition oneway synonyms specifications. If + multiple oneway synonyms conditions match, all + matching oneway synonyms controls in the list + will execute. Maximum number of specifications + is 100. Can only be set if - [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] - is - [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH]. + `SolutionType + `__ + is `SOLUTION_TYPE_SEARCH + `__. dissociate_control_ids (MutableSequence[str]): - Condition do not associate specifications. If multiple do - not associate conditions match, all matching do not - associate controls in the list will execute. Order does not - matter. Maximum number of specifications is 100. + Condition do not associate specifications. If + multiple do not associate conditions match, all + matching do not associate controls in the list + will execute. + Order does not matter. + Maximum number of specifications is 100. Can only be set if - [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] - is - [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH]. + `SolutionType + `__ + is `SOLUTION_TYPE_SEARCH + `__. replacement_control_ids (MutableSequence[str]): - Condition replacement specifications. Applied according to - the order in the list. A previously replaced term can not be - re-replaced. Maximum number of specifications is 100. + Condition replacement specifications. + Applied according to the order in the list. + A previously replaced term can not be + re-replaced. Maximum number of specifications is + 100. Can only be set if - [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] - is - [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH]. + `SolutionType + `__ + is `SOLUTION_TYPE_SEARCH + `__. ignore_control_ids (MutableSequence[str]): Condition ignore specifications. If multiple ignore conditions match, all matching ignore @@ -213,33 +242,39 @@ class ServingConfig(proto.Message): The specification for personalization spec. Notice that if both - [ServingConfig.personalization_spec][google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec] + `ServingConfig.personalization_spec + `__ and - [SearchRequest.personalization_spec][google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec] + `SearchRequest.personalization_spec + `__ are set, - [SearchRequest.personalization_spec][google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec] + `SearchRequest.personalization_spec + `__ overrides - [ServingConfig.personalization_spec][google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec]. + `ServingConfig.personalization_spec + `__. """ class MediaConfig(proto.Message): - r"""Specifies the configurations needed for Media Discovery. Currently - we support: - - - ``demote_content_watched``: Threshold for watched content - demotion. Customers can specify if using watched content demotion - or use viewed detail page. Using the content watched demotion, - customers need to specify the watched minutes or percentage - exceeds the threshold, the content will be demoted in the - recommendation result. - - ``promote_fresh_content``: cutoff days for fresh content - promotion. Customers can specify if using content freshness - promotion. If the content was published within the cutoff days, - the content will be promoted in the recommendation result. Can - only be set if - [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] - is - [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. + r"""Specifies the configurations needed for Media Discovery. + Currently we support: + + * ``demote_content_watched``: Threshold for watched content + demotion. Customers can specify if using watched content + demotion or use viewed detail page. Using the content watched + demotion, customers need to specify the watched minutes or + percentage exceeds the threshold, the content will be demoted in + the recommendation result. + + * ``promote_fresh_content``: cutoff days for fresh content + promotion. Customers can specify if using content freshness + promotion. If the content was published within the cutoff days, + the content will be promoted in the recommendation result. + Can only be set if + `SolutionType + `__ is + `SOLUTION_TYPE_RECOMMENDATION + `__. This message has `oneof`_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. @@ -250,9 +285,9 @@ class MediaConfig(proto.Message): Attributes: content_watched_percentage_threshold (float): - Specifies the content watched percentage threshold for - demotion. Threshold value must be between [0, 1.0] - inclusive. + Specifies the content watched percentage + threshold for demotion. Threshold value must be + between [0, 1.0] inclusive. This field is a member of `oneof`_ ``demote_content_watched``. content_watched_seconds_threshold (float): @@ -261,17 +296,20 @@ class MediaConfig(proto.Message): This field is a member of `oneof`_ ``demote_content_watched``. demotion_event_type (str): - Specifies the event type used for demoting recommendation - result. Currently supported values: + Specifies the event type used for demoting + recommendation result. Currently supported + values: + + * ``view-item``: Item viewed. + * ``media-play``: Start/resume watching a video, + playing a song, etc. - - ``view-item``: Item viewed. - - ``media-play``: Start/resume watching a video, playing a - song, etc. - - ``media-complete``: Finished or stopped midway through a - video, song, etc. + * ``media-complete``: Finished or stopped midway + through a video, song, etc. - If unset, watch history demotion will not be applied. - Content freshness demotion will still be applied. + If unset, watch history demotion will not be + applied. Content freshness demotion will still + be applied. demote_content_watched_past_days (int): Optional. Specifies the number of days to look back for demoting watched content. If set @@ -308,10 +346,11 @@ class MediaConfig(proto.Message): ) class GenericConfig(proto.Message): - r"""Specifies the configurations needed for Generic Discovery.Currently - we support: + r"""Specifies the configurations needed for Generic + Discovery.Currently we support: - - ``content_search_spec``: configuration for generic content search. + * ``content_search_spec``: configuration for generic content + search. Attributes: content_search_spec (google.cloud.discoveryengine_v1beta.types.SearchRequest.ContentSearchSpec): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/serving_config_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/serving_config_service.py index 2701dec76cc8..8cfe78819db4 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/serving_config_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/serving_config_service.py @@ -43,10 +43,12 @@ class UpdateServingConfigRequest(proto.Message): Required. The ServingConfig to update. update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided - [ServingConfig][google.cloud.discoveryengine.v1beta.ServingConfig] + `ServingConfig + `__ to update. The following are NOT supported: - - [ServingConfig.name][google.cloud.discoveryengine.v1beta.ServingConfig.name] + * `ServingConfig.name + `__ If not set, all supported fields are updated. """ @@ -68,8 +70,8 @@ class GetServingConfigRequest(proto.Message): Attributes: name (str): - Required. The resource name of the ServingConfig to get. - Format: + Required. The resource name of the ServingConfig + to get. Format: ``projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config_id}`` """ @@ -84,7 +86,8 @@ class ListServingConfigsRequest(proto.Message): Attributes: parent (str): - Required. Full resource name of the parent resource. Format: + Required. Full resource name of the parent + resource. Format: ``projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`` page_size (int): Optional. Maximum number of results to @@ -93,8 +96,8 @@ class ListServingConfigsRequest(proto.Message): results are returned. page_token (str): Optional. A page token, received from a previous - ``ListServingConfigs`` call. Provide this to retrieve the - subsequent page. + ``ListServingConfigs`` call. Provide this to + retrieve the subsequent page. """ parent: str = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/session.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/session.py index 013ee90b77c4..3aea0d341f23 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/session.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/session.py @@ -88,11 +88,13 @@ class Turn(proto.Message): call) happened in this turn. detailed_answer (google.cloud.discoveryengine_v1beta.types.Answer): Output only. In - [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1beta.ConversationalSearchService.GetSession] + `ConversationalSearchService.GetSession + `__ API, if - [GetSessionRequest.include_answer_details][google.cloud.discoveryengine.v1beta.GetSessionRequest.include_answer_details] - is set to true, this field will be populated when getting - answer query session. + `GetSessionRequest.include_answer_details + `__ + is set to true, this field will be populated + when getting answer query session. query_config (MutableMapping[str, str]): Optional. Represents metadata related to the query config, for example LLM model and version diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/site_search_engine.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/site_search_engine.py index 87bb9aa78b38..75a2cb9a727b 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/site_search_engine.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/site_search_engine.py @@ -38,8 +38,8 @@ class SiteSearchEngine(proto.Message): Attributes: name (str): - The fully qualified resource name of the site search engine. - Format: + The fully qualified resource name of the site + search engine. Format: ``projects/*/locations/*/dataStores/*/siteSearchEngine`` """ @@ -54,30 +54,34 @@ class TargetSite(proto.Message): Attributes: name (str): - Output only. The fully qualified resource name of the target - site. + Output only. The fully qualified resource name + of the target site. ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}`` The ``target_site_id`` is system-generated. provided_uri_pattern (str): - Required. Input only. The user provided URI pattern from - which the ``generated_uri_pattern`` is generated. + Required. Input only. The user provided URI + pattern from which the ``generated_uri_pattern`` + is generated. type_ (google.cloud.discoveryengine_v1beta.types.TargetSite.Type): The type of the target site, e.g., whether the site is to be included or excluded. exact_match (bool): - Input only. If set to false, a uri_pattern is generated to - include all pages whose address contains the - provided_uri_pattern. If set to true, an uri_pattern is - generated to try to be an exact match of the - provided_uri_pattern or just the specific page if the - provided_uri_pattern is a specific one. provided_uri_pattern - is always normalized to generate the URI pattern to be used - by the search engine. + Input only. If set to false, a uri_pattern is + generated to include all pages whose address + contains the provided_uri_pattern. If set to + true, an uri_pattern is generated to try to be + an exact match of the provided_uri_pattern or + just the specific page if the + provided_uri_pattern is a specific one. + provided_uri_pattern is always normalized to + generate the URI pattern to be used by the + search engine. generated_uri_pattern (str): - Output only. This is system-generated based on the - provided_uri_pattern. + Output only. This is system-generated based on + the provided_uri_pattern. root_domain_uri (str): - Output only. Root domain of the provided_uri_pattern. + Output only. Root domain of the + provided_uri_pattern. site_verification_info (google.cloud.discoveryengine_v1beta.types.SiteVerificationInfo): Output only. Site ownership and validity verification status. @@ -95,9 +99,9 @@ class Type(proto.Enum): Values: TYPE_UNSPECIFIED (0): - This value is unused. In this case, server behavior defaults - to - [Type.INCLUDE][google.cloud.discoveryengine.v1beta.TargetSite.Type.INCLUDE]. + This value is unused. In this case, server + behavior defaults to `Type.INCLUDE + `__. INCLUDE (1): Include the target site. EXCLUDE (2): @@ -273,8 +277,8 @@ class Sitemap(proto.Message): This field is a member of `oneof`_ ``feed``. name (str): - Output only. The fully qualified resource name of the - sitemap. + Output only. The fully qualified resource name + of the sitemap. ``projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/sitemaps/*`` The ``sitemap_id`` suffix is system-generated. create_time (google.protobuf.timestamp_pb2.Timestamp): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/site_search_engine_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/site_search_engine_service.py index 2db134f26036..1927067662df 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/site_search_engine_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/site_search_engine_service.py @@ -66,19 +66,22 @@ class GetSiteSearchEngineRequest(proto.Message): r"""Request message for - [SiteSearchEngineService.GetSiteSearchEngine][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.GetSiteSearchEngine] + `SiteSearchEngineService.GetSiteSearchEngine + `__ method. Attributes: name (str): Required. Resource name of - [SiteSearchEngine][google.cloud.discoveryengine.v1beta.SiteSearchEngine], + `SiteSearchEngine + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine``. - If the caller does not have permission to access the - [SiteSearchEngine], regardless of whether or not it exists, - a PERMISSION_DENIED error is returned. + If the caller does not have permission to access + the [SiteSearchEngine], regardless of whether or + not it exists, a PERMISSION_DENIED error is + returned. """ name: str = proto.Field( @@ -89,18 +92,20 @@ class GetSiteSearchEngineRequest(proto.Message): class CreateTargetSiteRequest(proto.Message): r"""Request message for - [SiteSearchEngineService.CreateTargetSite][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.CreateTargetSite] + `SiteSearchEngineService.CreateTargetSite + `__ method. Attributes: parent (str): Required. Parent resource name of - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite], + `TargetSite + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine``. target_site (google.cloud.discoveryengine_v1beta.types.TargetSite): - Required. The - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite] + Required. The `TargetSite + `__ to create. """ @@ -117,7 +122,8 @@ class CreateTargetSiteRequest(proto.Message): class CreateTargetSiteMetadata(proto.Message): r"""Metadata related to the progress of the - [SiteSearchEngineService.CreateTargetSite][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.CreateTargetSite] + `SiteSearchEngineService.CreateTargetSite + `__ operation. This will be returned by the google.longrunning.Operation.metadata field. @@ -143,16 +149,18 @@ class CreateTargetSiteMetadata(proto.Message): class BatchCreateTargetSitesRequest(proto.Message): r"""Request message for - [SiteSearchEngineService.BatchCreateTargetSites][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.BatchCreateTargetSites] + `SiteSearchEngineService.BatchCreateTargetSites + `__ method. Attributes: parent (str): - Required. The parent resource shared by all TargetSites - being created. + Required. The parent resource shared by all + TargetSites being created. ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine``. - The parent field in the CreateBookRequest messages must - either be empty or match this field. + The parent field in the CreateBookRequest + messages must either be empty or match this + field. requests (MutableSequence[google.cloud.discoveryengine_v1beta.types.CreateTargetSiteRequest]): Required. The request message specifying the resources to create. A maximum of 20 TargetSites @@ -172,23 +180,27 @@ class BatchCreateTargetSitesRequest(proto.Message): class GetTargetSiteRequest(proto.Message): r"""Request message for - [SiteSearchEngineService.GetTargetSite][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.GetTargetSite] + `SiteSearchEngineService.GetTargetSite + `__ method. Attributes: name (str): Required. Full resource name of - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite], + `TargetSite + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}``. - If the caller does not have permission to access the - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite], - regardless of whether or not it exists, a PERMISSION_DENIED - error is returned. + If the caller does not have permission to access + the `TargetSite + `__, + regardless of whether or not it exists, a + PERMISSION_DENIED error is returned. If the requested - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite] + `TargetSite + `__ does not exist, a NOT_FOUND error is returned. """ @@ -200,20 +212,23 @@ class GetTargetSiteRequest(proto.Message): class UpdateTargetSiteRequest(proto.Message): r"""Request message for - [SiteSearchEngineService.UpdateTargetSite][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.UpdateTargetSite] + `SiteSearchEngineService.UpdateTargetSite + `__ method. Attributes: target_site (google.cloud.discoveryengine_v1beta.types.TargetSite): - Required. The target site to update. If the caller does not - have permission to update the - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite], - regardless of whether or not it exists, a PERMISSION_DENIED - error is returned. - - If the - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite] - to update does not exist, a NOT_FOUND error is returned. + Required. The target site to update. + If the caller does not have permission to update + the `TargetSite + `__, + regardless of whether or not it exists, a + PERMISSION_DENIED error is returned. + + If the `TargetSite + `__ + to update does not exist, a NOT_FOUND error is + returned. """ target_site: gcd_site_search_engine.TargetSite = proto.Field( @@ -225,7 +240,8 @@ class UpdateTargetSiteRequest(proto.Message): class UpdateTargetSiteMetadata(proto.Message): r"""Metadata related to the progress of the - [SiteSearchEngineService.UpdateTargetSite][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.UpdateTargetSite] + `SiteSearchEngineService.UpdateTargetSite + `__ operation. This will be returned by the google.longrunning.Operation.metadata field. @@ -251,23 +267,27 @@ class UpdateTargetSiteMetadata(proto.Message): class DeleteTargetSiteRequest(proto.Message): r"""Request message for - [SiteSearchEngineService.DeleteTargetSite][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.DeleteTargetSite] + `SiteSearchEngineService.DeleteTargetSite + `__ method. Attributes: name (str): Required. Full resource name of - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite], + `TargetSite + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}``. - If the caller does not have permission to access the - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite], - regardless of whether or not it exists, a PERMISSION_DENIED - error is returned. + If the caller does not have permission to access + the `TargetSite + `__, + regardless of whether or not it exists, a + PERMISSION_DENIED error is returned. If the requested - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite] + `TargetSite + `__ does not exist, a NOT_FOUND error is returned. """ @@ -279,7 +299,8 @@ class DeleteTargetSiteRequest(proto.Message): class DeleteTargetSiteMetadata(proto.Message): r"""Metadata related to the progress of the - [SiteSearchEngineService.DeleteTargetSite][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.DeleteTargetSite] + `SiteSearchEngineService.DeleteTargetSite + `__ operation. This will be returned by the google.longrunning.Operation.metadata field. @@ -305,34 +326,39 @@ class DeleteTargetSiteMetadata(proto.Message): class ListTargetSitesRequest(proto.Message): r"""Request message for - [SiteSearchEngineService.ListTargetSites][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.ListTargetSites] + `SiteSearchEngineService.ListTargetSites + `__ method. Attributes: parent (str): - Required. The parent site search engine resource name, such - as + Required. The parent site search engine resource + name, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine``. If the caller does not have permission to list - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite]s - under this site search engine, regardless of whether or not - this branch exists, a PERMISSION_DENIED error is returned. + `TargetSite + `__s + under this site search engine, regardless of + whether or not this branch exists, a + PERMISSION_DENIED error is returned. page_size (int): - Requested page size. Server may return fewer items than - requested. If unspecified, server will pick an appropriate - default. The maximum value is 1000; values above 1000 will - be coerced to 1000. + Requested page size. Server may return fewer + items than requested. If unspecified, server + will pick an appropriate default. The maximum + value is 1000; values above 1000 will be coerced + to 1000. - If this field is negative, an INVALID_ARGUMENT error is - returned. + If this field is negative, an INVALID_ARGUMENT + error is returned. page_token (str): - A page token, received from a previous ``ListTargetSites`` - call. Provide this to retrieve the subsequent page. + A page token, received from a previous + ``ListTargetSites`` call. Provide this to + retrieve the subsequent page. - When paginating, all other parameters provided to - ``ListTargetSites`` must match the call that provided the - page token. + When paginating, all other parameters provided + to ``ListTargetSites`` must match the call that + provided the page token. """ parent: str = proto.Field( @@ -351,16 +377,17 @@ class ListTargetSitesRequest(proto.Message): class ListTargetSitesResponse(proto.Message): r"""Response message for - [SiteSearchEngineService.ListTargetSites][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.ListTargetSites] + `SiteSearchEngineService.ListTargetSites + `__ method. Attributes: target_sites (MutableSequence[google.cloud.discoveryengine_v1beta.types.TargetSite]): List of TargetSites. next_page_token (str): - A token that can be sent as ``page_token`` to retrieve the - next page. If this field is omitted, there are no subsequent - pages. + A token that can be sent as ``page_token`` to + retrieve the next page. If this field is + omitted, there are no subsequent pages. total_size (int): The total number of items matching the request. This will always be populated in the @@ -390,7 +417,8 @@ def raw_page(self): class BatchCreateTargetSiteMetadata(proto.Message): r"""Metadata related to the progress of the - [SiteSearchEngineService.BatchCreateTargetSites][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.BatchCreateTargetSites] + `SiteSearchEngineService.BatchCreateTargetSites + `__ operation. This will be returned by the google.longrunning.Operation.metadata field. @@ -416,7 +444,8 @@ class BatchCreateTargetSiteMetadata(proto.Message): class BatchCreateTargetSitesResponse(proto.Message): r"""Response message for - [SiteSearchEngineService.BatchCreateTargetSites][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.BatchCreateTargetSites] + `SiteSearchEngineService.BatchCreateTargetSites + `__ method. Attributes: @@ -435,19 +464,21 @@ class BatchCreateTargetSitesResponse(proto.Message): class CreateSitemapRequest(proto.Message): r"""Request message for - [SiteSearchEngineService.CreateSitemap][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.CreateSitemap] + `SiteSearchEngineService.CreateSitemap + `__ method. Attributes: parent (str): Required. Parent resource name of the - [SiteSearchEngine][google.cloud.discoveryengine.v1beta.SiteSearchEngine], + `SiteSearchEngine + `__, such as ``projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine``. sitemap (google.cloud.discoveryengine_v1beta.types.Sitemap): - Required. The - [Sitemap][google.cloud.discoveryengine.v1beta.Sitemap] to - create. + Required. The `Sitemap + `__ + to create. """ parent: str = proto.Field( @@ -463,24 +494,27 @@ class CreateSitemapRequest(proto.Message): class DeleteSitemapRequest(proto.Message): r"""Request message for - [SiteSearchEngineService.DeleteSitemap][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.DeleteSitemap] + `SiteSearchEngineService.DeleteSitemap + `__ method. Attributes: name (str): Required. Full resource name of - [Sitemap][google.cloud.discoveryengine.v1beta.Sitemap], such - as + `Sitemap + `__, + such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/sitemaps/{sitemap}``. - If the caller does not have permission to access the - [Sitemap][google.cloud.discoveryengine.v1beta.Sitemap], - regardless of whether or not it exists, a PERMISSION_DENIED - error is returned. + If the caller does not have permission to access + the `Sitemap + `__, + regardless of whether or not it exists, a + PERMISSION_DENIED error is returned. - If the requested - [Sitemap][google.cloud.discoveryengine.v1beta.Sitemap] does - not exist, a NOT_FOUND error is returned. + If the requested `Sitemap + `__ + does not exist, a NOT_FOUND error is returned. """ name: str = proto.Field( @@ -491,32 +525,35 @@ class DeleteSitemapRequest(proto.Message): class FetchSitemapsRequest(proto.Message): r"""Request message for - [SiteSearchEngineService.FetchSitemaps][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.FetchSitemaps] + `SiteSearchEngineService.FetchSitemaps + `__ method. Attributes: parent (str): Required. Parent resource name of the - [SiteSearchEngine][google.cloud.discoveryengine.v1beta.SiteSearchEngine], + `SiteSearchEngine + `__, such as ``projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine``. matcher (google.cloud.discoveryengine_v1beta.types.FetchSitemapsRequest.Matcher): Optional. If specified, fetches the matching - [Sitemap][google.cloud.discoveryengine.v1beta.Sitemap]s. If - not specified, fetches all - [Sitemap][google.cloud.discoveryengine.v1beta.Sitemap]s in - the - [DataStore][google.cloud.discoveryengine.v1beta.DataStore]. + `Sitemap + `__s. + If not specified, fetches all `Sitemap + `__s + in the `DataStore + `__. """ class UrisMatcher(proto.Message): - r"""Matcher for the - [Sitemap][google.cloud.discoveryengine.v1beta.Sitemap]s by their - uris. + r"""Matcher for the `Sitemap + `__s by their uris. Attributes: uris (MutableSequence[str]): - The [Sitemap][google.cloud.discoveryengine.v1beta.Sitemap] + The `Sitemap + `__ uris. """ @@ -526,8 +563,8 @@ class UrisMatcher(proto.Message): ) class Matcher(proto.Message): - r"""Matcher for the - [Sitemap][google.cloud.discoveryengine.v1beta.Sitemap]s. Currently + r"""Matcher for the `Sitemap + `__s. Currently only supports uris matcher. @@ -560,7 +597,8 @@ class Matcher(proto.Message): class CreateSitemapMetadata(proto.Message): r"""Metadata related to the progress of the - [SiteSearchEngineService.CreateSitemap][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.CreateSitemap] + `SiteSearchEngineService.CreateSitemap + `__ operation. This will be returned by the google.longrunning.Operation.metadata field. @@ -586,7 +624,8 @@ class CreateSitemapMetadata(proto.Message): class DeleteSitemapMetadata(proto.Message): r"""Metadata related to the progress of the - [SiteSearchEngineService.DeleteSitemap][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.DeleteSitemap] + `SiteSearchEngineService.DeleteSitemap + `__ operation. This will be returned by the google.longrunning.Operation.metadata field. @@ -612,23 +651,26 @@ class DeleteSitemapMetadata(proto.Message): class FetchSitemapsResponse(proto.Message): r"""Response message for - [SiteSearchEngineService.FetchSitemaps][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.FetchSitemaps] + `SiteSearchEngineService.FetchSitemaps + `__ method. Attributes: sitemaps_metadata (MutableSequence[google.cloud.discoveryengine_v1beta.types.FetchSitemapsResponse.SitemapMetadata]): - List of - [Sitemap][google.cloud.discoveryengine.v1beta.Sitemap]s + List of `Sitemap + `__s fetched. """ class SitemapMetadata(proto.Message): - r"""Contains a [Sitemap][google.cloud.discoveryengine.v1beta.Sitemap] - and its metadata. + r"""Contains a `Sitemap + `__ and its + metadata. Attributes: sitemap (google.cloud.discoveryengine_v1beta.types.Sitemap): - The [Sitemap][google.cloud.discoveryengine.v1beta.Sitemap]. + The `Sitemap + `__. """ sitemap: gcd_site_search_engine.Sitemap = proto.Field( @@ -646,13 +688,15 @@ class SitemapMetadata(proto.Message): class EnableAdvancedSiteSearchRequest(proto.Message): r"""Request message for - [SiteSearchEngineService.EnableAdvancedSiteSearch][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.EnableAdvancedSiteSearch] + `SiteSearchEngineService.EnableAdvancedSiteSearch + `__ method. Attributes: site_search_engine (str): Required. Full resource name of the - [SiteSearchEngine][google.cloud.discoveryengine.v1beta.SiteSearchEngine], + `SiteSearchEngine + `__, such as ``projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSearchEngine``. """ @@ -665,7 +709,8 @@ class EnableAdvancedSiteSearchRequest(proto.Message): class EnableAdvancedSiteSearchResponse(proto.Message): r"""Response message for - [SiteSearchEngineService.EnableAdvancedSiteSearch][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.EnableAdvancedSiteSearch] + `SiteSearchEngineService.EnableAdvancedSiteSearch + `__ method. """ @@ -673,7 +718,8 @@ class EnableAdvancedSiteSearchResponse(proto.Message): class EnableAdvancedSiteSearchMetadata(proto.Message): r"""Metadata related to the progress of the - [SiteSearchEngineService.EnableAdvancedSiteSearch][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.EnableAdvancedSiteSearch] + `SiteSearchEngineService.EnableAdvancedSiteSearch + `__ operation. This will be returned by the google.longrunning.Operation.metadata field. @@ -699,13 +745,15 @@ class EnableAdvancedSiteSearchMetadata(proto.Message): class DisableAdvancedSiteSearchRequest(proto.Message): r"""Request message for - [SiteSearchEngineService.DisableAdvancedSiteSearch][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.DisableAdvancedSiteSearch] + `SiteSearchEngineService.DisableAdvancedSiteSearch + `__ method. Attributes: site_search_engine (str): Required. Full resource name of the - [SiteSearchEngine][google.cloud.discoveryengine.v1beta.SiteSearchEngine], + `SiteSearchEngine + `__, such as ``projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSearchEngine``. """ @@ -718,7 +766,8 @@ class DisableAdvancedSiteSearchRequest(proto.Message): class DisableAdvancedSiteSearchResponse(proto.Message): r"""Response message for - [SiteSearchEngineService.DisableAdvancedSiteSearch][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.DisableAdvancedSiteSearch] + `SiteSearchEngineService.DisableAdvancedSiteSearch + `__ method. """ @@ -726,7 +775,8 @@ class DisableAdvancedSiteSearchResponse(proto.Message): class DisableAdvancedSiteSearchMetadata(proto.Message): r"""Metadata related to the progress of the - [SiteSearchEngineService.DisableAdvancedSiteSearch][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.DisableAdvancedSiteSearch] + `SiteSearchEngineService.DisableAdvancedSiteSearch + `__ operation. This will be returned by the google.longrunning.Operation.metadata field. @@ -752,24 +802,27 @@ class DisableAdvancedSiteSearchMetadata(proto.Message): class RecrawlUrisRequest(proto.Message): r"""Request message for - [SiteSearchEngineService.RecrawlUris][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.RecrawlUris] + `SiteSearchEngineService.RecrawlUris + `__ method. Attributes: site_search_engine (str): Required. Full resource name of the - [SiteSearchEngine][google.cloud.discoveryengine.v1beta.SiteSearchEngine], + `SiteSearchEngine + `__, such as ``projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine``. uris (MutableSequence[str]): - Required. List of URIs to crawl. At most 10K URIs are - supported, otherwise an INVALID_ARGUMENT error is thrown. - Each URI should match at least one - [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite] + Required. List of URIs to crawl. At most 10K + URIs are supported, otherwise an + INVALID_ARGUMENT error is thrown. Each URI + should match at least one `TargetSite + `__ in ``site_search_engine``. site_credential (str): - Optional. Full resource name of the [SiteCredential][], such - as + Optional. Full resource name of the + [SiteCredential][], such as ``projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/siteCredentials/*``. Only set to crawl private URIs. """ @@ -790,12 +843,14 @@ class RecrawlUrisRequest(proto.Message): class RecrawlUrisResponse(proto.Message): r"""Response message for - [SiteSearchEngineService.RecrawlUris][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.RecrawlUris] + `SiteSearchEngineService.RecrawlUris + `__ method. Attributes: failure_samples (MutableSequence[google.cloud.discoveryengine_v1beta.types.RecrawlUrisResponse.FailureInfo]): - Details for a sample of up to 10 ``failed_uris``. + Details for a sample of up to 10 + ``failed_uris``. failed_uris (MutableSequence[str]): URIs that were not crawled before the LRO terminated. @@ -879,7 +934,8 @@ class CorpusType(proto.Enum): class RecrawlUrisMetadata(proto.Message): r"""Metadata related to the progress of the - [SiteSearchEngineService.RecrawlUris][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.RecrawlUris] + `SiteSearchEngineService.RecrawlUris + `__ operation. This will be returned by the google.longrunning.Operation.metadata field. @@ -905,8 +961,8 @@ class RecrawlUrisMetadata(proto.Message): Total number of URIs that don't match any TargetSites. valid_uris_count (int): - Total number of unique URIs in the request that are not in - invalid_uris. + Total number of unique URIs in the request that + are not in invalid_uris. success_count (int): Total number of URIs that have been crawled so far. @@ -964,13 +1020,14 @@ class RecrawlUrisMetadata(proto.Message): class BatchVerifyTargetSitesRequest(proto.Message): r"""Request message for - [SiteSearchEngineService.BatchVerifyTargetSites][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.BatchVerifyTargetSites] + `SiteSearchEngineService.BatchVerifyTargetSites + `__ method. Attributes: parent (str): - Required. The parent resource shared by all TargetSites - being verified. + Required. The parent resource shared by all + TargetSites being verified. ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine``. """ @@ -982,7 +1039,8 @@ class BatchVerifyTargetSitesRequest(proto.Message): class BatchVerifyTargetSitesResponse(proto.Message): r"""Response message for - [SiteSearchEngineService.BatchVerifyTargetSites][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.BatchVerifyTargetSites] + `SiteSearchEngineService.BatchVerifyTargetSites + `__ method. """ @@ -990,7 +1048,8 @@ class BatchVerifyTargetSitesResponse(proto.Message): class BatchVerifyTargetSitesMetadata(proto.Message): r"""Metadata related to the progress of the - [SiteSearchEngineService.BatchVerifyTargetSites][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.BatchVerifyTargetSites] + `SiteSearchEngineService.BatchVerifyTargetSites + `__ operation. This will be returned by the google.longrunning.Operation.metadata field. @@ -1016,30 +1075,33 @@ class BatchVerifyTargetSitesMetadata(proto.Message): class FetchDomainVerificationStatusRequest(proto.Message): r"""Request message for - [SiteSearchEngineService.FetchDomainVerificationStatus][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.FetchDomainVerificationStatus] + `SiteSearchEngineService.FetchDomainVerificationStatus + `__ method. Attributes: site_search_engine (str): - Required. The site search engine resource under which we - fetch all the domain verification status. + Required. The site search engine resource under + which we fetch all the domain verification + status. ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine``. page_size (int): - Requested page size. Server may return fewer items than - requested. If unspecified, server will pick an appropriate - default. The maximum value is 1000; values above 1000 will - be coerced to 1000. + Requested page size. Server may return fewer + items than requested. If unspecified, server + will pick an appropriate default. The maximum + value is 1000; values above 1000 will be coerced + to 1000. - If this field is negative, an INVALID_ARGUMENT error is - returned. + If this field is negative, an INVALID_ARGUMENT + error is returned. page_token (str): A page token, received from a previous - ``FetchDomainVerificationStatus`` call. Provide this to - retrieve the subsequent page. + ``FetchDomainVerificationStatus`` call. Provide + this to retrieve the subsequent page. - When paginating, all other parameters provided to - ``FetchDomainVerificationStatus`` must match the call that - provided the page token. + When paginating, all other parameters provided + to ``FetchDomainVerificationStatus`` must match + the call that provided the page token. """ site_search_engine: str = proto.Field( @@ -1058,7 +1120,8 @@ class FetchDomainVerificationStatusRequest(proto.Message): class FetchDomainVerificationStatusResponse(proto.Message): r"""Response message for - [SiteSearchEngineService.FetchDomainVerificationStatus][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.FetchDomainVerificationStatus] + `SiteSearchEngineService.FetchDomainVerificationStatus + `__ method. Attributes: @@ -1066,9 +1129,9 @@ class FetchDomainVerificationStatusResponse(proto.Message): List of TargetSites containing the site verification status. next_page_token (str): - A token that can be sent as ``page_token`` to retrieve the - next page. If this field is omitted, there are no subsequent - pages. + A token that can be sent as ``page_token`` to + retrieve the next page. If this field is + omitted, there are no subsequent pages. total_size (int): The total number of items matching the request. This will always be populated in the diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/user_event.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/user_event.py index 5c7918c4a605..90c354565a9b 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/user_event.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/user_event.py @@ -49,190 +49,226 @@ class UserEvent(proto.Message): Generic values: - - ``search``: Search for Documents. - - ``view-item``: Detailed page view of a Document. - - ``view-item-list``: View of a panel or ordered list of - Documents. - - ``view-home-page``: View of the home page. - - ``view-category-page``: View of a category page, e.g. Home - > Men > Jeans - - ``add-feedback``: Add a user feedback. + * ``search``: Search for Documents. + * ``view-item``: Detailed page view of a + Document. + + * ``view-item-list``: View of a panel or ordered + list of Documents. * ``view-home-page``: View of + the home page. + + * ``view-category-page``: View of a category + page, e.g. Home > Men > Jeans * + ``add-feedback``: Add a user feedback. Retail-related values: - - ``add-to-cart``: Add an item(s) to cart, e.g. in Retail - online shopping - - ``purchase``: Purchase an item(s) + * ``add-to-cart``: Add an item(s) to cart, e.g. + in Retail online shopping * ``purchase``: + Purchase an item(s) Media-related values: - - ``media-play``: Start/resume watching a video, playing a - song, etc. - - ``media-complete``: Finished or stopped midway through a - video, song, etc. + * ``media-play``: Start/resume watching a video, + playing a song, etc. * ``media-complete``: + Finished or stopped midway through a video, + song, etc. user_pseudo_id (str): - Required. A unique identifier for tracking visitors. - - For example, this could be implemented with an HTTP cookie, - which should be able to uniquely identify a visitor on a - single device. This unique identifier should not change if - the visitor log in/out of the website. - - Do not set the field to the same fixed ID for different - users. This mixes the event history of those users together, - which results in degraded model quality. - - The field must be a UTF-8 encoded string with a length limit - of 128 characters. Otherwise, an ``INVALID_ARGUMENT`` error - is returned. + Required. A unique identifier for tracking + visitors. + For example, this could be implemented with an + HTTP cookie, which should be able to uniquely + identify a visitor on a single device. This + unique identifier should not change if the + visitor log in/out of the website. + + Do not set the field to the same fixed ID for + different users. This mixes the event history of + those users together, which results in degraded + model quality. + + The field must be a UTF-8 encoded string with a + length limit of 128 characters. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. - The field should not contain PII or user-data. We recommend - to use Google Analytics `Client - ID `__ + The field should not contain PII or user-data. + We recommend to use Google Analytics `Client + ID + `__ for this field. engine (str): - The [Engine][google.cloud.discoveryengine.v1beta.Engine] + The `Engine + `__ resource name, in the form of ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}``. Optional. Only required for - [Engine][google.cloud.discoveryengine.v1beta.Engine] - produced user events. For example, user events from blended - search. + `Engine + `__ + produced user events. For example, user events + from blended search. data_store (str): - The - [DataStore][google.cloud.discoveryengine.v1beta.DataStore] + The `DataStore + `__ resource full name, of the form ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}``. - Optional. Only required for user events whose data store - can't by determined by - [UserEvent.engine][google.cloud.discoveryengine.v1beta.UserEvent.engine] - or - [UserEvent.documents][google.cloud.discoveryengine.v1beta.UserEvent.documents]. - If data store is set in the parent of write/import/collect - user event requests, this field can be omitted. + Optional. Only required for user events whose + data store can't by determined by + `UserEvent.engine + `__ + or `UserEvent.documents + `__. + If data store is set in the parent of + write/import/collect user event requests, this + field can be omitted. event_time (google.protobuf.timestamp_pb2.Timestamp): Only required for - [UserEventService.ImportUserEvents][google.cloud.discoveryengine.v1beta.UserEventService.ImportUserEvents] - method. Timestamp of when the user event happened. + `UserEventService.ImportUserEvents + `__ + method. Timestamp of when the user event + happened. user_info (google.cloud.discoveryengine_v1beta.types.UserInfo): Information about the end user. direct_user_request (bool): - Should set to true if the request is made directly from the - end user, in which case the - [UserEvent.user_info.user_agent][google.cloud.discoveryengine.v1beta.UserInfo.user_agent] + Should set to true if the request is made + directly from the end user, in which case the + `UserEvent.user_info.user_agent + `__ can be populated from the HTTP request. - This flag should be set only if the API request is made - directly from the end user such as a mobile app (and not if - a gateway or a server is processing and pushing the user - events). + This flag should be set only if the API request + is made directly from the end user such as a + mobile app (and not if a gateway or a server is + processing and pushing the user events). - This should not be set when using the JavaScript tag in - [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1beta.UserEventService.CollectUserEvent]. + This should not be set when using the JavaScript + tag in `UserEventService.CollectUserEvent + `__. session_id (str): - A unique identifier for tracking a visitor session with a - length limit of 128 bytes. A session is an aggregation of an - end user behavior in a time span. + A unique identifier for tracking a visitor + session with a length limit of 128 bytes. A + session is an aggregation of an end user + behavior in a time span. A general guideline to populate the session_id: - 1. If user has no activity for 30 min, a new session_id - should be assigned. - 2. The session_id should be unique across users, suggest use - uuid or add - [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id] - as prefix. + 1. If user has no activity for 30 min, a new + session_id should be assigned. + 2. The session_id should be unique across users, + suggest use uuid or add + `UserEvent.user_pseudo_id + `__ + as prefix. page_info (google.cloud.discoveryengine_v1beta.types.PageInfo): - Page metadata such as categories and other critical - information for certain event types such as - ``view-category-page``. + Page metadata such as categories and other + critical information for certain event types + such as ``view-category-page``. attribution_token (str): - Token to attribute an API response to user action(s) to - trigger the event. - - Highly recommended for user events that are the result of - [RecommendationService.Recommend][google.cloud.discoveryengine.v1beta.RecommendationService.Recommend]. - This field enables accurate attribution of recommendation - model performance. + Token to attribute an API response to user + action(s) to trigger the event. + Highly recommended for user events that are the + result of `RecommendationService.Recommend + `__. + This field enables accurate attribution of + recommendation model performance. The value must be one of: - - [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1beta.RecommendResponse.attribution_token] - for events that are the result of - [RecommendationService.Recommend][google.cloud.discoveryengine.v1beta.RecommendationService.Recommend]. - - [SearchResponse.attribution_token][google.cloud.discoveryengine.v1beta.SearchResponse.attribution_token] - for events that are the result of - [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]. - - This token enables us to accurately attribute page view or - conversion completion back to the event and the particular - predict response containing this clicked/purchased product. - If user clicks on product K in the recommendation results, - pass - [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1beta.RecommendResponse.attribution_token] - as a URL parameter to product K's page. When recording - events on product K's page, log the - [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1beta.RecommendResponse.attribution_token] + * `RecommendResponse.attribution_token + `__ + for events that are the result of + `RecommendationService.Recommend + `__. + + * `SearchResponse.attribution_token + `__ + for events that are the result of + `SearchService.Search + `__. + + This token enables us to accurately attribute + page view or conversion completion back to the + event and the particular predict response + containing this clicked/purchased product. If + user clicks on product K in the recommendation + results, pass + `RecommendResponse.attribution_token + `__ + as a URL parameter to product K's page. When + recording events on product K's page, log the + `RecommendResponse.attribution_token + `__ to this field. filter (str): - The filter syntax consists of an expression language for - constructing a predicate from one or more fields of the - documents being filtered. + The filter syntax consists of an expression + language for constructing a predicate from one + or more fields of the documents being filtered. - One example is for ``search`` events, the associated - [SearchRequest][google.cloud.discoveryengine.v1beta.SearchRequest] + One example is for ``search`` events, the + associated `SearchRequest + `__ may contain a filter expression in - [SearchRequest.filter][google.cloud.discoveryengine.v1beta.SearchRequest.filter] - conforming to https://google.aip.dev/160#filtering. - - Similarly, for ``view-item-list`` events that are generated - from a - [RecommendRequest][google.cloud.discoveryengine.v1beta.RecommendRequest], + `SearchRequest.filter + `__ + conforming to + https://google.aip.dev/160#filtering. + + Similarly, for ``view-item-list`` events that + are generated from a `RecommendRequest + `__, this field may be populated directly from - [RecommendRequest.filter][google.cloud.discoveryengine.v1beta.RecommendRequest.filter] - conforming to https://google.aip.dev/160#filtering. + `RecommendRequest.filter + `__ + conforming to + https://google.aip.dev/160#filtering. - The value must be a UTF-8 encoded string with a length limit - of 1,000 characters. Otherwise, an ``INVALID_ARGUMENT`` - error is returned. + The value must be a UTF-8 encoded string with a + length limit of 1,000 characters. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. documents (MutableSequence[google.cloud.discoveryengine_v1beta.types.DocumentInfo]): - List of - [Document][google.cloud.discoveryengine.v1beta.Document]s + List of `Document + `__s associated with this user event. - This field is optional except for the following event types: - - - ``view-item`` - - ``add-to-cart`` - - ``purchase`` - - ``media-play`` - - ``media-complete`` - - In a ``search`` event, this field represents the documents - returned to the end user on the current page (the end user - may have not finished browsing the whole page yet). When a - new page is returned to the end user, after - pagination/filtering/ordering even for the same query, a new - ``search`` event with different - [UserEvent.documents][google.cloud.discoveryengine.v1beta.UserEvent.documents] + This field is optional except for the following + event types: + + * ``view-item`` + * ``add-to-cart`` + + * ``purchase`` + * ``media-play`` + + * ``media-complete`` + + In a ``search`` event, this field represents the + documents returned to the end user on the + current page (the end user may have not finished + browsing the whole page yet). When a new page is + returned to the end user, after + pagination/filtering/ordering even for the same + query, a new ``search`` event with different + `UserEvent.documents + `__ is desired. panel (google.cloud.discoveryengine_v1beta.types.PanelInfo): Panel metadata associated with this user event. search_info (google.cloud.discoveryengine_v1beta.types.SearchInfo): - [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] + `SearchService.Search + `__ details related to the event. This field should be set for ``search`` event. completion_info (google.cloud.discoveryengine_v1beta.types.CompletionInfo): - [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1beta.CompletionService.CompleteQuery] + `CompletionService.CompleteQuery + `__ details related to the event. - This field should be set for ``search`` event when - autocomplete function is enabled and the user clicks a - suggestion for search. + This field should be set for ``search`` event + when autocomplete function is enabled and the + user clicks a suggestion for search. transaction_info (google.cloud.discoveryengine_v1beta.types.TransactionInfo): The transaction metadata (if any) associated with this user event. @@ -246,34 +282,42 @@ class UserEvent(proto.Message): associated with promotions. Currently, this field is restricted to at most one ID. attributes (MutableMapping[str, google.cloud.discoveryengine_v1beta.types.CustomAttribute]): - Extra user event features to include in the recommendation - model. These attributes must NOT contain data that needs to - be parsed or processed further, e.g. JSON or other - encodings. - - If you provide custom attributes for ingested user events, - also include them in the user events that you associate with - prediction requests. Custom attribute formatting must be - consistent between imported events and events provided with - prediction requests. This lets the Discovery Engine API use - those custom attributes when training models and serving - predictions, which helps improve recommendation quality. - - This field needs to pass all below criteria, otherwise an - ``INVALID_ARGUMENT`` error is returned: - - - The key must be a UTF-8 encoded string with a length limit - of 5,000 characters. - - For text attributes, at most 400 values are allowed. Empty - values are not allowed. Each value must be a UTF-8 encoded - string with a length limit of 256 characters. - - For number attributes, at most 400 values are allowed. - - For product recommendations, an example of extra user - information is ``traffic_channel``, which is how a user - arrives at the site. Users can arrive at the site by coming - to the site directly, coming through Google search, or in - other ways. + Extra user event features to include in the + recommendation model. These attributes must NOT + contain data that needs to be parsed or + processed further, e.g. JSON or other encodings. + + If you provide custom attributes for ingested + user events, also include them in the user + events that you associate with prediction + requests. Custom attribute formatting must be + consistent between imported events and events + provided with prediction requests. This lets the + Discovery Engine API use those custom attributes + when training models and serving predictions, + which helps improve recommendation quality. + + This field needs to pass all below criteria, + otherwise an ``INVALID_ARGUMENT`` error is + returned: + + * The key must be a UTF-8 encoded string with a + length limit of 5,000 characters. + + * For text attributes, at most 400 values are + allowed. Empty values are not allowed. Each + value must be a UTF-8 encoded string with a + length limit of 256 characters. + + * For number attributes, at most 400 values are + allowed. + + For product recommendations, an example of extra + user information is ``traffic_channel``, which + is how a user arrives at the site. Users can + arrive + at the site by coming to the site directly, + coming through Google search, or in other ways. media_info (google.cloud.discoveryengine_v1beta.types.MediaInfo): Media-specific info. panels (MutableSequence[google.cloud.discoveryengine_v1beta.types.PanelInfo]): @@ -386,31 +430,36 @@ class PageInfo(proto.Message): pageview_id (str): A unique ID of a web page view. - This should be kept the same for all user events triggered - from the same pageview. For example, an item detail page - view could trigger multiple events as the user is browsing - the page. The ``pageview_id`` property should be kept the - same for all these events so that they can be grouped + This should be kept the same for all user events + triggered from the same pageview. For example, + an item detail page view could trigger multiple + events as the user is browsing the page. The + ``pageview_id`` property should be kept the same + for all these events so that they can be grouped together properly. - When using the client side event reporting with JavaScript - pixel and Google Tag Manager, this value is filled in - automatically. + When using the client side event reporting with + JavaScript pixel and Google Tag Manager, this + value is filled in automatically. page_category (str): - The most specific category associated with a category page. - - To represent full path of category, use '>' sign to separate - different hierarchies. If '>' is part of the category name, - replace it with other character(s). - - Category pages include special pages such as sales or - promotions. For instance, a special sale page may have the - category hierarchy: - ``"pageCategory" : "Sales > 2017 Black Friday Deals"``. - - Required for ``view-category-page`` events. Other event - types should not set this field. Otherwise, an - ``INVALID_ARGUMENT`` error is returned. + The most specific category associated with a + category page. + To represent full path of category, use '>' sign + to separate different hierarchies. If '>' is + part of the category name, replace it with other + character(s). + + Category pages include special pages such as + sales or promotions. For instance, a special + sale page may have the category hierarchy: + + ``"pageCategory" : "Sales > 2017 Black Friday + Deals"``. + + Required for ``view-category-page`` events. + Other event types should not set this field. + Otherwise, an ``INVALID_ARGUMENT`` error is + returned. uri (str): Complete URL (window.location.href) of the user's current page. @@ -456,49 +505,57 @@ class SearchInfo(proto.Message): The user's search query. See - [SearchRequest.query][google.cloud.discoveryengine.v1beta.SearchRequest.query] + `SearchRequest.query + `__ for definition. - The value must be a UTF-8 encoded string with a length limit - of 5,000 characters. Otherwise, an ``INVALID_ARGUMENT`` - error is returned. + The value must be a UTF-8 encoded string with a + length limit of 5,000 characters. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. At least one of - [search_query][google.cloud.discoveryengine.v1beta.SearchInfo.search_query] + `search_query + `__ or - [PageInfo.page_category][google.cloud.discoveryengine.v1beta.PageInfo.page_category] - is required for ``search`` events. Other event types should - not set this field. Otherwise, an ``INVALID_ARGUMENT`` error - is returned. + `PageInfo.page_category + `__ + is required for ``search`` events. Other event + types should not set this field. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. order_by (str): - The order in which products are returned, if applicable. - + The order in which products are returned, if + applicable. See - [SearchRequest.order_by][google.cloud.discoveryengine.v1beta.SearchRequest.order_by] + `SearchRequest.order_by + `__ for definition and syntax. - The value must be a UTF-8 encoded string with a length limit - of 1,000 characters. Otherwise, an ``INVALID_ARGUMENT`` - error is returned. - - This can only be set for ``search`` events. Other event - types should not set this field. Otherwise, an + The value must be a UTF-8 encoded string with a + length limit of 1,000 characters. Otherwise, an ``INVALID_ARGUMENT`` error is returned. + + This can only be set for ``search`` events. + Other event types should not set this field. + Otherwise, an ``INVALID_ARGUMENT`` error is + returned. offset (int): - An integer that specifies the current offset for pagination - (the 0-indexed starting location, amongst the products - deemed by the API as relevant). + An integer that specifies the current offset for + pagination (the 0-indexed starting location, + amongst the products deemed by the API as + relevant). See - [SearchRequest.offset][google.cloud.discoveryengine.v1beta.SearchRequest.offset] + `SearchRequest.offset + `__ for definition. - If this field is negative, an ``INVALID_ARGUMENT`` is - returned. + If this field is negative, an + ``INVALID_ARGUMENT`` is returned. - This can only be set for ``search`` events. Other event - types should not set this field. Otherwise, an - ``INVALID_ARGUMENT`` error is returned. + This can only be set for ``search`` events. + Other event types should not set this field. + Otherwise, an ``INVALID_ARGUMENT`` error is + returned. This field is a member of `oneof`_ ``_offset``. """ @@ -525,10 +582,12 @@ class CompletionInfo(proto.Message): Attributes: selected_suggestion (str): End user selected - [CompleteQueryResponse.QuerySuggestion.suggestion][google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion.suggestion]. + `CompleteQueryResponse.QuerySuggestion.suggestion + `__. selected_position (int): End user selected - [CompleteQueryResponse.QuerySuggestion.suggestion][google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion.suggestion] + `CompleteQueryResponse.QuerySuggestion.suggestion + `__ position, starting from 0. """ @@ -567,43 +626,51 @@ class TransactionInfo(proto.Message): This field is a member of `oneof`_ ``_tax``. cost (float): - All the costs associated with the products. These can be - manufacturing costs, shipping expenses not borne by the end - user, or any other costs, such that: - - - Profit = - [value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] - - - [tax][google.cloud.discoveryengine.v1beta.TransactionInfo.tax] - - - [cost][google.cloud.discoveryengine.v1beta.TransactionInfo.cost] + All the costs associated with the products. + These can be manufacturing costs, shipping + expenses not borne by the end user, or any other + costs, such that: + + * Profit = + `value + `__ + - `tax + `__ + - `cost + `__ This field is a member of `oneof`_ ``_cost``. discount_value (float): - The total discount(s) value applied to this transaction. - This figure should be excluded from - [TransactionInfo.value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] + The total discount(s) value applied to this + transaction. This figure should be excluded from + `TransactionInfo.value + `__ For example, if a user paid - [TransactionInfo.value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] - amount, then nominal (pre-discount) value of the transaction - is the sum of - [TransactionInfo.value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] + `TransactionInfo.value + `__ + amount, then nominal (pre-discount) value of the + transaction is the sum of `TransactionInfo.value + `__ and - [TransactionInfo.discount_value][google.cloud.discoveryengine.v1beta.TransactionInfo.discount_value] + `TransactionInfo.discount_value + `__ - This means that profit is calculated the same way, - regardless of the discount value, and that - [TransactionInfo.discount_value][google.cloud.discoveryengine.v1beta.TransactionInfo.discount_value] + This means that profit is calculated the same + way, regardless of the discount value, and that + `TransactionInfo.discount_value + `__ can be larger than - [TransactionInfo.value][google.cloud.discoveryengine.v1beta.TransactionInfo.value]: + `TransactionInfo.value + `__: - - Profit = - [value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] - - - [tax][google.cloud.discoveryengine.v1beta.TransactionInfo.tax] - - - [cost][google.cloud.discoveryengine.v1beta.TransactionInfo.cost] + * Profit = + `value + `__ + - `tax + `__ + - `cost + `__ This field is a member of `oneof`_ ``_discount_value``. """ @@ -650,32 +717,37 @@ class DocumentInfo(proto.Message): Attributes: id (str): - The [Document][google.cloud.discoveryengine.v1beta.Document] + The `Document + `__ resource ID. This field is a member of `oneof`_ ``document_descriptor``. name (str): - The [Document][google.cloud.discoveryengine.v1beta.Document] + The `Document + `__ resource full name, of the form: + ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`` This field is a member of `oneof`_ ``document_descriptor``. uri (str): - The [Document][google.cloud.discoveryengine.v1beta.Document] + The `Document + `__ URI - only allowed for website data stores. This field is a member of `oneof`_ ``document_descriptor``. quantity (int): - Quantity of the Document associated with the user event. - Defaults to 1. - - For example, this field is 2 if two quantities of the same - Document are involved in a ``add-to-cart`` event. + Quantity of the Document associated with the + user event. Defaults to 1. + For example, this field is 2 if two quantities + of the same Document are involved in a + ``add-to-cart`` event. - Required for events of the following event types: + Required for events of the following event + types: - - ``add-to-cart`` - - ``purchase`` + * ``add-to-cart`` + * ``purchase`` This field is a member of `oneof`_ ``_quantity``. promotion_ids (MutableSequence[str]): @@ -728,16 +800,18 @@ class PanelInfo(proto.Message): display_name (str): The display name of the panel. panel_position (int): - The ordered position of the panel, if shown to the user with - other panels. If set, then - [total_panels][google.cloud.discoveryengine.v1beta.PanelInfo.total_panels] + The ordered position of the panel, if shown to + the user with other panels. If set, then + `total_panels + `__ must also be set. This field is a member of `oneof`_ ``_panel_position``. total_panels (int): - The total number of panels, including this one, shown to the - user. Must be set if - [panel_position][google.cloud.discoveryengine.v1beta.PanelInfo.panel_position] + The total number of panels, including this one, + shown to the user. Must be set if + `panel_position + `__ is set. This field is a member of `oneof`_ ``_total_panels``. @@ -778,20 +852,24 @@ class MediaInfo(proto.Message): Attributes: media_progress_duration (google.protobuf.duration_pb2.Duration): - The media progress time in seconds, if applicable. For - example, if the end user has finished 90 seconds of a - playback video, then - [MediaInfo.media_progress_duration.seconds][google.protobuf.Duration.seconds] - should be set to 90. + The media progress time in seconds, if + applicable. For example, if the end user has + finished 90 seconds of a playback video, then + `MediaInfo.media_progress_duration.seconds + `__ should be + set to 90. media_progress_percentage (float): Media progress should be computed using only the - [media_progress_duration][google.cloud.discoveryengine.v1beta.MediaInfo.media_progress_duration] + `media_progress_duration + `__ relative to the media total length. - This value must be between ``[0, 1.0]`` inclusive. + This value must be between ``[0, 1.0]`` + inclusive. - If this is not a playback or the progress cannot be computed - (e.g. ongoing livestream), this field should be unset. + If this is not a playback or the progress cannot + be computed (e.g. ongoing livestream), this + field should be unset. This field is a member of `oneof`_ ``_media_progress_percentage``. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/user_event_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/user_event_service.py index 8be711e32aeb..166d76d7e7e9 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/user_event_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/user_event_service.py @@ -37,17 +37,22 @@ class WriteUserEventRequest(proto.Message): Attributes: parent (str): - Required. The parent resource name. If the write user event - action is applied in - [DataStore][google.cloud.discoveryengine.v1beta.DataStore] + Required. The parent resource name. + If the write user event action is applied in + `DataStore + `__ level, the format is: + ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}``. - If the write user event action is applied in [Location][] - level, for example, the event with - [Document][google.cloud.discoveryengine.v1beta.Document] - across multiple - [DataStore][google.cloud.discoveryengine.v1beta.DataStore], - the format is: ``projects/{project}/locations/{location}``. + If the write user event action is applied in + [Location][] level, for example, the event with + `Document + `__ + across multiple `DataStore + `__, + the format is: + + ``projects/{project}/locations/{location}``. user_event (google.cloud.discoveryengine_v1beta.types.UserEvent): Required. User event to write. @@ -81,7 +86,8 @@ class CollectUserEventRequest(proto.Message): Attributes: parent (str): - Required. The parent DataStore resource name, such as + Required. The parent DataStore resource name, + such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}``. user_event (str): Required. URL encoded UserEvent proto with a diff --git a/packages/google-cloud-discoveryengine/mypy.ini b/packages/google-cloud-discoveryengine/mypy.ini index 574c5aed394b..a3cb5c292172 100644 --- a/packages/google-cloud-discoveryengine/mypy.ini +++ b/packages/google-cloud-discoveryengine/mypy.ini @@ -1,3 +1,3 @@ [mypy] -python_version = 3.7 +python_version = 3.14 namespace_packages = True diff --git a/packages/google-cloud-discoveryengine/samples/generated_samples/snippet_metadata_google.cloud.discoveryengine.v1.json b/packages/google-cloud-discoveryengine/samples/generated_samples/snippet_metadata_google.cloud.discoveryengine.v1.json index e18088dc7e4c..af933896aabc 100644 --- a/packages/google-cloud-discoveryengine/samples/generated_samples/snippet_metadata_google.cloud.discoveryengine.v1.json +++ b/packages/google-cloud-discoveryengine/samples/generated_samples/snippet_metadata_google.cloud.discoveryengine.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-discoveryengine", - "version": "0.16.0" + "version": "0.4.0" }, "snippets": [ { diff --git a/packages/google-cloud-discoveryengine/samples/generated_samples/snippet_metadata_google.cloud.discoveryengine.v1alpha.json b/packages/google-cloud-discoveryengine/samples/generated_samples/snippet_metadata_google.cloud.discoveryengine.v1alpha.json index 57f9225e8d15..b70a65161aa1 100644 --- a/packages/google-cloud-discoveryengine/samples/generated_samples/snippet_metadata_google.cloud.discoveryengine.v1alpha.json +++ b/packages/google-cloud-discoveryengine/samples/generated_samples/snippet_metadata_google.cloud.discoveryengine.v1alpha.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-discoveryengine", - "version": "0.16.0" + "version": "0.4.0" }, "snippets": [ { diff --git a/packages/google-cloud-discoveryengine/samples/generated_samples/snippet_metadata_google.cloud.discoveryengine.v1beta.json b/packages/google-cloud-discoveryengine/samples/generated_samples/snippet_metadata_google.cloud.discoveryengine.v1beta.json index 167301fc5c7c..b2d0a745ffa9 100644 --- a/packages/google-cloud-discoveryengine/samples/generated_samples/snippet_metadata_google.cloud.discoveryengine.v1beta.json +++ b/packages/google-cloud-discoveryengine/samples/generated_samples/snippet_metadata_google.cloud.discoveryengine.v1beta.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-discoveryengine", - "version": "0.16.0" + "version": "0.4.0" }, "snippets": [ { From 24083312a7ef7684cd7483c494be6f2de27456cb Mon Sep 17 00:00:00 2001 From: ohmayr Date: Thu, 15 Jan 2026 00:39:22 +0000 Subject: [PATCH 2/2] change width and disable client post processing fixes --- .../cloud/discoveryengine_v1/types/answer.py | 124 +- .../discoveryengine_v1/types/assist_answer.py | 71 +- .../discoveryengine_v1/types/assistant.py | 4 +- .../types/assistant_service.py | 142 +- .../cloud/discoveryengine_v1/types/chunk.py | 76 +- .../types/cmek_config_service.py | 65 +- .../cloud/discoveryengine_v1/types/common.py | 108 +- .../discoveryengine_v1/types/completion.py | 37 +- .../types/completion_service.py | 83 +- .../cloud/discoveryengine_v1/types/control.py | 187 ++- .../types/control_service.py | 46 +- .../discoveryengine_v1/types/conversation.py | 11 +- .../types/conversational_search_service.py | 516 +++--- .../types/custom_tuning_model.py | 19 +- .../discoveryengine_v1/types/data_store.py | 150 +- .../types/data_store_service.py | 137 +- .../discoveryengine_v1/types/document.py | 121 +- .../types/document_processing_config.py | 104 +- .../types/document_service.py | 151 +- .../cloud/discoveryengine_v1/types/engine.py | 280 ++-- .../types/engine_service.py | 82 +- .../types/grounded_generation_service.py | 380 ++--- .../discoveryengine_v1/types/grounding.py | 23 +- .../types/identity_mapping_store.py | 56 +- .../types/identity_mapping_store_service.py | 163 +- .../discoveryengine_v1/types/import_config.py | 703 ++++----- .../cloud/discoveryengine_v1/types/project.py | 40 +- .../types/project_service.py | 19 +- .../discoveryengine_v1/types/purge_config.py | 200 ++- .../discoveryengine_v1/types/rank_service.py | 89 +- .../types/recommendation_service.py | 195 ++- .../cloud/discoveryengine_v1/types/safety.py | 10 +- .../cloud/discoveryengine_v1/types/schema.py | 8 +- .../types/schema_service.py | 93 +- .../types/search_service.py | 1262 +++++++-------- .../types/search_tuning_service.py | 121 +- .../types/serving_config.py | 245 ++- .../types/serving_config_service.py | 4 +- .../cloud/discoveryengine_v1/types/session.py | 43 +- .../types/site_search_engine.py | 68 +- .../types/site_search_engine_service.py | 300 ++-- .../discoveryengine_v1/types/user_event.py | 526 +++--- .../types/user_event_service.py | 57 +- .../discoveryengine_v1/types/user_license.py | 33 +- .../types/user_license_service.py | 80 +- .../types/acl_config.py | 4 +- .../types/acl_config_service.py | 4 +- .../discoveryengine_v1alpha/types/answer.py | 83 +- .../discoveryengine_v1alpha/types/chunk.py | 47 +- .../types/chunk_service.py | 56 +- .../discoveryengine_v1alpha/types/common.py | 92 +- .../types/completion.py | 37 +- .../types/completion_service.py | 83 +- .../discoveryengine_v1alpha/types/control.py | 103 +- .../types/control_service.py | 47 +- .../types/conversation.py | 11 +- .../types/conversational_search_service.py | 418 +++-- .../types/custom_tuning_model.py | 12 +- .../types/data_store.py | 116 +- .../types/data_store_service.py | 129 +- .../discoveryengine_v1alpha/types/document.py | 109 +- .../types/document_processing_config.py | 74 +- .../types/document_service.py | 147 +- .../discoveryengine_v1alpha/types/engine.py | 273 ++-- .../types/engine_service.py | 73 +- .../types/estimate_billing_service.py | 33 +- .../types/evaluation.py | 108 +- .../types/evaluation_service.py | 86 +- .../types/grounded_generation_service.py | 105 +- .../types/grounding.py | 23 +- .../types/import_config.py | 677 ++++---- .../discoveryengine_v1alpha/types/project.py | 40 +- .../types/project_service.py | 43 +- .../types/purge_config.py | 180 +-- .../types/rank_service.py | 81 +- .../types/recommendation_service.py | 192 ++- .../types/sample_query.py | 18 +- .../types/sample_query_service.py | 81 +- .../types/sample_query_set.py | 12 +- .../types/sample_query_set_service.py | 75 +- .../discoveryengine_v1alpha/types/schema.py | 162 +- .../types/schema_service.py | 78 +- .../types/search_service.py | 1365 ++++++++-------- .../types/search_tuning_service.py | 121 +- .../types/serving_config.py | 219 ++- .../types/serving_config_service.py | 23 +- .../discoveryengine_v1alpha/types/session.py | 138 +- .../types/session_service.py | 44 +- .../types/site_search_engine.py | 64 +- .../types/site_search_engine_service.py | 239 ++- .../types/user_event.py | 465 +++--- .../types/user_event_service.py | 32 +- .../discoveryengine_v1beta/types/answer.py | 83 +- .../discoveryengine_v1beta/types/chunk.py | 47 +- .../discoveryengine_v1beta/types/common.py | 54 +- .../types/completion.py | 37 +- .../types/completion_service.py | 295 ++-- .../discoveryengine_v1beta/types/control.py | 110 +- .../types/control_service.py | 47 +- .../types/conversation.py | 11 +- .../types/conversational_search_service.py | 503 +++--- .../types/custom_tuning_model.py | 19 +- .../types/data_store.py | 148 +- .../types/data_store_service.py | 123 +- .../discoveryengine_v1beta/types/document.py | 97 +- .../types/document_processing_config.py | 78 +- .../types/document_service.py | 137 +- .../discoveryengine_v1beta/types/engine.py | 171 +- .../types/engine_service.py | 75 +- .../types/evaluation.py | 118 +- .../types/evaluation_service.py | 90 +- .../types/grounded_generation_service.py | 325 ++-- .../discoveryengine_v1beta/types/grounding.py | 26 +- .../types/import_config.py | 687 ++++---- .../discoveryengine_v1beta/types/project.py | 40 +- .../types/project_service.py | 20 +- .../types/purge_config.py | 184 +-- .../types/rank_service.py | 81 +- .../types/recommendation_service.py | 192 ++- .../types/sample_query.py | 22 +- .../types/sample_query_service.py | 83 +- .../types/sample_query_set.py | 12 +- .../types/sample_query_set_service.py | 75 +- .../discoveryengine_v1beta/types/schema.py | 8 +- .../types/schema_service.py | 79 +- .../types/search_service.py | 1404 ++++++++--------- .../types/search_tuning_service.py | 121 +- .../types/serving_config.py | 250 ++- .../types/serving_config_service.py | 23 +- .../discoveryengine_v1beta/types/session.py | 39 +- .../types/site_search_engine.py | 68 +- .../types/site_search_engine_service.py | 281 ++-- .../types/user_event.py | 479 +++--- .../types/user_event_service.py | 36 +- 134 files changed, 9618 insertions(+), 11014 deletions(-) diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/answer.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/answer.py index ae7f0f53ec34..4d0ea1569609 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/answer.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/answer.py @@ -45,8 +45,8 @@ class Answer(proto.Message): answer_text (str): The textual answer. grounding_score (float): - A score in the range of [0, 1] describing how - grounded the answer is by the reference chunks. + A score in the range of [0, 1] describing how grounded + the answer is by the reference chunks. This field is a member of `oneof`_ ``_grounding_score``. citations (MutableSequence[google.cloud.discoveryengine_v1.types.Answer.Citation]): @@ -62,9 +62,9 @@ class Answer(proto.Message): query_understanding_info (google.cloud.discoveryengine_v1.types.Answer.QueryUnderstandingInfo): Query understanding information. answer_skipped_reasons (MutableSequence[google.cloud.discoveryengine_v1.types.Answer.AnswerSkippedReason]): - Additional answer-skipped reasons. This - provides the reason for ignored cases. If - nothing is skipped, this field is not set. + Additional answer-skipped reasons. This provides the + reason for ignored cases. If nothing is skipped, this + field is not set. create_time (google.protobuf.timestamp_pb2.Timestamp): Output only. Answer creation timestamp. complete_time (google.protobuf.timestamp_pb2.Timestamp): @@ -179,17 +179,15 @@ class Citation(proto.Message): Attributes: start_index (int): - Index indicates the start of the segment, - measured in bytes (UTF-8 unicode). If there are - multi-byte characters,such as non-ASCII - characters, the index measurement is longer than - the string length. + Index indicates the start of the segment, measured in + bytes (UTF-8 unicode). If there are multi-byte + characters,such as non-ASCII characters, the index + measurement is longer than the string length. end_index (int): - End of the attributed segment, exclusive. - Measured in bytes (UTF-8 unicode). If there are - multi-byte characters,such as non-ASCII - characters, the index measurement is longer than - the string length. + End of the attributed segment, exclusive. Measured in + bytes (UTF-8 unicode). If there are multi-byte + characters,such as non-ASCII characters, the index + measurement is longer than the string length. sources (MutableSequence[google.cloud.discoveryengine_v1.types.Answer.CitationSource]): Citation sources for the attributed segment. """ @@ -228,24 +226,23 @@ class GroundingSupport(proto.Message): Attributes: start_index (int): - Required. Index indicates the start of the - claim, measured in bytes (UTF-8 unicode). + Required. Index indicates the start of the claim, + measured in bytes (UTF-8 unicode). end_index (int): Required. End of the claim, exclusive. grounding_score (float): - A score in the range of [0, 1] describing how - grounded is a specific claim by the references. - Higher value means that the claim is better - supported by the reference chunks. + A score in the range of [0, 1] describing how grounded + is a specific claim by the references. + Higher value means that the claim is better supported by + the reference chunks. This field is a member of `oneof`_ ``_grounding_score``. grounding_check_required (bool): - Indicates that this claim required grounding - check. When the system decided this claim didn't - require attribution/grounding check, this field - is set to false. In that case, no grounding - check was done for the claim and therefore - ``grounding_score``, ``sources`` is not + Indicates that this claim required grounding check. When + the system decided this claim didn't require + attribution/grounding check, this field is set to false. + In that case, no grounding check was done for the claim + and therefore ``grounding_score``, ``sources`` is not returned. This field is a member of `oneof`_ ``_grounding_check_required``. @@ -313,12 +310,12 @@ class UnstructuredDocumentInfo(proto.Message): title (str): Title. chunk_contents (MutableSequence[google.cloud.discoveryengine_v1.types.Answer.Reference.UnstructuredDocumentInfo.ChunkContent]): - List of cited chunk contents derived from - document content. + List of cited chunk contents derived from document + content. struct_data (google.protobuf.struct_pb2.Struct): - The structured JSON metadata for the - document. It is populated from the struct data - from the Chunk in search result. + The structured JSON metadata for the document. + It is populated from the struct data from the Chunk in + search result. """ class ChunkContent(proto.Message): @@ -332,12 +329,12 @@ class ChunkContent(proto.Message): page_identifier (str): Page identifier. relevance_score (float): - The relevance of the chunk for a given query. - Values range from 0.0 (completely irrelevant) to - 1.0 (completely relevant). This value is for - informational purpose only. It may change for - the same query and chunk at any time due to a - model retraining or change in implementation. + The relevance of the chunk for a given query. Values + range from 0.0 (completely irrelevant) to 1.0 + (completely relevant). This value is for informational + purpose only. It may change for the same query and chunk + at any time due to a model retraining or change in + implementation. This field is a member of `oneof`_ ``_relevance_score``. """ @@ -392,12 +389,12 @@ class ChunkInfo(proto.Message): content (str): Chunk textual content. relevance_score (float): - The relevance of the chunk for a given query. - Values range from 0.0 (completely irrelevant) to - 1.0 (completely relevant). This value is for - informational purpose only. It may change for - the same query and chunk at any time due to a - model retraining or change in implementation. + The relevance of the chunk for a given query. Values + range from 0.0 (completely irrelevant) to 1.0 + (completely relevant). This value is for informational + purpose only. It may change for the same query and chunk + at any time due to a model retraining or change in + implementation. This field is a member of `oneof`_ ``_relevance_score``. document_metadata (google.cloud.discoveryengine_v1.types.Answer.Reference.ChunkInfo.DocumentMetadata): @@ -417,9 +414,9 @@ class DocumentMetadata(proto.Message): page_identifier (str): Page identifier. struct_data (google.protobuf.struct_pb2.Struct): - The structured JSON metadata for the - document. It is populated from the struct data - from the Chunk in search result. + The structured JSON metadata for the document. + It is populated from the struct data from the Chunk in + search result. """ document: str = proto.Field( @@ -584,9 +581,9 @@ class Observation(proto.Message): Attributes: search_results (MutableSequence[google.cloud.discoveryengine_v1.types.Answer.Step.Action.Observation.SearchResult]): - Search results observed by the search action, - it can be snippets info or chunk info, depending - on the citation type set by the user. + Search results observed by the search action, it can + be snippets info or chunk info, depending on the + citation type set by the user. """ class SearchResult(proto.Message): @@ -600,16 +597,16 @@ class SearchResult(proto.Message): title (str): Title. snippet_info (MutableSequence[google.cloud.discoveryengine_v1.types.Answer.Step.Action.Observation.SearchResult.SnippetInfo]): - If citation_type is DOCUMENT_LEVEL_CITATION, - populate document level snippets. + If citation_type is DOCUMENT_LEVEL_CITATION, populate + document level snippets. chunk_info (MutableSequence[google.cloud.discoveryengine_v1.types.Answer.Step.Action.Observation.SearchResult.ChunkInfo]): - If citation_type is CHUNK_LEVEL_CITATION and - chunk mode is on, populate chunk info. + If citation_type is CHUNK_LEVEL_CITATION and chunk mode + is on, populate chunk info. struct_data (google.protobuf.struct_pb2.Struct): Data representation. The structured JSON data for the document. - It's populated from the struct data from the - Document, or the Chunk in search result. + It's populated from the struct data from the Document, + or the Chunk in search result. """ class SnippetInfo(proto.Message): @@ -619,8 +616,7 @@ class SnippetInfo(proto.Message): snippet (str): Snippet content. snippet_status (str): - Status of the snippet defined by the search - team. + Status of the snippet defined by the search team. """ snippet: str = proto.Field( @@ -643,12 +639,12 @@ class ChunkInfo(proto.Message): content (str): Chunk textual content. relevance_score (float): - The relevance of the chunk for a given query. - Values range from 0.0 (completely irrelevant) to - 1.0 (completely relevant). This value is for - informational purpose only. It may change for - the same query and chunk at any time due to a - model retraining or change in implementation. + The relevance of the chunk for a given query. Values + range from 0.0 (completely irrelevant) to 1.0 + (completely relevant). This value is for informational + purpose only. It may change for the same query and chunk + at any time due to a model retraining or change in + implementation. This field is a member of `oneof`_ ``_relevance_score``. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/assist_answer.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/assist_answer.py index 2d4b5d606c11..19c85c7a579d 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/assist_answer.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/assist_answer.py @@ -31,18 +31,17 @@ class AssistAnswer(proto.Message): r"""AssistAnswer resource, main part of - `AssistResponse - `__. + `AssistResponse `__. Attributes: name (str): - Immutable. Resource name of the - ``AssistAnswer``. Format: + Immutable. Resource name of the ``AssistAnswer``. + Format: ``projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/assistAnswers/{assist_answer}`` - This field must be a UTF-8 encoded string with a - length limit of 1024 characters. + This field must be a UTF-8 encoded string with a length + limit of 1024 characters. state (google.cloud.discoveryengine_v1.types.AssistAnswer.State): State of the answer generation. replies (MutableSequence[google.cloud.discoveryengine_v1.types.AssistAnswer.Reply]): @@ -98,8 +97,8 @@ class Reply(proto.Message): Attributes: grounded_content (google.cloud.discoveryengine_v1.types.AssistantGroundedContent): - Possibly grounded response text or media from - the assistant. + Possibly grounded response text or media from the + assistant. This field is a member of `oneof`_ ``reply``. """ @@ -156,8 +155,8 @@ class AssistantContent(proto.Message): This field is a member of `oneof`_ ``data``. executable_code (google.cloud.discoveryengine_v1.types.AssistantContent.ExecutableCode): - Code generated by the model that is meant to - be executed. + Code generated by the model that is meant to be + executed. This field is a member of `oneof`_ ``data``. code_execution_result (google.cloud.discoveryengine_v1.types.AssistantContent.CodeExecutionResult): @@ -165,11 +164,11 @@ class AssistantContent(proto.Message): This field is a member of `oneof`_ ``data``. role (str): - The producer of the content. Can be "model" - or "user". + The producer of the content. Can be "model" or + "user". thought (bool): - Optional. Indicates if the part is thought - from the model. + Optional. Indicates if the part is thought from the + model. """ class Blob(proto.Message): @@ -177,8 +176,8 @@ class Blob(proto.Message): Attributes: mime_type (str): - Required. The media type (MIME type) of the - generated data. + Required. The media type (MIME type) of the generated + data. data (bytes): Required. Raw bytes. """ @@ -197,8 +196,7 @@ class File(proto.Message): Attributes: mime_type (str): - Required. The media type (MIME type) of the - file. + Required. The media type (MIME type) of the file. file_id (str): Required. The file ID. """ @@ -213,13 +211,13 @@ class File(proto.Message): ) class ExecutableCode(proto.Message): - r"""Code generated by the model that is meant to be executed by - the model. + r"""Code generated by the model that is meant to be executed by the + model. Attributes: code (str): - Required. The code content. Currently only - supports Python. + Required. The code content. Currently only supports + Python. """ code: str = proto.Field( @@ -234,9 +232,8 @@ class CodeExecutionResult(proto.Message): outcome (google.cloud.discoveryengine_v1.types.AssistantContent.CodeExecutionResult.Outcome): Required. Outcome of the code execution. output (str): - Optional. Contains stdout when code execution - is successful, stderr or other description - otherwise. + Optional. Contains stdout when code execution is + successful, stderr or other description otherwise. """ class Outcome(proto.Enum): @@ -313,8 +310,8 @@ class Outcome(proto.Enum): class AssistantGroundedContent(proto.Message): r"""A piece of content and possibly its grounding information. - Not all content needs grounding. Phrases like "Of course, I will - gladly search it for you." do not need grounding. + Not all content needs grounding. Phrases like "Of course, I will gladly + search it for you." do not need grounding. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -343,10 +340,10 @@ class Segment(proto.Message): Attributes: start_index (int): - Zero-based index indicating the start of the - segment, measured in bytes of a UTF-8 string - (i.e. characters encoded on multiple bytes have - a length of more than one). + Zero-based index indicating the start of the segment, + measured in bytes of a UTF-8 string (i.e. characters + encoded on multiple bytes have a length of more than + one). end_index (int): End of the segment, exclusive. reference_indices (MutableSequence[int]): @@ -399,8 +396,8 @@ class DocumentMetadata(proto.Message): This field is a member of `oneof`_ ``_document``. uri (str): - URI for the document. It may contain a URL - that redirects to the actual website. + URI for the document. It may contain a URL that + redirects to the actual website. This field is a member of `oneof`_ ``_uri``. title (str): @@ -412,10 +409,10 @@ class DocumentMetadata(proto.Message): This field is a member of `oneof`_ ``_page_identifier``. domain (str): - Domain name from the document URI. Note that the - ``uri`` field may contain a URL that redirects - to the actual website, in which case this will - contain the domain name of the target site. + Domain name from the document URI. Note that the ``uri`` + field may contain a URL that redirects to the actual + website, in which case this will contain the domain name + of the target site. This field is a member of `oneof`_ ``_domain``. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/assistant.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/assistant.py index 42d90d8c4209..e2e156a79f4e 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/assistant.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/assistant.py @@ -37,8 +37,8 @@ class Assistant(proto.Message): ``projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`` - It must be a UTF-8 encoded string with a length - limit of 1024 characters. + It must be a UTF-8 encoded string with a length limit of + 1024 characters. """ name: str = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/assistant_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/assistant_service.py index 725473d2ba79..404d9718ee24 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/assistant_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/assistant_service.py @@ -37,14 +37,12 @@ class AssistUserMetadata(proto.Message): Attributes: time_zone (str): - Optional. IANA time zone, e.g. - Europe/Budapest. + Optional. IANA time zone, e.g. Europe/Budapest. preferred_language_code (str): - Optional. Preferred language to be used for - answering if language detection fails. Also used - as the language of error messages created by - actions, regardless of language detection - results. + Optional. Preferred language to be used for answering + if language detection fails. Also used as the language + of error messages created by actions, regardless of + language detection results. """ time_zone: str = proto.Field( @@ -67,35 +65,33 @@ class StreamAssistRequest(proto.Message): name (str): Required. The resource name of the `Assistant - `__. - Format: + `__. Format: ``projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`` query (google.cloud.discoveryengine_v1.types.Query): Optional. Current user query. - Empty query is only supported if ``file_ids`` - are provided. In this case, the answer will be - generated based on those context files. + Empty query is only supported if ``file_ids`` are + provided. In this case, the answer will be generated + based on those context files. session (str): Optional. The session to use for the request. If - specified, the assistant has access to the - session history, and the query and the answer - are stored there. + specified, the assistant has access to the session + history, and the query and the answer are stored there. - If ``-`` is specified as the session ID, or it - is left empty, then a new session is created - with an automatically generated ID. + If ``-`` is specified as the session ID, or it is left + empty, then a new session is created with an + automatically generated ID. Format: ``projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}`` user_metadata (google.cloud.discoveryengine_v1.types.AssistUserMetadata): - Optional. Information about the user - initiating the query. + Optional. Information about the user initiating the + query. tools_spec (google.cloud.discoveryengine_v1.types.StreamAssistRequest.ToolsSpec): - Optional. Specification of tools that are - used to serve the request. + Optional. Specification of tools that are used to + serve the request. generation_spec (google.cloud.discoveryengine_v1.types.StreamAssistRequest.GenerationSpec): Optional. Specification of the generation configuration for the request. @@ -106,22 +102,18 @@ class ToolsSpec(proto.Message): Attributes: vertex_ai_search_spec (google.cloud.discoveryengine_v1.types.StreamAssistRequest.ToolsSpec.VertexAiSearchSpec): - Optional. Specification of the Vertex AI - Search tool. + Optional. Specification of the Vertex AI Search tool. web_grounding_spec (google.cloud.discoveryengine_v1.types.StreamAssistRequest.ToolsSpec.WebGroundingSpec): - Optional. Specification of the web grounding - tool. If field is present, enables grounding - with web search. Works only if - `Assistant.web_grounding_type + Optional. Specification of the web grounding tool. + If field is present, enables grounding with web search. + Works only if `Assistant.web_grounding_type `__ is [WEB_GROUNDING_TYPE_GOOGLE_SEARCH][] or [WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH][]. image_generation_spec (google.cloud.discoveryengine_v1.types.StreamAssistRequest.ToolsSpec.ImageGenerationSpec): - Optional. Specification of the image - generation tool. + Optional. Specification of the image generation tool. video_generation_spec (google.cloud.discoveryengine_v1.types.StreamAssistRequest.ToolsSpec.VideoGenerationSpec): - Optional. Specification of the video - generation tool. + Optional. Specification of the video generation tool. """ class VertexAiSearchSpec(proto.Message): @@ -131,32 +123,30 @@ class VertexAiSearchSpec(proto.Message): data_store_specs (MutableSequence[google.cloud.discoveryengine_v1.types.SearchRequest.DataStoreSpec]): Optional. Specs defining `DataStore - `__s - to filter on in a search call and configurations - for those data stores. This is only considered - for `Engine - `__s - with multiple data stores. + `__s to + filter on in a search call and configurations for those + data stores. This is only considered for `Engine + `__s with + multiple data stores. filter (str): - Optional. The filter syntax consists of an - expression language for constructing a predicate - from one or more fields of the documents being - filtered. Filter expression is case-sensitive. + Optional. The filter syntax consists of an expression + language for constructing a predicate from one or more + fields of the documents being filtered. Filter + expression is case-sensitive. If this field is unrecognizable, an ``INVALID_ARGUMENT`` is returned. - Filtering in Vertex AI Search is done by mapping - the LHS filter key to a key property defined in - the Vertex AI Search backend -- this mapping is - defined by the customer in their schema. For - example a media customer might have a field - 'name' in their schema. In this case the filter - would look like this: filter --> name:'ANY("king - kong")' - - For more information about filtering including - syntax and filter operators, see + Filtering in Vertex AI Search is done by mapping the LHS + filter key to a key property defined in the Vertex AI + Search backend -- this mapping is defined by the + customer in their schema. For example a media customer + might have a field 'name' in their schema. In this case + the filter would look like this: filter --> + name:'ANY("king kong")' + + For more information about filtering including syntax + and filter operators, see `Filter `__ """ @@ -213,14 +203,14 @@ class VideoGenerationSpec(proto.Message): class GenerationSpec(proto.Message): r"""Assistant generation specification for the request. - This allows to override the default generation configuration at - the engine level. + This allows to override the default generation configuration at the + engine level. Attributes: model_id (str): - Optional. The Vertex AI model_id used for the - generative model. If not set, the default - Assistant model will be used. + Optional. The Vertex AI model_id used for the generative + model. If not set, the default Assistant model will be + used. """ model_id: str = proto.Field( @@ -266,36 +256,34 @@ class StreamAssistResponse(proto.Message): Attributes: answer (google.cloud.discoveryengine_v1.types.AssistAnswer): - Assist answer resource object containing parts - of the assistant's final answer for the user's - query. + Assist answer resource object containing parts of the + assistant's final answer for the user's query. - Not present if the current response doesn't add - anything to previously sent + Not present if the current response doesn't add anything + to previously sent `AssistAnswer.replies `__. Observe `AssistAnswer.state `__ - to see if more parts are to be expected. While - the state is ``IN_PROGRESS``, the - `AssistAnswer.replies + to see if more parts are to be expected. While the state + is ``IN_PROGRESS``, the `AssistAnswer.replies `__ - field in each response will contain replies - (reply fragments) to be appended to the ones - received in previous responses. - [AssistAnswer.name][] won't be filled. + field in each response will contain replies (reply + fragments) to be appended to the ones received in + previous responses. [AssistAnswer.name][] won't be + filled. If the state is ``SUCCEEDED``, ``FAILED`` or - ``SKIPPED``, the response is the last response - and [AssistAnswer.name][] will have a value. + ``SKIPPED``, the response is the last response and + [AssistAnswer.name][] will have a value. session_info (google.cloud.discoveryengine_v1.types.StreamAssistResponse.SessionInfo): Session information. assist_token (str): - A global unique ID that identifies the - current pair of request and stream of responses. - Used for feedback and support. + A global unique ID that identifies the current pair + of request and stream of responses. Used for feedback + and support. """ class SessionInfo(proto.Message): @@ -303,8 +291,8 @@ class SessionInfo(proto.Message): Attributes: session (str): - Name of the newly generated or continued - session. + Name of the newly generated or continued session. + Format: ``projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}``. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/chunk.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/chunk.py index 07d06b1bb7f6..bfa50498f4fb 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/chunk.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/chunk.py @@ -42,53 +42,49 @@ class Chunk(proto.Message): ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}/chunks/{chunk_id}``. - This field must be a UTF-8 encoded string with a - length limit of 1024 characters. + This field must be a UTF-8 encoded string with a length + limit of 1024 characters. id (str): Unique chunk ID of the current chunk. content (str): - Content is a string from a document (parsed - content). + Content is a string from a document (parsed content). relevance_score (float): - Output only. Represents the relevance score - based on similarity. Higher score indicates - higher chunk relevance. The score is in range - [-1.0, 1.0]. + Output only. Represents the relevance score based on + similarity. Higher score indicates higher chunk + relevance. The score is in range [-1.0, 1.0]. Only populated on `SearchResponse `__. This field is a member of `oneof`_ ``_relevance_score``. document_metadata (google.cloud.discoveryengine_v1.types.Chunk.DocumentMetadata): - Metadata of the document from the current - chunk. + Metadata of the document from the current chunk. derived_struct_data (google.protobuf.struct_pb2.Struct): Output only. This field is OUTPUT_ONLY. - It contains derived data that are not in the - original input document. + It contains derived data that are not in the original + input document. page_span (google.cloud.discoveryengine_v1.types.Chunk.PageSpan): Page span of the chunk. chunk_metadata (google.cloud.discoveryengine_v1.types.Chunk.ChunkMetadata): Output only. Metadata of the current chunk. data_urls (MutableSequence[str]): - Output only. Image Data URLs if the current - chunk contains images. Data URLs are composed of - four parts: a prefix (data:), a MIME type - indicating the type of data, an optional base64 - token if non-textual, and the data itself: + Output only. Image Data URLs if the current chunk + contains images. Data URLs are composed of four parts: a + prefix (data:), a MIME type indicating the type of data, + an optional base64 token if non-textual, and the data + itself: data:` <;base64>`__, annotation_contents (MutableSequence[str]): - Output only. Annotation contents if the - current chunk contains annotations. + Output only. Annotation contents if the current chunk + contains annotations. annotation_metadata (MutableSequence[google.cloud.discoveryengine_v1.types.Chunk.AnnotationMetadata]): Output only. The annotation metadata includes structured content in the current chunk. """ class StructureType(proto.Enum): - r"""Defines the types of the structured content that can be - extracted. + r"""Defines the types of the structured content that can be extracted. Values: STRUCTURE_TYPE_UNSPECIFIED (0): @@ -106,8 +102,8 @@ class StructureType(proto.Enum): CHECKBOX_STRUCTURE = 3 class DocumentMetadata(proto.Message): - r"""Document metadata contains the information of the document of - the current chunk. + r"""Document metadata contains the information of the document of the + current chunk. Attributes: uri (str): @@ -116,10 +112,10 @@ class DocumentMetadata(proto.Message): Title of the document. struct_data (google.protobuf.struct_pb2.Struct): Data representation. - The structured JSON data for the document. It - should conform to the registered `Schema - `__ or - an ``INVALID_ARGUMENT`` error is thrown. + The structured JSON data for the document. It should + conform to the registered `Schema + `__ or an + ``INVALID_ARGUMENT`` error is thrown. """ uri: str = proto.Field( @@ -162,8 +158,8 @@ class ChunkMetadata(proto.Message): Attributes: previous_chunks (MutableSequence[google.cloud.discoveryengine_v1.types.Chunk]): - The previous chunks of the current chunk. The - number is controlled by + The previous chunks of the current chunk. The number is + controlled by `SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks `__. This field is only populated on @@ -171,8 +167,8 @@ class ChunkMetadata(proto.Message): `__ API. next_chunks (MutableSequence[google.cloud.discoveryengine_v1.types.Chunk]): - The next chunks of the current chunk. The number - is controlled by + The next chunks of the current chunk. The number is + controlled by `SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks `__. This field is only populated on @@ -197,11 +193,10 @@ class StructuredContent(proto.Message): Attributes: structure_type (google.cloud.discoveryengine_v1.types.Chunk.StructureType): - Output only. The structure type of the - structured content. - content (str): - Output only. The content of the structured + Output only. The structure type of the structured content. + content (str): + Output only. The content of the structured content. """ structure_type: "Chunk.StructureType" = proto.Field( @@ -215,16 +210,15 @@ class StructuredContent(proto.Message): ) class AnnotationMetadata(proto.Message): - r"""The annotation metadata includes structured content in the - current chunk. + r"""The annotation metadata includes structured content in the current + chunk. Attributes: structured_content (google.cloud.discoveryengine_v1.types.Chunk.StructuredContent): - Output only. The structured content - information. + Output only. The structured content information. image_id (str): - Output only. Image id is provided if the - structured content is based on an image. + Output only. Image id is provided if the structured + content is based on an image. """ structured_content: "Chunk.StructuredContent" = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/cmek_config_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/cmek_config_service.py index de8b823f8ce0..d57763136473 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/cmek_config_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/cmek_config_service.py @@ -44,9 +44,8 @@ class UpdateCmekConfigRequest(proto.Message): config (google.cloud.discoveryengine_v1.types.CmekConfig): Required. The CmekConfig resource. set_default (bool): - Set the following CmekConfig as the default - to be used for child resources if one is not - specified. + Set the following CmekConfig as the default to be + used for child resources if one is not specified. """ config: "CmekConfig" = proto.Field( @@ -67,12 +66,12 @@ class GetCmekConfigRequest(proto.Message): name (str): Required. Resource name of `CmekConfig - `__, - such as ``projects/*/locations/*/cmekConfig`` or + `__, such as + ``projects/*/locations/*/cmekConfig`` or ``projects/*/locations/*/cmekConfigs/*``. - If the caller does not have permission to access - the `CmekConfig + If the caller does not have permission to access the + `CmekConfig `__, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. @@ -89,8 +88,8 @@ class SingleRegionKey(proto.Message): Attributes: kms_key (str): - Required. Single-regional kms key resource name - which will be used to encrypt resources + Required. Single-regional kms key resource name which + will be used to encrypt resources ``projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{keyId}``. """ @@ -101,8 +100,8 @@ class SingleRegionKey(proto.Message): class CmekConfig(proto.Message): - r"""Configurations used to enable CMEK data encryption with Cloud - KMS keys. + r"""Configurations used to enable CMEK data encryption with Cloud KMS + keys. Attributes: name (str): @@ -111,27 +110,25 @@ class CmekConfig(proto.Message): or ``projects/{project}/locations/{location}/cmekConfigs/{cmek_config}``. kms_key (str): - KMS key resource name which will be used to - encrypt resources + KMS key resource name which will be used to encrypt + resources ``projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{keyId}``. kms_key_version (str): - KMS key version resource name which will be used - to encrypt resources + KMS key version resource name which will be used to + encrypt resources ``/cryptoKeyVersions/{keyVersion}``. state (google.cloud.discoveryengine_v1.types.CmekConfig.State): Output only. The states of the CmekConfig. is_default (bool): - Output only. The default CmekConfig for the - Customer. + Output only. The default CmekConfig for the Customer. last_rotation_timestamp_micros (int): - Output only. The timestamp of the last key - rotation. + Output only. The timestamp of the last key rotation. single_region_keys (MutableSequence[google.cloud.discoveryengine_v1.types.SingleRegionKey]): - Optional. Single-regional CMEKs that are - required for some VAIS features. + Optional. Single-regional CMEKs that are required for + some VAIS features. notebooklm_state (google.cloud.discoveryengine_v1.types.CmekConfig.NotebookLMState): - Output only. Whether the NotebookLM Corpus is - ready to be used. + Output only. Whether the NotebookLM Corpus is ready + to be used. """ class State(proto.Enum): @@ -236,8 +233,8 @@ class UpdateCmekConfigMetadata(proto.Message): create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -260,16 +257,14 @@ class ListCmekConfigsRequest(proto.Message): Attributes: parent (str): - Required. The parent location resource name, - such as + Required. The parent location resource name, such as ``projects/{project}/locations/{location}``. If the caller does not have permission to list `CmekConfig - `__s - under this location, regardless of whether or - not a CmekConfig exists, a PERMISSION_DENIED - error is returned. + `__s under + this location, regardless of whether or not a CmekConfig + exists, a PERMISSION_DENIED error is returned. """ parent: str = proto.Field( @@ -308,8 +303,8 @@ class DeleteCmekConfigRequest(proto.Message): name (str): Required. The resource name of the `CmekConfig - `__ - to delete, such as + `__ to + delete, such as ``projects/{project}/locations/{location}/cmekConfigs/{cmek_config}``. """ @@ -330,8 +325,8 @@ class DeleteCmekConfigMetadata(proto.Message): create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/common.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/common.py index 22e7596b13f5..591c3fdde7f2 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/common.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/common.py @@ -109,9 +109,8 @@ class SearchUseCase(proto.Enum): class SearchTier(proto.Enum): - r"""Tiers of search features. Different tiers might have - different pricing. To learn more, check the pricing - documentation. + r"""Tiers of search features. Different tiers might have different + pricing. To learn more, check the pricing documentation. Values: SEARCH_TIER_UNSPECIFIED (0): @@ -193,8 +192,8 @@ class Interval(proto.Message): class CustomAttribute(proto.Message): - r"""A custom attribute that is not explicitly modeled in a resource, - e.g. `UserEvent `__. + r"""A custom attribute that is not explicitly modeled in a resource, e.g. + `UserEvent `__. Attributes: text (MutableSequence[str]): @@ -211,12 +210,11 @@ class CustomAttribute(proto.Message): or `CustomAttribute.numbers `__ - should be set. Otherwise, an - ``INVALID_ARGUMENT`` error is returned. + should be set. Otherwise, an ``INVALID_ARGUMENT`` error + is returned. numbers (MutableSequence[float]): - The numerical values of this custom attribute. - For example, ``[2.3, 15.4]`` when the key is - "lengths_cm". + The numerical values of this custom attribute. For + example, ``[2.3, 15.4]`` when the key is "lengths_cm". Exactly one of `CustomAttribute.text @@ -224,8 +222,8 @@ class CustomAttribute(proto.Message): or `CustomAttribute.numbers `__ - should be set. Otherwise, an - ``INVALID_ARGUMENT`` error is returned. + should be set. Otherwise, an ``INVALID_ARGUMENT`` error + is returned. """ text: MutableSequence[str] = proto.RepeatedField( @@ -244,29 +242,27 @@ class UserInfo(proto.Message): Attributes: user_id (str): Highly recommended for logged-in users. Unique - identifier for logged-in user, such as a user - name. Don't set for anonymous users. + identifier for logged-in user, such as a user name. + Don't set for anonymous users. Always use a hashed value for this ID. - Don't set the field to the same fixed ID for - different users. This mixes the event history of - those users together, which results in degraded - model quality. + Don't set the field to the same fixed ID for different + users. This mixes the event history of those users + together, which results in degraded model quality. - The field must be a UTF-8 encoded string with a - length limit of 128 characters. Otherwise, an + The field must be a UTF-8 encoded string with a length + limit of 128 characters. Otherwise, an ``INVALID_ARGUMENT`` error is returned. user_agent (str): User agent as included in the HTTP header. - The field must be a UTF-8 encoded string with a - length limit of 1,000 characters. Otherwise, an + The field must be a UTF-8 encoded string with a length + limit of 1,000 characters. Otherwise, an ``INVALID_ARGUMENT`` error is returned. - This should not be set when using the client - side event reporting with GTM or JavaScript tag - in + This should not be set when using the client side event + reporting with GTM or JavaScript tag in `UserEventService.CollectUserEvent `__ or if @@ -274,8 +270,7 @@ class UserInfo(proto.Message): `__ is set. time_zone (str): - Optional. IANA time zone, e.g. - Europe/Budapest. + Optional. IANA time zone, e.g. Europe/Budapest. """ user_id: str = proto.Field( @@ -319,25 +314,25 @@ class Principal(proto.Message): Attributes: user_id (str): User identifier. - For Google Workspace user account, user_id - should be the google workspace user email. - For non-google identity provider user account, - user_id is the mapped user identifier configured - during the workforcepool config. + For Google Workspace user account, user_id should be the + google workspace user email. + For non-google identity provider user account, user_id + is the mapped user identifier configured during the + workforcepool config. This field is a member of `oneof`_ ``principal``. group_id (str): Group identifier. - For Google Workspace user account, group_id - should be the google workspace group email. - For non-google identity provider user account, - group_id is the mapped group identifier - configured during the workforcepool config. + For Google Workspace user account, group_id should be + the google workspace group email. + For non-google identity provider user account, group_id + is the mapped group identifier configured during the + workforcepool config. This field is a member of `oneof`_ ``principal``. external_entity_id (str): - For 3P application identities which are not - present in the customer identity provider. + For 3P application identities which are not present + in the customer identity provider. This field is a member of `oneof`_ ``principal``. """ @@ -366,17 +361,16 @@ class HealthcareFhirConfig(proto.Message): enable_configurable_schema (bool): Whether to enable configurable schema for ``HEALTHCARE_FHIR`` vertical. - If set to ``true``, the predefined healthcare - fhir schema can be extended for more customized - searching and filtering. + If set to ``true``, the predefined healthcare fhir + schema can be extended for more customized searching and + filtering. enable_static_indexing_for_batch_ingestion (bool): Whether to enable static indexing for ``HEALTHCARE_FHIR`` batch ingestion. If set to ``true``, the batch ingestion will be - processed in a static indexing mode which is - slower but more capable of handling larger - volume. + processed in a static indexing mode which is slower but + more capable of handling larger volume. """ enable_configurable_schema: bool = proto.Field( @@ -390,33 +384,31 @@ class HealthcareFhirConfig(proto.Message): class SearchLinkPromotion(proto.Message): - r"""Promotion proto includes uri and other helping information to - display the promotion. + r"""Promotion proto includes uri and other helping information to display + the promotion. Attributes: title (str): Required. The title of the promotion. Maximum length: 160 characters. uri (str): - Optional. The URL for the page the user wants - to promote. Must be set for site search. For - other verticals, this is optional. + Optional. The URL for the page the user wants to + promote. Must be set for site search. For other + verticals, this is optional. document (str): Optional. The `Document - `__ - the user wants to promote. For site search, - leave unset and only populate uri. Can be set - along with uri. + `__ the user + wants to promote. For site search, leave unset and only + populate uri. Can be set along with uri. image_uri (str): Optional. The promotion thumbnail image url. description (str): Optional. The Promotion description. Maximum length: 200 characters. enabled (bool): - Optional. The enabled promotion will be - returned for any serving configs associated with - the parent of the control this promotion is - attached to. + Optional. The enabled promotion will be returned for + any serving configs associated with the parent of the + control this promotion is attached to. This flag is used for basic site search only. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/completion.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/completion.py index 5f080bdbe0cb..4c86162e7027 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/completion.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/completion.py @@ -29,17 +29,17 @@ class SuggestionDenyListEntry(proto.Message): - r"""Suggestion deny list entry identifying the phrase to block - from suggestions and the applied operation for the phrase. + r"""Suggestion deny list entry identifying the phrase to block from + suggestions and the applied operation for the phrase. Attributes: block_phrase (str): - Required. Phrase to block from suggestions - served. Can be maximum 125 characters. + Required. Phrase to block from suggestions served. + Can be maximum 125 characters. match_operator (google.cloud.discoveryengine_v1.types.SuggestionDenyListEntry.MatchOperator): - Required. The match operator to apply for - this phrase. Whether to block the exact phrase, - or block any suggestions containing this phrase. + Required. The match operator to apply for this + phrase. Whether to block the exact phrase, or block any + suggestions containing this phrase. """ class MatchOperator(proto.Enum): @@ -82,13 +82,13 @@ class CompletionSuggestion(proto.Message): Attributes: global_score (float): - Global score of this suggestion. Control how - this suggestion would be scored / ranked. + Global score of this suggestion. Control how this + suggestion would be scored / ranked. This field is a member of `oneof`_ ``ranking_info``. frequency (int): - Frequency of this suggestion. Will be used to - rank suggestions when score is not available. + Frequency of this suggestion. Will be used to rank + suggestions when score is not available. This field is a member of `oneof`_ ``ranking_info``. suggestion (str): @@ -96,17 +96,14 @@ class CompletionSuggestion(proto.Message): language_code (str): BCP-47 language code of this suggestion. group_id (str): - If two suggestions have the same groupId, - they will not be returned together. Instead the - one ranked higher will be returned. This can be - used to deduplicate semantically identical - suggestions. + If two suggestions have the same groupId, they will + not be returned together. Instead the one ranked higher + will be returned. This can be used to deduplicate + semantically identical suggestions. group_score (float): - The score of this suggestion within its - group. + The score of this suggestion within its group. alternative_phrases (MutableSequence[str]): - Alternative matching phrases for this - suggestion. + Alternative matching phrases for this suggestion. """ global_score: float = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/completion_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/completion_service.py index c610525dd280..694cc71762be 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/completion_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/completion_service.py @@ -36,45 +36,44 @@ class CompleteQueryRequest(proto.Message): Attributes: data_store (str): - Required. The parent data store resource name - for which the completion is performed, such as + Required. The parent data store resource name for which + the completion is performed, such as ``projects/*/locations/global/collections/default_collection/dataStores/default_data_store``. query (str): Required. The typeahead input used to fetch suggestions. Maximum length is 128 characters. query_model (str): - Specifies the autocomplete data model. This - overrides any model specified in the - Configuration > Autocomplete section of the - Cloud console. Currently supported values: - - * ``document`` - Using suggestions generated - from user-imported documents. * - ``search-history`` - Using suggestions generated - from the past history of `SearchService.Search + Specifies the autocomplete data model. This overrides + any model specified in the Configuration > Autocomplete + section of the Cloud console. Currently supported + values: + + * ``document`` - Using suggestions generated from + user-imported documents. * ``search-history`` - Using + suggestions generated from the past history of + `SearchService.Search `__ - API calls. Do not use it when there is no - traffic for Search API. + API calls. Do not use it when there is no traffic for + Search API. - * ``user-event`` - Using suggestions generated - from user-imported search events. + * ``user-event`` - Using suggestions generated from + user-imported search events. - * ``document-completable`` - Using suggestions - taken directly from user-imported document - fields marked as completable. + * ``document-completable`` - Using suggestions taken + directly from user-imported document fields marked as + completable. Default values: * ``document`` is the default model for regular - dataStores. * ``search-history`` is the default - model for site search dataStores. + dataStores. * ``search-history`` is the default model + for site search dataStores. user_pseudo_id (str): - A unique identifier for tracking visitors. For - example, this could be implemented with an HTTP - cookie, which should be able to uniquely - identify a visitor on a single device. This - unique identifier should not change if the - visitor logs in or out of the website. + A unique identifier for tracking visitors. For example, + this could be implemented with an HTTP cookie, which + should be able to uniquely identify a visitor on a + single device. This unique identifier should not change + if the visitor logs in or out of the website. This field should NOT have a fixed value such as ``unknown_visitor``. @@ -86,16 +85,15 @@ class CompleteQueryRequest(proto.Message): `SearchRequest.user_pseudo_id `__. - The field must be a UTF-8 encoded string with a - length limit of 128 characters. Otherwise, an + The field must be a UTF-8 encoded string with a length + limit of 128 characters. Otherwise, an ``INVALID_ARGUMENT`` error is returned. include_tail_suggestions (bool): - Indicates if tail suggestions should be - returned if there are no suggestions that match - the full query. Even if set to true, if there - are suggestions that match the full query, those - are returned and no tail suggestions are - returned. + Indicates if tail suggestions should be returned if + there are no suggestions that match the full query. Even + if set to true, if there are suggestions that match the + full query, those are returned and no tail suggestions + are returned. """ data_store: str = proto.Field( @@ -128,16 +126,15 @@ class CompleteQueryResponse(proto.Message): Attributes: query_suggestions (MutableSequence[google.cloud.discoveryengine_v1.types.CompleteQueryResponse.QuerySuggestion]): - Results of the matched query suggestions. The - result list is ordered and the first result is a - top suggestion. + Results of the matched query suggestions. The result + list is ordered and the first result is a top + suggestion. tail_match_triggered (bool): True if the returned suggestions are all tail suggestions. For tail matching to be triggered, - include_tail_suggestions in the request must be - true and there must be no suggestions that match - the full query. + include_tail_suggestions in the request must be true and + there must be no suggestions that match the full query. """ class QuerySuggestion(proto.Message): @@ -147,9 +144,9 @@ class QuerySuggestion(proto.Message): suggestion (str): The suggestion for the query. completable_field_paths (MutableSequence[str]): - The unique document field paths that serve as - the source of this suggestion if it was - generated from completable fields. + The unique document field paths that serve as the + source of this suggestion if it was generated from + completable fields. This field is only populated for the document-completable model. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/control.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/control.py index f3abb1cdb514..0eed1a4c4077 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/control.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/control.py @@ -32,8 +32,7 @@ class Condition(proto.Message): - r"""Defines circumstances to be checked before allowing a - behavior + r"""Defines circumstances to be checked before allowing a behavior Attributes: query_terms (MutableSequence[google.cloud.discoveryengine_v1.types.Condition.QueryTerm]): @@ -46,16 +45,16 @@ class Condition(proto.Message): Maximum of 10 query terms. active_time_range (MutableSequence[google.cloud.discoveryengine_v1.types.Condition.TimeRange]): - Range of time(s) specifying when condition is - active. + Range of time(s) specifying when condition is active. + Maximum of 10 time ranges. query_regex (str): - Optional. Query regex to match the whole search - query. Cannot be set when + Optional. Query regex to match the whole search query. + Cannot be set when `Condition.query_terms `__ - is set. Only supported for Basic Site Search - promotion serving controls. + is set. Only supported for Basic Site Search promotion + serving controls. """ class QueryTerm(proto.Message): @@ -66,12 +65,12 @@ class QueryTerm(proto.Message): The specific query value to match against Must be lowercase, must be UTF-8. - Can have at most 3 space separated terms if - full_match is true. Cannot be an empty string. + Can have at most 3 space separated terms if full_match + is true. Cannot be an empty string. Maximum length of 5000 characters. full_match (bool): - Whether the search query needs to exactly - match the query term. + Whether the search query needs to exactly match the + query term. """ value: str = proto.Field( @@ -128,8 +127,7 @@ class TimeRange(proto.Message): class Control(proto.Message): r"""Defines a conditioned behavior to employ during serving. Must be attached to a - `ServingConfig - `__ to be + `ServingConfig `__ to be considered at serving time. Permitted actions dependent on ``SolutionType``. @@ -155,33 +153,32 @@ class Control(proto.Message): This field is a member of `oneof`_ ``action``. synonyms_action (google.cloud.discoveryengine_v1.types.Control.SynonymsAction): - Treats a group of terms as synonyms of one - another. + Treats a group of terms as synonyms of one another. This field is a member of `oneof`_ ``action``. promote_action (google.cloud.discoveryengine_v1.types.Control.PromoteAction): - Promote certain links based on predefined - trigger queries. + Promote certain links based on predefined trigger + queries. This field is a member of `oneof`_ ``action``. name (str): Immutable. Fully qualified name ``projects/*/locations/global/dataStore/*/controls/*`` display_name (str): - Required. Human readable name. The identifier - used in UI views. - Must be UTF-8 encoded string. Length limit is - 128 characters. Otherwise an INVALID ARGUMENT - error is thrown. + Required. Human readable name. The identifier used in + UI views. + Must be UTF-8 encoded string. Length limit is 128 + characters. Otherwise an INVALID ARGUMENT error is + thrown. associated_serving_config_ids (MutableSequence[str]): Output only. List of all `ServingConfig - `__ - IDs this control is attached to. May take up to - 10 minutes to update after changes. + `__ IDs + this control is attached to. May take up to 10 minutes + to update after changes. solution_type (google.cloud.discoveryengine_v1.types.SolutionType): - Required. Immutable. What solution the - control belongs to. + Required. Immutable. What solution the control + belongs to. Must be compatible with vertical of resource. Otherwise an INVALID ARGUMENT error is thrown. use_cases (MutableSequence[google.cloud.discoveryengine_v1.types.SearchUseCase]): @@ -195,12 +192,11 @@ class Control(proto.Message): `SolutionType.SOLUTION_TYPE_SEARCH `__. conditions (MutableSequence[google.cloud.discoveryengine_v1.types.Condition]): - Determines when the associated action will - trigger. + Determines when the associated action will trigger. + Omit to always apply the action. - Currently only a single condition may be - specified. Otherwise an INVALID ARGUMENT error - is thrown. + Currently only a single condition may be specified. + Otherwise an INVALID ARGUMENT error is thrown. """ class BoostAction(proto.Message): @@ -215,69 +211,64 @@ class BoostAction(proto.Message): Attributes: fixed_boost (float): - Optional. Strength of the boost, which should be - in [-1, 1]. Negative boost means demotion. - Default is 0.0 (No-op). + Optional. Strength of the boost, which should be in [-1, + 1]. Negative boost means demotion. Default is 0.0 + (No-op). This field is a member of `oneof`_ ``boost_spec``. interpolation_boost_spec (google.cloud.discoveryengine_v1.types.Control.BoostAction.InterpolationBoostSpec): - Optional. Complex specification for custom - ranking based on customer defined attribute - value. + Optional. Complex specification for custom ranking + based on customer defined attribute value. This field is a member of `oneof`_ ``boost_spec``. boost (float): - Strength of the boost, which should be in [-1, - 1]. Negative boost means demotion. Default is - 0.0 (No-op). + Strength of the boost, which should be in [-1, 1]. + Negative boost means demotion. Default is 0.0 (No-op). filter (str): - Required. Specifies which products to apply - the boost to. - If no filter is provided all products will be - boosted (No-op). Syntax documentation: + Required. Specifies which products to apply the boost + to. + If no filter is provided all products will be boosted + (No-op). Syntax documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown. data_store (str): - Required. Specifies which data store's documents - can be boosted by this control. Full data store - name e.g. + Required. Specifies which data store's documents can be + boosted by this control. Full data store name e.g. projects/123/locations/global/collections/default_collection/dataStores/default_data_store """ class InterpolationBoostSpec(proto.Message): r"""Specification for custom ranking based on customer specified - attribute value. It provides more controls for customized - ranking than the simple (condition, boost) combination above. + attribute value. It provides more controls for customized ranking than + the simple (condition, boost) combination above. Attributes: field_name (str): - Optional. The name of the field whose value - will be used to determine the boost amount. + Optional. The name of the field whose value will be + used to determine the boost amount. attribute_type (google.cloud.discoveryengine_v1.types.Control.BoostAction.InterpolationBoostSpec.AttributeType): - Optional. The attribute type to be used to - determine the boost amount. The attribute value - can be derived from the field value of the - specified field_name. In the case of numerical - it is straightforward i.e. attribute_value = - numerical_field_value. In the case of freshness + Optional. The attribute type to be used to determine the + boost amount. The attribute value can be derived from + the field value of the specified field_name. In the case + of numerical it is straightforward i.e. attribute_value + = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value). interpolation_type (google.cloud.discoveryengine_v1.types.Control.BoostAction.InterpolationBoostSpec.InterpolationType): - Optional. The interpolation type to be - applied to connect the control points listed - below. + Optional. The interpolation type to be applied to + connect the control points listed below. control_points (MutableSequence[google.cloud.discoveryengine_v1.types.Control.BoostAction.InterpolationBoostSpec.ControlPoint]): - Optional. The control points used to define the - curve. The monotonic function (defined through - the interpolation_type above) passes through the - control points listed here. + Optional. The control points used to define the curve. + The monotonic function (defined through the + interpolation_type above) passes through the control + points listed here. """ class AttributeType(proto.Enum): - r"""The attribute(or function) for which the custom ranking is to - be applied. + r"""The attribute(or function) for which the custom ranking is to be + applied. Values: ATTRIBUTE_TYPE_UNSPECIFIED (0): @@ -319,9 +310,9 @@ class InterpolationType(proto.Enum): LINEAR = 1 class ControlPoint(proto.Message): - r"""The control points used to define the curve. The curve - defined through these control points can only be monotonically - increasing or decreasing(constant values are acceptable). + r"""The control points used to define the curve. The curve defined + through these control points can only be monotonically increasing or + decreasing(constant values are acceptable). Attributes: attribute_value (str): @@ -331,13 +322,13 @@ class ControlPoint(proto.Message): 2. The duration spec for freshness: The value must be formatted as an XSD - ``dayTimeDuration`` value (a restricted subset - of an ISO 8601 duration value). The pattern for - this is: ```nD `__`nM `__]``. + ``dayTimeDuration`` value (a restricted subset of an ISO + 8601 duration value). The pattern for this is: ```nD + `__`nM `__]``. boost_amount (float): - Optional. The value between -1 to 1 by which to - boost the score if the attribute_value evaluates - to the value specified above. + Optional. The value between -1 to 1 by which to boost + the score if the attribute_value evaluates to the value + specified above. """ attribute_value: str = proto.Field( @@ -403,18 +394,17 @@ class FilterAction(proto.Message): Attributes: filter (str): - Required. A filter to apply on the matching - condition results. + Required. A filter to apply on the matching condition + results. Required Syntax documentation: https://cloud.google.com/retail/docs/filter-and-order - Maximum length is 5000 characters. Otherwise an - INVALID ARGUMENT error is thrown. + Maximum length is 5000 characters. Otherwise an INVALID + ARGUMENT error is thrown. data_store (str): - Required. Specifies which data store's documents - can be filtered by this control. Full data store - name e.g. + Required. Specifies which data store's documents can be + filtered by this control. Full data store name e.g. projects/123/locations/global/collections/default_collection/dataStores/default_data_store """ @@ -432,12 +422,11 @@ class RedirectAction(proto.Message): Attributes: redirect_uri (str): - Required. The URI to which the shopper will - be redirected. + Required. The URI to which the shopper will be + redirected. Required. - URI must have length equal or less than 2000 - characters. Otherwise an INVALID ARGUMENT error - is thrown. + URI must have length equal or less than 2000 characters. + Otherwise an INVALID ARGUMENT error is thrown. """ redirect_uri: str = proto.Field( @@ -446,17 +435,17 @@ class RedirectAction(proto.Message): ) class SynonymsAction(proto.Message): - r"""Creates a set of terms that will act as synonyms of one - another. - Example: "happy" will also be considered as "glad", "glad" will - also be considered as "happy". + r"""Creates a set of terms that will act as synonyms of one another. + + Example: "happy" will also be considered as "glad", "glad" will also be + considered as "happy". Attributes: synonyms (MutableSequence[str]): Defines a set of synonyms. Can specify up to 100 synonyms. - Must specify at least 2 synonyms. Otherwise an - INVALID ARGUMENT error is thrown. + Must specify at least 2 synonyms. Otherwise an INVALID + ARGUMENT error is thrown. """ synonyms: MutableSequence[str] = proto.RepeatedField( @@ -467,13 +456,13 @@ class SynonymsAction(proto.Message): class PromoteAction(proto.Message): r"""Promote certain links based on some trigger queries. - Example: Promote shoe store link when searching for ``shoe`` - keyword. The link can be outside of associated data store. + Example: Promote shoe store link when searching for ``shoe`` keyword. + The link can be outside of associated data store. Attributes: data_store (str): - Required. Data store with which this - promotion is attached to. + Required. Data store with which this promotion is + attached to. search_link_promotion (google.cloud.discoveryengine_v1.types.SearchLinkPromotion): Required. Promotion attached to this action. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/control_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/control_service.py index a85138d16767..16668f784ad6 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/control_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/control_service.py @@ -40,17 +40,17 @@ class CreateControlRequest(proto.Message): Attributes: parent (str): - Required. Full resource name of parent data - store. Format: + Required. Full resource name of parent data store. + Format: ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`` or ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}``. control (google.cloud.discoveryengine_v1.types.Control): Required. The Control to create. control_id (str): - Required. The ID to use for the Control, which - will become the final component of the Control's - resource name. + Required. The ID to use for the Control, which will + become the final component of the Control's resource + name. This value must be within 1-63 characters. Valid characters are /`a-z <0-9>`__-_/. @@ -79,17 +79,15 @@ class UpdateControlRequest(proto.Message): Required. The Control to update. update_mask (google.protobuf.field_mask_pb2.FieldMask): Optional. Indicates which fields in the provided - `Control - `__ to + `Control `__ to update. The following are NOT supported: * `Control.name - `__ - * `Control.solution_type + `__ * + `Control.solution_type `__ - If not set or empty, all supported fields are - updated. + If not set or empty, all supported fields are updated. """ control: gcd_control.Control = proto.Field( @@ -109,8 +107,8 @@ class DeleteControlRequest(proto.Message): Attributes: name (str): - Required. The resource name of the Control to - delete. Format: + Required. The resource name of the Control to delete. + Format: ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`` """ @@ -125,8 +123,8 @@ class GetControlRequest(proto.Message): Attributes: name (str): - Required. The resource name of the Control to - get. Format: + Required. The resource name of the Control to get. + Format: ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`` """ @@ -142,22 +140,22 @@ class ListControlsRequest(proto.Message): Attributes: parent (str): Required. The data store resource name. Format: + ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`` or ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}``. page_size (int): - Optional. Maximum number of results to - return. If unspecified, defaults to 50. Max - allowed value is 1000. + Optional. Maximum number of results to return. If + unspecified, defaults to 50. Max allowed value is 1000. page_token (str): Optional. A page token, received from a previous - ``ListControls`` call. Provide this to retrieve - the subsequent page. + ``ListControls`` call. Provide this to retrieve the + subsequent page. filter (str): Optional. A filter to apply on the list results. Supported features: - * List all the products under the parent branch - if `filter + * List all the products under the parent branch if + `filter `__ is unset. Currently this field is unsupported. """ @@ -187,8 +185,8 @@ class ListControlsResponse(proto.Message): controls (MutableSequence[google.cloud.discoveryengine_v1.types.Control]): All the Controls for a given data store. next_page_token (str): - Pagination token, if not returned indicates - the last page. + Pagination token, if not returned indicates the last + page. """ @property diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/conversation.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/conversation.py index 45179ba30683..ab2c9a5e4c0b 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/conversation.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/conversation.py @@ -50,11 +50,9 @@ class Conversation(proto.Message): messages (MutableSequence[google.cloud.discoveryengine_v1.types.ConversationMessage]): Conversation messages. start_time (google.protobuf.timestamp_pb2.Timestamp): - Output only. The time the conversation - started. + Output only. The time the conversation started. end_time (google.protobuf.timestamp_pb2.Timestamp): - Output only. The time the conversation - finished. + Output only. The time the conversation finished. """ class State(proto.Enum): @@ -122,9 +120,8 @@ class ConversationContext(proto.Message): Attributes: context_documents (MutableSequence[str]): - The current list of documents the user is - seeing. It contains the document resource - references. + The current list of documents the user is seeing. + It contains the document resource references. active_document (str): The current active document the user opened. It contains the document resource reference. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/conversational_search_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/conversational_search_service.py index 44b27332d060..dd1d5d2432e5 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/conversational_search_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/conversational_search_service.py @@ -57,49 +57,46 @@ class ConverseConversationRequest(proto.Message): Attributes: name (str): - Required. The resource name of the Conversation - to get. Format: + Required. The resource name of the Conversation to get. + Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}``. Use ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/-`` - to activate auto session mode, which - automatically creates a new conversation inside - a ConverseConversation session. + to activate auto session mode, which automatically + creates a new conversation inside a ConverseConversation + session. query (google.cloud.discoveryengine_v1.types.TextInput): Required. Current user input. serving_config (str): - The resource name of the Serving Config to use. - Format: + The resource name of the Serving Config to use. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/servingConfigs/{serving_config_id}`` - If this is not set, the default serving config - will be used. + If this is not set, the default serving config will be + used. conversation (google.cloud.discoveryengine_v1.types.Conversation): - The conversation to be used by auto session - only. The name field will be ignored as we - automatically assign new name for the - conversation in auto session. + The conversation to be used by auto session only. The + name field will be ignored as we automatically assign + new name for the conversation in auto session. safe_search (bool): Whether to turn on safe search. user_labels (MutableMapping[str, str]): - The user labels applied to a resource must meet - the following requirements: - * Each resource can have multiple labels, up to - a maximum of 64. + The user labels applied to a resource must meet the + following requirements: + * Each resource can have multiple labels, up to a + maximum of 64. * Each label must be a key-value pair. - * Keys have a minimum length of 1 character and - a maximum length of 63 characters and cannot - be empty. Values can be empty and have a maximum - length of 63 characters. + * Keys have a minimum length of 1 character and a + maximum length of 63 characters and cannot be empty. + Values can be empty and have a maximum length of 63 + characters. - * Keys and values can contain only lowercase - letters, numeric characters, underscores, and - dashes. All characters must use UTF-8 encoding, - and international characters are allowed. + * Keys and values can contain only lowercase letters, + numeric characters, underscores, and dashes. All + characters must use UTF-8 encoding, and international + characters are allowed. - * The key portion of a label must be unique. - However, you can use the same key with - multiple resources. + * The key portion of a label must be unique. However, + you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. @@ -109,37 +106,34 @@ class ConverseConversationRequest(proto.Message): `__ for more details. summary_spec (google.cloud.discoveryengine_v1.types.SearchRequest.ContentSearchSpec.SummarySpec): - A specification for configuring the summary - returned in the response. + A specification for configuring the summary returned + in the response. filter (str): - The filter syntax consists of an expression - language for constructing a predicate from one - or more fields of the documents being filtered. - Filter expression is case-sensitive. This will - be used to filter search results which may - affect the summary response. + The filter syntax consists of an expression language for + constructing a predicate from one or more fields of the + documents being filtered. Filter expression is + case-sensitive. This will be used to filter search + results which may affect the summary response. If this field is unrecognizable, an ``INVALID_ARGUMENT`` is returned. - Filtering in Vertex AI Search is done by mapping - the LHS filter key to a key property defined in - the Vertex AI Search backend -- this mapping is - defined by the customer in their schema. For - example a media customer might have a field - 'name' in their schema. In this case the filter - would look like this: filter --> name:'ANY("king - kong")' - - For more information about filtering including - syntax and filter operators, see + Filtering in Vertex AI Search is done by mapping the LHS + filter key to a key property defined in the Vertex AI + Search backend -- this mapping is defined by the + customer in their schema. For example a media customer + might have a field 'name' in their schema. In this case + the filter would look like this: filter --> + name:'ANY("king kong")' + + For more information about filtering including syntax + and filter operators, see `Filter `__ boost_spec (google.cloud.discoveryengine_v1.types.SearchRequest.BoostSpec): - Boost specification to boost certain documents - in search results which may affect the converse - response. For more information on boosting, see - `Boosting + Boost specification to boost certain documents in search + results which may affect the converse response. For more + information on boosting, see `Boosting `__ """ @@ -227,8 +221,8 @@ class CreateConversationRequest(proto.Message): Attributes: parent (str): - Required. Full resource name of parent data - store. Format: + Required. Full resource name of parent data store. + Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`` conversation (google.cloud.discoveryengine_v1.types.Conversation): Required. The conversation to create. @@ -254,14 +248,13 @@ class UpdateConversationRequest(proto.Message): update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided `Conversation - `__ - to update. The following are NOT supported: + `__ to + update. The following are NOT supported: * `Conversation.name `__ - If not set or empty, all supported fields are - updated. + If not set or empty, all supported fields are updated. """ conversation: gcd_conversation.Conversation = proto.Field( @@ -281,8 +274,8 @@ class DeleteConversationRequest(proto.Message): Attributes: name (str): - Required. The resource name of the Conversation - to delete. Format: + Required. The resource name of the Conversation to + delete. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`` """ @@ -297,8 +290,8 @@ class GetConversationRequest(proto.Message): Attributes: name (str): - Required. The resource name of the Conversation - to get. Format: + Required. The resource name of the Conversation to get. + Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`` """ @@ -314,26 +307,26 @@ class ListConversationsRequest(proto.Message): Attributes: parent (str): Required. The data store resource name. Format: + ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`` page_size (int): - Maximum number of results to return. If - unspecified, defaults to 50. Max allowed value - is 1000. + Maximum number of results to return. If unspecified, + defaults to 50. Max allowed value is 1000. page_token (str): A page token, received from a previous - ``ListConversations`` call. Provide this to - retrieve the subsequent page. + ``ListConversations`` call. Provide this to retrieve the + subsequent page. filter (str): - A filter to apply on the list results. The - supported features are: user_pseudo_id, state. + A filter to apply on the list results. The supported + features are: user_pseudo_id, state. Example: "user_pseudo_id = some_id". order_by (str): - A comma-separated list of fields to order by, - sorted in ascending order. Use "desc" after a - field name for descending. Supported fields: + A comma-separated list of fields to order by, sorted in + ascending order. Use "desc" after a field name for + descending. Supported fields: * ``update_time`` * ``create_time`` @@ -375,8 +368,8 @@ class ListConversationsResponse(proto.Message): conversations (MutableSequence[google.cloud.discoveryengine_v1.types.Conversation]): All the Conversations for a given data store. next_page_token (str): - Pagination token, if not returned indicates - the last page. + Pagination token, if not returned indicates the last + page. """ @property @@ -402,25 +395,24 @@ class AnswerQueryRequest(proto.Message): Attributes: serving_config (str): - Required. The resource name of the Search - serving config, such as + Required. The resource name of the Search serving + config, such as ``projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config``, or ``projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config``. - This field is used to identify the serving - configuration name, set of models used to make - the search. + This field is used to identify the serving configuration + name, set of models used to make the search. query (google.cloud.discoveryengine_v1.types.Query): Required. Current user query. session (str): The session resource name. Not required. - When session field is not set, the API is in - sessionless mode. + When session field is not set, the API is in sessionless + mode. - We support auto session mode: users can use the - wildcard symbol ``-`` as session ID. A new ID - will be automatically generated and assigned. + We support auto session mode: users can use the wildcard + symbol ``-`` as session ID. A new ID will be + automatically generated and assigned. safety_spec (google.cloud.discoveryengine_v1.types.AnswerQueryRequest.SafetySpec): Model specification. related_questions_spec (google.cloud.discoveryengine_v1.types.AnswerQueryRequest.RelatedQuestionsSpec): @@ -434,55 +426,53 @@ class AnswerQueryRequest(proto.Message): query_understanding_spec (google.cloud.discoveryengine_v1.types.AnswerQueryRequest.QueryUnderstandingSpec): Query understanding specification. asynchronous_mode (bool): - Deprecated: This field is deprecated. Streaming - Answer API will be supported. + Deprecated: This field is deprecated. Streaming Answer + API will be supported. Asynchronous mode control. If enabled, the response will be returned with - answer/session resource name without final - answer. The API users need to do the polling to - get the latest status of answer/session by - calling `ConversationalSearchService.GetAnswer + answer/session resource name without final answer. The + API users need to do the polling to get the latest + status of answer/session by calling + `ConversationalSearchService.GetAnswer `__ or `ConversationalSearchService.GetSession `__ method. user_pseudo_id (str): - A unique identifier for tracking visitors. For - example, this could be implemented with an HTTP - cookie, which should be able to uniquely - identify a visitor on a single device. This - unique identifier should not change if the - visitor logs in or out of the website. + A unique identifier for tracking visitors. For example, + this could be implemented with an HTTP cookie, which + should be able to uniquely identify a visitor on a + single device. This unique identifier should not change + if the visitor logs in or out of the website. This field should NOT have a fixed value such as ``unknown_visitor``. - The field must be a UTF-8 encoded string with a - length limit of 128 characters. Otherwise, an + The field must be a UTF-8 encoded string with a length + limit of 128 characters. Otherwise, an ``INVALID_ARGUMENT`` error is returned. user_labels (MutableMapping[str, str]): - The user labels applied to a resource must meet - the following requirements: - * Each resource can have multiple labels, up to - a maximum of 64. + The user labels applied to a resource must meet the + following requirements: + * Each resource can have multiple labels, up to a + maximum of 64. * Each label must be a key-value pair. - * Keys have a minimum length of 1 character and - a maximum length of 63 characters and cannot - be empty. Values can be empty and have a maximum - length of 63 characters. + * Keys have a minimum length of 1 character and a + maximum length of 63 characters and cannot be empty. + Values can be empty and have a maximum length of 63 + characters. - * Keys and values can contain only lowercase - letters, numeric characters, underscores, and - dashes. All characters must use UTF-8 encoding, - and international characters are allowed. + * Keys and values can contain only lowercase letters, + numeric characters, underscores, and dashes. All + characters must use UTF-8 encoding, and international + characters are allowed. - * The key portion of a label must be unique. - However, you can use the same key with - multiple resources. + * The key portion of a label must be unique. However, + you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. @@ -501,13 +491,13 @@ class SafetySpec(proto.Message): 1. when only safety_spec.enable is set, the BLOCK_LOW_AND_ABOVE threshold will be applied for all categories. - 2. when safety_spec.enable is set and some safety_settings are - set, only specified safety_settings are applied. + 2. when safety_spec.enable is set and some safety_settings are set, only + specified safety_settings are applied. Attributes: enable (bool): - Enable the safety filtering on the answer - response. It is false by default. + Enable the safety filtering on the answer response. + It is false by default. safety_settings (MutableSequence[google.cloud.discoveryengine_v1.types.AnswerQueryRequest.SafetySpec.SafetySetting]): Optional. Safety settings. This settings are effective only when the @@ -591,16 +581,15 @@ class GroundingSpec(proto.Message): Attributes: include_grounding_supports (bool): Optional. Specifies whether to include - grounding_supports in the answer. The default - value is ``false``. + grounding_supports in the answer. The default value is + ``false``. - When this field is set to ``true``, returned - answer will have ``grounding_score`` and will - contain GroundingSupports for each claim. + When this field is set to ``true``, returned answer will + have ``grounding_score`` and will contain + GroundingSupports for each claim. filtering_level (google.cloud.discoveryengine_v1.types.AnswerQueryRequest.GroundingSpec.FilteringLevel): - Optional. Specifies whether to enable the - filtering based on grounding score and at what - level. + Optional. Specifies whether to enable the filtering + based on grounding score and at what level. """ class FilteringLevel(proto.Enum): @@ -641,65 +630,59 @@ class AnswerGenerationSpec(proto.Message): prompt_spec (google.cloud.discoveryengine_v1.types.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec): Answer generation prompt specification. include_citations (bool): - Specifies whether to include citation metadata - in the answer. The default value is ``false``. + Specifies whether to include citation metadata in the + answer. The default value is ``false``. answer_language_code (str): - Language code for Answer. Use language tags - defined by `BCP47 - `__. - Note: This is an experimental feature. + Language code for Answer. Use language tags defined by + `BCP47 + `__. Note: + This is an experimental feature. ignore_adversarial_query (bool): - Specifies whether to filter out adversarial - queries. The default value is ``false``. - - Google employs search-query classification to - detect adversarial queries. No answer is - returned if the search query is classified as an - adversarial query. For example, a user might ask - a question regarding negative comments about the - company or submit a query designed to generate - unsafe, policy-violating output. If this field - is set to ``true``, we skip generating answers - for adversarial queries and return fallback - messages instead. + Specifies whether to filter out adversarial queries. The + default value is ``false``. + + Google employs search-query classification to detect + adversarial queries. No answer is returned if the search + query is classified as an adversarial query. For + example, a user might ask a question regarding negative + comments about the company or submit a query designed to + generate unsafe, policy-violating output. If this field + is set to ``true``, we skip generating answers for + adversarial queries and return fallback messages + instead. ignore_non_answer_seeking_query (bool): - Specifies whether to filter out queries that are - not answer-seeking. The default value is - ``false``. - - Google employs search-query classification to - detect answer-seeking queries. No answer is - returned if the search query is classified as a - non-answer seeking query. If this field is set - to ``true``, we skip generating answers for - non-answer seeking queries and return fallback - messages instead. + Specifies whether to filter out queries that are not + answer-seeking. The default value is ``false``. + + Google employs search-query classification to detect + answer-seeking queries. No answer is returned if the + search query is classified as a non-answer seeking + query. If this field is set to ``true``, we skip + generating answers for non-answer seeking queries and + return fallback messages instead. ignore_low_relevant_content (bool): - Specifies whether to filter out queries that - have low relevance. - If this field is set to ``false``, all search - results are used regardless of relevance to - generate answers. If set to ``true`` or unset, - the behavior will be determined automatically by - the service. + Specifies whether to filter out queries that have low + relevance. + If this field is set to ``false``, all search results + are used regardless of relevance to generate answers. If + set to ``true`` or unset, the behavior will be + determined automatically by the service. This field is a member of `oneof`_ ``_ignore_low_relevant_content``. ignore_jail_breaking_query (bool): - Optional. Specifies whether to filter out - jail-breaking queries. The default value is - ``false``. + Optional. Specifies whether to filter out jail-breaking + queries. The default value is ``false``. - Google employs search-query classification to - detect jail-breaking queries. No summary is - returned if the search query is classified as a - jail-breaking query. A user might add - instructions to the query to change the tone, - style, language, content of the answer, or ask - the model to act as a different entity, e.g. - "Reply in the tone of a competing company's - CEO". If this field is set to ``true``, we skip - generating summaries for jail-breaking queries - and return fallback messages instead. + Google employs search-query classification to detect + jail-breaking queries. No summary is returned if the + search query is classified as a jail-breaking query. A + user might add instructions to the query to change the + tone, style, language, content of the answer, or ask the + model to act as a different entity, e.g. "Reply in the + tone of a competing company's CEO". If this field is set + to ``true``, we skip generating summaries for + jail-breaking queries and return fallback messages + instead. """ class ModelSpec(proto.Message): @@ -707,9 +690,8 @@ class ModelSpec(proto.Message): Attributes: model_version (str): - Model version. If not set, it will use the - default stable model. Allowed values are: - stable, preview. + Model version. If not set, it will use the default + stable model. Allowed values are: stable, preview. """ model_version: str = proto.Field( @@ -795,60 +777,55 @@ class SearchParams(proto.Message): Number of search results to return. The default value is 10. filter (str): - The filter syntax consists of an expression - language for constructing a predicate from one - or more fields of the documents being filtered. - Filter expression is case-sensitive. This will - be used to filter search results which may - affect the Answer response. + The filter syntax consists of an expression language for + constructing a predicate from one or more fields of the + documents being filtered. Filter expression is + case-sensitive. This will be used to filter search + results which may affect the Answer response. If this field is unrecognizable, an ``INVALID_ARGUMENT`` is returned. - Filtering in Vertex AI Search is done by mapping - the LHS filter key to a key property defined in - the Vertex AI Search backend -- this mapping is - defined by the customer in their schema. For - example a media customers might have a field - 'name' in their schema. In this case the filter - would look like this: filter --> name:'ANY("king - kong")' - - For more information about filtering including - syntax and filter operators, see + Filtering in Vertex AI Search is done by mapping the LHS + filter key to a key property defined in the Vertex AI + Search backend -- this mapping is defined by the + customer in their schema. For example a media customers + might have a field 'name' in their schema. In this case + the filter would look like this: filter --> + name:'ANY("king kong")' + + For more information about filtering including syntax + and filter operators, see `Filter `__ boost_spec (google.cloud.discoveryengine_v1.types.SearchRequest.BoostSpec): - Boost specification to boost certain documents - in search results which may affect the answer - query response. For more information on - boosting, see `Boosting + Boost specification to boost certain documents in search + results which may affect the answer query response. For + more information on boosting, see `Boosting `__ order_by (str): - The order in which documents are returned. - Documents can be ordered by a field in an - `Document - `__ - object. Leave it unset if ordered by relevance. - ``order_by`` expression is case-sensitive. For - more information on ordering, see `Ordering + The order in which documents are returned. Documents can + be ordered by a field in an `Document + `__ object. + Leave it unset if ordered by relevance. ``order_by`` + expression is case-sensitive. For more information on + ordering, see `Ordering `__ - If this field is unrecognizable, an - ``INVALID_ARGUMENT`` is returned. + If this field is unrecognizable, an ``INVALID_ARGUMENT`` + is returned. search_result_mode (google.cloud.discoveryengine_v1.types.SearchRequest.ContentSearchSpec.SearchResultMode): - Specifies the search result mode. If - unspecified, the search result mode defaults to - ``DOCUMENTS``. See `parse and chunk + Specifies the search result mode. If unspecified, the + search result mode defaults to ``DOCUMENTS``. + See `parse and chunk documents `__ data_store_specs (MutableSequence[google.cloud.discoveryengine_v1.types.SearchRequest.DataStoreSpec]): - Specs defining dataStores to filter on in a - search call and configurations for those - dataStores. This is only considered for engines - with multiple dataStores use case. For single - dataStore within an engine, they should use the - specs at the top level. + Specs defining dataStores to filter on in a search + call and configurations for those dataStores. This is + only considered for engines with multiple dataStores use + case. For single dataStore within an engine, they should + use the specs at the top level. """ max_return_results: int = proto.Field( @@ -921,18 +898,17 @@ class UnstructuredDocumentInfo(proto.Message): title (str): Title. document_contexts (MutableSequence[google.cloud.discoveryengine_v1.types.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext]): - List of document contexts. The content will - be used for Answer Generation. This is supposed - to be the main content of the document that can - be long and comprehensive. + List of document contexts. The content will be used + for Answer Generation. This is supposed to be the main + content of the document that can be long and + comprehensive. extractive_segments (MutableSequence[google.cloud.discoveryengine_v1.types.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment]): List of extractive segments. extractive_answers (MutableSequence[google.cloud.discoveryengine_v1.types.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer]): - Deprecated: This field is deprecated and will - have no effect on the Answer generation. - Please use document_contexts and - extractive_segments fields. List of extractive - answers. + Deprecated: This field is deprecated and will have no + effect on the Answer generation. + Please use document_contexts and extractive_segments + fields. List of extractive answers. """ class DocumentContext(proto.Message): @@ -942,8 +918,7 @@ class DocumentContext(proto.Message): page_identifier (str): Page identifier. content (str): - Document content to be used for answer - generation. + Document content to be used for answer generation. """ page_identifier: str = proto.Field( @@ -959,8 +934,8 @@ class ExtractiveSegment(proto.Message): r"""Extractive segment. `Guide `__ - Answer generation will only use it if document_contexts is - empty. This is supposed to be shorter snippets. + Answer generation will only use it if document_contexts is empty. This + is supposed to be shorter snippets. Attributes: page_identifier (str): @@ -1042,13 +1017,12 @@ class ChunkInfo(proto.Message): content (str): Chunk textual content. document_metadata (google.cloud.discoveryengine_v1.types.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo.DocumentMetadata): - Metadata of the document from the current - chunk. + Metadata of the document from the current chunk. """ class DocumentMetadata(proto.Message): - r"""Document metadata contains the information of the document of - the current chunk. + r"""Document metadata contains the information of the document of the + current chunk. Attributes: uri (str): @@ -1183,8 +1157,7 @@ class QueryRephraserSpec(proto.Message): If not set or set to < 1, it will be set to 1 by default. model_spec (google.cloud.discoveryengine_v1.types.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec): - Optional. Query Rephraser Model - specification. + Optional. Query Rephraser Model specification. """ class ModelSpec(proto.Message): @@ -1192,8 +1165,8 @@ class ModelSpec(proto.Message): Attributes: model_type (google.cloud.discoveryengine_v1.types.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec.ModelType): - Optional. Enabled query rephraser model type. - If not set, it will use LARGE by default. + Optional. Enabled query rephraser model type. If not + set, it will use LARGE by default. """ class ModelType(proto.Enum): @@ -1278,8 +1251,7 @@ class ChunkInfo(proto.Message): Chunk textual content. It is limited to 8000 characters. document_metadata (google.cloud.discoveryengine_v1.types.AnswerQueryRequest.EndUserSpec.EndUserMetaData.ChunkInfo.DocumentMetadata): - Metadata of the document from the current - chunk. + Metadata of the document from the current chunk. """ class DocumentMetadata(proto.Message): @@ -1400,15 +1372,15 @@ class AnswerQueryResponse(proto.Message): `__ is greater than 1, use `Answer.name - `__ - to fetch answer information using + `__ to + fetch answer information using `ConversationalSearchService.GetAnswer `__ API. session (google.cloud.discoveryengine_v1.types.Session): Session resource object. - It will be only available when session field is - set and valid in the `AnswerQueryRequest + It will be only available when session field is set and + valid in the `AnswerQueryRequest `__ request. answer_query_token (str): @@ -1436,8 +1408,8 @@ class GetAnswerRequest(proto.Message): Attributes: name (str): - Required. The resource name of the Answer to - get. Format: + Required. The resource name of the Answer to get. + Format: ``projects/{project}/locations/{location}/collections/{collection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`` """ @@ -1452,8 +1424,8 @@ class CreateSessionRequest(proto.Message): Attributes: parent (str): - Required. Full resource name of parent data - store. Format: + Required. Full resource name of parent data store. + Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`` session (google.cloud.discoveryengine_v1.types.Session): Required. The session to create. @@ -1478,15 +1450,13 @@ class UpdateSessionRequest(proto.Message): Required. The Session to update. update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided - `Session - `__ to + `Session `__ to update. The following are NOT supported: * `Session.name `__ - If not set or empty, all supported fields are - updated. + If not set or empty, all supported fields are updated. """ session: gcd_session.Session = proto.Field( @@ -1506,8 +1476,8 @@ class DeleteSessionRequest(proto.Message): Attributes: name (str): - Required. The resource name of the Session to - delete. Format: + Required. The resource name of the Session to delete. + Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`` """ @@ -1522,12 +1492,12 @@ class GetSessionRequest(proto.Message): Attributes: name (str): - Required. The resource name of the Session to - get. Format: + Required. The resource name of the Session to get. + Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`` include_answer_details (bool): - Optional. If set to true, the full session - including all answer details will be returned. + Optional. If set to true, the full session including + all answer details will be returned. """ name: str = proto.Field( @@ -1546,18 +1516,17 @@ class ListSessionsRequest(proto.Message): Attributes: parent (str): Required. The data store resource name. Format: + ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`` page_size (int): - Maximum number of results to return. If - unspecified, defaults to 50. Max allowed value - is 1000. + Maximum number of results to return. If unspecified, + defaults to 50. Max allowed value is 1000. page_token (str): - A page token, received from a previous - ``ListSessions`` call. Provide this to retrieve - the subsequent page. + A page token, received from a previous ``ListSessions`` + call. Provide this to retrieve the subsequent page. filter (str): - A comma-separated list of fields to filter by, - in EBNF grammar. The supported fields are: + A comma-separated list of fields to filter by, in EBNF + grammar. The supported fields are: * ``user_pseudo_id`` * ``state`` @@ -1579,9 +1548,9 @@ class ListSessionsRequest(proto.Message): "is_pinned=true AND (NOT labels:hidden)" "create_time > \"1970-01-01T12:00:00Z\"". order_by (str): - A comma-separated list of fields to order by, - sorted in ascending order. Use "desc" after a - field name for descending. Supported fields: + A comma-separated list of fields to order by, sorted in + ascending order. Use "desc" after a field name for + descending. Supported fields: * ``update_time`` * ``create_time`` @@ -1594,9 +1563,8 @@ class ListSessionsRequest(proto.Message): * "update_time desc" * "create_time" - * "is_pinned desc,update_time desc": list - sessions by is_pinned first, then by - update_time. + * "is_pinned desc,update_time desc": list sessions by + is_pinned first, then by update_time. """ parent: str = proto.Field( @@ -1628,8 +1596,8 @@ class ListSessionsResponse(proto.Message): sessions (MutableSequence[google.cloud.discoveryengine_v1.types.Session]): All the Sessions for a given data store. next_page_token (str): - Pagination token, if not returned indicates - the last page. + Pagination token, if not returned indicates the last + page. """ @property diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/custom_tuning_model.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/custom_tuning_model.py index e5c995df38f3..4417f6ae786f 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/custom_tuning_model.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/custom_tuning_model.py @@ -33,31 +33,30 @@ class CustomTuningModel(proto.Message): Attributes: name (str): - Required. The fully qualified resource name of - the model. + Required. The fully qualified resource name of the + model. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/customTuningModels/{custom_tuning_model}``. - Model must be an alpha-numerical string with - limit of 40 characters. + Model must be an alpha-numerical string with limit of 40 + characters. display_name (str): The display name of the model. model_version (int): The version of the model. model_state (google.cloud.discoveryengine_v1.types.CustomTuningModel.ModelState): - The state that the model is in (e.g.``TRAINING`` - or ``TRAINING_FAILED``). + The state that the model is in (e.g.``TRAINING`` or + ``TRAINING_FAILED``). create_time (google.protobuf.timestamp_pb2.Timestamp): - Deprecated: Timestamp the Model was created - at. + Deprecated: Timestamp the Model was created at. training_start_time (google.protobuf.timestamp_pb2.Timestamp): Timestamp the model training was initiated. metrics (MutableMapping[str, float]): The metrics of the trained model. error_message (str): - Currently this is only populated if the model - state is ``INPUT_VALIDATION_FAILED``. + Currently this is only populated if the model state is + ``INPUT_VALIDATION_FAILED``. """ class ModelState(proto.Enum): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/data_store.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/data_store.py index 2df1b69c48aa..b43c70988452 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/data_store.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/data_store.py @@ -37,77 +37,73 @@ class DataStore(proto.Message): - r"""DataStore captures global settings and configs at the - DataStore level. + r"""DataStore captures global settings and configs at the DataStore + level. Attributes: name (str): - Immutable. Identifier. The full resource name of - the data store. Format: + Immutable. Identifier. The full resource name of the + data store. Format: ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}``. - This field must be a UTF-8 encoded string with a - length limit of 1024 characters. + This field must be a UTF-8 encoded string with a length + limit of 1024 characters. display_name (str): Required. The data store display name. - This field must be a UTF-8 encoded string with a - length limit of 128 characters. Otherwise, an - INVALID_ARGUMENT error is returned. + This field must be a UTF-8 encoded string with a length + limit of 128 characters. Otherwise, an INVALID_ARGUMENT + error is returned. industry_vertical (google.cloud.discoveryengine_v1.types.IndustryVertical): - Immutable. The industry vertical that the - data store registers. + Immutable. The industry vertical that the data store + registers. solution_types (MutableSequence[google.cloud.discoveryengine_v1.types.SolutionType]): - The solutions that the data store enrolls. - Available solutions for each `industry_vertical + The solutions that the data store enrolls. Available + solutions for each `industry_vertical `__: - * ``MEDIA``: ``SOLUTION_TYPE_RECOMMENDATION`` - and ``SOLUTION_TYPE_SEARCH``. * ``SITE_SEARCH``: - ``SOLUTION_TYPE_SEARCH`` is automatically - enrolled. Other solutions cannot be enrolled. + * ``MEDIA``: ``SOLUTION_TYPE_RECOMMENDATION`` and + ``SOLUTION_TYPE_SEARCH``. * ``SITE_SEARCH``: + ``SOLUTION_TYPE_SEARCH`` is automatically enrolled. + Other solutions cannot be enrolled. default_schema_id (str): Output only. The id of the default - `Schema - `__ + `Schema `__ associated to this data store. content_config (google.cloud.discoveryengine_v1.types.DataStore.ContentConfig): - Immutable. The content config of the data store. - If this field is unset, the server behavior - defaults to `ContentConfig.NO_CONTENT + Immutable. The content config of the data store. If this + field is unset, the server behavior defaults to + `ContentConfig.NO_CONTENT `__. create_time (google.protobuf.timestamp_pb2.Timestamp): Output only. Timestamp the `DataStore - `__ - was created at. + `__ was + created at. advanced_site_search_config (google.cloud.discoveryengine_v1.types.AdvancedSiteSearchConfig): - Optional. Configuration for advanced site - search. + Optional. Configuration for advanced site search. kms_key_name (str): - Input only. The KMS key to be used to protect - this DataStore at creation time. + Input only. The KMS key to be used to protect this + DataStore at creation time. - Must be set for requests that need to comply - with CMEK Org Policy protections. + Must be set for requests that need to comply with CMEK + Org Policy protections. - If this field is set and processed successfully, - the DataStore will be protected by the KMS key, - as indicated in the cmek_config field. + If this field is set and processed successfully, the + DataStore will be protected by the KMS key, as indicated + in the cmek_config field. cmek_config (google.cloud.discoveryengine_v1.types.CmekConfig): Output only. CMEK-related information for the DataStore. billing_estimation (google.cloud.discoveryengine_v1.types.DataStore.BillingEstimation): - Output only. Data size estimation for - billing. + Output only. Data size estimation for billing. acl_enabled (bool): Immutable. Whether data in the `DataStore - `__ - has ACL information. If set to ``true``, the - source data must have ACL. ACL will be ingested - when data is ingested by + `__ has ACL + information. If set to ``true``, the source data must + have ACL. ACL will be ingested when data is ingested by `DocumentService.ImportDocuments `__ methods. @@ -115,8 +111,7 @@ class DataStore(proto.Message): When ACL is enabled for the `DataStore `__, - `Document - `__ + `Document `__ can't be accessed by calling `DocumentService.GetDocument `__ @@ -124,12 +119,11 @@ class DataStore(proto.Message): `DocumentService.ListDocuments `__. - Currently ACL is only supported in ``GENERIC`` - industry vertical with non-``PUBLIC_WEBSITE`` - content config. + Currently ACL is only supported in ``GENERIC`` industry + vertical with non-``PUBLIC_WEBSITE`` content config. workspace_config (google.cloud.discoveryengine_v1.types.WorkspaceConfig): - Config to store data store type configuration - for workspace data. This must be set when + Config to store data store type configuration for + workspace data. This must be set when `DataStore.content_config `__ is set as @@ -141,39 +135,37 @@ class DataStore(proto.Message): starting_schema (google.cloud.discoveryengine_v1.types.Schema): The start schema to use for this `DataStore - `__ - when provisioning it. If unset, a default - vertical specialized schema will be used. + `__ when + provisioning it. If unset, a default vertical + specialized schema will be used. This field is only used by `CreateDataStore `__ - API, and will be ignored if used in other APIs. - This field will be omitted from all API - responses including + API, and will be ignored if used in other APIs. This + field will be omitted from all API responses including `CreateDataStore `__ API. To retrieve a schema of a `DataStore - `__, - use `SchemaService.GetSchema + `__, use + `SchemaService.GetSchema `__ API instead. - The provided schema will be validated against - certain rules on schema. Learn more from `this + The provided schema will be validated against certain + rules on schema. Learn more from `this doc `__. healthcare_fhir_config (google.cloud.discoveryengine_v1.types.HealthcareFhirConfig): Optional. Configuration for ``HEALTHCARE_FHIR`` vertical. identity_mapping_store (str): - Immutable. The fully qualified resource name of - the associated `IdentityMappingStore + Immutable. The fully qualified resource name of the + associated `IdentityMappingStore `__. - This field can only be set for acl_enabled - DataStores with ``THIRD_PARTY`` or ``GSUITE`` - IdP. Format: + This field can only be set for acl_enabled DataStores + with ``THIRD_PARTY`` or ``GSUITE`` IdP. Format: ``projects/{project}/locations/{location}/identityMappingStores/{identity_mapping_store}``. """ @@ -212,11 +204,9 @@ class BillingEstimation(proto.Message): Attributes: structured_data_size (int): - Data size for structured data in terms of - bytes. + Data size for structured data in terms of bytes. unstructured_data_size (int): - Data size for unstructured data in terms of - bytes. + Data size for unstructured data in terms of bytes. website_data_size (int): Data size for websites in terms of bytes. structured_data_update_time (google.protobuf.timestamp_pb2.Timestamp): @@ -343,13 +333,13 @@ class AdvancedSiteSearchConfig(proto.Message): Attributes: disable_initial_index (bool): - If set true, initial indexing is disabled for - the DataStore. + If set true, initial indexing is disabled for the + DataStore. This field is a member of `oneof`_ ``_disable_initial_index``. disable_automatic_refresh (bool): - If set true, automatic refresh is disabled - for the DataStore. + If set true, automatic refresh is disabled for the + DataStore. This field is a member of `oneof`_ ``_disable_automatic_refresh``. """ @@ -367,8 +357,7 @@ class AdvancedSiteSearchConfig(proto.Message): class WorkspaceConfig(proto.Message): - r"""Config to store data store type configuration for workspace - data + r"""Config to store data store type configuration for workspace data Attributes: type_ (google.cloud.discoveryengine_v1.types.WorkspaceConfig.Type): @@ -376,20 +365,19 @@ class WorkspaceConfig(proto.Message): dasher_customer_id (str): Obfuscated Dasher customer ID. super_admin_service_account (str): - Optional. The super admin service account for - the workspace that will be used for access token - generation. For now we only use it for Native - Google Drive connector data ingestion. + Optional. The super admin service account for the + workspace that will be used for access token generation. + For now we only use it for Native Google Drive connector + data ingestion. super_admin_email_address (str): - Optional. The super admin email address for - the workspace that will be used for access token - generation. For now we only use it for Native - Google Drive connector data ingestion. + Optional. The super admin email address for the + workspace that will be used for access token generation. + For now we only use it for Native Google Drive connector + data ingestion. """ class Type(proto.Enum): - r"""Specifies the type of Workspace App supported by this - DataStore + r"""Specifies the type of Workspace App supported by this DataStore Values: TYPE_UNSPECIFIED (0): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/data_store_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/data_store_service.py index 9ad546117e91..b5a474290aa6 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/data_store_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/data_store_service.py @@ -53,15 +53,14 @@ class CreateDataStoreRequest(proto.Message): Attributes: cmek_config_name (str): - Resource name of the CmekConfig to use for - protecting this DataStore. + Resource name of the CmekConfig to use for protecting + this DataStore. This field is a member of `oneof`_ ``cmek_options``. disable_cmek (bool): - DataStore without CMEK protections. If a - default CmekConfig is set for the project, - setting this field will override the default - CmekConfig as well. + DataStore without CMEK protections. If a default + CmekConfig is set for the project, setting this field + will override the default CmekConfig as well. This field is a member of `oneof`_ ``cmek_options``. parent (str): @@ -69,39 +68,35 @@ class CreateDataStoreRequest(proto.Message): ``projects/{project}/locations/{location}/collections/{collection}``. data_store (google.cloud.discoveryengine_v1.types.DataStore): Required. The `DataStore - `__ - to create. + `__ to + create. data_store_id (str): Required. The ID to use for the `DataStore - `__, - which will become the final component of the + `__, which + will become the final component of the `DataStore `__'s resource name. This field must conform to `RFC-1034 - `__ - standard with a length limit of 63 characters. - Otherwise, an INVALID_ARGUMENT error is - returned. + `__ standard with a + length limit of 63 characters. Otherwise, an + INVALID_ARGUMENT error is returned. create_advanced_site_search (bool): - A boolean flag indicating whether user want to - directly create an advanced data store for site - search. If the data store is not configured as - site + A boolean flag indicating whether user want to directly + create an advanced data store for site search. + If the data store is not configured as site search (GENERIC vertical and PUBLIC_WEBSITE content_config), this flag will be ignored. skip_default_schema_creation (bool): - A boolean flag indicating whether to skip the - default schema creation for the data store. Only - enable this flag if you are certain that the - default schema is incompatible with your use - case. + A boolean flag indicating whether to skip the default + schema creation for the data store. Only enable this + flag if you are certain that the default schema is + incompatible with your use case. - If set to true, you must manually create a - schema for the data store before any documents - can be ingested. + If set to true, you must manually create a schema for + the data store before any documents can be ingested. This flag cannot be specified if ``data_store.starting_schema`` is specified. @@ -150,19 +145,18 @@ class GetDataStoreRequest(proto.Message): name (str): Required. Full resource name of `DataStore - `__, - such as + `__, such as ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}``. - If the caller does not have permission to access - the `DataStore + If the caller does not have permission to access the + `DataStore `__, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested `DataStore - `__ - does not exist, a NOT_FOUND error is returned. + `__ does not + exist, a NOT_FOUND error is returned. """ name: str = proto.Field( @@ -182,8 +176,8 @@ class CreateDataStoreMetadata(proto.Message): create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -206,25 +200,23 @@ class ListDataStoresRequest(proto.Message): Attributes: parent (str): - Required. The parent branch resource name, such - as + Required. The parent branch resource name, such as ``projects/{project}/locations/{location}/collections/{collection_id}``. If the caller does not have permission to list `DataStore - `__s - under this location, regardless of whether or - not this data store exists, a PERMISSION_DENIED - error is returned. + `__s under + this location, regardless of whether or not this data + store exists, a PERMISSION_DENIED error is returned. page_size (int): Maximum number of `DataStore - `__s - to return. If unspecified, defaults to 10. The - maximum allowed value is 50. Values above 50 - will be coerced to 50. + `__s to + return. If unspecified, defaults to 10. The maximum + allowed value is 50. Values above 50 will be coerced to + 50. - If this field is negative, an INVALID_ARGUMENT - is returned. + If this field is negative, an INVALID_ARGUMENT is + returned. page_token (str): A page token `ListDataStoresResponse.next_page_token @@ -232,15 +224,13 @@ class ListDataStoresRequest(proto.Message): received from a previous `DataStoreService.ListDataStores `__ - call. Provide this to retrieve the subsequent - page. + call. Provide this to retrieve the subsequent page. - When paginating, all other parameters provided - to `DataStoreService.ListDataStores + When paginating, all other parameters provided to + `DataStoreService.ListDataStores `__ - must match the call that provided the page - token. Otherwise, an INVALID_ARGUMENT error is - returned. + must match the call that provided the page token. + Otherwise, an INVALID_ARGUMENT error is returned. filter (str): Filter by solution type . For example: ``filter = @@ -279,8 +269,8 @@ class ListDataStoresResponse(proto.Message): A token that can be sent as `ListDataStoresRequest.page_token `__ - to retrieve the next page. If this field is - omitted, there are no subsequent pages. + to retrieve the next page. If this field is omitted, + there are no subsequent pages. """ @property @@ -308,20 +298,18 @@ class DeleteDataStoreRequest(proto.Message): name (str): Required. Full resource name of `DataStore - `__, - such as + `__, such as ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}``. - If the caller does not have permission to delete - the `DataStore + If the caller does not have permission to delete the + `DataStore `__, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the `DataStore - `__ - to delete does not exist, a NOT_FOUND error is - returned. + `__ to delete + does not exist, a NOT_FOUND error is returned. """ name: str = proto.Field( @@ -339,27 +327,26 @@ class UpdateDataStoreRequest(proto.Message): Attributes: data_store (google.cloud.discoveryengine_v1.types.DataStore): Required. The `DataStore - `__ - to update. + `__ to + update. - If the caller does not have permission to update - the `DataStore + If the caller does not have permission to update the + `DataStore `__, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the `DataStore - `__ - to update does not exist, a NOT_FOUND error is - returned. + `__ to update + does not exist, a NOT_FOUND error is returned. update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided `DataStore - `__ - to update. + `__ to + update. - If an unsupported or unknown field is provided, - an INVALID_ARGUMENT error is returned. + If an unsupported or unknown field is provided, an + INVALID_ARGUMENT error is returned. """ data_store: gcd_data_store.DataStore = proto.Field( @@ -385,8 +372,8 @@ class DeleteDataStoreMetadata(proto.Message): create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/document.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/document.py index d0b88ee4bc58..f45759985a9b 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/document.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/document.py @@ -45,73 +45,71 @@ class Document(proto.Message): Attributes: struct_data (google.protobuf.struct_pb2.Struct): - The structured JSON data for the document. It - should conform to the registered `Schema - `__ or - an ``INVALID_ARGUMENT`` error is thrown. + The structured JSON data for the document. It should + conform to the registered `Schema + `__ or an + ``INVALID_ARGUMENT`` error is thrown. This field is a member of `oneof`_ ``data``. json_data (str): - The JSON string representation of the document. - It should conform to the registered `Schema - `__ or - an ``INVALID_ARGUMENT`` error is thrown. + The JSON string representation of the document. It + should conform to the registered `Schema + `__ or an + ``INVALID_ARGUMENT`` error is thrown. This field is a member of `oneof`_ ``data``. name (str): - Immutable. The full resource name of the - document. Format: + Immutable. The full resource name of the document. + Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}``. - This field must be a UTF-8 encoded string with a - length limit of 1024 characters. + This field must be a UTF-8 encoded string with a length + limit of 1024 characters. id (str): Immutable. The identifier of the document. Id should conform to `RFC-1034 - `__ - standard with a length limit of 128 characters. + `__ standard with a + length limit of 128 characters. schema_id (str): - The identifier of the schema located in the - same data store. - content (google.cloud.discoveryengine_v1.types.Document.Content): - The unstructured data linked to this document. - Content can only be set and must be set if this - document is under a ``CONTENT_REQUIRED`` data + The identifier of the schema located in the same data store. + content (google.cloud.discoveryengine_v1.types.Document.Content): + The unstructured data linked to this document. Content + can only be set and must be set if this document is + under a ``CONTENT_REQUIRED`` data store. parent_document_id (str): The identifier of the parent document. Currently supports at most two level document hierarchy. Id should conform to `RFC-1034 - `__ - standard with a length limit of 63 characters. + `__ standard with a + length limit of 63 characters. derived_struct_data (google.protobuf.struct_pb2.Struct): Output only. This field is OUTPUT_ONLY. - It contains derived data that are not in the - original input document. + It contains derived data that are not in the original + input document. acl_info (google.cloud.discoveryengine_v1.types.Document.AclInfo): Access control information for the document. index_time (google.protobuf.timestamp_pb2.Timestamp): - Output only. The last time the document was - indexed. If this field is set, the document - could be returned in search results. + Output only. The last time the document was indexed. If + this field is set, the document could be returned in + search results. This field is OUTPUT_ONLY. If this field is not - populated, it means the document has never been - indexed. + populated, it means the document has never been indexed. index_status (google.cloud.discoveryengine_v1.types.Document.IndexStatus): Output only. The index status of the document. - * If document is indexed successfully, the - index_time field is populated. + * If document is indexed successfully, the index_time + field is populated. - * Otherwise, if document is not indexed due to - errors, the error_samples field is populated. + * Otherwise, if document is not indexed due to errors, + the error_samples field is populated. - * Otherwise, if document's index is in progress, - the pending_message field is populated. + * Otherwise, if document's index is in progress, the + pending_message field is populated. """ class Content(proto.Message): @@ -126,24 +124,22 @@ class Content(proto.Message): Attributes: raw_bytes (bytes): - The content represented as a stream of bytes. - The maximum length is 1,000,000 bytes (1 MB / - ~0.95 MiB). - - Note: As with all ``bytes`` fields, this field - is represented as pure binary in Protocol - Buffers and base64-encoded string in JSON. For - example, ``abc123!?$*&()'-=@~`` should be - represented as ``YWJjMTIzIT8kKiYoKSctPUB+`` in - JSON. See + The content represented as a stream of bytes. The + maximum length is 1,000,000 bytes (1 MB / ~0.95 MiB). + + Note: As with all ``bytes`` fields, this field is + represented as pure binary in Protocol Buffers and + base64-encoded string in JSON. For example, + ``abc123!?$*&()'-=@~`` should be represented as + ``YWJjMTIzIT8kKiYoKSctPUB+`` in JSON. See https://developers.google.com/protocol-buffers/docs/proto3#json. This field is a member of `oneof`_ ``content``. uri (str): - The URI of the content. Only Cloud Storage URIs - (e.g. ``gs://bucket-name/path/to/file``) are - supported. The maximum file size is 2.5 MB for - text-based formats, 200 MB for other formats. + The URI of the content. Only Cloud Storage URIs (e.g. + ``gs://bucket-name/path/to/file``) are supported. The + maximum file size is 2.5 MB for text-based formats, 200 + MB for other formats. This field is a member of `oneof`_ ``content``. mime_type (str): @@ -168,12 +164,11 @@ class Content(proto.Message): ``application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`` (XLSX) - * - ``application/vnd.ms-excel.sheet.macroenabled.12`` + * ``application/vnd.ms-excel.sheet.macroenabled.12`` (XLSM) - The following types are supported only if layout - parser is enabled in the data store: + The following types are supported only if layout parser + is enabled in the data store: * ``image/bmp`` (BMP) * ``image/gif`` (GIF) @@ -213,8 +208,8 @@ class AclInfo(proto.Message): class AccessRestriction(proto.Message): r"""AclRestriction to model complex inheritance restrictions. - Example: Modeling a "Both Permit" inheritance, where to access a - child document, user needs to have access to parent document. + Example: Modeling a "Both Permit" inheritance, where to access a child + document, user needs to have access to parent document. Document Hierarchy - Space_S --> Page_P. @@ -303,16 +298,16 @@ class IndexStatus(proto.Message): Attributes: index_time (google.protobuf.timestamp_pb2.Timestamp): The time when the document was indexed. - If this field is populated, it means the - document has been indexed. + If this field is populated, it means the document has + been indexed. error_samples (MutableSequence[google.rpc.status_pb2.Status]): - A sample of errors encountered while indexing - the document. If this field is populated, the - document is not indexed due to errors. + A sample of errors encountered while indexing the + document. If this field is populated, the document is + not indexed due to errors. pending_message (str): - Immutable. The message indicates the document - index is in progress. If this field is - populated, the document index is pending. + Immutable. The message indicates the document index + is in progress. If this field is populated, the document + index is pending. """ index_time: timestamp_pb2.Timestamp = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/document_processing_config.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/document_processing_config.py index 5b2e162074b3..6ec25a045322 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/document_processing_config.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/document_processing_config.py @@ -29,56 +29,48 @@ class DocumentProcessingConfig(proto.Message): r"""A singleton resource of - `DataStore `__. If - it's empty when `DataStore - `__ is created and - `DataStore `__ is set - to `DataStore.ContentConfig.CONTENT_REQUIRED + `DataStore `__. If it's empty + when `DataStore `__ is + created and `DataStore `__ is + set to `DataStore.ContentConfig.CONTENT_REQUIRED `__, the default parser will default to digital parser. Attributes: name (str): - The full resource name of the Document - Processing Config. Format: + The full resource name of the Document Processing + Config. Format: ``projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig``. chunking_config (google.cloud.discoveryengine_v1.types.DocumentProcessingConfig.ChunkingConfig): Whether chunking mode is enabled. default_parsing_config (google.cloud.discoveryengine_v1.types.DocumentProcessingConfig.ParsingConfig): Configurations for default Document parser. - If not specified, we will configure it as - default DigitalParsingConfig, and the default - parsing config will be applied to all file types - for Document parsing. + If not specified, we will configure it as default + DigitalParsingConfig, and the default parsing config + will be applied to all file types for Document parsing. parsing_config_overrides (MutableMapping[str, google.cloud.discoveryengine_v1.types.DocumentProcessingConfig.ParsingConfig]): - Map from file type to override the default - parsing configuration based on the file type. - Supported keys: + Map from file type to override the default parsing + configuration based on the file type. Supported keys: - * ``pdf``: Override parsing config for PDF - files, either digital parsing, ocr parsing or - layout parsing is supported. + * ``pdf``: Override parsing config for PDF files, either + digital parsing, ocr parsing or layout parsing is + supported. - * ``html``: Override parsing config for HTML - files, only digital parsing and layout parsing - are supported. + * ``html``: Override parsing config for HTML files, only + digital parsing and layout parsing are supported. - * ``docx``: Override parsing config for DOCX - files, only digital parsing and layout parsing - are supported. + * ``docx``: Override parsing config for DOCX files, only + digital parsing and layout parsing are supported. - * ``pptx``: Override parsing config for PPTX - files, only digital parsing and layout parsing - are supported. + * ``pptx``: Override parsing config for PPTX files, only + digital parsing and layout parsing are supported. - * ``xlsm``: Override parsing config for XLSM - files, only digital parsing and layout parsing - are supported. + * ``xlsm``: Override parsing config for XLSM files, only + digital parsing and layout parsing are supported. - * ``xlsx``: Override parsing config for XLSX - files, only digital parsing and layout parsing - are supported. + * ``xlsx``: Override parsing config for XLSX files, only + digital parsing and layout parsing are supported. """ class ChunkingConfig(proto.Message): @@ -103,9 +95,9 @@ class LayoutBasedChunkingConfig(proto.Message): Supported values: 100-500 (inclusive). Default value: 500. include_ancestor_headings (bool): - Whether to include appending different levels - of headings to chunks from the middle of the - document to prevent context loss. + Whether to include appending different levels of + headings to chunks from the middle of the document to + prevent context loss. Default value: False. """ @@ -127,8 +119,7 @@ class LayoutBasedChunkingConfig(proto.Message): ) class ParsingConfig(proto.Message): - r"""Related configurations applied to a specific type of document - parser. + r"""Related configurations applied to a specific type of document parser. This message has `oneof`_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. @@ -143,8 +134,8 @@ class ParsingConfig(proto.Message): This field is a member of `oneof`_ ``type_dedicated_config``. ocr_parsing_config (google.cloud.discoveryengine_v1.types.DocumentProcessingConfig.ParsingConfig.OcrParsingConfig): - Configurations applied to OCR parser. - Currently it only applies to PDFs. + Configurations applied to OCR parser. Currently it + only applies to PDFs. This field is a member of `oneof`_ ``type_dedicated_config``. layout_parsing_config (google.cloud.discoveryengine_v1.types.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig): @@ -161,13 +152,12 @@ class OcrParsingConfig(proto.Message): Attributes: enhanced_document_elements (MutableSequence[str]): - [DEPRECATED] This field is deprecated. To use - the additional enhanced document elements - processing, please switch to - ``layout_parsing_config``. + [DEPRECATED] This field is deprecated. To use the + additional enhanced document elements processing, please + switch to ``layout_parsing_config``. use_native_text (bool): - If true, will use native text instead of OCR - text on pages containing native text. + If true, will use native text instead of OCR text on + pages containing native text. """ enhanced_document_elements: MutableSequence[str] = proto.RepeatedField( @@ -184,25 +174,25 @@ class LayoutParsingConfig(proto.Message): Attributes: enable_table_annotation (bool): - Optional. If true, the LLM based annotation - is added to the table during parsing. + Optional. If true, the LLM based annotation is added + to the table during parsing. enable_image_annotation (bool): - Optional. If true, the LLM based annotation - is added to the image during parsing. + Optional. If true, the LLM based annotation is added + to the image during parsing. structured_content_types (MutableSequence[str]): - Optional. Contains the required structure types - to extract from the document. Supported values: + Optional. Contains the required structure types to + extract from the document. Supported values: * ``shareholder-structure`` exclude_html_elements (MutableSequence[str]): - Optional. List of HTML elements to exclude - from the parsed content. + Optional. List of HTML elements to exclude from the + parsed content. exclude_html_classes (MutableSequence[str]): - Optional. List of HTML classes to exclude - from the parsed content. + Optional. List of HTML classes to exclude from the + parsed content. exclude_html_ids (MutableSequence[str]): - Optional. List of HTML ids to exclude from - the parsed content. + Optional. List of HTML ids to exclude from the parsed + content. """ enable_table_annotation: bool = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/document_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/document_service.py index d9edd210c506..8723a927a4b0 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/document_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/document_service.py @@ -41,27 +41,23 @@ class GetDocumentRequest(proto.Message): r"""Request message for `DocumentService.GetDocument - `__ - method. + `__ method. Attributes: name (str): Required. Full resource name of - `Document - `__, + `Document `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}``. - If the caller does not have permission to access - the `Document - `__, + If the caller does not have permission to access the + `Document `__, regardless of whether or not it exists, a ``PERMISSION_DENIED`` error is returned. If the requested `Document - `__ - does not exist, a ``NOT_FOUND`` error is - returned. + `__ does not + exist, a ``NOT_FOUND`` error is returned. """ name: str = proto.Field( @@ -78,27 +74,25 @@ class ListDocumentsRequest(proto.Message): Attributes: parent (str): - Required. The parent branch resource name, such - as + Required. The parent branch resource name, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}``. Use ``default_branch`` as the branch ID, to list documents under the default branch. If the caller does not have permission to list - `Document - `__s - under this branch, regardless of whether or not - this branch exists, a ``PERMISSION_DENIED`` - error is returned. + `Document `__s + under this branch, regardless of whether or not this + branch exists, a ``PERMISSION_DENIED`` error is + returned. page_size (int): Maximum number of `Document - `__s - to return. If unspecified, defaults to 100. The - maximum allowed value is 1000. Values above 1000 - are set to 1000. + `__s to + return. If unspecified, defaults to 100. The maximum + allowed value is 1000. Values above 1000 are set to + 1000. - If this field is negative, an - ``INVALID_ARGUMENT`` error is returned. + If this field is negative, an ``INVALID_ARGUMENT`` error + is returned. page_token (str): A page token `ListDocumentsResponse.next_page_token @@ -106,15 +100,13 @@ class ListDocumentsRequest(proto.Message): received from a previous `DocumentService.ListDocuments `__ - call. Provide this to retrieve the subsequent - page. + call. Provide this to retrieve the subsequent page. - When paginating, all other parameters provided - to `DocumentService.ListDocuments + When paginating, all other parameters provided to + `DocumentService.ListDocuments `__ - must match the call that provided the page - token. Otherwise, an ``INVALID_ARGUMENT`` error - is returned. + must match the call that provided the page token. + Otherwise, an ``INVALID_ARGUMENT`` error is returned. """ parent: str = proto.Field( @@ -145,8 +137,8 @@ class ListDocumentsResponse(proto.Message): A token that can be sent as `ListDocumentsRequest.page_token `__ - to retrieve the next page. If this field is - omitted, there are no subsequent pages. + to retrieve the next page. If this field is omitted, + there are no subsequent pages. """ @property @@ -176,35 +168,29 @@ class CreateDocumentRequest(proto.Message): ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}``. document (google.cloud.discoveryengine_v1.types.Document): Required. The `Document - `__ to - create. + `__ to create. document_id (str): Required. The ID to use for the - `Document - `__, + `Document `__, which becomes the final component of the `Document.name `__. - If the caller does not have permission to create - the `Document - `__, + If the caller does not have permission to create the + `Document `__, regardless of whether or not it exists, a ``PERMISSION_DENIED`` error is returned. This field must be unique among all - `Document - `__s + `Document `__s with the same `parent `__. - Otherwise, an ``ALREADY_EXISTS`` error is - returned. + Otherwise, an ``ALREADY_EXISTS`` error is returned. This field must conform to `RFC-1034 - `__ - standard with a length limit of 128 characters. - Otherwise, an ``INVALID_ARGUMENT`` error is - returned. + `__ standard with a + length limit of 128 characters. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. """ parent: str = proto.Field( @@ -232,29 +218,27 @@ class UpdateDocumentRequest(proto.Message): document (google.cloud.discoveryengine_v1.types.Document): Required. The document to update/create. - If the caller does not have permission to update - the `Document - `__, + If the caller does not have permission to update the + `Document `__, regardless of whether or not it exists, a ``PERMISSION_DENIED`` error is returned. If the `Document - `__ to - update does not exist and + `__ to update + does not exist and `allow_missing `__ is not set, a ``NOT_FOUND`` error is returned. allow_missing (bool): If set to ``true`` and the - `Document - `__ is - not found, a new `Document - `__ is - be created. + `Document `__ + is not found, a new `Document + `__ is be + created. update_mask (google.protobuf.field_mask_pb2.FieldMask): - Indicates which fields in the provided - imported 'document' to update. If not set, by - default updates all fields. + Indicates which fields in the provided imported + 'document' to update. If not set, by default updates all + fields. """ document: gcd_document.Document = proto.Field( @@ -282,21 +266,18 @@ class DeleteDocumentRequest(proto.Message): Attributes: name (str): Required. Full resource name of - `Document - `__, + `Document `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}``. - If the caller does not have permission to delete - the `Document - `__, + If the caller does not have permission to delete the + `Document `__, regardless of whether or not it exists, a ``PERMISSION_DENIED`` error is returned. If the `Document - `__ to - delete does not exist, a ``NOT_FOUND`` error is - returned. + `__ to delete + does not exist, a ``NOT_FOUND`` error is returned. """ name: str = proto.Field( @@ -313,8 +294,7 @@ class BatchGetDocumentsMetadataRequest(proto.Message): Attributes: parent (str): - Required. The parent branch resource name, such - as + Required. The parent branch resource name, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}``. matcher (google.cloud.discoveryengine_v1.types.BatchGetDocumentsMetadataRequest.Matcher): Required. Matcher for the @@ -323,8 +303,8 @@ class BatchGetDocumentsMetadataRequest(proto.Message): """ class UrisMatcher(proto.Message): - r"""Matcher for the `Document - `__s by exact uris. + r"""Matcher for the `Document `__s + by exact uris. Attributes: uris (MutableSequence[str]): @@ -337,9 +317,8 @@ class UrisMatcher(proto.Message): ) class FhirMatcher(proto.Message): - r"""Matcher for the `Document - `__s by FHIR resource - names. + r"""Matcher for the `Document `__s + by FHIR resource names. Attributes: fhir_resources (MutableSequence[str]): @@ -356,8 +335,8 @@ class FhirMatcher(proto.Message): class Matcher(proto.Message): r"""Matcher for the `Document - `__s. Currently - supports matching by exact URIs. + `__s. Currently supports + matching by exact URIs. This message has `oneof`_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. @@ -446,26 +425,23 @@ class DocumentMetadata(proto.Message): Attributes: matcher_value (google.cloud.discoveryengine_v1.types.BatchGetDocumentsMetadataResponse.DocumentMetadata.MatcherValue): - The value of the matcher that was used to match - the `Document - `__. + The value of the matcher that was used to match the + `Document `__. state (google.cloud.discoveryengine_v1.types.BatchGetDocumentsMetadataResponse.State): The state of the document. last_refreshed_time (google.protobuf.timestamp_pb2.Timestamp): The timestamp of the last time the - `Document - `__ + `Document `__ was last indexed. data_ingestion_source (str): The data ingestion source of the - `Document - `__. + `Document `__. Allowed values are: * ``batch``: Data ingested via Batch API, e.g., - ImportDocuments. * ``streaming`` Data ingested - via Streaming API, e.g., FHIR streaming. + ImportDocuments. * ``streaming`` Data ingested via + Streaming API, e.g., FHIR streaming. """ class MatcherValue(proto.Message): @@ -482,8 +458,7 @@ class MatcherValue(proto.Message): Attributes: uri (str): If match by URI, the URI of the - `Document - `__. + `Document `__. This field is a member of `oneof`_ ``matcher_value``. fhir_resource (str): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/engine.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/engine.py index 1da567b08cd2..4db4e21a6f0c 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/engine.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/engine.py @@ -31,8 +31,8 @@ class Engine(proto.Message): - r"""Metadata that describes the training and serving parameters of - an `Engine `__. + r"""Metadata that describes the training and serving parameters of an + `Engine `__. This message has `oneof`_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. @@ -43,24 +43,24 @@ class Engine(proto.Message): Attributes: chat_engine_config (google.cloud.discoveryengine_v1.types.Engine.ChatEngineConfig): - Configurations for the Chat Engine. Only - applicable if `solution_type + Configurations for the Chat Engine. Only applicable if + `solution_type `__ is `SOLUTION_TYPE_CHAT `__. This field is a member of `oneof`_ ``engine_config``. search_engine_config (google.cloud.discoveryengine_v1.types.Engine.SearchEngineConfig): - Configurations for the Search Engine. Only - applicable if `solution_type + Configurations for the Search Engine. Only applicable if + `solution_type `__ is `SOLUTION_TYPE_SEARCH `__. This field is a member of `oneof`_ ``engine_config``. media_recommendation_engine_config (google.cloud.discoveryengine_v1.types.Engine.MediaRecommendationEngineConfig): - Configurations for the Media Engine. Only - applicable on the data stores with + Configurations for the Media Engine. Only applicable on + the data stores with `solution_type `__ `SOLUTION_TYPE_RECOMMENDATION @@ -72,8 +72,8 @@ class Engine(proto.Message): This field is a member of `oneof`_ ``engine_config``. chat_engine_metadata (google.cloud.discoveryengine_v1.types.Engine.ChatEngineMetadata): - Output only. Additional information of the Chat - Engine. Only applicable if `solution_type + Output only. Additional information of the Chat Engine. + Only applicable if `solution_type `__ is `SOLUTION_TYPE_CHAT @@ -81,70 +81,69 @@ class Engine(proto.Message): This field is a member of `oneof`_ ``engine_metadata``. name (str): - Immutable. Identifier. The fully qualified - resource name of the engine. - This field must be a UTF-8 encoded string with a - length limit of 1024 characters. + Immutable. Identifier. The fully qualified resource name + of the engine. + This field must be a UTF-8 encoded string with a length + limit of 1024 characters. Format: ``projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`` - engine should be 1-63 characters, and valid - characters are /`a-z0-9 `__*/. - Otherwise, an INVALID_ARGUMENT error is - returned. + engine should be 1-63 characters, and valid characters + are /`a-z0-9 `__*/. Otherwise, an + INVALID_ARGUMENT error is returned. display_name (str): - Required. The display name of the engine. - Should be human readable. UTF-8 encoded string - with limit of 1024 characters. + Required. The display name of the engine. Should be + human readable. UTF-8 encoded string with limit of 1024 + characters. create_time (google.protobuf.timestamp_pb2.Timestamp): - Output only. Timestamp the Recommendation - Engine was created at. + Output only. Timestamp the Recommendation Engine was + created at. update_time (google.protobuf.timestamp_pb2.Timestamp): - Output only. Timestamp the Recommendation - Engine was last updated. + Output only. Timestamp the Recommendation Engine was + last updated. data_store_ids (MutableSequence[str]): - Optional. The data stores associated with this - engine. + Optional. The data stores associated with this engine. + For `SOLUTION_TYPE_SEARCH `__ and `SOLUTION_TYPE_RECOMMENDATION `__ - type of engines, they can only associate with at - most one data store. + type of engines, they can only associate with at most + one data store. If `solution_type `__ is `SOLUTION_TYPE_CHAT `__, multiple `DataStore - `__s - in the same `Collection - `__ - can be associated here. + `__s in the + same `Collection + `__ can be + associated here. Note that when used in `CreateEngineRequest `__, - one DataStore id must be provided as the system - will use it for necessary initializations. + one DataStore id must be provided as the system will use + it for necessary initializations. solution_type (google.cloud.discoveryengine_v1.types.SolutionType): Required. The solutions of the engine. industry_vertical (google.cloud.discoveryengine_v1.types.IndustryVertical): Optional. The industry vertical that the engine - registers. The restriction of the Engine - industry vertical is based on `DataStore - `__: - Vertical on Engine has to match vertical of the - DataStore linked to the engine. + registers. The restriction of the Engine industry + vertical is based on `DataStore + `__: Vertical + on Engine has to match vertical of the DataStore linked + to the engine. common_config (google.cloud.discoveryengine_v1.types.Engine.CommonConfig): - Common config spec that specifies the - metadata of the engine. + Common config spec that specifies the metadata of the + engine. disable_analytics (bool): - Optional. Whether to disable analytics for - searches performed on this engine. + Optional. Whether to disable analytics for searches + performed on this engine. """ class SearchEngineConfig(proto.Message): @@ -155,8 +154,7 @@ class SearchEngineConfig(proto.Message): The search feature tier of this engine. Different tiers might have different - pricing. To learn more, check the pricing - documentation. + pricing. To learn more, check the pricing documentation. Defaults to `SearchTier.SEARCH_TIER_STANDARD @@ -187,11 +185,10 @@ class MediaRecommendationEngineConfig(proto.Message): This field together with `optimization_objective `__ - describe engine metadata to use to control - engine training and serving. + describe engine metadata to use to control engine + training and serving. - Currently supported values: - ``recommended-for-you``, + Currently supported values: ``recommended-for-you``, ``others-you-may-like``, ``more-like-this``, ``most-popular-items``. optimization_objective (str): @@ -200,42 +197,37 @@ class MediaRecommendationEngineConfig(proto.Message): This field together with `optimization_objective `__ - describe engine metadata to use to control - engine training and serving. + describe engine metadata to use to control engine + training and serving. Currently supported values: ``ctr``, ``cvr``. - If not specified, we choose default based on - engine type. Default depends on type of - recommendation: + If not specified, we choose default based on engine + type. Default depends on type of recommendation: ``recommended-for-you`` => ``ctr`` ``others-you-may-like`` => ``ctr`` optimization_objective_config (google.cloud.discoveryengine_v1.types.Engine.MediaRecommendationEngineConfig.OptimizationObjectiveConfig): Name and value of the custom threshold for cvr - optimization_objective. For target_field - ``watch-time``, target_field_value must be an - integer value indicating the media progress time - in seconds between (0, 86400] (excludes 0, - includes 86400) (e.g., 90). + optimization_objective. For target_field ``watch-time``, + target_field_value must be an integer value indicating + the media progress time in seconds between (0, 86400] + (excludes 0, includes 86400) (e.g., 90). For target_field ``watch-percentage``, the - target_field_value must be a valid float value - between (0, 1.0] (excludes 0, includes 1.0) - (e.g., 0.5). + target_field_value must be a valid float value between + (0, 1.0] (excludes 0, includes 1.0) (e.g., 0.5). training_state (google.cloud.discoveryengine_v1.types.Engine.MediaRecommendationEngineConfig.TrainingState): The training state that the engine is in (e.g. ``TRAINING`` or ``PAUSED``). - Since part of the cost of running the service is - frequency of training - this can be used to - determine when to train engine in order to - control cost. If not specified: the default - value for ``CreateEngine`` method is - ``TRAINING``. The default value for - ``UpdateEngine`` method is to keep the state the - same as before. + Since part of the cost of running the service + is frequency of training - this can be used to determine + when to train engine in order to control cost. If not + specified: the default value for ``CreateEngine`` method + is ``TRAINING``. The default value for ``UpdateEngine`` + method is to keep the state the same as before. engine_features_config (google.cloud.discoveryengine_v1.types.Engine.MediaRecommendationEngineConfig.EngineFeaturesConfig): Optional. Additional engine features config. """ @@ -260,12 +252,11 @@ class OptimizationObjectiveConfig(proto.Message): Attributes: target_field (str): - Required. The name of the field to target. - Currently supported values: - ``watch-percentage``, ``watch-time``. + Required. The name of the field to target. Currently + supported values: ``watch-percentage``, ``watch-time``. target_field_value_float (float): - Required. The threshold to be applied to the - target (e.g., 0.5). + Required. The threshold to be applied to the target + (e.g., 0.5). """ target_field: str = proto.Field( @@ -312,22 +303,20 @@ class EngineFeaturesConfig(proto.Message): ) class RecommendedForYouFeatureConfig(proto.Message): - r"""Additional feature configurations for creating a - ``recommended-for-you`` engine. + r"""Additional feature configurations for creating a ``recommended-for-you`` + engine. Attributes: context_event_type (str): - The type of event with which the engine is - queried at prediction time. If set to - ``generic``, only ``view-item``, - ``media-play``,and ``media-complete`` will be - used as ``context-event`` in engine training. If - set to ``view-home-page``, ``view-home-page`` - will also be used as ``context-events`` in - addition to ``view-item``, ``media-play``, and - ``media-complete``. Currently supported for the - ``recommended-for-you`` engine. Currently - supported values: ``view-home-page``, + The type of event with which the engine is queried at + prediction time. If set to ``generic``, only + ``view-item``, ``media-play``,and ``media-complete`` + will be used as ``context-event`` in engine training. If + set to ``view-home-page``, ``view-home-page`` will also + be used as ``context-events`` in addition to + ``view-item``, ``media-play``, and ``media-complete``. + Currently supported for the ``recommended-for-you`` + engine. Currently supported values: ``view-home-page``, ``generic``. """ @@ -337,16 +326,16 @@ class RecommendedForYouFeatureConfig(proto.Message): ) class MostPopularFeatureConfig(proto.Message): - r"""Feature configurations that are required for creating a Most - Popular engine. + r"""Feature configurations that are required for creating a Most Popular + engine. Attributes: time_window_days (int): - The time window of which the engine is queried - at training and prediction time. Positive - integers only. The value translates to the last - X days of events. Currently required for the - ``most-popular-items`` engine. + The time window of which the engine is queried at + training and prediction time. Positive integers only. + The value translates to the last X days of events. + Currently required for the ``most-popular-items`` + engine. """ time_window_days: int = proto.Field( @@ -385,32 +374,29 @@ class ChatEngineConfig(proto.Message): Attributes: agent_creation_config (google.cloud.discoveryengine_v1.types.Engine.ChatEngineConfig.AgentCreationConfig): - The configurationt generate the Dialogflow agent - that is associated to this Engine. + The configurationt generate the Dialogflow agent that is + associated to this Engine. - Note that these configurations are one-time - consumed by and passed to Dialogflow service. It - means they cannot be retrieved using - `EngineService.GetEngine + Note that these configurations are one-time consumed by + and passed to Dialogflow service. It means they cannot + be retrieved using `EngineService.GetEngine `__ or `EngineService.ListEngines `__ API after engine creation. dialogflow_agent_to_link (str): - The resource name of an exist Dialogflow agent - to link to this Chat Engine. Customers can - either provide ``agent_creation_config`` to - create agent or provide an agent name that links - the agent with the Chat engine. - - Format: ``projects//locations//agents/``. - - Note that the ``dialogflow_agent_to_link`` are - one-time consumed by and passed to Dialogflow - service. It means they cannot be retrieved using - `EngineService.GetEngine + The resource name of an exist Dialogflow agent to link + to this Chat Engine. Customers can either provide + ``agent_creation_config`` to create agent or provide an + agent name that links the agent with the Chat engine. + + Format: ``projects//locations//agents/``. + + Note that the ``dialogflow_agent_to_link`` are one-time + consumed by and passed to Dialogflow service. It means + they cannot be retrieved using `EngineService.GetEngine `__ or `EngineService.ListEngines @@ -418,17 +404,15 @@ class ChatEngineConfig(proto.Message): API after engine creation. Use `ChatEngineMetadata.dialogflow_agent `__ - for actual agent association after Engine is - created. + for actual agent association after Engine is created. allow_cross_region (bool): - Optional. If the flag set to true, we allow the - agent and engine are in different locations, - otherwise the agent and engine are required to - be in the same location. The flag is set to - false by default. - - Note that the ``allow_cross_region`` are - one-time consumed by and passed to + Optional. If the flag set to true, we allow the agent + and engine are in different locations, otherwise the + agent and engine are required to be in the same + location. The flag is set to false by default. + + Note that the ``allow_cross_region`` are one-time + consumed by and passed to `EngineService.CreateEngine `__. It means they cannot be retrieved using @@ -443,38 +427,34 @@ class ChatEngineConfig(proto.Message): class AgentCreationConfig(proto.Message): r"""Configurations for generating a Dialogflow agent. - Note that these configurations are one-time consumed by and - passed to Dialogflow service. It means they cannot be retrieved + Note that these configurations are one-time consumed by + and passed to Dialogflow service. It means they cannot be retrieved using `EngineService.GetEngine `__ or `EngineService.ListEngines - `__ - API after engine creation. + `__ API after + engine creation. Attributes: business (str): - Name of the company, organization or other - entity that the agent represents. Used for - knowledge connector LLM prompt and for knowledge - search. + Name of the company, organization or other entity + that the agent represents. Used for knowledge connector + LLM prompt and for knowledge search. default_language_code (str): Required. The default language of the agent as a language tag. See `Language Support `__ - for a list of the currently supported language - codes. + for a list of the currently supported language codes. time_zone (str): - Required. The time zone of the agent from the - `time zone database - `__, e.g., + Required. The time zone of the agent from the `time zone + database `__, e.g., America/New_York, Europe/Paris. location (str): - Agent location for Agent creation, supported - values: global/us/eu. If not provided, us Engine - will create Agent using us-central-1 by default; - eu Engine will create Agent using eu-west-1 by - default. + Agent location for Agent creation, supported values: + global/us/eu. If not provided, us Engine will create + Agent using us-central-1 by default; eu Engine will + create Agent using eu-west-1 by default. """ business: str = proto.Field( @@ -515,9 +495,9 @@ class CommonConfig(proto.Message): Attributes: company_name (str): - The name of the company, business or entity - that is associated with the engine. Setting this - may help improve LLM related features. + The name of the company, business or entity that is + associated with the engine. Setting this may help + improve LLM related features. """ company_name: str = proto.Field( @@ -531,11 +511,11 @@ class ChatEngineMetadata(proto.Message): Attributes: dialogflow_agent (str): - The resource name of a Dialogflow agent, that - this Chat Engine refers to. + The resource name of a Dialogflow agent, that this Chat + Engine refers to. - Format: ``projects//locations//agents/``. + Format: ``projects//locations//agents/``. """ dialogflow_agent: str = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/engine_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/engine_service.py index 37d88767c6c5..1702c9e93994 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/engine_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/engine_service.py @@ -41,8 +41,7 @@ class CreateEngineRequest(proto.Message): r"""Request for `EngineService.CreateEngine - `__ - method. + `__ method. Attributes: parent (str): @@ -50,22 +49,18 @@ class CreateEngineRequest(proto.Message): ``projects/{project}/locations/{location}/collections/{collection}``. engine (google.cloud.discoveryengine_v1.types.Engine): Required. The `Engine - `__ to - create. + `__ to create. engine_id (str): Required. The ID to use for the - `Engine - `__, - which will become the final component of the - `Engine - `__'s - resource name. + `Engine `__, + which will become the final component of the `Engine + `__'s resource + name. This field must conform to `RFC-1034 - `__ - standard with a length limit of 63 characters. - Otherwise, an INVALID_ARGUMENT error is - returned. + `__ standard with a + length limit of 63 characters. Otherwise, an + INVALID_ARGUMENT error is returned. """ parent: str = proto.Field( @@ -94,8 +89,8 @@ class CreateEngineMetadata(proto.Message): create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -113,27 +108,23 @@ class CreateEngineMetadata(proto.Message): class DeleteEngineRequest(proto.Message): r"""Request message for `EngineService.DeleteEngine - `__ - method. + `__ method. Attributes: name (str): Required. Full resource name of - `Engine - `__, + `Engine `__, such as ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}``. - If the caller does not have permission to delete - the `Engine - `__, + If the caller does not have permission to delete the + `Engine `__, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the `Engine - `__ to - delete does not exist, a NOT_FOUND error is - returned. + `__ to delete + does not exist, a NOT_FOUND error is returned. """ name: str = proto.Field( @@ -153,8 +144,8 @@ class DeleteEngineMetadata(proto.Message): create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -172,14 +163,12 @@ class DeleteEngineMetadata(proto.Message): class GetEngineRequest(proto.Message): r"""Request message for `EngineService.GetEngine - `__ - method. + `__ method. Attributes: name (str): Required. Full resource name of - `Engine - `__, + `Engine `__, such as ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}``. """ @@ -193,8 +182,7 @@ class GetEngineRequest(proto.Message): class ListEnginesRequest(proto.Message): r"""Request message for `EngineService.ListEngines - `__ - method. + `__ method. Attributes: parent (str): @@ -206,6 +194,7 @@ class ListEnginesRequest(proto.Message): Optional. Not supported. filter (str): Optional. Filter by solution type. For example: + solution_type=SOLUTION_TYPE_SEARCH """ @@ -230,8 +219,7 @@ class ListEnginesRequest(proto.Message): class ListEnginesResponse(proto.Message): r"""Response message for `EngineService.ListEngines - `__ - method. + `__ method. Attributes: engines (MutableSequence[google.cloud.discoveryengine_v1.types.Engine]): @@ -259,31 +247,27 @@ def raw_page(self): class UpdateEngineRequest(proto.Message): r"""Request message for `EngineService.UpdateEngine - `__ - method. + `__ method. Attributes: engine (google.cloud.discoveryengine_v1.types.Engine): Required. The `Engine - `__ to - update. If the caller does not have permission - to update the `Engine - `__, + `__ to update. + If the caller does not have permission to update the + `Engine `__, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the `Engine - `__ to - update does not exist, a NOT_FOUND error is - returned. + `__ to update + does not exist, a NOT_FOUND error is returned. update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided - `Engine - `__ to + `Engine `__ to update. - If an unsupported or unknown field is provided, - an INVALID_ARGUMENT error is returned. + If an unsupported or unknown field is provided, an + INVALID_ARGUMENT error is returned. """ engine: gcd_engine.Engine = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/grounded_generation_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/grounded_generation_service.py index 64fd48f334da..f3ba89b2bdfa 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/grounded_generation_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/grounded_generation_service.py @@ -35,18 +35,16 @@ class GroundedGenerationContent(proto.Message): - r"""Base structured datatype containing multi-part content of a - message. + r"""Base structured datatype containing multi-part content of a message. Attributes: role (str): - Producer of the content. Must be either ``user`` - or ``model``. - Intended to be used for multi-turn - conversations. Otherwise, it can be left unset. + Producer of the content. Must be either ``user`` or + ``model``. + Intended to be used for multi-turn conversations. + Otherwise, it can be left unset. parts (MutableSequence[google.cloud.discoveryengine_v1.types.GroundedGenerationContent.Part]): - Ordered ``Parts`` that constitute a single - message. + Ordered ``Parts`` that constitute a single message. """ class Part(proto.Message): @@ -79,52 +77,49 @@ class Part(proto.Message): class GenerateGroundedContentRequest(proto.Message): - r"""Top-level message sent by the client for the - ``GenerateGroundedContent`` method. + r"""Top-level message sent by the client for the ``GenerateGroundedContent`` + method. Attributes: location (str): Required. Location resource. - Format: - ``projects/{project}/locations/{location}``. + Format: ``projects/{project}/locations/{location}``. system_instruction (google.cloud.discoveryengine_v1.types.GroundedGenerationContent): - Content of the system instruction for the - current API. - These instructions will take priority over any - other prompt instructions if the selected model - is supporting them. + Content of the system instruction for the current + API. + These instructions will take priority over any other + prompt instructions if the selected model is supporting + them. contents (MutableSequence[google.cloud.discoveryengine_v1.types.GroundedGenerationContent]): - Content of the current conversation with the - model. - For single-turn queries, this is a single - instance. For multi-turn queries, this is a - repeated field that contains conversation - history + latest request. + Content of the current conversation with the model. + + For single-turn queries, this is a single instance. For + multi-turn queries, this is a repeated field that + contains conversation history + latest request. generation_spec (google.cloud.discoveryengine_v1.types.GenerateGroundedContentRequest.GenerationSpec): Content generation specification. grounding_spec (google.cloud.discoveryengine_v1.types.GenerateGroundedContentRequest.GroundingSpec): Grounding specification. user_labels (MutableMapping[str, str]): - The user labels applied to a resource must meet - the following requirements: - * Each resource can have multiple labels, up to - a maximum of 64. + The user labels applied to a resource must meet the + following requirements: + * Each resource can have multiple labels, up to a + maximum of 64. * Each label must be a key-value pair. - * Keys have a minimum length of 1 character and - a maximum length of 63 characters and cannot - be empty. Values can be empty and have a maximum - length of 63 characters. + * Keys have a minimum length of 1 character and a + maximum length of 63 characters and cannot be empty. + Values can be empty and have a maximum length of 63 + characters. - * Keys and values can contain only lowercase - letters, numeric characters, underscores, and - dashes. All characters must use UTF-8 encoding, - and international characters are allowed. + * Keys and values can contain only lowercase letters, + numeric characters, underscores, and dashes. All + characters must use UTF-8 encoding, and international + characters are allowed. - * The key portion of a label must be unique. - However, you can use the same key with - multiple resources. + * The key portion of a label must be unique. However, + you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. @@ -145,42 +140,41 @@ class GenerationSpec(proto.Message): Specifies which Vertex model id to use for generation. language_code (str): - Language code for content. Use language tags - defined by `BCP47 + Language code for content. Use language tags defined by + `BCP47 `__. temperature (float): - If specified, custom value for the - temperature will be used. + If specified, custom value for the temperature will + be used. This field is a member of `oneof`_ ``_temperature``. top_p (float): - If specified, custom value for nucleus - sampling will be used. + If specified, custom value for nucleus sampling will + be used. This field is a member of `oneof`_ ``_top_p``. top_k (int): - If specified, custom value for top-k sampling - will be used. + If specified, custom value for top-k sampling will be + used. This field is a member of `oneof`_ ``_top_k``. frequency_penalty (float): - If specified, custom value for frequency - penalty will be used. + If specified, custom value for frequency penalty will + be used. This field is a member of `oneof`_ ``_frequency_penalty``. seed (int): - If specified, custom value for the seed will - be used. + If specified, custom value for the seed will be used. This field is a member of `oneof`_ ``_seed``. presence_penalty (float): - If specified, custom value for presence - penalty will be used. + If specified, custom value for presence penalty will + be used. This field is a member of `oneof`_ ``_presence_penalty``. max_output_tokens (int): - If specified, custom value for max output - tokens will be used. + If specified, custom value for max output tokens will + be used. This field is a member of `oneof`_ ``_max_output_tokens``. """ @@ -245,12 +239,12 @@ class DynamicRetrievalPredictor(proto.Message): Attributes: version (google.cloud.discoveryengine_v1.types.GenerateGroundedContentRequest.DynamicRetrievalConfiguration.DynamicRetrievalPredictor.Version): - The version of the predictor to be used in - dynamic retrieval. + The version of the predictor to be used in dynamic + retrieval. threshold (float): - The value of the threshold. If the predictor - will predict a value smaller than this, it would - suppress grounding in the source. + The value of the threshold. If the predictor will + predict a value smaller than this, it would suppress + grounding in the source. This field is a member of `oneof`_ ``_threshold``. """ @@ -298,23 +292,20 @@ class GroundingSource(proto.Message): Attributes: inline_source (google.cloud.discoveryengine_v1.types.GenerateGroundedContentRequest.GroundingSource.InlineSource): - If set, grounding is performed with inline - content. + If set, grounding is performed with inline content. This field is a member of `oneof`_ ``source``. search_source (google.cloud.discoveryengine_v1.types.GenerateGroundedContentRequest.GroundingSource.SearchSource): - If set, grounding is performed with Vertex AI - Search. + If set, grounding is performed with Vertex AI Search. This field is a member of `oneof`_ ``source``. google_search_source (google.cloud.discoveryengine_v1.types.GenerateGroundedContentRequest.GroundingSource.GoogleSearchSource): - If set, grounding is performed with Google - Search. + If set, grounding is performed with Google Search. This field is a member of `oneof`_ ``source``. enterprise_web_retrieval_source (google.cloud.discoveryengine_v1.types.GenerateGroundedContentRequest.GroundingSource.EnterpriseWebRetrievalSource): - If set, grounding is performed with - enterprise web retrieval. + If set, grounding is performed with enterprise web + retrieval. This field is a member of `oneof`_ ``source``. """ @@ -328,10 +319,9 @@ class InlineSource(proto.Message): attributes (MutableMapping[str, str]): Attributes associated with the content. - Common attributes include ``source`` (indicating - where the content was sourced from) and - ``author`` (indicating the author of the - content). + Common attributes include ``source`` (indicating where + the content was sourced from) and ``author`` (indicating + the author of the content). """ grounding_facts: MutableSequence[ @@ -360,8 +350,8 @@ class SearchSource(proto.Message): max_result_count (int): Number of search results to return. - The default value is 10. The maximumm allowed - value is 10. + The default value is 10. The maximumm allowed value is + 10. filter (str): Filter expression to be applied to the search. @@ -369,8 +359,8 @@ class SearchSource(proto.Message): `SearchRequest.filter `__. safe_search (bool): - If set, safe search is enabled in Vertex AI - Search requests. + If set, safe search is enabled in Vertex AI Search + requests. """ serving_config: str = proto.Field( @@ -406,10 +396,7 @@ class GoogleSearchSource(proto.Message): ) class EnterpriseWebRetrievalSource(proto.Message): - r"""Params for using enterprise web retrieval as grounding - source. - - """ + r"""Params for using enterprise web retrieval as grounding source.""" inline_source: "GenerateGroundedContentRequest.GroundingSource.InlineSource" = ( proto.Field( @@ -506,8 +493,8 @@ class Candidate(proto.Message): content (google.cloud.discoveryengine_v1.types.GroundedGenerationContent): Content of the candidate. grounding_score (float): - The overall grounding score for the candidate, - in the range of [0, 1]. + The overall grounding score for the candidate, in the + range of [0, 1]. This field is a member of `oneof`_ ``_grounding_score``. grounding_metadata (google.cloud.discoveryengine_v1.types.GenerateGroundedContentResponse.Candidate.GroundingMetadata): @@ -519,26 +506,24 @@ class GroundingMetadata(proto.Message): Attributes: retrieval_metadata (MutableSequence[google.cloud.discoveryengine_v1.types.GenerateGroundedContentResponse.Candidate.GroundingMetadata.RetrievalMetadata]): - Retrieval metadata to provide an - understanding in the retrieval steps performed - by the model. There can be multiple such - messages which can correspond to different parts - of the retrieval. This is a mechanism used to + Retrieval metadata to provide an understanding in the + retrieval steps performed by the model. There can be + multiple such messages which can correspond to different + parts of the retrieval. This is a mechanism used to ensure transparency to our users. support_chunks (MutableSequence[google.cloud.discoveryengine_v1.types.FactChunk]): - List of chunks to be attributed across all - claims in the candidate. These are derived from - the grounding sources supplied in the request. + List of chunks to be attributed across all claims in + the candidate. These are derived from the grounding + sources supplied in the request. web_search_queries (MutableSequence[str]): - Web search queries for the following-up web - search. + Web search queries for the following-up web search. search_entry_point (google.cloud.discoveryengine_v1.types.GenerateGroundedContentResponse.Candidate.GroundingMetadata.SearchEntryPoint): Google search entry for the following-up web searches. grounding_support (MutableSequence[google.cloud.discoveryengine_v1.types.GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport]): - GroundingSupport across all claims in the - answer candidate. An support to a fact indicates - that the claim is supported by the fact. + GroundingSupport across all claims in the answer + candidate. An support to a fact indicates that the claim + is supported by the fact. images (MutableSequence[google.cloud.discoveryengine_v1.types.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata]): Images from the web search. """ @@ -607,23 +592,21 @@ class DynamicRetrievalPredictorMetadata(proto.Message): Attributes: version (google.cloud.discoveryengine_v1.types.GenerateGroundedContentResponse.Candidate.GroundingMetadata.DynamicRetrievalPredictorMetadata.Version): - The version of the predictor which was used - in dynamic retrieval. + The version of the predictor which was used in + dynamic retrieval. prediction (float): - The value of the predictor. This should be - between [0, 1] where a value of 0 means that the - query would not benefit from grounding, while a - value of 1.0 means that the query would benefit - the most. In between values allow to - differentiate between different usefulness + The value of the predictor. This should be between [0, + 1] where a value of 0 means that the query would not + benefit from grounding, while a value of 1.0 means that + the query would benefit the most. In between values + allow to differentiate between different usefulness scores for grounding. This field is a member of `oneof`_ ``_prediction``. """ class Version(proto.Enum): - r"""The version of the predictor which was used in dynamic - retrieval. + r"""The version of the predictor which was used in dynamic retrieval. Values: VERSION_UNSPECIFIED (0): @@ -651,11 +634,11 @@ class SearchEntryPoint(proto.Message): Attributes: rendered_content (str): - Web content snippet that can be embedded in a - web page or an app webview. + Web content snippet that can be embedded in a web + page or an app webview. sdk_blob (bytes): - Base64 encoded JSON representing array of - tuple. + Base64 encoded JSON representing array of tuple. """ rendered_content: str = proto.Field( @@ -674,20 +657,19 @@ class GroundingSupport(proto.Message): Attributes: claim_text (str): - Text for the claim in the candidate. Always - provided when a support is found. + Text for the claim in the candidate. Always provided + when a support is found. support_chunk_indices (MutableSequence[int]): - A list of indices (into 'support_chunks') - specifying the citations associated with the - claim. For instance [1,3,4] means that - support_chunks[1], support_chunks[3], - support_chunks[4] are the chunks attributed to - the claim. + A list of indices (into 'support_chunks') specifying the + citations associated with the claim. For instance + [1,3,4] means that support_chunks[1], support_chunks[3], + support_chunks[4] are the chunks attributed to the + claim. support_score (float): - A score in the range of [0, 1] describing how - grounded is a specific claim in the support - chunks indicated. Higher value means that the - claim is better supported by the chunks. + A score in the range of [0, 1] describing how grounded + is a specific claim in the support chunks indicated. + Higher value means that the claim is better supported by + the chunks. This field is a member of `oneof`_ ``_support_score``. """ @@ -715,8 +697,7 @@ class ImageMetadata(proto.Message): thumbnail (google.cloud.discoveryengine_v1.types.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.Image): Metadata about the thumbnail. source (google.cloud.discoveryengine_v1.types.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo): - The details about the website that the image - is from. + The details about the website that the image is from. """ class WebsiteInfo(proto.Message): @@ -849,18 +830,17 @@ class CheckGroundingSpec(proto.Message): Attributes: citation_threshold (float): - The threshold (in [0,1]) used for determining - whether a fact must be cited for a claim in the - answer candidate. Choosing a higher threshold - will lead to fewer but very strong citations, - while choosing a lower threshold may lead to - more but somewhat weaker citations. If unset, + The threshold (in [0,1]) used for determining whether a + fact must be cited for a claim in the answer candidate. + Choosing a higher threshold will lead to fewer but very + strong citations, while choosing a lower threshold may + lead to more but somewhat weaker citations. If unset, the threshold will default to 0.6. This field is a member of `oneof`_ ``_citation_threshold``. enable_claim_level_score (bool): - The control flag that enables claim-level - grounding score in the response. + The control flag that enables claim-level grounding + score in the response. This field is a member of `oneof`_ ``_enable_claim_level_score``. """ @@ -885,37 +865,36 @@ class CheckGroundingRequest(proto.Message): Attributes: grounding_config (str): - Required. The resource name of the grounding - config, such as + Required. The resource name of the grounding config, + such as ``projects/*/locations/global/groundingConfigs/default_grounding_config``. answer_candidate (str): - Answer candidate to check. It can have a - maximum length of 4096 tokens. + Answer candidate to check. It can have a maximum + length of 4096 tokens. facts (MutableSequence[google.cloud.discoveryengine_v1.types.GroundingFact]): List of facts for the grounding check. We support up to 200 facts. grounding_spec (google.cloud.discoveryengine_v1.types.CheckGroundingSpec): Configuration of the grounding check. user_labels (MutableMapping[str, str]): - The user labels applied to a resource must meet - the following requirements: - * Each resource can have multiple labels, up to - a maximum of 64. + The user labels applied to a resource must meet the + following requirements: + * Each resource can have multiple labels, up to a + maximum of 64. * Each label must be a key-value pair. - * Keys have a minimum length of 1 character and - a maximum length of 63 characters and cannot - be empty. Values can be empty and have a maximum - length of 63 characters. + * Keys have a minimum length of 1 character and a + maximum length of 63 characters and cannot be empty. + Values can be empty and have a maximum length of 63 + characters. - * Keys and values can contain only lowercase - letters, numeric characters, underscores, and - dashes. All characters must use UTF-8 encoding, - and international characters are allowed. + * Keys and values can contain only lowercase letters, + numeric characters, underscores, and dashes. All + characters must use UTF-8 encoding, and international + characters are allowed. - * The key portion of a label must be unique. - However, you can use the same key with - multiple resources. + * The key portion of a label must be unique. However, + you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. @@ -962,24 +941,23 @@ class CheckGroundingResponse(proto.Message): Attributes: support_score (float): - The support score for the input answer - candidate. Higher the score, higher is the - fraction of claims that are supported by the - provided facts. This is always set when a - response is returned. + The support score for the input answer candidate. + Higher the score, higher is the fraction of claims that + are supported by the provided facts. This is always set + when a response is returned. This field is a member of `oneof`_ ``_support_score``. cited_chunks (MutableSequence[google.cloud.discoveryengine_v1.types.FactChunk]): - List of facts cited across all claims in the - answer candidate. These are derived from the - facts supplied in the request. + List of facts cited across all claims in the answer + candidate. These are derived from the facts supplied in + the request. cited_facts (MutableSequence[google.cloud.discoveryengine_v1.types.CheckGroundingResponse.CheckGroundingFactChunk]): - List of facts cited across all claims in the - answer candidate. These are derived from the - facts supplied in the request. + List of facts cited across all claims in the answer + candidate. These are derived from the facts supplied in + the request. claims (MutableSequence[google.cloud.discoveryengine_v1.types.CheckGroundingResponse.Claim]): - Claim texts and citation info across all - claims in the answer candidate. + Claim texts and citation info across all claims in + the answer candidate. """ class CheckGroundingFactChunk(proto.Message): @@ -987,8 +965,8 @@ class CheckGroundingFactChunk(proto.Message): Attributes: chunk_text (str): - Text content of the fact chunk. Can be at - most 10K characters long. + Text content of the fact chunk. Can be at most 10K + characters long. """ chunk_text: str = proto.Field( @@ -1003,61 +981,53 @@ class Claim(proto.Message): Attributes: start_pos (int): - Position indicating the start of the claim in - the answer candidate, measured in bytes. Note - that this is not measured in characters and, - therefore, must be rendered in the user - interface keeping in mind that some characters - may take more than one byte. For example, if the - claim text contains non-ASCII characters, the - start and end positions vary when measured in - characters - (programming-language-dependent) and when - measured in bytes - (programming-language-independent). + Position indicating the start of the claim in the + answer candidate, measured in bytes. Note that this is + not measured in characters and, therefore, must be + rendered in the user interface keeping in mind that some + characters may take more than one byte. For example, if + the claim text contains non-ASCII characters, the start + and end positions vary when measured in characters + (programming-language-dependent) and when measured in + bytes (programming-language-independent). This field is a member of `oneof`_ ``_start_pos``. end_pos (int): - Position indicating the end of the claim in - the answer candidate, exclusive, in bytes. Note - that this is not measured in characters and, - therefore, must be rendered as such. For - example, if the claim text contains non-ASCII - characters, the start and end positions vary - when measured in characters - (programming-language-dependent) and when - measured in bytes - (programming-language-independent). + Position indicating the end of the claim in the + answer candidate, exclusive, in bytes. Note that this is + not measured in characters and, therefore, must be + rendered as such. For example, if the claim text + contains non-ASCII characters, the start and end + positions vary when measured in characters + (programming-language-dependent) and when measured in + bytes (programming-language-independent). This field is a member of `oneof`_ ``_end_pos``. claim_text (str): - Text for the claim in the answer candidate. - Always provided regardless of whether citations - or anti-citations are found. + Text for the claim in the answer candidate. Always + provided regardless of whether citations or + anti-citations are found. citation_indices (MutableSequence[int]): - A list of indices (into 'cited_chunks') - specifying the citations associated with the - claim. For instance [1,3,4] means that - cited_chunks[1], cited_chunks[3], - cited_chunks[4] are the facts cited supporting - for the claim. A citation to a fact indicates - that the claim is supported by the fact. + A list of indices (into 'cited_chunks') specifying the + citations associated with the claim. For instance + [1,3,4] means that cited_chunks[1], cited_chunks[3], + cited_chunks[4] are the facts cited supporting for the + claim. A citation to a fact indicates that the claim is + supported by the fact. grounding_check_required (bool): - Indicates that this claim required grounding - check. When the system decided this claim - doesn't require attribution/grounding check, - this field will be set to false. In that case, - no grounding check was done for the claim and - therefore + Indicates that this claim required grounding check. When + the system decided this claim doesn't require + attribution/grounding check, this field will be set to + false. In that case, no grounding check was done for the + claim and therefore `citation_indices `__ should not be returned. This field is a member of `oneof`_ ``_grounding_check_required``. score (float): - Confidence score for the claim in the answer - candidate, in the range of [0, 1]. This is set - only when + Confidence score for the claim in the answer candidate, + in the range of [0, 1]. This is set only when ``CheckGroundingRequest.grounding_spec.enable_claim_level_score`` is true. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/grounding.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/grounding.py index 4b77e23edfd9..31904644feaf 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/grounding.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/grounding.py @@ -37,9 +37,9 @@ class GroundingFact(proto.Message): characters long. attributes (MutableMapping[str, str]): Attributes associated with the fact. - Common attributes include ``source`` (indicating - where the fact was sourced from), ``author`` - (indicating the author of the fact), and so on. + Common attributes include ``source`` (indicating where + the fact was sourced from), ``author`` (indicating the + author of the fact), and so on. """ fact_text: str = proto.Field( @@ -58,17 +58,16 @@ class FactChunk(proto.Message): Attributes: chunk_text (str): - Text content of the fact chunk. Can be at - most 10K characters long. + Text content of the fact chunk. Can be at most 10K + characters long. source (str): - Source from which this fact chunk was - retrieved. If it was retrieved from the - GroundingFacts provided in the request then this - field will contain the index of the specific - fact from which this chunk was retrieved. + Source from which this fact chunk was retrieved. If + it was retrieved from the GroundingFacts provided in the + request then this field will contain the index of the + specific fact from which this chunk was retrieved. index (int): - The index of this chunk. Currently, only used - for the streaming mode. + The index of this chunk. Currently, only used for the + streaming mode. source_metadata (MutableMapping[str, str]): More fine-grained information for the source reference. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/identity_mapping_store.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/identity_mapping_store.py index 8fd66f677d96..8be39dbbf01e 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/identity_mapping_store.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/identity_mapping_store.py @@ -31,28 +31,26 @@ class IdentityMappingStore(proto.Message): - r"""Identity Mapping Store which contains Identity Mapping - Entries. + r"""Identity Mapping Store which contains Identity Mapping Entries. Attributes: name (str): - Immutable. The full resource name of the - identity mapping store. Format: + Immutable. The full resource name of the identity + mapping store. Format: ``projects/{project}/locations/{location}/identityMappingStores/{identity_mapping_store}``. - This field must be a UTF-8 encoded string with a - length limit of 1024 characters. + This field must be a UTF-8 encoded string with a length + limit of 1024 characters. kms_key_name (str): - Input only. The KMS key to be used to protect - this Identity Mapping Store at creation time. + Input only. The KMS key to be used to protect this + Identity Mapping Store at creation time. - Must be set for requests that need to comply - with CMEK Org Policy protections. + Must be set for requests that need to comply with CMEK + Org Policy protections. - If this field is set and processed successfully, - the Identity Mapping Store will be protected by - the KMS key, as indicated in the cmek_config - field. + If this field is set and processed successfully, the + Identity Mapping Store will be protected by the KMS key, + as indicated in the cmek_config field. cmek_config (google.cloud.discoveryengine_v1.types.CmekConfig): Output only. CMEK-related information for the Identity Mapping Store. @@ -74,8 +72,8 @@ class IdentityMappingStore(proto.Message): class IdentityMappingEntry(proto.Message): - r"""Identity Mapping Entry that maps an external identity to an - internal identity. + r"""Identity Mapping Entry that maps an external identity to an internal + identity. This message has `oneof`_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. @@ -87,26 +85,26 @@ class IdentityMappingEntry(proto.Message): Attributes: user_id (str): User identifier. - For Google Workspace user account, user_id - should be the google workspace user email. - For non-google identity provider, user_id is the - mapped user identifier configured during the - workforcepool config. + For Google Workspace user account, user_id should be the + google workspace user email. + For non-google identity provider, user_id is the mapped + user identifier configured during the workforcepool + config. This field is a member of `oneof`_ ``identity_provider_id``. group_id (str): Group identifier. - For Google Workspace user account, group_id - should be the google workspace group email. - For non-google identity provider, group_id is - the mapped group identifier configured during - the workforcepool config. + For Google Workspace user account, group_id should be + the google workspace group email. + For non-google identity provider, group_id is the mapped + group identifier configured during the workforcepool + config. This field is a member of `oneof`_ ``identity_provider_id``. external_identity (str): - Required. Identity outside the customer - identity provider. The length limit of external - identity will be of 100 characters. + Required. Identity outside the customer identity + provider. The length limit of external identity will be + of 100 characters. """ user_id: str = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/identity_mapping_store_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/identity_mapping_store_service.py index 7d78977cca01..73d79bfddafe 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/identity_mapping_store_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/identity_mapping_store_service.py @@ -58,30 +58,27 @@ class CreateIdentityMappingStoreRequest(proto.Message): Attributes: cmek_config_name (str): - Resource name of the CmekConfig to use for - protecting this Identity Mapping Store. + Resource name of the CmekConfig to use for protecting + this Identity Mapping Store. This field is a member of `oneof`_ ``cmek_options``. disable_cmek (bool): - Identity Mapping Store without CMEK - protections. If a default CmekConfig is set for - the project, setting this field will override - the default CmekConfig as well. + Identity Mapping Store without CMEK protections. If a + default CmekConfig is set for the project, setting this + field will override the default CmekConfig as well. This field is a member of `oneof`_ ``cmek_options``. parent (str): - Required. The parent collection resource name, - such as + Required. The parent collection resource name, such as ``projects/{project}/locations/{location}``. identity_mapping_store_id (str): - Required. The ID of the Identity Mapping Store - to create. - The ID must contain only letters (a-z, A-Z), - numbers (0-9), underscores (_), and hyphens (-). - The maximum length is 63 characters. - identity_mapping_store (google.cloud.discoveryengine_v1.types.IdentityMappingStore): - Required. The Identity Mapping Store to + Required. The ID of the Identity Mapping Store to create. + The ID must contain only letters (a-z, A-Z), numbers + (0-9), underscores (_), and hyphens (-). The maximum + length is 63 characters. + identity_mapping_store (google.cloud.discoveryengine_v1.types.IdentityMappingStore): + Required. The Identity Mapping Store to create. """ cmek_config_name: str = proto.Field( @@ -118,8 +115,8 @@ class GetIdentityMappingStoreRequest(proto.Message): Attributes: name (str): - Required. The name of the Identity Mapping Store - to get. Format: + Required. The name of the Identity Mapping Store to get. + Format: ``projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`` """ @@ -137,8 +134,8 @@ class DeleteIdentityMappingStoreRequest(proto.Message): Attributes: name (str): - Required. The name of the Identity Mapping Store - to delete. Format: + Required. The name of the Identity Mapping Store to + delete. Format: ``projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`` """ @@ -159,13 +156,13 @@ class ImportIdentityMappingsRequest(proto.Message): Attributes: inline_source (google.cloud.discoveryengine_v1.types.ImportIdentityMappingsRequest.InlineSource): - The inline source to import identity mapping - entries from. + The inline source to import identity mapping entries + from. This field is a member of `oneof`_ ``source``. identity_mapping_store (str): - Required. The name of the Identity Mapping Store - to import Identity Mapping Entries to. Format: + Required. The name of the Identity Mapping Store to + import Identity Mapping Entries to. Format: ``projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`` """ @@ -175,8 +172,8 @@ class InlineSource(proto.Message): Attributes: identity_mapping_entries (MutableSequence[google.cloud.discoveryengine_v1.types.IdentityMappingEntry]): - A maximum of 10000 entries can be imported at - one time + A maximum of 10000 entries can be imported at one + time """ identity_mapping_entries: MutableSequence[ @@ -206,8 +203,8 @@ class ImportIdentityMappingsResponse(proto.Message): Attributes: error_samples (MutableSequence[google.rpc.status_pb2.Status]): - A sample of errors encountered while - processing the request. + A sample of errors encountered while processing the + request. """ error_samples: MutableSequence[status_pb2.Status] = proto.RepeatedField( @@ -227,26 +224,26 @@ class PurgeIdentityMappingsRequest(proto.Message): Attributes: inline_source (google.cloud.discoveryengine_v1.types.PurgeIdentityMappingsRequest.InlineSource): - The inline source to purge identity mapping - entries from. + The inline source to purge identity mapping entries + from. This field is a member of `oneof`_ ``source``. identity_mapping_store (str): - Required. The name of the Identity Mapping Store - to purge Identity Mapping Entries from. Format: + Required. The name of the Identity Mapping Store to + purge Identity Mapping Entries from. Format: ``projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`` filter (str): Filter matching identity mappings to purge. The eligible field for filtering is: - * ``update_time``: in ISO 8601 "zulu" format. * - ``external_id`` + * ``update_time``: in ISO 8601 "zulu" format. + * ``external_id`` Examples: - * Deleting all identity mappings updated in a - time range: + * Deleting all identity mappings updated in a time + range: ``update_time > "2012-04-23T18:25:43.511Z" AND update_time < "2012-04-23T18:30:43.511Z"`` @@ -256,22 +253,21 @@ class PurgeIdentityMappingsRequest(proto.Message): ``external_id = "id1"`` - * Deleting all identity mappings inside an - identity mapping store: + * Deleting all identity mappings inside an identity + mapping store: ``*`` - The filtering fields are assumed to have an - implicit AND. Should not be used with source. An - error will be thrown, if both are provided. + The filtering fields are assumed to have an implicit + AND. Should not be used with source. An error will be + thrown, if both are provided. force (bool): - Actually performs the purge. If ``force`` is set - to false, return the expected purge count - without deleting any identity mappings. This - field is only supported for purge with filter. - For input source this field is ignored and data - will be purged regardless of the value of this - field. + Actually performs the purge. If ``force`` is set to + false, return the expected purge count without deleting + any identity mappings. This field is only supported for + purge with filter. For input source this field is + ignored and data will be purged regardless of the value + of this field. This field is a member of `oneof`_ ``_force``. """ @@ -281,8 +277,7 @@ class InlineSource(proto.Message): Attributes: identity_mapping_entries (MutableSequence[google.cloud.discoveryengine_v1.types.IdentityMappingEntry]): - A maximum of 10000 entries can be purged at - one time + A maximum of 10000 entries can be purged at one time """ identity_mapping_entries: MutableSequence[ @@ -321,23 +316,22 @@ class ListIdentityMappingsRequest(proto.Message): Attributes: identity_mapping_store (str): - Required. The name of the Identity Mapping Store - to list Identity Mapping Entries in. Format: + Required. The name of the Identity Mapping Store to list + Identity Mapping Entries in. Format: ``projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`` page_size (int): - Maximum number of IdentityMappings to return. - If unspecified, defaults to 2000. The maximum - allowed value is 10000. Values above 10000 will - be coerced to 10000. + Maximum number of IdentityMappings to return. If + unspecified, defaults to 2000. The maximum allowed value + is 10000. Values above 10000 will be coerced to 10000. page_token (str): A page token, received from a previous - ``ListIdentityMappings`` call. Provide this to - retrieve the subsequent page. + ``ListIdentityMappings`` call. Provide this to retrieve + the subsequent page. - When paginating, all other parameters provided - to ``ListIdentityMappings`` must match the call - that provided the page token. + When paginating, all other parameters provided to + ``ListIdentityMappings`` must match the call that + provided the page token. """ identity_mapping_store: str = proto.Field( @@ -363,9 +357,9 @@ class ListIdentityMappingsResponse(proto.Message): identity_mapping_entries (MutableSequence[google.cloud.discoveryengine_v1.types.IdentityMappingEntry]): The Identity Mapping Entries. next_page_token (str): - A token that can be sent as ``page_token`` to - retrieve the next page. If this field is - omitted, there are no subsequent pages. + A token that can be sent as ``page_token`` to retrieve + the next page. If this field is omitted, there are no + subsequent pages. """ @property @@ -392,23 +386,22 @@ class ListIdentityMappingStoresRequest(proto.Message): Attributes: parent (str): - Required. The parent of the Identity Mapping - Stores to list. Format: + Required. The parent of the Identity Mapping Stores to + list. Format: ``projects/{project}/locations/{location}``. page_size (int): - Maximum number of IdentityMappingStores to - return. If unspecified, defaults to 100. The - maximum allowed value is 1000. Values above 1000 - will be coerced to 1000. + Maximum number of IdentityMappingStores to return. If + unspecified, defaults to 100. The maximum allowed value + is 1000. Values above 1000 will be coerced to 1000. page_token (str): A page token, received from a previous - ``ListIdentityMappingStores`` call. Provide this - to retrieve the subsequent page. + ``ListIdentityMappingStores`` call. Provide this to + retrieve the subsequent page. - When paginating, all other parameters provided - to ``ListIdentityMappingStores`` must match the - call that provided the page token. + When paginating, all other parameters provided to + ``ListIdentityMappingStores`` must match the call that + provided the page token. """ parent: str = proto.Field( @@ -434,9 +427,9 @@ class ListIdentityMappingStoresResponse(proto.Message): identity_mapping_stores (MutableSequence[google.cloud.discoveryengine_v1.types.IdentityMappingStore]): The Identity Mapping Stores. next_page_token (str): - A token that can be sent as ``page_token`` to - retrieve the next page. If this field is - omitted, there are no subsequent pages. + A token that can be sent as ``page_token`` to retrieve + the next page. If this field is omitted, there are no + subsequent pages. """ @property @@ -466,14 +459,14 @@ class IdentityMappingEntryOperationMetadata(proto.Message): Attributes: success_count (int): - The number of IdentityMappingEntries that - were successfully processed. + The number of IdentityMappingEntries that were + successfully processed. failure_count (int): - The number of IdentityMappingEntries that - failed to be processed. + The number of IdentityMappingEntries that failed to + be processed. total_count (int): - The total number of IdentityMappingEntries - that were processed. + The total number of IdentityMappingEntries that were + processed. """ success_count: int = proto.Field( @@ -501,8 +494,8 @@ class DeleteIdentityMappingStoreMetadata(proto.Message): create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/import_config.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/import_config.py index 26b3f0350d9e..18b208b6c9a2 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/import_config.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/import_config.py @@ -59,55 +59,51 @@ class GcsSource(proto.Message): Attributes: input_uris (MutableSequence[str]): - Required. Cloud Storage URIs to input files. - Each URI can be up to 2000 characters long. URIs - can match the full object path (for example, - ``gs://bucket/directory/object.json``) or a - pattern matching one or more files, such as + Required. Cloud Storage URIs to input files. Each URI + can be up to 2000 characters long. URIs can match the + full object path (for example, + ``gs://bucket/directory/object.json``) or a pattern + matching one or more files, such as ``gs://bucket/directory/*.json``. - A request can contain at most 100 files (or - 100,000 files if ``data_schema`` is - ``content``). Each file can be up to 2 GB (or - 100 MB if ``data_schema`` is ``content``). + A request can contain at most 100 files (or 100,000 + files if ``data_schema`` is ``content``). Each file can + be up to 2 GB (or 100 MB if ``data_schema`` is + ``content``). data_schema (str): - The schema to use when parsing the data from the - source. + The schema to use when parsing the data from the source. + Supported values for document imports: * ``document`` (default): One JSON - `Document - `__ + `Document `__ per line. Each document must have a valid `Document.id `__. - * ``content``: Unstructured data (e.g. PDF, - HTML). Each file matched by ``input_uris`` - becomes a document, with the ID set to the first - 128 bits of SHA256(URI) encoded as a hex - string. - - * ``custom``: One custom data JSON per row in - arbitrary format that conforms to the defined - `Schema - `__ of - the data store. This can only be used by the - GENERIC Data Store vertical. - - * ``csv``: A CSV file with header conforming to - the defined `Schema - `__ of - the data store. Each entry after the header is - imported as a Document. This can only be used - by the GENERIC Data Store vertical. + * ``content``: Unstructured data (e.g. PDF, HTML). Each + file matched by ``input_uris`` becomes a document, + with the ID set to the first 128 bits of SHA256(URI) + encoded as a hex string. + + * ``custom``: One custom data JSON per row in arbitrary + format that conforms to the defined `Schema + `__ of the + data store. This can only be used by the GENERIC Data + Store vertical. + + * ``csv``: A CSV file with header conforming to the + defined `Schema + `__ of the + data store. Each entry after the header is imported as a + Document. This can only be used by the GENERIC Data + Store vertical. Supported values for user event imports: * ``user_event`` (default): One JSON `UserEvent - `__ - per line. + `__ per line. """ input_uris: MutableSequence[str] = proto.RepeatedField( @@ -127,59 +123,53 @@ class BigQuerySource(proto.Message): Attributes: partition_date (google.type.date_pb2.Date): - BigQuery time partitioned table's _PARTITIONDATE - in YYYY-MM-DD format. + BigQuery time partitioned table's _PARTITIONDATE in + YYYY-MM-DD format. This field is a member of `oneof`_ ``partition``. project_id (str): - The project ID or the project number that - contains the BigQuery source. Has a length limit - of 128 characters. If not specified, inherits - the project ID from the parent request. + The project ID or the project number that contains + the BigQuery source. Has a length limit of 128 + characters. If not specified, inherits the project ID + from the parent request. dataset_id (str): - Required. The BigQuery data set to copy the - data from with a length limit of 1,024 - characters. + Required. The BigQuery data set to copy the data from + with a length limit of 1,024 characters. table_id (str): - Required. The BigQuery table to copy the data - from with a length limit of 1,024 characters. + Required. The BigQuery table to copy the data from + with a length limit of 1,024 characters. gcs_staging_dir (str): - Intermediate Cloud Storage directory used for - the import with a length limit of 2,000 - characters. Can be specified if one wants to - have the BigQuery export to a specific Cloud - Storage directory. + Intermediate Cloud Storage directory used for the + import with a length limit of 2,000 characters. Can be + specified if one wants to have the BigQuery export to a + specific Cloud Storage directory. data_schema (str): - The schema to use when parsing the data from the - source. + The schema to use when parsing the data from the source. + Supported values for user event imports: * ``user_event`` (default): One `UserEvent - `__ - per row. + `__ per row. Supported values for document imports: * ``document`` (default): One - `Document - `__ - format per row. Each document must have a - valid + `Document `__ + format per row. Each document must have a valid `Document.id - `__ - and one of `Document.json_data + `__ and one + of `Document.json_data `__ or `Document.struct_data `__. - * ``custom``: One custom data per row in - arbitrary format that conforms to the defined - `Schema - `__ of - the data store. This can only be used by the - GENERIC Data Store vertical. + * ``custom``: One custom data per row in arbitrary + format that conforms to the defined `Schema + `__ of the data + store. This can only be used by the GENERIC Data Store + vertical. """ partition_date: date_pb2.Date = proto.Field( @@ -215,23 +205,22 @@ class SpannerSource(proto.Message): Attributes: project_id (str): - The project ID that contains the Spanner - source. Has a length limit of 128 characters. If - not specified, inherits the project ID from the - parent request. + The project ID that contains the Spanner source. Has + a length limit of 128 characters. If not specified, + inherits the project ID from the parent request. instance_id (str): - Required. The instance ID of the source - Spanner table. + Required. The instance ID of the source Spanner + table. database_id (str): - Required. The database ID of the source - Spanner table. + Required. The database ID of the source Spanner + table. table_id (str): - Required. The table name of the Spanner - database that needs to be imported. + Required. The table name of the Spanner database that + needs to be imported. enable_data_boost (bool): - Whether to apply data boost on Spanner export. - Enabling this option will incur additional cost. - More info can be found `here + Whether to apply data boost on Spanner export. Enabling + this option will incur additional cost. More info can be + found `here `__. """ @@ -258,19 +247,19 @@ class SpannerSource(proto.Message): class BigtableOptions(proto.Message): - r"""The Bigtable Options object that contains information to - support the import. + r"""The Bigtable Options object that contains information to support + the import. Attributes: key_field_name (str): - The field name used for saving row key value in - the document. The name has to match the pattern - ```a-zA-Z0-9 `__*``. + The field name used for saving row key value in the + document. The name has to match the pattern ```a-zA-Z0-9 + `__*``. families (MutableMapping[str, google.cloud.discoveryengine_v1.types.BigtableOptions.BigtableColumnFamily]): - The mapping from family names to an object - that contains column families level information - for the given column family. If a family is not - present in this map it will be ignored. + The mapping from family names to an object that + contains column families level information for the given + column family. If a family is not present in this map it + will be ignored. """ class Type(proto.Enum): @@ -328,32 +317,30 @@ class BigtableColumnFamily(proto.Message): Attributes: field_name (str): - The field name to use for this column family in - the document. The name has to match the pattern - ```a-zA-Z0-9 `__*``. If not set, it - is parsed from the family name with best effort. - However, due to different naming patterns, field - name collisions could happen, where parsing - behavior is undefined. + The field name to use for this column family in the + document. The name has to match the pattern ```a-zA-Z0-9 + `__*``. If not set, it is parsed from the + family name with best effort. However, due to different + naming patterns, field name collisions could happen, + where parsing behavior is undefined. encoding (google.cloud.discoveryengine_v1.types.BigtableOptions.Encoding): - The encoding mode of the values when the type is - not STRING. Acceptable encoding values are: - - * ``TEXT``: indicates values are alphanumeric - text strings. * ``BINARY``: indicates values are - encoded using ``HBase Bytes.toBytes`` family of - functions. This can be overridden for a specific - column by listing that column in ``columns`` and - specifying an encoding for it. + The encoding mode of the values when the type is not + STRING. Acceptable encoding values are: + + * ``TEXT``: indicates values are alphanumeric text + strings. * ``BINARY``: indicates values are encoded + using ``HBase Bytes.toBytes`` family of functions. This + can be overridden for a specific column by listing that + column in ``columns`` and specifying an encoding for it. type_ (google.cloud.discoveryengine_v1.types.BigtableOptions.Type): The type of values in this column family. - The values are expected to be encoded using - ``HBase Bytes.toBytes`` function when the - encoding value is set to ``BINARY``. + The values are expected to be encoded using ``HBase + Bytes.toBytes`` function when the encoding value is set + to ``BINARY``. columns (MutableSequence[google.cloud.discoveryengine_v1.types.BigtableOptions.BigtableColumn]): - The list of objects that contains column - level information for each column. If a column - is not present in this list it will be ignored. + The list of objects that contains column level + information for each column. If a column is not present + in this list it will be ignored. """ field_name: str = proto.Field( @@ -383,32 +370,30 @@ class BigtableColumn(proto.Message): Attributes: qualifier (bytes): - Required. Qualifier of the column. If it - cannot be decoded with utf-8, use a base-64 - encoded string instead. + Required. Qualifier of the column. If it cannot be + decoded with utf-8, use a base-64 encoded string + instead. field_name (str): - The field name to use for this column in the - document. The name has to match the pattern - ```a-zA-Z0-9 `__*``. If not set, it - is parsed from the qualifier bytes with best - effort. However, due to different naming - patterns, field name collisions could happen, - where parsing behavior is undefined. + The field name to use for this column in the document. + The name has to match the pattern ```a-zA-Z0-9 + `__*``. If not set, it is parsed from the + qualifier bytes with best effort. However, due to + different naming patterns, field name collisions could + happen, where parsing behavior is undefined. encoding (google.cloud.discoveryengine_v1.types.BigtableOptions.Encoding): - The encoding mode of the values when the type is - not ``STRING``. Acceptable encoding values are: - - * ``TEXT``: indicates values are alphanumeric - text strings. * ``BINARY``: indicates values are - encoded using ``HBase Bytes.toBytes`` family of - functions. This can be overridden for a specific - column by listing that column in ``columns`` and - specifying an encoding for it. + The encoding mode of the values when the type is not + ``STRING``. Acceptable encoding values are: + + * ``TEXT``: indicates values are alphanumeric text + strings. * ``BINARY``: indicates values are encoded + using ``HBase Bytes.toBytes`` family of functions. This + can be overridden for a specific column by listing that + column in ``columns`` and specifying an encoding for it. type_ (google.cloud.discoveryengine_v1.types.BigtableOptions.Type): The type of values in this column family. - The values are expected to be encoded using - ``HBase Bytes.toBytes`` function when the - encoding value is set to ``BINARY``. + The values are expected to be encoded using ``HBase + Bytes.toBytes`` function when the encoding value is set + to ``BINARY``. """ qualifier: bytes = proto.Field( @@ -447,21 +432,19 @@ class BigtableSource(proto.Message): Attributes: project_id (str): - The project ID that contains the Bigtable - source. Has a length limit of 128 characters. If - not specified, inherits the project ID from the - parent request. + The project ID that contains the Bigtable source. Has + a length limit of 128 characters. If not specified, + inherits the project ID from the parent request. instance_id (str): - Required. The instance ID of the Cloud - Bigtable that needs to be imported. + Required. The instance ID of the Cloud Bigtable that + needs to be imported. table_id (str): - Required. The table ID of the Cloud Bigtable - that needs to be imported. + Required. The table ID of the Cloud Bigtable that + needs to be imported. bigtable_options (google.cloud.discoveryengine_v1.types.BigtableOptions): - Required. Bigtable options that contains - information needed when parsing data into typed - structures. For example, column type - annotations. + Required. Bigtable options that contains information + needed when parsing data into typed structures. For + example, column type annotations. """ project_id: str = proto.Field( @@ -488,35 +471,32 @@ class FhirStoreSource(proto.Message): Attributes: fhir_store (str): - Required. The full resource name of the FHIR - store to import data from, in the format of + Required. The full resource name of the FHIR store to + import data from, in the format of ``projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}``. gcs_staging_dir (str): - Intermediate Cloud Storage directory used for - the import with a length limit of 2,000 - characters. Can be specified if one wants to - have the FhirStore export to a specific Cloud - Storage directory. + Intermediate Cloud Storage directory used for the + import with a length limit of 2,000 characters. Can be + specified if one wants to have the FhirStore export to a + specific Cloud Storage directory. resource_types (MutableSequence[str]): - The FHIR resource types to import. The resource - types should be a subset of all `supported FHIR - resource types + The FHIR resource types to import. The resource types + should be a subset of all `supported FHIR resource + types `__. - Default to all supported FHIR resource types if - empty. + Default to all supported FHIR resource types if empty. update_from_latest_predefined_schema (bool): - Optional. Whether to update the DataStore schema - to the latest predefined schema. - - If true, the DataStore schema will be updated to - include any FHIR fields or resource types that - have been added since the last import and - corresponding FHIR resources will be imported - from the FHIR store. - - Note this field cannot be used in conjunction - with ``resource_types``. It should be used after - initial import. + Optional. Whether to update the DataStore schema to the + latest predefined schema. + + If true, the DataStore schema will be updated to include + any FHIR fields or resource types that have been added + since the last import and corresponding FHIR resources + will be imported from the FHIR store. + + Note this field cannot be used in conjunction with + ``resource_types``. It should be used after initial + import. """ fhir_store: str = proto.Field( @@ -542,33 +522,31 @@ class CloudSqlSource(proto.Message): Attributes: project_id (str): - The project ID that contains the Cloud SQL - source. Has a length limit of 128 characters. If - not specified, inherits the project ID from the - parent request. + The project ID that contains the Cloud SQL source. + Has a length limit of 128 characters. If not specified, + inherits the project ID from the parent request. instance_id (str): - Required. The Cloud SQL instance to copy the - data from with a length limit of 256 characters. + Required. The Cloud SQL instance to copy the data + from with a length limit of 256 characters. database_id (str): - Required. The Cloud SQL database to copy the - data from with a length limit of 256 characters. + Required. The Cloud SQL database to copy the data + from with a length limit of 256 characters. table_id (str): - Required. The Cloud SQL table to copy the - data from with a length limit of 256 characters. + Required. The Cloud SQL table to copy the data from + with a length limit of 256 characters. gcs_staging_dir (str): - Intermediate Cloud Storage directory used for - the import with a length limit of 2,000 - characters. Can be specified if one wants to - have the Cloud SQL export to a specific Cloud - Storage directory. - - Ensure that the Cloud SQL service account has - the necessary Cloud Storage Admin permissions to - access the specified Cloud Storage directory. + Intermediate Cloud Storage directory used for the + import with a length limit of 2,000 characters. Can be + specified if one wants to have the Cloud SQL export to a + specific Cloud Storage directory. + + Ensure that the Cloud SQL service account has the + necessary Cloud Storage Admin permissions to access the + specified Cloud Storage directory. offload (bool): - Option for serverless export. Enabling this - option will incur additional cost. More info can - be found `here + Option for serverless export. Enabling this option will + incur additional cost. More info can be found + `here `__. """ @@ -603,32 +581,30 @@ class AlloyDbSource(proto.Message): Attributes: project_id (str): - The project ID that contains the AlloyDB - source. Has a length limit of 128 characters. If - not specified, inherits the project ID from the - parent request. + The project ID that contains the AlloyDB source. + Has a length limit of 128 characters. If not specified, + inherits the project ID from the parent request. location_id (str): - Required. The AlloyDB location to copy the - data from with a length limit of 256 characters. + Required. The AlloyDB location to copy the data from + with a length limit of 256 characters. cluster_id (str): - Required. The AlloyDB cluster to copy the - data from with a length limit of 256 characters. + Required. The AlloyDB cluster to copy the data from + with a length limit of 256 characters. database_id (str): - Required. The AlloyDB database to copy the - data from with a length limit of 256 characters. + Required. The AlloyDB database to copy the data from + with a length limit of 256 characters. table_id (str): - Required. The AlloyDB table to copy the data - from with a length limit of 256 characters. + Required. The AlloyDB table to copy the data from + with a length limit of 256 characters. gcs_staging_dir (str): - Intermediate Cloud Storage directory used for - the import with a length limit of 2,000 - characters. Can be specified if one wants to - have the AlloyDB export to a specific Cloud - Storage directory. + Intermediate Cloud Storage directory used for the + import with a length limit of 2,000 characters. Can be + specified if one wants to have the AlloyDB export to a + specific Cloud Storage directory. Ensure that the AlloyDB service account has the - necessary Cloud Storage Admin permissions to - access the specified Cloud Storage directory. + necessary Cloud Storage Admin permissions to access the + specified Cloud Storage directory. """ project_id: str = proto.Field( @@ -662,27 +638,25 @@ class FirestoreSource(proto.Message): Attributes: project_id (str): - The project ID that the Cloud SQL source is - in with a length limit of 128 characters. If not - specified, inherits the project ID from the - parent request. + The project ID that the Cloud SQL source is in with a + length limit of 128 characters. If not specified, + inherits the project ID from the parent request. database_id (str): - Required. The Firestore database to copy the - data from with a length limit of 256 characters. + Required. The Firestore database to copy the data + from with a length limit of 256 characters. collection_id (str): - Required. The Firestore collection (or - entity) to copy the data from with a length - limit of 1,500 characters. + Required. The Firestore collection (or entity) to + copy the data from with a length limit of 1,500 + characters. gcs_staging_dir (str): - Intermediate Cloud Storage directory used for - the import with a length limit of 2,000 - characters. Can be specified if one wants to - have the Firestore export to a specific Cloud - Storage directory. - - Ensure that the Firestore service account has - the necessary Cloud Storage Admin permissions to - access the specified Cloud Storage directory. + Intermediate Cloud Storage directory used for the + import with a length limit of 2,000 characters. Can be + specified if one wants to have the Firestore export to a + specific Cloud Storage directory. + + Ensure that the Firestore service account has the + necessary Cloud Storage Admin permissions to access the + specified Cloud Storage directory. """ project_id: str = proto.Field( @@ -710,11 +684,10 @@ class ImportErrorConfig(proto.Message): Attributes: gcs_prefix (str): - Cloud Storage prefix for import errors. This - must be an empty, existing Cloud Storage - directory. Import errors are written to sharded - files in this directory, one per line, as a - JSON-encoded ``google.rpc.Status`` message. + Cloud Storage prefix for import errors. This must be an + empty, existing Cloud Storage directory. Import errors + are written to sharded files in this directory, one per + line, as a JSON-encoded ``google.rpc.Status`` message. This field is a member of `oneof`_ ``destination``. """ @@ -751,18 +724,15 @@ class ImportUserEventsRequest(proto.Message): This field is a member of `oneof`_ ``source``. parent (str): - Required. Parent DataStore resource name, of the - form + Required. Parent DataStore resource name, of the form ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`` error_config (google.cloud.discoveryengine_v1.types.ImportErrorConfig): - The desired location of errors incurred - during the Import. Cannot be set for inline user - event imports. + The desired location of errors incurred during the + Import. Cannot be set for inline user event imports. """ class InlineSource(proto.Message): - r"""The inline source for the input config for ImportUserEvents - method. + r"""The inline source for the input config for ImportUserEvents method. Attributes: user_events (MutableSequence[google.cloud.discoveryengine_v1.types.UserEvent]): @@ -808,23 +778,22 @@ class InlineSource(proto.Message): class ImportUserEventsResponse(proto.Message): r"""Response of the ImportUserEventsRequest. If the long running operation was successful, then this message is returned by the - google.longrunning.Operations.response field if the operation - was successful. + google.longrunning.Operations.response field if the operation was + successful. Attributes: error_samples (MutableSequence[google.rpc.status_pb2.Status]): - A sample of errors encountered while - processing the request. + A sample of errors encountered while processing the + request. error_config (google.cloud.discoveryengine_v1.types.ImportErrorConfig): - Echoes the destination for the complete - errors if this field was set in the request. + Echoes the destination for the complete errors if + this field was set in the request. joined_events_count (int): - Count of user events imported with complete - existing Documents. + Count of user events imported with complete existing + Documents. unjoined_events_count (int): - Count of user events imported, but with - Document information not found in the existing - Branch. + Count of user events imported, but with Document + information not found in the existing Branch. """ error_samples: MutableSequence[status_pb2.Status] = proto.RepeatedField( @@ -848,22 +817,20 @@ class ImportUserEventsResponse(proto.Message): class ImportUserEventsMetadata(proto.Message): - r"""Metadata related to the progress of the Import operation. - This is returned by the google.longrunning.Operation.metadata - field. + r"""Metadata related to the progress of the Import operation. This is + returned by the google.longrunning.Operation.metadata field. Attributes: create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. success_count (int): - Count of entries that were processed - successfully. + Count of entries that were processed successfully. failure_count (int): - Count of entries that encountered errors - while processing. + Count of entries that encountered errors while + processing. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -887,22 +854,20 @@ class ImportUserEventsMetadata(proto.Message): class ImportDocumentsMetadata(proto.Message): - r"""Metadata related to the progress of the ImportDocuments - operation. This is returned by the - google.longrunning.Operation.metadata field. + r"""Metadata related to the progress of the ImportDocuments operation. + This is returned by the google.longrunning.Operation.metadata field. Attributes: create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. success_count (int): - Count of entries that were processed - successfully. + Count of entries that were processed successfully. failure_count (int): - Count of entries that encountered errors - while processing. + Count of entries that encountered errors while + processing. total_count (int): Total count of entries that were processed. """ @@ -980,42 +945,38 @@ class ImportDocumentsRequest(proto.Message): This field is a member of `oneof`_ ``source``. parent (str): - Required. The parent branch resource name, such - as + Required. The parent branch resource name, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}``. Requires create/update permission. error_config (google.cloud.discoveryengine_v1.types.ImportErrorConfig): - The desired location of errors incurred - during the Import. + The desired location of errors incurred during the + Import. reconciliation_mode (google.cloud.discoveryengine_v1.types.ImportDocumentsRequest.ReconciliationMode): - The mode of reconciliation between existing - documents and the documents to be imported. - Defaults to `ReconciliationMode.INCREMENTAL + The mode of reconciliation between existing documents + and the documents to be imported. Defaults to + `ReconciliationMode.INCREMENTAL `__. update_mask (google.protobuf.field_mask_pb2.FieldMask): - Indicates which fields in the provided - imported documents to update. If not set, the - default is to update all fields. + Indicates which fields in the provided imported + documents to update. If not set, the default is to + update all fields. auto_generate_ids (bool): - Whether to automatically generate IDs for the - documents if absent. + Whether to automatically generate IDs for the documents + if absent. If set to ``true``, `Document.id - `__s - are automatically generated based on the hash of - the payload, where IDs may not be consistent - during multiple imports. In which case - `ReconciliationMode.FULL + `__s are + automatically generated based on the hash of the + payload, where IDs may not be consistent during multiple + imports. In which case `ReconciliationMode.FULL `__ - is highly recommended to avoid duplicate - contents. If unset or set to ``false``, - `Document.id - `__s - have to be specified using + is highly recommended to avoid duplicate contents. If + unset or set to ``false``, `Document.id + `__s have + to be specified using `id_field `__, - otherwise, documents without IDs fail to be - imported. + otherwise, documents without IDs fail to be imported. Supported data sources: @@ -1034,34 +995,33 @@ class ImportDocumentsRequest(proto.Message): INVALID_ARGUMENT error is thrown. * `SpannerSource - `__. - * `CloudSqlSource + `__. * + `CloudSqlSource `__. * `FirestoreSource - `__. - * `BigtableSource + `__. * + `BigtableSource `__. id_field (str): - The field indicates the ID field or column to be - used as unique IDs of the documents. + The field indicates the ID field or column to be used as + unique IDs of the documents. For `GcsSource - `__ - it is the key of the JSON field. For instance, - ``my_id`` for JSON ``{"my_id": "some_uuid"}``. - For others, it may be the column name of the - table where the unique ids are stored. - - The values of the JSON field or the table column - are used as the `Document.id - `__s. - The JSON field or the table column must be of - string type, and the values must be set as valid - strings conform to `RFC-1034 - `__ with - 1-63 characters. Otherwise, documents without - valid IDs fail to be imported. + `__ it is the + key of the JSON field. For instance, ``my_id`` for JSON + ``{"my_id": "some_uuid"}``. For others, it may be the + column name of the table where the unique ids are + stored. + + The values of the JSON field or the table column are + used as the `Document.id + `__s. The + JSON field or the table column must be of string type, + and the values must be set as valid strings conform to + `RFC-1034 `__ with + 1-63 characters. Otherwise, documents without valid IDs + fail to be imported. Only set this field when `auto_generate_ids @@ -1069,8 +1029,8 @@ class ImportDocumentsRequest(proto.Message): is unset or set as ``false``. Otherwise, an INVALID_ARGUMENT error is thrown. - If it is unset, a default value ``_id`` is used - when importing from the allowed data sources. + If it is unset, a default value ``_id`` is used when + importing from the allowed data sources. Supported data sources: @@ -1089,26 +1049,26 @@ class ImportDocumentsRequest(proto.Message): INVALID_ARGUMENT error is thrown. * `SpannerSource - `__. - * `CloudSqlSource + `__. * + `CloudSqlSource `__. * `FirestoreSource - `__. - * `BigtableSource + `__. * + `BigtableSource `__. force_refresh_content (bool): - Optional. Whether to force refresh the - unstructured content of the documents. + Optional. Whether to force refresh the unstructured + content of the documents. - If set to ``true``, the content part of the - documents will be refreshed regardless of the - update status of the referencing content. + If set to ``true``, the content part of the documents + will be refreshed regardless of the update status of the + referencing content. """ class ReconciliationMode(proto.Enum): - r"""Indicates how imported documents are reconciled with the - existing documents created or imported before. + r"""Indicates how imported documents are reconciled with the existing + documents created or imported before. Values: RECONCILIATION_MODE_UNSPECIFIED (0): @@ -1127,13 +1087,12 @@ class ReconciliationMode(proto.Enum): FULL = 2 class InlineSource(proto.Message): - r"""The inline source for the input config for ImportDocuments - method. + r"""The inline source for the input config for ImportDocuments method. Attributes: documents (MutableSequence[google.cloud.discoveryengine_v1.types.Document]): - Required. A list of documents to update/create. - Each document must have a valid `Document.id + Required. A list of documents to update/create. Each + document must have a valid `Document.id `__. Recommended max of 100 items. """ @@ -1234,18 +1193,18 @@ class InlineSource(proto.Message): class ImportDocumentsResponse(proto.Message): r"""Response of the `ImportDocumentsRequest - `__. If - the long running operation is done, then this message is - returned by the google.longrunning.Operations.response field if - the operation was successful. + `__. If the long + running operation is done, then this message is returned by the + google.longrunning.Operations.response field if the operation was + successful. Attributes: error_samples (MutableSequence[google.rpc.status_pb2.Status]): - A sample of errors encountered while - processing the request. + A sample of errors encountered while processing the + request. error_config (google.cloud.discoveryengine_v1.types.ImportErrorConfig): - Echoes the destination for the complete - errors in the request if set. + Echoes the destination for the complete errors in the + request if set. """ error_samples: MutableSequence[status_pb2.Status] = proto.RepeatedField( @@ -1282,19 +1241,17 @@ class ImportSuggestionDenyListEntriesRequest(proto.Message): gcs_source (google.cloud.discoveryengine_v1.types.GcsSource): Cloud Storage location for the input content. - Only 1 file can be specified that contains all - entries to import. Supported values - ``gcs_source.schema`` for autocomplete - suggestion deny list entry imports: + Only 1 file can be specified that contains all entries + to import. Supported values ``gcs_source.schema`` for + autocomplete suggestion deny list entry imports: * ``suggestion_deny_list`` (default): One JSON [SuggestionDenyListEntry] per line. This field is a member of `oneof`_ ``source``. parent (str): - Required. The parent data store resource name - for which to import denylist entries. Follows - pattern + Required. The parent data store resource name for which + to import denylist entries. Follows pattern projects/*/locations/*/collections/*/dataStores/*. """ @@ -1303,8 +1260,8 @@ class InlineSource(proto.Message): Attributes: entries (MutableSequence[google.cloud.discoveryengine_v1.types.SuggestionDenyListEntry]): - Required. A list of all denylist entries to - import. Max of 1000 items. + Required. A list of all denylist entries to import. + Max of 1000 items. """ entries: MutableSequence[ @@ -1341,11 +1298,10 @@ class ImportSuggestionDenyListEntriesResponse(proto.Message): Attributes: error_samples (MutableSequence[google.rpc.status_pb2.Status]): - A sample of errors encountered while - processing the request. + A sample of errors encountered while processing the + request. imported_entries_count (int): - Count of deny list entries successfully - imported. + Count of deny list entries successfully imported. failed_entries_count (int): Count of deny list entries that failed to be imported. @@ -1368,15 +1324,15 @@ class ImportSuggestionDenyListEntriesResponse(proto.Message): class ImportSuggestionDenyListEntriesMetadata(proto.Message): r"""Metadata related to the progress of the - ImportSuggestionDenyListEntries operation. This is returned by - the google.longrunning.Operation.metadata field. + ImportSuggestionDenyListEntries operation. This is returned by the + google.longrunning.Operation.metadata field. Attributes: create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -1418,15 +1374,14 @@ class ImportCompletionSuggestionsRequest(proto.Message): This field is a member of `oneof`_ ``source``. parent (str): - Required. The parent data store resource name - for which to import customer autocomplete - suggestions. + Required. The parent data store resource name for which + to import customer autocomplete suggestions. Follows pattern ``projects/*/locations/*/collections/*/dataStores/*`` error_config (google.cloud.discoveryengine_v1.types.ImportErrorConfig): - The desired location of errors incurred - during the Import. + The desired location of errors incurred during the + Import. """ class InlineSource(proto.Message): @@ -1434,8 +1389,8 @@ class InlineSource(proto.Message): Attributes: suggestions (MutableSequence[google.cloud.discoveryengine_v1.types.CompletionSuggestion]): - Required. A list of all denylist entries to - import. Max of 1000 items. + Required. A list of all denylist entries to import. + Max of 1000 items. """ suggestions: MutableSequence[ @@ -1479,17 +1434,17 @@ class ImportCompletionSuggestionsResponse(proto.Message): r"""Response of the `CompletionService.ImportCompletionSuggestions `__ - method. If the long running operation is done, this message is - returned by the google.longrunning.Operations.response field if - the operation is successful. + method. If the long running operation is done, this message is returned + by the google.longrunning.Operations.response field if the operation is + successful. Attributes: error_samples (MutableSequence[google.rpc.status_pb2.Status]): - A sample of errors encountered while - processing the request. + A sample of errors encountered while processing the + request. error_config (google.cloud.discoveryengine_v1.types.ImportErrorConfig): - The desired location of errors incurred - during the Import. + The desired location of errors incurred during the + Import. """ error_samples: MutableSequence[status_pb2.Status] = proto.RepeatedField( @@ -1505,16 +1460,16 @@ class ImportCompletionSuggestionsResponse(proto.Message): class ImportCompletionSuggestionsMetadata(proto.Message): - r"""Metadata related to the progress of the - ImportCompletionSuggestions operation. This will be returned by - the google.longrunning.Operation.metadata field. + r"""Metadata related to the progress of the ImportCompletionSuggestions + operation. This will be returned by the + google.longrunning.Operation.metadata field. Attributes: create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. success_count (int): Count of `CompletionSuggestion diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/project.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/project.py index 2784661130f5..87bcc457fb52 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/project.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/project.py @@ -34,22 +34,21 @@ class Project(proto.Message): Attributes: name (str): - Output only. Full resource name of the project, - for example ``projects/{project}``. - Note that when making requests, project number - and project id are both acceptable, but the - server will always respond in project number. + Output only. Full resource name of the project, for + example ``projects/{project}``. + Note that when making requests, project number and + project id are both acceptable, but the server will + always respond in project number. create_time (google.protobuf.timestamp_pb2.Timestamp): - Output only. The timestamp when this project - is created. + Output only. The timestamp when this project is + created. provision_completion_time (google.protobuf.timestamp_pb2.Timestamp): - Output only. The timestamp when this project - is successfully provisioned. Empty value means - this project is still provisioning and is not - ready for use. + Output only. The timestamp when this project is + successfully provisioned. Empty value means this project + is still provisioning and is not ready for use. service_terms_map (MutableMapping[str, google.cloud.discoveryengine_v1.types.Project.ServiceTerms]): - Output only. A map of terms of services. The key - is the ``id`` of `ServiceTerms + Output only. A map of terms of services. The key is the + ``id`` of `ServiceTerms `__. """ @@ -62,8 +61,7 @@ class ServiceTerms(proto.Message): Available terms: * ``GA_DATA_USE_TERMS``: `Terms for data - use - `__. + use `__. When using this as ``id``, the acceptable `version `__ @@ -75,14 +73,14 @@ class ServiceTerms(proto.Message): `__ above. state (google.cloud.discoveryengine_v1.types.Project.ServiceTerms.State): - Whether the project has accepted/rejected the - service terms or it is still pending. + Whether the project has accepted/rejected the service + terms or it is still pending. accept_time (google.protobuf.timestamp_pb2.Timestamp): - The last time when the project agreed to the - terms of service. + The last time when the project agreed to the terms of + service. decline_time (google.protobuf.timestamp_pb2.Timestamp): - The last time when the project declined or - revoked the agreement to terms of service. + The last time when the project declined or revoked + the agreement to terms of service. """ class State(proto.Enum): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/project_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/project_service.py index 57ec8f64d2b0..ff31364eaaa8 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/project_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/project_service.py @@ -37,23 +37,20 @@ class ProvisionProjectRequest(proto.Message): Attributes: name (str): Required. Full resource name of a - `Project - `__, + `Project `__, such as ``projects/{project_id_or_number}``. accept_data_use_terms (bool): - Required. Set to ``true`` to specify that caller - has read and would like to give consent to the - `Terms for data use + Required. Set to ``true`` to specify that caller has + read and would like to give consent to the `Terms for + data use `__. data_use_terms_version (str): Required. The version of the `Terms for data - use - `__ - that caller has read and would like to give - consent to. + use `__ + that caller has read and would like to give consent to. - Acceptable version is ``2022-11-23``, and this - may change over time. + Acceptable version is ``2022-11-23``, and this may + change over time. """ name: str = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/purge_config.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/purge_config.py index e3d4d00cbc30..d73852d3b9c4 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/purge_config.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/purge_config.py @@ -48,14 +48,13 @@ class PurgeUserEventsRequest(proto.Message): Attributes: parent (str): - Required. The resource name of the catalog under - which the events are created. The format is + Required. The resource name of the catalog under which + the events are created. The format is ``projects/{project}/locations/global/collections/{collection}/dataStores/{dataStore}``. filter (str): - Required. The filter string to specify the - events to be deleted with a length limit of - 5,000 characters. The eligible fields for - filtering are: + Required. The filter string to specify the events to be + deleted with a length limit of 5,000 characters. The + eligible fields for filtering are: * ``eventType``: Double quoted `UserEvent.event_type @@ -63,16 +62,14 @@ class PurgeUserEventsRequest(proto.Message): string. * ``eventTime``: in ISO 8601 "zulu" format. - * ``userPseudoId``: Double quoted string. - Specifying this will delete all events - associated with a visitor. + * ``userPseudoId``: Double quoted string. Specifying + this will delete all events associated with a visitor. - * ``userId``: Double quoted string. Specifying - this will delete all events associated with a - user. + * ``userId``: Double quoted string. Specifying this will + delete all events associated with a user. - Note: This API only supports purging a max range - of 30 days. + Note: This API only supports purging a max range of 30 + days. Examples: @@ -84,33 +81,32 @@ class PurgeUserEventsRequest(proto.Message): * Deleting specific eventType in a time range: ``eventTime > "2012-04-23T18:25:43.511Z" - eventTime < "2012-04-23T18:30:43.511Z" - eventType = "search"`` + eventTime < "2012-04-23T18:30:43.511Z" eventType = + "search"`` - * Deleting all events for a specific visitor in - a time range: + * Deleting all events for a specific visitor in a time + range: ``eventTime > "2012-04-23T18:25:43.511Z" - eventTime < "2012-04-23T18:30:43.511Z" - userPseudoId = "visitor1024"`` + eventTime < "2012-04-23T18:30:43.511Z" userPseudoId = + "visitor1024"`` * Deleting the past 30 days of events inside a DataStore: ``*`` - The filtering fields are assumed to have an - implicit AND. + The filtering fields are assumed to have an implicit + AND. force (bool): - The ``force`` field is currently not supported. - Purge user event requests will permanently - delete all purgeable events. Once the - development is complete: - - If ``force`` is set to false, the method will - return the expected purge count without deleting - any user events. This field will default to - false if not included in the request. + The ``force`` field is currently not supported. Purge + user event requests will permanently delete all + purgeable events. Once the development is complete: + + If ``force`` is set to false, the method will return the + expected purge count without deleting any user events. + This field will default to false if not included in the + request. """ parent: str = proto.Field( @@ -128,14 +124,14 @@ class PurgeUserEventsRequest(proto.Message): class PurgeUserEventsResponse(proto.Message): - r"""Response of the PurgeUserEventsRequest. If the long running - operation is successfully done, then this message is returned by - the google.longrunning.Operations.response field. + r"""Response of the PurgeUserEventsRequest. If the long running operation + is successfully done, then this message is returned by the + google.longrunning.Operations.response field. Attributes: purge_count (int): - The total count of events purged as a result - of the operation. + The total count of events purged as a result of the + operation. """ purge_count: int = proto.Field( @@ -145,22 +141,21 @@ class PurgeUserEventsResponse(proto.Message): class PurgeUserEventsMetadata(proto.Message): - r"""Metadata related to the progress of the PurgeUserEvents - operation. This will be returned by the - google.longrunning.Operation.metadata field. + r"""Metadata related to the progress of the PurgeUserEvents operation. + This will be returned by the google.longrunning.Operation.metadata + field. Attributes: create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. success_count (int): - Count of entries that were deleted - successfully. + Count of entries that were deleted successfully. failure_count (int): - Count of entries that encountered errors - while processing. + Count of entries that encountered errors while + processing. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -190,11 +185,10 @@ class PurgeErrorConfig(proto.Message): Attributes: gcs_prefix (str): - Cloud Storage prefix for purge errors. This must - be an empty, existing Cloud Storage directory. - Purge errors are written to sharded files in - this directory, one per line, as a JSON-encoded - ``google.rpc.Status`` message. + Cloud Storage prefix for purge errors. This must be an + empty, existing Cloud Storage directory. Purge errors + are written to sharded files in this directory, one per + line, as a JSON-encoded ``google.rpc.Status`` message. This field is a member of `oneof`_ ``destination``. """ @@ -226,29 +220,28 @@ class PurgeDocumentsRequest(proto.Message): * ``document_id``: One valid `Document.id - `__ - per line. + `__ per + line. This field is a member of `oneof`_ ``source``. inline_source (google.cloud.discoveryengine_v1.types.PurgeDocumentsRequest.InlineSource): - Inline source for the input content for - purge. + Inline source for the input content for purge. This field is a member of `oneof`_ ``source``. parent (str): Required. The parent resource name, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}``. filter (str): - Required. Filter matching documents to purge. - Only currently supported value is + Required. Filter matching documents to purge. Only + currently supported value is ``*`` (all items). error_config (google.cloud.discoveryengine_v1.types.PurgeErrorConfig): - The desired location of errors incurred - during the purge. + The desired location of errors incurred during the + purge. force (bool): - Actually performs the purge. If ``force`` is set - to false, return the expected purge count - without deleting any documents. + Actually performs the purge. If ``force`` is set to + false, return the expected purge count without deleting + any documents. """ class InlineSource(proto.Message): @@ -259,8 +252,8 @@ class InlineSource(proto.Message): Attributes: documents (MutableSequence[str]): - Required. A list of full resource name of - documents to purge. In the format + Required. A list of full resource name of documents to + purge. In the format ``projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*``. Recommended max of 100 items. """ @@ -305,19 +298,18 @@ class PurgeDocumentsResponse(proto.Message): r"""Response message for `DocumentService.PurgeDocuments `__ - method. If the long running operation is successfully done, then - this message is returned by the - google.longrunning.Operations.response field. + method. If the long running operation is successfully done, then this + message is returned by the google.longrunning.Operations.response field. Attributes: purge_count (int): - The total count of documents purged as a - result of the operation. + The total count of documents purged as a result of + the operation. purge_sample (MutableSequence[str]): - A sample of document names that will be deleted. - Only populated if ``force`` is set to false. A - max of 100 names will be returned and the names - are chosen at random. + A sample of document names that will be deleted. Only + populated if ``force`` is set to false. A max of 100 + names will be returned and the names are chosen at + random. """ purge_count: int = proto.Field( @@ -331,25 +323,24 @@ class PurgeDocumentsResponse(proto.Message): class PurgeDocumentsMetadata(proto.Message): - r"""Metadata related to the progress of the PurgeDocuments - operation. This will be returned by the - google.longrunning.Operation.metadata field. + r"""Metadata related to the progress of the PurgeDocuments operation. + This will be returned by the google.longrunning.Operation.metadata + field. Attributes: create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. success_count (int): - Count of entries that were deleted - successfully. + Count of entries that were deleted successfully. failure_count (int): - Count of entries that encountered errors - while processing. + Count of entries that encountered errors while + processing. ignored_count (int): - Count of entries that were ignored as entries - were not found. + Count of entries that were ignored as entries were + not found. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -384,9 +375,8 @@ class PurgeSuggestionDenyListEntriesRequest(proto.Message): Attributes: parent (str): - Required. The parent data store resource name - for which to import denylist entries. Follows - pattern + Required. The parent data store resource name for which + to import denylist entries. Follows pattern projects/*/locations/*/collections/*/dataStores/*. """ @@ -404,11 +394,10 @@ class PurgeSuggestionDenyListEntriesResponse(proto.Message): Attributes: purge_count (int): - Number of suggestion deny list entries - purged. + Number of suggestion deny list entries purged. error_samples (MutableSequence[google.rpc.status_pb2.Status]): - A sample of errors encountered while - processing the request. + A sample of errors encountered while processing the + request. """ purge_count: int = proto.Field( @@ -424,15 +413,15 @@ class PurgeSuggestionDenyListEntriesResponse(proto.Message): class PurgeSuggestionDenyListEntriesMetadata(proto.Message): r"""Metadata related to the progress of the - PurgeSuggestionDenyListEntries operation. This is returned by - the google.longrunning.Operation.metadata field. + PurgeSuggestionDenyListEntries operation. This is returned by the + google.longrunning.Operation.metadata field. Attributes: create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -455,9 +444,8 @@ class PurgeCompletionSuggestionsRequest(proto.Message): Attributes: parent (str): - Required. The parent data store resource name - for which to purge completion suggestions. - Follows pattern + Required. The parent data store resource name for which + to purge completion suggestions. Follows pattern projects/*/locations/*/collections/*/dataStores/*. """ @@ -475,11 +463,11 @@ class PurgeCompletionSuggestionsResponse(proto.Message): Attributes: purge_succeeded (bool): - Whether the completion suggestions were - successfully purged. + Whether the completion suggestions were successfully + purged. error_samples (MutableSequence[google.rpc.status_pb2.Status]): - A sample of errors encountered while - processing the request. + A sample of errors encountered while processing the + request. """ purge_succeeded: bool = proto.Field( @@ -494,16 +482,16 @@ class PurgeCompletionSuggestionsResponse(proto.Message): class PurgeCompletionSuggestionsMetadata(proto.Message): - r"""Metadata related to the progress of the - PurgeCompletionSuggestions operation. This is returned by the - google.longrunning.Operation.metadata field. + r"""Metadata related to the progress of the PurgeCompletionSuggestions + operation. This is returned by the google.longrunning.Operation.metadata + field. Attributes: create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/rank_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/rank_service.py index 9dee9f05ef12..efcecc71dd77 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/rank_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/rank_service.py @@ -31,8 +31,8 @@ class RankingRecord(proto.Message): r"""Record message for - `RankService.Rank - `__ method. + `RankService.Rank `__ + method. Attributes: id (str): @@ -44,8 +44,8 @@ class RankingRecord(proto.Message): `__ or `content `__ - should be set otherwise an INVALID_ARGUMENT - error is thrown. + should be set otherwise an INVALID_ARGUMENT error is + thrown. content (str): The content of the record. Empty by default. At least one of @@ -53,14 +53,13 @@ class RankingRecord(proto.Message): `__ or `content `__ - should be set otherwise an INVALID_ARGUMENT - error is thrown. + should be set otherwise an INVALID_ARGUMENT error is + thrown. score (float): - The score of this record based on the given - query and selected model. The score will be - rounded to 2 decimal places. If the score is - close to 0, it will be rounded to 0.0001 to - avoid returning unset. + The score of this record based on the given query and + selected model. The score will be rounded to 2 decimal + places. If the score is close to 0, it will be rounded + to 0.0001 to avoid returning unset. """ id: str = proto.Field( @@ -83,55 +82,53 @@ class RankingRecord(proto.Message): class RankRequest(proto.Message): r"""Request message for - `RankService.Rank - `__ method. + `RankService.Rank `__ + method. Attributes: ranking_config (str): - Required. The resource name of the rank service - config, such as + Required. The resource name of the rank service config, + such as ``projects/{project_num}/locations/{location}/rankingConfigs/default_ranking_config``. model (str): - The identifier of the model to use. It is one - of: - * ``semantic-ranker-512@latest``: Semantic - ranking model with maximum input token size 512. + The identifier of the model to use. It is one of: - It is set to ``semantic-ranker-512@latest`` by - default if unspecified. + * ``semantic-ranker-512@latest``: Semantic ranking model + with maximum input token size 512. + + It is set to ``semantic-ranker-512@latest`` by default + if unspecified. top_n (int): - The number of results to return. If this is - unset or no bigger than zero, returns all - results. + The number of results to return. If this is unset or + no bigger than zero, returns all results. query (str): The query to use. records (MutableSequence[google.cloud.discoveryengine_v1.types.RankingRecord]): - Required. A list of records to rank. At most - 200 records to rank. + Required. A list of records to rank. At most 200 + records to rank. ignore_record_details_in_response (bool): - If true, the response will contain only - record ID and score. By default, it is false, - the response will contain record details. + If true, the response will contain only record ID and + score. By default, it is false, the response will + contain record details. user_labels (MutableMapping[str, str]): - The user labels applied to a resource must meet - the following requirements: - * Each resource can have multiple labels, up to - a maximum of 64. + The user labels applied to a resource must meet the + following requirements: + * Each resource can have multiple labels, up to a + maximum of 64. * Each label must be a key-value pair. - * Keys have a minimum length of 1 character and - a maximum length of 63 characters and cannot - be empty. Values can be empty and have a maximum - length of 63 characters. + * Keys have a minimum length of 1 character and a + maximum length of 63 characters and cannot be empty. + Values can be empty and have a maximum length of 63 + characters. - * Keys and values can contain only lowercase - letters, numeric characters, underscores, and - dashes. All characters must use UTF-8 encoding, - and international characters are allowed. + * Keys and values can contain only lowercase letters, + numeric characters, underscores, and dashes. All + characters must use UTF-8 encoding, and international + characters are allowed. - * The key portion of a label must be unique. - However, you can use the same key with - multiple resources. + * The key portion of a label must be unique. However, + you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. @@ -176,8 +173,8 @@ class RankRequest(proto.Message): class RankResponse(proto.Message): r"""Response message for - `RankService.Rank - `__ method. + `RankService.Rank `__ + method. Attributes: records (MutableSequence[google.cloud.discoveryengine_v1.types.RankingRecord]): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/recommendation_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/recommendation_service.py index 5b436ab96e11..01da7b298b1e 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/recommendation_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/recommendation_service.py @@ -45,10 +45,10 @@ class RecommendRequest(proto.Message): or ``projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*`` - One default serving config is created along with - your recommendation engine creation. The engine - ID is used as the ID of the default serving - config. For example, for Engine + One default serving config is created along with your + recommendation engine creation. The engine ID is used as + the ID of the default serving config. For example, for + Engine ``projects/*/locations/global/collections/*/engines/my-engine``, you can use ``projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine`` @@ -57,24 +57,22 @@ class RecommendRequest(proto.Message): `__ requests. user_event (google.cloud.discoveryengine_v1.types.UserEvent): - Required. Context about the user, what they are - looking at and what action they took to trigger - the Recommend request. Note that this user event - detail won't be ingested to userEvent logs. - Thus, a separate userEvent write request is - required for event logging. + Required. Context about the user, what they are looking + at and what action they took to trigger the Recommend + request. Note that this user event detail won't be + ingested to userEvent logs. Thus, a separate userEvent + write request is required for event logging. Don't set `UserEvent.user_pseudo_id `__ or `UserEvent.user_info.user_id - `__ - to the same fixed ID for different users. If you - are trying to receive non-personalized - recommendations (not recommended; this can - negatively impact model performance), instead - set + `__ to + the same fixed ID for different users. If you are trying + to receive non-personalized recommendations (not + recommended; this can negatively impact model + performance), instead set `UserEvent.user_pseudo_id `__ to a random unique ID and leave @@ -83,82 +81,76 @@ class RecommendRequest(proto.Message): unset. page_size (int): Maximum number of results to return. Set this - property to the number of recommendation results - needed. If zero, the service chooses a - reasonable default. The maximum allowed value is - 100. Values above 100 are set to 100. + property to the number of recommendation results needed. + If zero, the service chooses a reasonable default. The + maximum allowed value is 100. Values above 100 are set + to 100. filter (str): - Filter for restricting recommendation results - with a length limit of 5,000 characters. - Currently, only filter expressions on the - ``filter_tags`` attribute is supported. + Filter for restricting recommendation results with a + length limit of 5,000 characters. Currently, only filter + expressions on the ``filter_tags`` attribute is + supported. Examples: - * ``(filter_tags: ANY("Red", "Blue") OR - filter_tags: ANY("Hot", "Cold"))`` * - ``(filter_tags: ANY("Red", "Blue")) AND NOT - (filter_tags: ANY("Green"))`` + * ``(filter_tags: ANY("Red", "Blue") OR filter_tags: + ANY("Hot", "Cold"))`` * ``(filter_tags: ANY("Red", + "Blue")) AND NOT (filter_tags: ANY("Green"))`` - If ``attributeFilteringSyntax`` is set to true - under the ``params`` field, then attribute-based - expressions are expected instead of the above - described tag-based syntax. Examples: + If ``attributeFilteringSyntax`` is set to true under the + ``params`` field, then attribute-based expressions are + expected instead of the above described tag-based + syntax. Examples: - * (language: ANY("en", "es")) AND NOT - (categories: ANY("Movie")) * (available: true) - AND + * (language: ANY("en", "es")) AND NOT (categories: + ANY("Movie")) * (available: true) AND (language: ANY("en", "es")) OR (categories: ANY("Movie")) - If your filter blocks all results, the API - returns generic (unfiltered) popular Documents. - If you only want results strictly matching the - filters, set ``strictFiltering`` to ``true`` in + If your filter blocks all results, the API returns + generic (unfiltered) popular Documents. If you only want + results strictly matching the filters, set + ``strictFiltering`` to ``true`` in `RecommendRequest.params `__ to receive empty results instead. Note that the API never returns - `Document - `__s - with ``storageStatus`` as ``EXPIRED`` or - ``DELETED`` regardless of filter choices. + `Document `__s + with ``storageStatus`` as ``EXPIRED`` or ``DELETED`` + regardless of filter choices. validate_only (bool): - Use validate only mode for this recommendation - query. If set to ``true``, a fake model is used - that returns arbitrary Document IDs. Note that - the validate only mode should only be used for - testing the API, or if the model is not ready. + Use validate only mode for this recommendation query. If + set to ``true``, a fake model is used that returns + arbitrary Document IDs. Note that the validate only mode + should only be used for testing the API, or if the model + is not ready. params (MutableMapping[str, google.protobuf.struct_pb2.Value]): Additional domain specific parameters for the recommendations. Allowed values: - * ``returnDocument``: Boolean. If set to - ``true``, the associated Document object is - returned in - `RecommendResponse.RecommendationResult.document + * ``returnDocument``: Boolean. If set to ``true``, the + associated Document object is returned in + `RecommendResponse.RecommendationResult.document `__. * ``returnScore``: Boolean. If set to true, the - recommendation score corresponding to each - returned Document is set in + recommendation score corresponding to each returned + Document is set in `RecommendResponse.RecommendationResult.metadata `__. - The given score indicates the probability of a - Document conversion given the user's context - and history. + The given score indicates the probability of a Document + conversion given the user's context and history. - * ``strictFiltering``: Boolean. True by default. - If set to ``false``, the service - returns generic (unfiltered) popular - Documents instead of empty if your filter - blocks all recommendation results. + * ``strictFiltering``: Boolean. True by default. If set + to ``false``, the service + returns generic (unfiltered) popular Documents + instead of empty if your filter blocks all + recommendation results. - * ``diversityLevel``: String. Default empty. If - set to be non-empty, then it needs to be one - of: + * ``diversityLevel``: String. Default empty. If set to + be non-empty, then it needs to be one of: * ``no-diversity`` * ``low-diversity`` @@ -168,33 +160,31 @@ class RecommendRequest(proto.Message): * ``auto-diversity`` This gives request-level control and adjusts - recommendation results based on Document - category. + recommendation results based on Document category. - * ``attributeFilteringSyntax``: Boolean. False - by default. If set to true, the ``filter`` - field is interpreted according to the new, - attribute-based syntax. + * ``attributeFilteringSyntax``: Boolean. False by + default. If set to true, the ``filter`` field is + interpreted according to the new, attribute-based + syntax. user_labels (MutableMapping[str, str]): - The user labels applied to a resource must meet - the following requirements: - * Each resource can have multiple labels, up to - a maximum of 64. + The user labels applied to a resource must meet the + following requirements: + * Each resource can have multiple labels, up to a + maximum of 64. * Each label must be a key-value pair. - * Keys have a minimum length of 1 character and - a maximum length of 63 characters and cannot - be empty. Values can be empty and have a maximum - length of 63 characters. + * Keys have a minimum length of 1 character and a + maximum length of 63 characters and cannot be empty. + Values can be empty and have a maximum length of 63 + characters. - * Keys and values can contain only lowercase - letters, numeric characters, underscores, and - dashes. All characters must use UTF-8 encoding, - and international characters are allowed. + * Keys and values can contain only lowercase letters, + numeric characters, underscores, and dashes. All + characters must use UTF-8 encoding, and international + characters are allowed. - * The key portion of a label must be unique. - However, you can use the same key with - multiple resources. + * The key portion of a label must be unique. However, + you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. @@ -244,20 +234,20 @@ class RecommendResponse(proto.Message): Attributes: results (MutableSequence[google.cloud.discoveryengine_v1.types.RecommendResponse.RecommendationResult]): - A list of recommended Documents. The order - represents the ranking (from the most relevant - Document to the least). + A list of recommended Documents. The order represents + the ranking (from the most relevant Document to the + least). attribution_token (str): - A unique attribution token. This should be - included in the `UserEvent - `__ - logs resulting from this recommendation, which - enables accurate attribution of recommendation - model performance. + A unique attribution token. This should be included in + the `UserEvent + `__ logs + resulting from this recommendation, which enables + accurate attribution of recommendation model + performance. missing_ids (MutableSequence[str]): - IDs of documents in the request that were - missing from the default Branch associated with - the requested ServingConfig. + IDs of documents in the request that were missing + from the default Branch associated with the requested + ServingConfig. validate_only (bool): True if `RecommendRequest.validate_only @@ -266,8 +256,8 @@ class RecommendResponse(proto.Message): """ class RecommendationResult(proto.Message): - r"""RecommendationResult represents a generic recommendation - result with associated metadata. + r"""RecommendationResult represents a generic recommendation result with + associated metadata. Attributes: id (str): @@ -281,9 +271,8 @@ class RecommendationResult(proto.Message): Possible values: - * ``score``: Recommendation score in double - value. Is set if ``returnScore`` is set to - true in + * ``score``: Recommendation score in double value. Is + set if ``returnScore`` is set to true in `RecommendRequest.params `__. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/safety.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/safety.py index 19274c56b9f2..363eed8321ce 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/safety.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/safety.py @@ -61,18 +61,16 @@ class SafetyRating(proto.Message): category (google.cloud.discoveryengine_v1.types.HarmCategory): Output only. Harm category. probability (google.cloud.discoveryengine_v1.types.SafetyRating.HarmProbability): - Output only. Harm probability levels in the - content. + Output only. Harm probability levels in the content. probability_score (float): Output only. Harm probability score. severity (google.cloud.discoveryengine_v1.types.SafetyRating.HarmSeverity): - Output only. Harm severity levels in the - content. + Output only. Harm severity levels in the content. severity_score (float): Output only. Harm severity score. blocked (bool): - Output only. Indicates whether the content - was filtered out because of this rating. + Output only. Indicates whether the content was + filtered out because of this rating. """ class HarmProbability(proto.Enum): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/schema.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/schema.py index 9d0dc820efb0..18e6d43e0a35 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/schema.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/schema.py @@ -48,12 +48,12 @@ class Schema(proto.Message): This field is a member of `oneof`_ ``schema``. name (str): - Immutable. The full resource name of the schema, - in the format of + Immutable. The full resource name of the schema, in the + format of ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}``. - This field must be a UTF-8 encoded string with a - length limit of 1024 characters. + This field must be a UTF-8 encoded string with a length + limit of 1024 characters. """ struct_schema: struct_pb2.Struct = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/schema_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/schema_service.py index 6500a84a4b9d..2eac74fa996e 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/schema_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/schema_service.py @@ -41,13 +41,12 @@ class GetSchemaRequest(proto.Message): r"""Request message for `SchemaService.GetSchema - `__ - method. + `__ method. Attributes: name (str): - Required. The full resource name of the schema, - in the format of + Required. The full resource name of the schema, in the + format of ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}``. """ @@ -60,39 +59,34 @@ class GetSchemaRequest(proto.Message): class ListSchemasRequest(proto.Message): r"""Request message for `SchemaService.ListSchemas - `__ - method. + `__ method. Attributes: parent (str): - Required. The parent data store resource name, - in the format of + Required. The parent data store resource name, in the + format of ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}``. page_size (int): The maximum number of `Schema - `__s to - return. The service may return fewer than this - value. + `__s to return. + The service may return fewer than this value. If unspecified, at most 100 - `Schema - `__s are + `Schema `__s are returned. - The maximum value is 1000; values above 1000 are - set to 1000. + The maximum value is 1000; values above 1000 are set to + 1000. page_token (str): A page token, received from a previous `SchemaService.ListSchemas `__ - call. Provide this to retrieve the subsequent - page. + call. Provide this to retrieve the subsequent page. - When paginating, all other parameters provided - to `SchemaService.ListSchemas + When paginating, all other parameters provided to + `SchemaService.ListSchemas `__ - must match the call that provided the page - token. + must match the call that provided the page token. """ parent: str = proto.Field( @@ -112,8 +106,7 @@ class ListSchemasRequest(proto.Message): class ListSchemasResponse(proto.Message): r"""Response message for `SchemaService.ListSchemas - `__ - method. + `__ method. Attributes: schemas (MutableSequence[google.cloud.discoveryengine_v1.types.Schema]): @@ -123,8 +116,8 @@ class ListSchemasResponse(proto.Message): A token that can be sent as `ListSchemasRequest.page_token `__ - to retrieve the next page. If this field is - omitted, there are no subsequent pages. + to retrieve the next page. If this field is omitted, + there are no subsequent pages. """ @property @@ -145,29 +138,25 @@ def raw_page(self): class CreateSchemaRequest(proto.Message): r"""Request message for `SchemaService.CreateSchema - `__ - method. + `__ method. Attributes: parent (str): - Required. The parent data store resource name, - in the format of + Required. The parent data store resource name, in the + format of ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}``. schema (google.cloud.discoveryengine_v1.types.Schema): Required. The `Schema - `__ to - create. + `__ to create. schema_id (str): Required. The ID to use for the - `Schema - `__, + `Schema `__, which becomes the final component of the `Schema.name `__. This field should conform to - `RFC-1034 - `__ + `RFC-1034 `__ standard with a length limit of 63 characters. """ @@ -189,21 +178,18 @@ class CreateSchemaRequest(proto.Message): class UpdateSchemaRequest(proto.Message): r"""Request message for `SchemaService.UpdateSchema - `__ - method. + `__ method. Attributes: schema (google.cloud.discoveryengine_v1.types.Schema): Required. The `Schema - `__ to - update. + `__ to update. allow_missing (bool): If set to true, and the `Schema - `__ is - not found, a new `Schema - `__ is - created. In this situation, ``update_mask`` is - ignored. + `__ is not + found, a new `Schema + `__ is created. + In this situation, ``update_mask`` is ignored. """ schema: gcd_schema.Schema = proto.Field( @@ -220,13 +206,12 @@ class UpdateSchemaRequest(proto.Message): class DeleteSchemaRequest(proto.Message): r"""Request message for `SchemaService.DeleteSchema - `__ - method. + `__ method. Attributes: name (str): - Required. The full resource name of the schema, - in the format of + Required. The full resource name of the schema, in the + format of ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}``. """ @@ -243,8 +228,8 @@ class CreateSchemaMetadata(proto.Message): create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -266,8 +251,8 @@ class UpdateSchemaMetadata(proto.Message): create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -289,8 +274,8 @@ class DeleteSchemaMetadata(proto.Message): create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/search_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/search_service.py index 56eb0d2d2d06..c0abe49a0aa6 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/search_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/search_service.py @@ -36,166 +36,154 @@ class SearchRequest(proto.Message): r"""Request message for `SearchService.Search - `__ - method. + `__ method. Attributes: serving_config (str): - Required. The resource name of the Search - serving config, such as + Required. The resource name of the Search serving + config, such as ``projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config``, or ``projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config``. - This field is used to identify the serving - configuration name, set of models used to make - the search. + This field is used to identify the serving configuration + name, set of models used to make the search. branch (str): The branch resource name, such as ``projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0``. - Use ``default_branch`` as the branch ID or leave - this field empty, to search documents under the - default branch. + Use ``default_branch`` as the branch ID or leave this + field empty, to search documents under the default + branch. query (str): Raw search query. image_query (google.cloud.discoveryengine_v1.types.SearchRequest.ImageQuery): Raw image query. page_size (int): Maximum number of `Document - `__s - to return. The maximum allowed value depends on - the data type. Values above the maximum value - are coerced to the maximum value. + `__s to + return. The maximum allowed value depends on the data + type. Values above the maximum value are coerced to the + maximum value. - * Websites with basic indexing: Default ``10``, - Maximum ``25``. * Websites with advanced - indexing: Default ``25``, Maximum ``50``. + * Websites with basic indexing: Default ``10``, Maximum + ``25``. * Websites with advanced indexing: Default + ``25``, Maximum ``50``. * Other: Default ``50``, Maximum ``100``. - If this field is negative, an - ``INVALID_ARGUMENT`` is returned. + If this field is negative, an ``INVALID_ARGUMENT`` is + returned. page_token (str): A page token received from a previous `SearchService.Search `__ - call. Provide this to retrieve the subsequent - page. + call. Provide this to retrieve the subsequent page. - When paginating, all other parameters provided - to `SearchService.Search + When paginating, all other parameters provided to + `SearchService.Search `__ - must match the call that provided the page - token. Otherwise, an ``INVALID_ARGUMENT`` - error is returned. + must match the call that provided the page token. + Otherwise, an ``INVALID_ARGUMENT`` error is returned. offset (int): - A 0-indexed integer that specifies the current - offset (that is, starting result location, - amongst the `Document - `__s - deemed by the API as relevant) in search - results. This field is only considered if - `page_token + A 0-indexed integer that specifies the current offset + (that is, starting result location, amongst the + `Document `__s + deemed by the API as relevant) in search results. This + field is only considered if `page_token `__ is unset. - If this field is negative, an - ``INVALID_ARGUMENT`` is returned. + If this field is negative, an ``INVALID_ARGUMENT`` is + returned. one_box_page_size (int): - The maximum number of results to return for - OneBox. This applies to each OneBox type - individually. Default number is 10. + The maximum number of results to return for OneBox. + This applies to each OneBox type individually. + Default number is 10. data_store_specs (MutableSequence[google.cloud.discoveryengine_v1.types.SearchRequest.DataStoreSpec]): Specifications that define the specific `DataStore - `__s - to be searched, along with configurations for - those data stores. This is only considered for - `Engine - `__s - with multiple data stores. For engines with a - single data store, the specs directly under - `SearchRequest + `__s to be + searched, along with configurations for those data + stores. This is only considered for `Engine + `__s with + multiple data stores. For engines with a single data + store, the specs directly under `SearchRequest `__ should be used. filter (str): - The filter syntax consists of an expression - language for constructing a predicate from one - or more fields of the documents being filtered. - Filter expression is case-sensitive. + The filter syntax consists of an expression language for + constructing a predicate from one or more fields of the + documents being filtered. Filter expression is + case-sensitive. If this field is unrecognizable, an ``INVALID_ARGUMENT`` is returned. - Filtering in Vertex AI Search is done by mapping - the LHS filter key to a key property defined in - the Vertex AI Search backend -- this mapping is - defined by the customer in their schema. For - example a media customer might have a field - 'name' in their schema. In this case the filter - would look like this: filter --> name:'ANY("king - kong")' - - For more information about filtering including - syntax and filter operators, see + Filtering in Vertex AI Search is done by mapping the LHS + filter key to a key property defined in the Vertex AI + Search backend -- this mapping is defined by the + customer in their schema. For example a media customer + might have a field 'name' in their schema. In this case + the filter would look like this: filter --> + name:'ANY("king kong")' + + For more information about filtering including syntax + and filter operators, see `Filter `__ canonical_filter (str): - The default filter that is applied when a user - performs a search without checking any filters - on the search page. - - The filter applied to every search request when - quality improvement such as query expansion is - needed. In the case a query does not have a - sufficient amount of results this filter will be - used to determine whether or not to enable the - query expansion flow. The original filter will - still be used for the query expanded search. - This field is strongly recommended to achieve - high search quality. + The default filter that is applied when a user performs + a search without checking any filters on the search + page. + + The filter applied to every search request when quality + improvement such as query expansion is needed. In the + case a query does not have a sufficient amount of + results this filter will be used to determine whether or + not to enable the query expansion flow. The original + filter will still be used for the query expanded search. + This field is strongly recommended to achieve high + search quality. For more information about filter syntax, see `SearchRequest.filter `__. order_by (str): - The order in which documents are returned. - Documents can be ordered by a field in an - `Document - `__ - object. Leave it unset if ordered by relevance. - ``order_by`` expression is case-sensitive. - - For more information on ordering the website - search results, see `Order web search + The order in which documents are returned. Documents can + be ordered by a field in an `Document + `__ object. + Leave it unset if ordered by relevance. ``order_by`` + expression is case-sensitive. + + For more information on ordering the website search + results, see `Order web search results `__. - For more information on ordering the healthcare - search results, see `Order healthcare search + For more information on ordering the healthcare search + results, see `Order healthcare search results `__. - If this field is unrecognizable, an - ``INVALID_ARGUMENT`` is returned. + If this field is unrecognizable, an ``INVALID_ARGUMENT`` + is returned. user_info (google.cloud.discoveryengine_v1.types.UserInfo): Information about the end user. - Highly recommended for analytics and - personalization. `UserInfo.user_agent + Highly recommended for analytics and personalization. + `UserInfo.user_agent `__ is used to deduce ``device_type`` for analytics. language_code (str): - The BCP-47 language code, such as "en-US" or - "sr-Latn". For more information, see `Standard + The BCP-47 language code, such as "en-US" or "sr-Latn". + For more information, see `Standard fields `__. - This field helps to better interpret the query. - If a value isn't specified, the query language - code is automatically detected, which may not be - accurate. + This field helps to better interpret the query. If a + value isn't specified, the query language code is + automatically detected, which may not be accurate. facet_specs (MutableSequence[google.cloud.discoveryengine_v1.types.SearchRequest.FacetSpec]): - Facet specifications for faceted search. If - empty, no facets are returned. - A maximum of 100 values are allowed. Otherwise, - an ``INVALID_ARGUMENT`` error is returned. + Facet specifications for faceted search. If empty, no + facets are returned. + A maximum of 100 values are allowed. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. boost_spec (google.cloud.discoveryengine_v1.types.SearchRequest.BoostSpec): Boost specification to boost certain documents. For more information on boosting, see @@ -204,38 +192,34 @@ class SearchRequest(proto.Message): params (MutableMapping[str, google.protobuf.struct_pb2.Value]): Additional search parameters. - For public website search only, supported values - are: + For public website search only, supported values are: - * ``user_country_code``: string. Default empty. - If set to non-empty, results are restricted - or boosted based on the location provided. - For example, ``user_country_code: "au"`` + * ``user_country_code``: string. Default empty. If set + to non-empty, results are restricted or boosted based + on the location provided. For example, + ``user_country_code: "au"`` For available codes see `Country Codes `__ - * ``search_type``: double. Default empty. - Enables non-webpage searching depending on - the value. The only valid non-default value is - 1, which enables image searching. + * ``search_type``: double. Default empty. Enables + non-webpage searching depending on the value. The + only valid non-default value is 1, which enables + image searching. For example, ``search_type: 1`` query_expansion_spec (google.cloud.discoveryengine_v1.types.SearchRequest.QueryExpansionSpec): - The query expansion specification that - specifies the conditions under which query - expansion occurs. + The query expansion specification that specifies the + conditions under which query expansion occurs. spell_correction_spec (google.cloud.discoveryengine_v1.types.SearchRequest.SpellCorrectionSpec): - The spell correction specification that - specifies the mode under which spell correction - takes effect. + The spell correction specification that specifies the + mode under which spell correction takes effect. user_pseudo_id (str): - A unique identifier for tracking visitors. For - example, this could be implemented with an HTTP - cookie, which should be able to uniquely - identify a visitor on a single device. This - unique identifier should not change if the - visitor logs in or out of the website. + A unique identifier for tracking visitors. For example, + this could be implemented with an HTTP cookie, which + should be able to uniquely identify a visitor on a + single device. This unique identifier should not change + if the visitor logs in or out of the website. This field should NOT have a fixed value such as ``unknown_visitor``. @@ -247,35 +231,34 @@ class SearchRequest(proto.Message): `CompleteQueryRequest.user_pseudo_id `__ - The field must be a UTF-8 encoded string with a - length limit of 128 characters. Otherwise, an + The field must be a UTF-8 encoded string with a length + limit of 128 characters. Otherwise, an ``INVALID_ARGUMENT`` error is returned. content_search_spec (google.cloud.discoveryengine_v1.types.SearchRequest.ContentSearchSpec): - A specification for configuring the behavior - of content search. + A specification for configuring the behavior of + content search. safe_search (bool): Whether to turn on safe search. This is only supported for website search. user_labels (MutableMapping[str, str]): - The user labels applied to a resource must meet - the following requirements: - * Each resource can have multiple labels, up to - a maximum of 64. + The user labels applied to a resource must meet the + following requirements: + * Each resource can have multiple labels, up to a + maximum of 64. * Each label must be a key-value pair. - * Keys have a minimum length of 1 character and - a maximum length of 63 characters and cannot - be empty. Values can be empty and have a maximum - length of 63 characters. + * Keys have a minimum length of 1 character and a + maximum length of 63 characters and cannot be empty. + Values can be empty and have a maximum length of 63 + characters. - * Keys and values can contain only lowercase - letters, numeric characters, underscores, and - dashes. All characters must use UTF-8 encoding, - and international characters are allowed. + * Keys and values can contain only lowercase letters, + numeric characters, underscores, and dashes. All + characters must use UTF-8 encoding, and international + characters are allowed. - * The key portion of a label must be unique. - However, you can use the same key with - multiple resources. + * The key portion of a label must be unique. However, + you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. @@ -285,57 +268,54 @@ class SearchRequest(proto.Message): `__ for more details. search_as_you_type_spec (google.cloud.discoveryengine_v1.types.SearchRequest.SearchAsYouTypeSpec): - Search as you type configuration. Only supported - for the `IndustryVertical.MEDIA + Search as you type configuration. Only supported for the + `IndustryVertical.MEDIA `__ vertical. display_spec (google.cloud.discoveryengine_v1.types.SearchRequest.DisplaySpec): - Optional. Config for display feature, like - match highlighting on search results. + Optional. Config for display feature, like match + highlighting on search results. session (str): The session resource name. Optional. - Session allows users to do multi-turn /search - API calls or coordination between /search API - calls and /answer API calls. + Session allows users to do multi-turn /search API calls + or coordination between /search API calls and /answer + API calls. Example #1 (multi-turn /search API calls): - - Call /search API with the session ID generated - in the first call. Here, the previous search - query gets considered in query standing. I.e., - if the first query is "How did Alphabet do in - 2022?" and the current query is "How about - 2023?", the current query will be interpreted - as "How did Alphabet do in 2023?". - - Example #2 (coordination between /search API - calls and /answer API calls): - - - Call /answer API with the session ID generated - in the first call. Here, the answer generation - happens in the context of the search results - from the first search call. - - Multi-turn Search feature is currently at - private GA stage. Please use v1alpha or v1beta - version instead before we launch this feature to - public GA. Or ask for allowlisting through - Google Support team. + Call /search API with the session ID generated in the + first call. Here, the previous search query gets + considered in query standing. I.e., if the first query + is "How did Alphabet do in 2022?" and the current + query is "How about 2023?", the current query will be + interpreted as "How did Alphabet do in 2023?". + + Example #2 (coordination between /search API calls and + /answer API calls): + + Call /answer API with the session ID generated in the + first call. Here, the answer generation happens in the + context of the search results from the first search + call. + + Multi-turn Search feature is currently at private GA + stage. Please use v1alpha or v1beta version instead + before we launch this feature to public GA. Or ask for + allowlisting through Google Support team. session_spec (google.cloud.discoveryengine_v1.types.SearchRequest.SessionSpec): Session specification. Can be used only when ``session`` is set. relevance_threshold (google.cloud.discoveryengine_v1.types.SearchRequest.RelevanceThreshold): - The relevance threshold of the search - results. - Default to Google defined threshold, leveraging - a balance of precision and recall to deliver - both highly accurate results and comprehensive - coverage of relevant information. - - This feature is not supported for healthcare - search. + The relevance threshold of the search results. + + Default to Google defined threshold, leveraging a + balance of precision and recall to deliver both highly + accurate results and comprehensive coverage of relevant + information. + + This feature is not supported for healthcare search. relevance_score_spec (google.cloud.discoveryengine_v1.types.SearchRequest.RelevanceScoreSpec): Optional. The specification for returning the relevance score. @@ -398,9 +378,9 @@ class SearchRequest(proto.Message): """ class RelevanceThreshold(proto.Enum): - r"""The relevance threshold of the search results. The higher - relevance threshold is, the higher relevant results are shown - and the less number of results are returned. + r"""The relevance threshold of the search results. The higher relevance + threshold is, the higher relevant results are shown and the less number + of results are returned. Values: RELEVANCE_THRESHOLD_UNSPECIFIED (0): @@ -445,8 +425,8 @@ class ImageQuery(proto.Message): Attributes: image_bytes (str): - Base64 encoded image bytes. Supported image - formats: JPEG, PNG, and BMP. + Base64 encoded image bytes. Supported image formats: + JPEG, PNG, and BMP. This field is a member of `oneof`_ ``image``. """ @@ -459,21 +439,19 @@ class ImageQuery(proto.Message): class DataStoreSpec(proto.Message): r"""A struct to define data stores to filter on in a search call and - configurations for those data stores. Otherwise, an - ``INVALID_ARGUMENT`` error is returned. + configurations for those data stores. Otherwise, an ``INVALID_ARGUMENT`` + error is returned. Attributes: data_store (str): Required. Full resource name of `DataStore - `__, - such as + `__, such as ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}``. filter (str): - Optional. Filter specification to filter - documents in the data store specified by - data_store field. For more information on - filtering, see `Filtering + Optional. Filter specification to filter documents in + the data store specified by data_store field. For more + information on filtering, see `Filtering `__ boost_spec (google.cloud.discoveryengine_v1.types.SearchRequest.BoostSpec): Optional. Boost specification to boost certain @@ -481,10 +459,10 @@ class DataStoreSpec(proto.Message): `Boosting `__ custom_search_operators (str): - Optional. Custom search operators which if - specified will be used to filter results from - workspace data stores. For more information on - custom search operators, see + Optional. Custom search operators which if specified + will be used to filter results from workspace data + stores. For more information on custom search operators, + see `SearchOperators `__. """ @@ -514,75 +492,70 @@ class FacetSpec(proto.Message): facet_key (google.cloud.discoveryengine_v1.types.SearchRequest.FacetSpec.FacetKey): Required. The facet key specification. limit (int): - Maximum facet values that are returned for this - facet. If unspecified, defaults to 20. The - maximum allowed value is 300. Values above 300 - are coerced to 300. + Maximum facet values that are returned for this facet. + If unspecified, defaults to 20. The maximum allowed + value is 300. Values above 300 are coerced to 300. For aggregation in healthcare search, when the - [FacetKey.key] is "healthcare_aggregation_key", - the limit will be overridden to 10,000 - internally, regardless of the value set here. + [FacetKey.key] is "healthcare_aggregation_key", the + limit will be overridden to 10,000 internally, + regardless of the value set here. - If this field is negative, an - ``INVALID_ARGUMENT`` is returned. + If this field is negative, an ``INVALID_ARGUMENT`` is + returned. excluded_filter_keys (MutableSequence[str]): List of keys to exclude when faceting. By default, `FacetKey.key `__ - is not excluded from the filter unless it is - listed in this field. - - Listing a facet key in this field allows its - values to appear as facet results, even when - they are filtered out of search results. Using - this field does not affect what search results - are returned. - - For example, suppose there are 100 documents - with the color facet "Red" and 200 documents - with the color facet "Blue". A query containing - the filter "color:ANY("Red")" and having "color" - as `FacetKey.key + is not excluded from the filter unless it is listed in + this field. + + Listing a facet key in this field allows its values to + appear as facet results, even when they are filtered out + of search results. Using this field does not affect what + search results are returned. + + For example, suppose there are 100 documents with the + color facet "Red" and 200 documents with the color facet + "Blue". A query containing the filter "color:ANY("Red")" + and having "color" as + `FacetKey.key `__ - would by default return only "Red" documents in - the search results, and also return "Red" with - count 100 as the only color facet. Although - there are also blue documents available, "Blue" - would not be shown as an available facet value. - - If "color" is listed in "excludedFilterKeys", - then the query returns the facet values "Red" - with count 100 and "Blue" with count 200, - because the "color" key is now excluded from the - filter. Because this field doesn't affect search - results, the search results are still correctly - filtered to return only "Red" documents. - - A maximum of 100 values are allowed. Otherwise, - an ``INVALID_ARGUMENT`` error is returned. + would by default return only "Red" documents in the + search results, and also return "Red" with count 100 as + the only color facet. Although there are also blue + documents available, "Blue" would not be shown as an + available facet value. + + If "color" is listed in "excludedFilterKeys", then the + query returns the facet values "Red" with count 100 and + "Blue" with count 200, because the "color" key is now + excluded from the filter. Because this field doesn't + affect search results, the search results are still + correctly filtered to return only "Red" documents. + + A maximum of 100 values are allowed. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. enable_dynamic_position (bool): - Enables dynamic position for this facet. If set - to true, the position of this facet among all - facets in the response is determined - automatically. If dynamic facets are enabled, it - is ordered together. If set to false, the - position of this facet in the response is the - same as in the request, and it is ranked before - the facets with dynamic position enable and all + Enables dynamic position for this facet. If set to true, + the position of this facet among all facets in the + response is determined automatically. If dynamic facets + are enabled, it is ordered together. If set to false, + the position of this facet in the + response is the same as in the request, and it is ranked + before the facets with dynamic position enable and all dynamic facets. - For example, you may always want to have rating - facet returned in the response, but it's not - necessarily to always display the rating facet - at the top. In that case, you can set - enable_dynamic_position to true so that the - position of rating facet in response is + For example, you may always want to have rating facet + returned in the response, but it's not necessarily to + always display the rating facet at the top. In that + case, you can set enable_dynamic_position to true so + that the position of rating facet in response is determined automatically. - Another example, assuming you have the following - facets in the request: + Another example, assuming you have the following facets + in the request: * "rating", enable_dynamic_position = true @@ -590,14 +563,13 @@ class FacetSpec(proto.Message): * "brands", enable_dynamic_position = false - And also you have a dynamic facets enabled, - which generates a facet ``gender``. Then the - final order of the facets in the response can be - ("price", "brands", "rating", "gender") or - ("price", "brands", "gender", "rating") depends - on how API orders "gender" and "rating" facets. - However, notice that "price" and "brands" are - always ranked at first and second position + And also you have a dynamic facets enabled, which + generates a facet ``gender``. Then the final order of + the facets in the response can be ("price", "brands", + "rating", "gender") or ("price", "brands", "gender", + "rating") depends on how API orders "gender" and + "rating" facets. However, notice that "price" and + "brands" are always ranked at first and second position because their enable_dynamic_position is false. """ @@ -606,45 +578,41 @@ class FacetKey(proto.Message): Attributes: key (str): - Required. Supported textual and numerical facet - keys in `Document - `__ - object, over which the facet values are - computed. Facet key is case-sensitive. + Required. Supported textual and numerical facet keys in + `Document `__ + object, over which the facet values are computed. Facet + key is case-sensitive. intervals (MutableSequence[google.cloud.discoveryengine_v1.types.Interval]): - Set only if values should be bucketed into - intervals. Must be set for facets with numerical - values. Must not be set for facet with text - values. Maximum number of intervals is 30. + Set only if values should be bucketed into intervals. + Must be set for facets with numerical values. Must not + be set for facet with text values. Maximum number of + intervals is 30. restricted_values (MutableSequence[str]): - Only get facet for the given restricted values. - Only supported on textual fields. For example, - suppose "category" has three values "Action > - 2022", "Action > 2021" and "Sci-Fi > 2022". If - set "restricted_values" to "Action > 2022", the - "category" facet only contains "Action > 2022". - Only supported on textual fields. Maximum is 10. + Only get facet for the given restricted values. Only + supported on textual fields. For example, suppose + "category" has three values "Action > 2022", "Action > + 2021" and "Sci-Fi > 2022". If set "restricted_values" to + "Action > 2022", the "category" facet only contains + "Action > 2022". Only supported on textual fields. + Maximum is 10. prefixes (MutableSequence[str]): - Only get facet values that start with the - given string prefix. For example, suppose - "category" has three values "Action > 2022", - "Action > 2021" and "Sci-Fi > 2022". If set - "prefixes" to "Action", the "category" facet - only contains "Action > 2022" and "Action > - 2021". Only supported on textual fields. Maximum - is 10. + Only get facet values that start with the given + string prefix. For example, suppose "category" has three + values "Action > 2022", "Action > 2021" and "Sci-Fi > + 2022". If set "prefixes" to "Action", the "category" + facet only contains "Action > 2022" and "Action > 2021". + Only supported on textual fields. Maximum is 10. contains (MutableSequence[str]): - Only get facet values that contain the given - strings. For example, suppose "category" has - three values "Action > 2022", "Action > 2021" - and "Sci-Fi > 2022". If set "contains" to - "2022", the "category" facet only contains - "Action > 2022" and "Sci-Fi > 2022". Only - supported on textual fields. Maximum is 10. + Only get facet values that contain the given strings. + For example, suppose "category" has three values "Action + > 2022", "Action > 2021" and "Sci-Fi > 2022". If set + "contains" to "2022", the "category" facet only contains + "Action > 2022" and "Sci-Fi > 2022". Only supported on + textual fields. Maximum is 10. case_insensitive (bool): - True to make facet keys case insensitive when - getting faceting values with prefixes or - contains; false otherwise. + True to make facet keys case insensitive when getting + faceting values with prefixes or contains; false + otherwise. order_by (str): The order in which documents are returned. @@ -661,11 +629,10 @@ class FacetKey(proto.Message): descending. Only applies to textual facets. - If not set, textual values are sorted in - `natural order + If not set, textual values are sorted in `natural + order `__; - numerical intervals are sorted in the order - given by + numerical intervals are sorted in the order given by `FacetSpec.FacetKey.intervals `__. """ @@ -723,12 +690,11 @@ class BoostSpec(proto.Message): Attributes: condition_boost_specs (MutableSequence[google.cloud.discoveryengine_v1.types.SearchRequest.BoostSpec.ConditionBoostSpec]): - Condition boost specifications. If a document - matches multiple conditions in the - specifications, boost scores from these - specifications are all applied and combined in a - non-linear way. Maximum number of specifications - is 20. + Condition boost specifications. If a document matches + multiple conditions in the specifications, boost scores + from these specifications are all applied and combined + in a non-linear way. Maximum number of specifications is + 20. """ class ConditionBoostSpec(proto.Message): @@ -736,9 +702,9 @@ class ConditionBoostSpec(proto.Message): Attributes: condition (str): - An expression which specifies a boost condition. - The syntax and supported fields are the same as - a filter expression. See `SearchRequest.filter + An expression which specifies a boost condition. The + syntax and supported fields are the same as a filter + expression. See `SearchRequest.filter `__ for detail syntax and limitations. @@ -747,71 +713,66 @@ class ConditionBoostSpec(proto.Message): * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": - ``(document_id: ANY("doc_1", "doc_2")) AND - (color: ANY("Red", "Blue"))`` + ``(document_id: ANY("doc_1", "doc_2")) AND (color: + ANY("Red", "Blue"))`` boost (float): - Strength of the condition boost, which should be - in [-1, 1]. Negative boost means demotion. - Default is 0.0. - - Setting to 1.0 gives the document a big - promotion. However, it does not necessarily mean - that the boosted document will be the top result - at all times, nor that other documents will be - excluded. Results could still be shown even when - none of them matches the condition. And results - that are significantly more relevant to the - search query can still trump your heavily - favored but irrelevant documents. - - Setting to -1.0 gives the document a big - demotion. However, results that are deeply - relevant might still be shown. The document will - have an upstream battle to get a fairly high - ranking, but it is not blocked out completely. - - Setting to 0.0 means no boost applied. The - boosting condition is ignored. Only one of the - (condition, boost) combination or the - boost_control_spec below are set. If both are - set then the global boost is ignored and the + Strength of the condition boost, which should be in [-1, + 1]. Negative boost means demotion. Default is 0.0. + + Setting to 1.0 gives the document a big promotion. + However, it does not necessarily mean that the boosted + document will be the top result at all times, nor that + other documents will be excluded. Results could still be + shown even when none of them matches the condition. And + results that are significantly more relevant to the + search query can still trump your heavily favored but + irrelevant documents. + + Setting to -1.0 gives the document a big demotion. + However, results that are deeply relevant might still be + shown. The document will have an upstream battle to get + a fairly high ranking, but it is not blocked out + completely. + + Setting to 0.0 means no boost applied. The boosting + condition is ignored. Only one of the (condition, boost) + combination or the boost_control_spec below are set. If + both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied. boost_control_spec (google.cloud.discoveryengine_v1.types.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec): - Complex specification for custom ranking - based on customer defined attribute value. + Complex specification for custom ranking based on + customer defined attribute value. """ class BoostControlSpec(proto.Message): r"""Specification for custom ranking based on customer specified - attribute value. It provides more controls for customized - ranking than the simple (condition, boost) combination above. + attribute value. It provides more controls for customized ranking than + the simple (condition, boost) combination above. Attributes: field_name (str): - The name of the field whose value will be - used to determine the boost amount. + The name of the field whose value will be used to + determine the boost amount. attribute_type (google.cloud.discoveryengine_v1.types.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.AttributeType): - The attribute type to be used to determine the - boost amount. The attribute value can be derived - from the field value of the specified - field_name. In the case of numerical it is - straightforward i.e. attribute_value = - numerical_field_value. In the case of freshness - however, attribute_value = (time.now() - - datetime_field_value). + The attribute type to be used to determine the boost + amount. The attribute value can be derived from the + field value of the specified field_name. In the case of + numerical it is straightforward i.e. attribute_value = + numerical_field_value. In the case of freshness however, + attribute_value = (time.now() - datetime_field_value). interpolation_type (google.cloud.discoveryengine_v1.types.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.InterpolationType): - The interpolation type to be applied to - connect the control points listed below. + The interpolation type to be applied to connect the + control points listed below. control_points (MutableSequence[google.cloud.discoveryengine_v1.types.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint]): The control points used to define the curve. The monotonic function (defined through the - interpolation_type above) passes through the - control points listed here. + interpolation_type above) passes through the control + points listed here. """ class AttributeType(proto.Enum): - r"""The attribute(or function) for which the custom ranking is to - be applied. + r"""The attribute(or function) for which the custom ranking is to be + applied. Values: ATTRIBUTE_TYPE_UNSPECIFIED (0): @@ -853,9 +814,9 @@ class InterpolationType(proto.Enum): LINEAR = 1 class ControlPoint(proto.Message): - r"""The control points used to define the curve. The curve - defined through these control points can only be monotonically - increasing or decreasing(constant values are acceptable). + r"""The control points used to define the curve. The curve defined + through these control points can only be monotonically increasing or + decreasing(constant values are acceptable). Attributes: attribute_value (str): @@ -865,13 +826,13 @@ class ControlPoint(proto.Message): 2. The duration spec for freshness: The value must be formatted as an XSD - ``dayTimeDuration`` value (a restricted subset - of an ISO 8601 duration value). The pattern for - this is: ```nD `__`nM `__]``. + ``dayTimeDuration`` value (a restricted subset of an ISO + 8601 duration value). The pattern for this is: ```nD + `__`nM `__]``. boost_amount (float): - The value between -1 to 1 by which to boost the - score if the attribute_value evaluates to the - value specified above. + The value between -1 to 1 by which to boost the score if + the attribute_value evaluates to the value specified + above. """ attribute_value: str = proto.Field( @@ -928,24 +889,22 @@ class ControlPoint(proto.Message): ) class QueryExpansionSpec(proto.Message): - r"""Specification to determine under which conditions query - expansion should occur. + r"""Specification to determine under which conditions query expansion + should occur. Attributes: condition (google.cloud.discoveryengine_v1.types.SearchRequest.QueryExpansionSpec.Condition): - The condition under which query expansion should - occur. Default to `Condition.DISABLED + The condition under which query expansion should occur. + Default to `Condition.DISABLED `__. pin_unexpanded_results (bool): - Whether to pin unexpanded results. If this - field is set to true, unexpanded products are - always at the top of the search results, - followed by the expanded results. + Whether to pin unexpanded results. If this field is + set to true, unexpanded products are always at the top + of the search results, followed by the expanded results. """ class Condition(proto.Enum): - r"""Enum describing under which condition query expansion should - occur. + r"""Enum describing under which condition query expansion should occur. Values: CONDITION_UNSPECIFIED (0): @@ -989,8 +948,7 @@ class SpellCorrectionSpec(proto.Message): """ class Mode(proto.Enum): - r"""Enum describing under which mode spell correction should - occur. + r"""Enum describing under which mode spell correction should occur. Values: MODE_UNSPECIFIED (0): @@ -1021,27 +979,24 @@ class Mode(proto.Enum): ) class ContentSearchSpec(proto.Message): - r"""A specification for configuring the behavior of content - search. + r"""A specification for configuring the behavior of content search. Attributes: snippet_spec (google.cloud.discoveryengine_v1.types.SearchRequest.ContentSearchSpec.SnippetSpec): - If ``snippetSpec`` is not specified, snippets - are not included in the search response. + If ``snippetSpec`` is not specified, snippets are not + included in the search response. summary_spec (google.cloud.discoveryengine_v1.types.SearchRequest.ContentSearchSpec.SummarySpec): - If ``summarySpec`` is not specified, summaries - are not included in the search response. + If ``summarySpec`` is not specified, summaries are not + included in the search response. extractive_content_spec (google.cloud.discoveryengine_v1.types.SearchRequest.ContentSearchSpec.ExtractiveContentSpec): - If there is no extractive_content_spec provided, - there will be no extractive answer in the search - response. + If there is no extractive_content_spec provided, there + will be no extractive answer in the search response. search_result_mode (google.cloud.discoveryengine_v1.types.SearchRequest.ContentSearchSpec.SearchResultMode): - Specifies the search result mode. If - unspecified, the search result mode defaults to - ``DOCUMENTS``. + Specifies the search result mode. If unspecified, the + search result mode defaults to ``DOCUMENTS``. chunk_spec (google.cloud.discoveryengine_v1.types.SearchRequest.ContentSearchSpec.ChunkSpec): - Specifies the chunk spec to be returned from the - search response. Only available if the + Specifies the chunk spec to be returned from the search + response. Only available if the `SearchRequest.ContentSearchSpec.search_result_mode `__ is set to @@ -1070,24 +1025,22 @@ class SearchResultMode(proto.Enum): CHUNKS = 2 class SnippetSpec(proto.Message): - r"""A specification for configuring snippets in a search - response. + r"""A specification for configuring snippets in a search response. Attributes: max_snippet_count (int): - [DEPRECATED] This field is deprecated. To - control snippet return, use ``return_snippet`` - field. For backwards compatibility, we will - return snippet if max_snippet_count > 0. + [DEPRECATED] This field is deprecated. To control + snippet return, use ``return_snippet`` field. For + backwards compatibility, we will return snippet if + max_snippet_count > 0. reference_only (bool): - [DEPRECATED] This field is deprecated and will - have no affect on the snippet. + [DEPRECATED] This field is deprecated and will have no + affect on the snippet. return_snippet (bool): - If ``true``, then return snippet. If no snippet - can be generated, we return "No snippet is - available for this page." A ``snippet_status`` - with ``SUCCESS`` or ``NO_SNIPPET_AVAILABLE`` - will also be returned. + If ``true``, then return snippet. If no snippet can be + generated, we return "No snippet is available for this + page." A ``snippet_status`` with ``SUCCESS`` or + ``NO_SNIPPET_AVAILABLE`` will also be returned. """ max_snippet_count: int = proto.Field( @@ -1104,123 +1057,112 @@ class SnippetSpec(proto.Message): ) class SummarySpec(proto.Message): - r"""A specification for configuring a summary returned in a - search response. + r"""A specification for configuring a summary returned in a search + response. Attributes: summary_result_count (int): - The number of top results to generate the - summary from. If the number of results returned - is less than ``summaryResultCount``, the summary - is generated from all of the results. - - At most 10 results for documents mode, or 50 for - chunks mode, can be used to generate a summary. - The chunks mode is used when + The number of top results to generate the summary from. + If the number of results returned is less than + ``summaryResultCount``, the summary is generated from + all of the results. + + At most 10 results for documents mode, or 50 for chunks + mode, can be used to generate a summary. The chunks mode + is used when `SearchRequest.ContentSearchSpec.search_result_mode `__ is set to `CHUNKS `__. include_citations (bool): - Specifies whether to include citations in the - summary. The default value is ``false``. + Specifies whether to include citations in the summary. + The default value is ``false``. - When this field is set to ``true``, summaries - include in-line citation numbers. + When this field is set to ``true``, summaries include + in-line citation numbers. Example summary including citations: - BigQuery is Google Cloud's fully managed and - completely serverless enterprise data warehouse - [1]. BigQuery supports all data types, works - across clouds, and has built-in machine learning - and business intelligence, all within a unified - platform [2, 3]. - - The citation numbers refer to the returned - search results and are 1-indexed. For example, - [1] means that the sentence is attributed to the - first search result. [2, 3] means that the - sentence is attributed to both the second and - third search results. + BigQuery is Google Cloud's fully managed and completely + serverless enterprise data warehouse [1]. BigQuery + supports all data types, works across clouds, and has + built-in machine learning and business intelligence, all + within a unified platform [2, 3]. + + The citation numbers refer to the returned search + results and are 1-indexed. For example, [1] means that + the sentence is attributed to the first search result. + [2, 3] means that the sentence is attributed to both the + second and third search results. ignore_adversarial_query (bool): - Specifies whether to filter out adversarial - queries. The default value is ``false``. + Specifies whether to filter out adversarial queries. The + default value is ``false``. - Google employs search-query classification to - detect adversarial queries. No summary is - returned if the search query is classified as an - adversarial query. For example, a user might ask - a question regarding negative comments about the - company or submit a query designed to generate - unsafe, policy-violating output. If this field - is set to ``true``, we skip generating summaries - for adversarial queries and return fallback - messages instead. + Google employs search-query classification to detect + adversarial queries. No summary is returned if the + search query is classified as an adversarial query. For + example, a user might ask a question regarding negative + comments about the company or submit a query designed to + generate unsafe, policy-violating output. If this field + is set to ``true``, we skip generating summaries for + adversarial queries and return fallback messages + instead. ignore_non_summary_seeking_query (bool): - Specifies whether to filter out queries that are - not summary-seeking. The default value is - ``false``. - - Google employs search-query classification to - detect summary-seeking queries. No summary is - returned if the search query is classified as a - non-summary seeking query. For example, ``why is - the sky blue`` and ``Who is the best soccer - player in the world?`` are summary-seeking - queries, but ``SFO airport`` and ``world cup - 2026`` are not. They are most likely - navigational queries. If this field is set to - ``true``, we skip generating summaries for - non-summary seeking queries and return fallback - messages instead. + Specifies whether to filter out queries that are not + summary-seeking. The default value is ``false``. + + Google employs search-query classification to detect + summary-seeking queries. No summary is returned if the + search query is classified as a non-summary seeking + query. For example, ``why is the sky blue`` and ``Who is + the best soccer player in the world?`` are + summary-seeking queries, but ``SFO airport`` and ``world + cup 2026`` are not. They are most likely navigational + queries. If this field is set to ``true``, we skip + generating summaries for non-summary seeking queries and + return fallback messages instead. ignore_low_relevant_content (bool): - Specifies whether to filter out queries that - have low relevance. The default value is - ``false``. - - If this field is set to ``false``, all search - results are used regardless of relevance to - generate answers. If set to ``true``, only - queries with high relevance search results will - generate answers. + Specifies whether to filter out queries that have low + relevance. The default value is ``false``. + + If this field is set to ``false``, all search results + are used regardless of relevance to generate answers. If + set to ``true``, only queries with high relevance search + results will generate answers. ignore_jail_breaking_query (bool): - Optional. Specifies whether to filter out - jail-breaking queries. The default value is - ``false``. - - Google employs search-query classification to - detect jail-breaking queries. No summary is - returned if the search query is classified as a - jail-breaking query. A user might add - instructions to the query to change the tone, - style, language, content of the answer, or ask - the model to act as a different entity, e.g. - "Reply in the tone of a competing company's - CEO". If this field is set to ``true``, we skip - generating summaries for jail-breaking queries - and return fallback messages instead. + Optional. Specifies whether to filter out jail-breaking + queries. The default value is ``false``. + + Google employs search-query classification to detect + jail-breaking queries. No summary is returned if the + search query is classified as a jail-breaking query. A + user might add instructions to the query to change the + tone, style, language, content of the answer, or ask the + model to act as a different entity, e.g. "Reply in the + tone of a competing company's CEO". If this field is set + to ``true``, we skip generating summaries for + jail-breaking queries and return fallback messages + instead. model_prompt_spec (google.cloud.discoveryengine_v1.types.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec): - If specified, the spec will be used to modify - the prompt provided to the LLM. + If specified, the spec will be used to modify the + prompt provided to the LLM. language_code (str): - Language code for Summary. Use language tags - defined by `BCP47 - `__. - Note: This is an experimental feature. + Language code for Summary. Use language tags defined by + `BCP47 + `__. Note: + This is an experimental feature. model_spec (google.cloud.discoveryengine_v1.types.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec): - If specified, the spec will be used to modify - the model specification provided to the LLM. + If specified, the spec will be used to modify the + model specification provided to the LLM. use_semantic_chunks (bool): - If true, answer will be generated from most - relevant chunks from top search results. This - feature will improve summary quality. Note that - with this feature enabled, not all top search - results will be referenced and included in the - reference list, so the citation source index - only points to the search results listed in the - reference list. + If true, answer will be generated from most relevant + chunks from top search results. This feature will + improve summary quality. Note that with this feature + enabled, not all top search results will be referenced + and included in the reference list, so the citation + source index only points to the search results listed in + the reference list. """ class ModelPromptSpec(proto.Message): @@ -1228,9 +1170,8 @@ class ModelPromptSpec(proto.Message): Attributes: preamble (str): - Text at the beginning of the prompt that - instructs the assistant. Examples are available - in the user guide. + Text at the beginning of the prompt that instructs + the assistant. Examples are available in the user guide. """ preamble: str = proto.Field( @@ -1247,16 +1188,15 @@ class ModelSpec(proto.Message): Supported values are: - * ``stable``: string. Default value when no - value is specified. Uses a generally - available, fine-tuned model. For more - information, see `Answer generation model - versions and + * ``stable``: string. Default value when no value is + specified. Uses a generally available, fine-tuned + model. For more information, see `Answer generation + model versions and lifecycle `__. - * ``preview``: string. (Public preview) Uses a - preview model. For more information, see + * ``preview``: string. (Public preview) Uses a preview + model. For more information, see `Answer generation model versions and lifecycle `__. @@ -1313,33 +1253,31 @@ class ModelSpec(proto.Message): ) class ExtractiveContentSpec(proto.Message): - r"""A specification for configuring the extractive content in a - search response. + r"""A specification for configuring the extractive content in a search + response. Attributes: max_extractive_answer_count (int): - The maximum number of extractive answers - returned in each search result. + The maximum number of extractive answers returned in + each search result. - An extractive answer is a verbatim answer - extracted from the original document, which - provides a precise and contextually relevant - answer to the search query. + An extractive answer is a verbatim answer extracted from + the original document, which provides a precise and + contextually relevant answer to the search query. - If the number of matching answers is less than - the ``max_extractive_answer_count``, return all - of the answers. Otherwise, return the + If the number of matching answers is less than the + ``max_extractive_answer_count``, return all of the + answers. Otherwise, return the ``max_extractive_answer_count``. At most five answers are returned for each `SearchResult `__. max_extractive_segment_count (int): - The max number of extractive segments returned - in each search result. Only applied if the + The max number of extractive segments returned in each + search result. Only applied if the `DataStore - `__ - is set to + `__ is set to `DataStore.ContentConfig.CONTENT_REQUIRED `__ or @@ -1349,32 +1287,30 @@ class ExtractiveContentSpec(proto.Message): `SOLUTION_TYPE_CHAT `__. - An extractive segment is a text segment - extracted from the original document that is - relevant to the search query, and, in general, - more verbose than an extractive answer. The - segment could then be used as input for LLMs to - generate summaries and answers. + An extractive segment is a text segment extracted from + the original document that is relevant to the search + query, and, in general, more verbose than an extractive + answer. The segment could then be used as input for LLMs + to generate summaries and answers. If the number of matching segments is less than - ``max_extractive_segment_count``, return all of - the segments. Otherwise, return the + ``max_extractive_segment_count``, return all of the + segments. Otherwise, return the ``max_extractive_segment_count``. return_extractive_segment_score (bool): - Specifies whether to return the confidence score - from the extractive segments in each search - result. This feature is available only for new - or allowlisted data stores. To allowlist your - data store, contact your Customer Engineer. The - default value is ``false``. + Specifies whether to return the confidence score from + the extractive segments in each search result. This + feature is available only for new or allowlisted data + stores. To allowlist your data store, contact your + Customer Engineer. The default value is ``false``. num_previous_segments (int): - Specifies whether to also include the adjacent - from each selected segments. - Return at most ``num_previous_segments`` - segments before each selected segments. + Specifies whether to also include the adjacent from each + selected segments. + Return at most ``num_previous_segments`` segments before + each selected segments. num_next_segments (int): - Return at most ``num_next_segments`` segments - after each selected segments. + Return at most ``num_next_segments`` segments after each + selected segments. """ max_extractive_answer_count: int = proto.Field( @@ -1399,8 +1335,8 @@ class ExtractiveContentSpec(proto.Message): ) class ChunkSpec(proto.Message): - r"""Specifies the chunk spec to be returned from the search - response. Only available if the + r"""Specifies the chunk spec to be returned from the search response. + Only available if the `SearchRequest.ContentSearchSpec.search_result_mode `__ is set to @@ -1409,15 +1345,13 @@ class ChunkSpec(proto.Message): Attributes: num_previous_chunks (int): - The number of previous chunks to be returned - of the current chunk. The maximum allowed value - is 3. If not specified, no previous chunks will - be returned. + The number of previous chunks to be returned of the + current chunk. The maximum allowed value is 3. + If not specified, no previous chunks will be returned. num_next_chunks (int): - The number of next chunks to be returned of - the current chunk. The maximum allowed value is - 3. If not specified, no next chunks will be - returned. + The number of next chunks to be returned of the + current chunk. The maximum allowed value is 3. + If not specified, no next chunks will be returned. """ num_previous_chunks: int = proto.Field( @@ -1462,15 +1396,15 @@ class SearchAsYouTypeSpec(proto.Message): Attributes: condition (google.cloud.discoveryengine_v1.types.SearchRequest.SearchAsYouTypeSpec.Condition): - The condition under which search as you type - should occur. Default to + The condition under which search as you type should + occur. Default to `Condition.DISABLED `__. """ class Condition(proto.Enum): - r"""Enum describing under which condition search as you type - should occur. + r"""Enum describing under which condition search as you type should + occur. Values: CONDITION_UNSPECIFIED (0): @@ -1503,13 +1437,13 @@ class DisplaySpec(proto.Message): Attributes: match_highlighting_condition (google.cloud.discoveryengine_v1.types.SearchRequest.DisplaySpec.MatchHighlightingCondition): - The condition under which match highlighting - should occur. + The condition under which match highlighting should + occur. """ class MatchHighlightingCondition(proto.Enum): - r"""Enum describing under which condition match highlighting - should occur. + r"""Enum describing under which condition match highlighting should + occur. Values: MATCH_HIGHLIGHTING_CONDITION_UNSPECIFIED (0): @@ -1533,18 +1467,17 @@ class MatchHighlightingCondition(proto.Enum): class SessionSpec(proto.Message): r"""Session specification. - Multi-turn Search feature is currently at private GA stage. - Please use v1alpha or v1beta version instead before we launch - this feature to public GA. Or ask for allowlisting through - Google Support team. + Multi-turn Search feature is currently at private GA stage. Please use + v1alpha or v1beta version instead before we launch this feature to + public GA. Or ask for allowlisting through Google Support team. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: query_id (str): - If set, the search result gets stored to the - "turn" specified by this query ID. + If set, the search result gets stored to the "turn" + specified by this query ID. Example: Let's say the session looks like this: @@ -1555,36 +1488,33 @@ class SessionSpec(proto.Message): ".../questions/yyy" } answer: "Foo is ..." } turns { - query { text: "How about bar then?" - query_id: ".../questions/zzz" } } + query { text: "How about bar then?" query_id: + ".../questions/zzz" } } } - The user can call /search API with a request - like this: + The user can call /search API with a request like this: session: ".../sessions/xxx" - session_spec { query_id: ".../questions/zzz" - } - - Then, the API stores the search result, - associated with the last turn. The stored search - result can be used by a subsequent /answer API - call (with the session ID and the query ID - specified). Also, it is possible to call /search - and /answer in parallel with the same session ID + session_spec { query_id: ".../questions/zzz" } + + Then, the API stores the search result, associated with + the last turn. The stored search result can be used by a + subsequent /answer API call (with the session ID and the + query ID specified). Also, it is possible to call + /search and /answer in parallel with the same session ID & query ID. search_result_persistence_count (int): The number of top search results to persist. The - persisted search results can be used for the - subsequent /answer api call. + persisted search results can be used for the subsequent + /answer api call. - This field is similar to the - ``summary_result_count`` field in + This field is similar to the ``summary_result_count`` + field in `SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count `__. - At most 10 results for documents mode, or 50 for - chunks mode. + At most 10 results for documents mode, or 50 for chunks + mode. This field is a member of `oneof`_ ``_search_result_persistence_count``. """ @@ -1604,9 +1534,9 @@ class RelevanceScoreSpec(proto.Message): Attributes: return_relevance_score (bool): - Optional. Whether to return the relevance - score for search results. The higher the score, - the more relevant the document is to the query. + Optional. Whether to return the relevance score for + search results. The higher the score, the more relevant + the document is to the query. """ return_relevance_score: bool = proto.Field( @@ -1760,36 +1690,34 @@ class RelevanceScoreSpec(proto.Message): class SearchResponse(proto.Message): r"""Response message for `SearchService.Search - `__ - method. + `__ method. Attributes: results (MutableSequence[google.cloud.discoveryengine_v1.types.SearchResponse.SearchResult]): - A list of matched documents. The order - represents the ranking. + A list of matched documents. The order represents the + ranking. facets (MutableSequence[google.cloud.discoveryengine_v1.types.SearchResponse.Facet]): Results of facets requested by user. total_size (int): - The estimated total count of matched items - irrespective of pagination. The count of - `results + The estimated total count of matched items irrespective + of pagination. The count of `results `__ returned by pagination may be less than the `total_size `__ that matches. attribution_token (str): - A unique search token. This should be included - in the `UserEvent - `__ - logs resulting from this search, which enables - accurate attribution of search model - performance. This also helps to identify a - request during the customer support scenarios. + A unique search token. This should be included in the + `UserEvent + `__ logs + resulting from this search, which enables accurate + attribution of search model performance. This also helps + to identify a request during the customer support + scenarios. redirect_uri (str): - The URI of a customer-defined redirect page. If - redirect action is triggered, no search is - performed, and only `redirect_uri + The URI of a customer-defined redirect page. If redirect + action is triggered, no search is performed, and only + `redirect_uri `__ and `attribution_token @@ -1799,13 +1727,13 @@ class SearchResponse(proto.Message): A token that can be sent as `SearchRequest.page_token `__ - to retrieve the next page. If this field is - omitted, there are no subsequent pages. + to retrieve the next page. If this field is omitted, + there are no subsequent pages. corrected_query (str): - Contains the spell corrected query, if found. If - the spell correction type is AUTOMATIC, then the - search results are based on corrected_query. - Otherwise the original query is used for search. + Contains the spell corrected query, if found. If the + spell correction type is AUTOMATIC, then the search + results are based on corrected_query. Otherwise the + original query is used for search. summary (google.cloud.discoveryengine_v1.types.SearchResponse.Summary): A summary as part of the search results. This field is only returned if @@ -1813,16 +1741,14 @@ class SearchResponse(proto.Message): `__ is set. query_expansion_info (google.cloud.discoveryengine_v1.types.SearchResponse.QueryExpansionInfo): - Query expansion information for the returned - results. + Query expansion information for the returned results. session_info (google.cloud.discoveryengine_v1.types.SearchResponse.SessionInfo): Session information. Only set if `SearchRequest.session `__ - is provided. See its description for more - details. + is provided. See its description for more details. search_link_promotions (MutableSequence[google.cloud.discoveryengine_v1.types.SearchLinkPromotion]): Promotions for site search. """ @@ -1833,13 +1759,12 @@ class SearchResult(proto.Message): Attributes: id (str): `Document.id - `__ - of the searched `Document + `__ of the + searched `Document `__. document (google.cloud.discoveryengine_v1.types.Document): - The document data snippet in the search - response. Only fields that are marked as - ``retrievable`` are populated. + The document data snippet in the search response. Only + fields that are marked as ``retrievable`` are populated. chunk (google.cloud.discoveryengine_v1.types.Chunk): The chunk data in the search response if the `SearchRequest.ContentSearchSpec.search_result_mode @@ -1848,11 +1773,9 @@ class SearchResult(proto.Message): `CHUNKS `__. model_scores (MutableMapping[str, google.cloud.discoveryengine_v1.types.DoubleList]): - Output only. Google provided available - scores. + Output only. Google provided available scores. rank_signals (google.cloud.discoveryengine_v1.types.SearchResponse.SearchResult.RankSignals): - A set of ranking signals associated with the - result. + A set of ranking signals associated with the result. """ class RankSignals(proto.Message): @@ -1874,8 +1797,7 @@ class RankSignals(proto.Message): This field is a member of `oneof`_ ``_semantic_similarity_score``. pctr_rank (float): - Predicted conversion rate adjustment as a - rank. + Predicted conversion rate adjustment as a rank. This field is a member of `oneof`_ ``_pctr_rank``. topicality_rank (float): @@ -1903,8 +1825,8 @@ class CustomSignal(proto.Message): name (str): Name of the signal. value (float): - Float value representing the ranking signal - (e.g. 1.25 for BM25). + Float value representing the ranking signal (e.g. + 1.25 for BM25). """ name: str = proto.Field( @@ -1994,8 +1916,8 @@ class Facet(proto.Message): Attributes: key (str): - The key for this facet. For example, - ``"colors"`` or ``"price"``. It matches + The key for this facet. For example, ``"colors"`` or + ``"price"``. It matches `SearchRequest.FacetSpec.FacetKey.key `__. values (MutableSequence[google.cloud.discoveryengine_v1.types.SearchResponse.Facet.FacetValue]): @@ -2016,13 +1938,13 @@ class FacetValue(proto.Message): Attributes: value (str): - Text value of a facet, such as "Black" for - facet "colors". + Text value of a facet, such as "Black" for facet + "colors". This field is a member of `oneof`_ ``facet_value``. interval (google.cloud.discoveryengine_v1.types.Interval): - Interval value for a facet, such as `10, 20) for - facet "price". It matches + Interval value for a facet, such as `10, 20) for facet + "price". It matches [SearchRequest.FacetSpec.FacetKey.intervals `__. @@ -2064,19 +1986,18 @@ class FacetValue(proto.Message): ) class Summary(proto.Message): - r"""Summary of the top N search results specified by the summary - spec. + r"""Summary of the top N search results specified by the summary spec. Attributes: summary_text (str): The summary content. summary_skipped_reasons (MutableSequence[google.cloud.discoveryengine_v1.types.SearchResponse.Summary.SummarySkippedReason]): - Additional summary-skipped reasons. This - provides the reason for ignored cases. If - nothing is skipped, this field is not set. + Additional summary-skipped reasons. This provides the + reason for ignored cases. If nothing is skipped, this + field is not set. safety_attributes (google.cloud.discoveryengine_v1.types.SearchResponse.Summary.SafetyAttributes): - A collection of Safety Attribute categories - and their associated confidence scores. + A collection of Safety Attribute categories and their + associated confidence scores. summary_with_metadata (google.cloud.discoveryengine_v1.types.SearchResponse.Summary.SummaryWithMetadata): Summary with metadata information. """ @@ -2165,18 +2086,17 @@ class SummarySkippedReason(proto.Enum): TIME_OUT = 10 class SafetyAttributes(proto.Message): - r"""Safety Attribute categories and their associated confidence - scores. + r"""Safety Attribute categories and their associated confidence scores. Attributes: categories (MutableSequence[str]): - The display names of Safety Attribute - categories associated with the generated - content. Order matches the Scores. + The display names of Safety Attribute categories + associated with the generated content. Order matches the + Scores. scores (MutableSequence[float]): - The confidence scores of the each category, - higher value means higher confidence. Order - matches the Categories. + The confidence scores of the each category, higher + value means higher confidence. Order matches the + Categories. """ categories: MutableSequence[str] = proto.RepeatedField( @@ -2209,8 +2129,8 @@ class Citation(proto.Message): Attributes: start_index (int): - Index indicates the start of the segment, - measured in bytes/unicode. + Index indicates the start of the segment, measured in + bytes/unicode. end_index (int): End of the attributed segment, exclusive. sources (MutableSequence[google.cloud.discoveryengine_v1.types.SearchResponse.Summary.CitationSource]): @@ -2239,9 +2159,9 @@ class CitationSource(proto.Message): Attributes: reference_index (int): Document reference index from - SummaryWithMetadata.references. It is 0-indexed - and the value will be zero if the - reference_index is not set explicitly. + SummaryWithMetadata.references. It is 0-indexed and the + value will be zero if the reference_index is not set + explicitly. """ reference_index: int = proto.Field( @@ -2258,15 +2178,15 @@ class Reference(proto.Message): document (str): Required. `Document.name - `__ - of the document. Full resource name of the - referenced document, in the format + `__ of + the document. Full resource name of the referenced + document, in the format ``projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*``. uri (str): Cloud Storage or HTTP uri for the document. chunk_contents (MutableSequence[google.cloud.discoveryengine_v1.types.SearchResponse.Summary.Reference.ChunkContent]): - List of cited chunk contents derived from - document content. + List of cited chunk contents derived from document + content. """ class ChunkContent(proto.Message): @@ -2362,16 +2282,15 @@ class SummaryWithMetadata(proto.Message): ) class QueryExpansionInfo(proto.Message): - r"""Information describing query expansion including whether - expansion has occurred. + r"""Information describing query expansion including whether expansion + has occurred. Attributes: expanded_query (bool): - Bool describing whether query expansion has - occurred. + Bool describing whether query expansion has occurred. pinned_result_count (int): - Number of pinned results. This field will only - be set when expansion happens and + Number of pinned results. This field will only be set + when expansion happens and `SearchRequest.QueryExpansionSpec.pin_unexpanded_results `__ is set to true. @@ -2395,17 +2314,16 @@ class SessionInfo(proto.Message): If the auto-session mode is used (when `SearchRequest.session `__ - ends with "-"), this field holds the newly - generated session name. + ends with "-"), this field holds the newly generated + session name. query_id (str): - Query ID that corresponds to this search API - call. One session can have multiple turns, each - with a unique query ID. - - By specifying the session name and this query ID - in the Answer API call, the answer generation - happens in the context of the search results - from this search call. + Query ID that corresponds to this search API call. + One session can have multiple turns, each with a unique + query ID. + + By specifying the session name and this query ID in the + Answer API call, the answer generation happens in the + context of the search results from this search call. """ name: str = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/search_tuning_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/search_tuning_service.py index 055ca583be5d..888d05e4c679 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/search_tuning_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/search_tuning_service.py @@ -43,11 +43,11 @@ class ListCustomModelsRequest(proto.Message): Attributes: data_store (str): - Required. The resource name of the parent Data - Store, such as + Required. The resource name of the parent Data Store, + such as ``projects/*/locations/global/collections/default_collection/dataStores/default_data_store``. - This field is used to identify the data store - where to fetch the models from. + This field is used to identify the data store where to + fetch the models from. """ data_store: str = proto.Field( @@ -91,19 +91,18 @@ class TrainCustomModelRequest(proto.Message): This field is a member of `oneof`_ ``training_input``. data_store (str): - Required. The resource name of the Data Store, - such as + Required. The resource name of the Data Store, such as ``projects/*/locations/global/collections/default_collection/dataStores/default_data_store``. - This field is used to identify the data store - where to train the models. + This field is used to identify the data store where to + train the models. model_type (str): Model to be trained. Supported values are: - * **search-tuning**: Fine tuning the search - system based on data provided. + * **search-tuning**: Fine tuning the search system based + on data provided. error_config (google.cloud.discoveryengine_v1.types.ImportErrorConfig): - The desired location of errors incurred - during the data ingestion and training. + The desired location of errors incurred during the + data ingestion and training. model_id (str): If not provided, a UUID will be generated. """ @@ -113,45 +112,42 @@ class GcsTrainingInput(proto.Message): Attributes: corpus_data_path (str): - The Cloud Storage corpus data which could be - associated in train data. The data path format - is ``gs:///``. - A newline delimited jsonl/ndjson file. + The Cloud Storage corpus data which could be associated + in train data. The data path format is + ``gs:///``. A newline + delimited jsonl/ndjson file. - For search-tuning model, each line should have - the _id, title and text. Example: + For search-tuning model, each line should have the _id, + title and text. Example: ``{"_id": "doc1", title: "relevant doc", "text": "relevant text"}`` query_data_path (str): - The gcs query data which could be associated in - train data. The data path format is - ``gs:///``. A - newline delimited jsonl/ndjson file. - - For search-tuning model, each line should have - the _id and text. Example: {"_id": "query1", - "text": "example query"} + The gcs query data which could be associated in train + data. The data path format is + ``gs:///``. A newline + delimited jsonl/ndjson file. + + For search-tuning model, each line should have the _id + and text. Example: {"_id": "query1", "text": "example + query"} train_data_path (str): - Cloud Storage training data path whose format - should be - ``gs:///``. The - file should be in tsv format. Each line should - have the doc_id and query_id and score (number). - - For search-tuning model, it should have the - query-id corpus-id score as tsv file header. The - score should be a number in ``[0, inf+)``. The - larger the number is, the more relevant the pair - is. Example: + Cloud Storage training data path whose format should be + ``gs:///``. The file + should be in tsv format. Each line should have the + doc_id and query_id and score (number). + + For search-tuning model, it should have the query-id + corpus-id score as tsv file header. The score should be + a number in ``[0, inf+)``. The larger the number is, the + more relevant the pair is. Example: * ``query-id\tcorpus-id\tscore`` * ``query1\tdoc1\t1`` test_data_path (str): - Cloud Storage test data. Same format as - train_data_path. If not provided, a random 80/20 - train/test split will be performed on - train_data_path. + Cloud Storage test data. Same format as train_data_path. + If not provided, a random 80/20 train/test split will be + performed on train_data_path. """ corpus_data_path: str = proto.Field( @@ -199,39 +195,35 @@ class GcsTrainingInput(proto.Message): class TrainCustomModelResponse(proto.Message): r"""Response of the `TrainCustomModelRequest - `__. - This message is returned by the - google.longrunning.Operations.response field. + `__. This + message is returned by the google.longrunning.Operations.response field. Attributes: error_samples (MutableSequence[google.rpc.status_pb2.Status]): - A sample of errors encountered while - processing the data. + A sample of errors encountered while processing the + data. error_config (google.cloud.discoveryengine_v1.types.ImportErrorConfig): - Echoes the destination for the complete - errors in the request if set. + Echoes the destination for the complete errors in the + request if set. model_status (str): The trained model status. Possible values are: - * **bad-data**: The training data quality is - bad. + * **bad-data**: The training data quality is bad. - * **no-improvement**: Tuning didn't improve - performance. Won't deploy. * **in-progress**: - Model training job creation is in progress. + * **no-improvement**: Tuning didn't improve performance. + Won't deploy. * **in-progress**: Model training job + creation is in progress. * **training**: Model is actively training. - * **evaluating**: The model is evaluating - trained metrics. + * **evaluating**: The model is evaluating trained + metrics. - * **indexing**: The model trained metrics are - indexing. * **ready**: The model is ready for - serving. + * **indexing**: The model trained metrics are indexing. + * **ready**: The model is ready for serving. metrics (MutableMapping[str, float]): The metrics of the trained model. model_name (str): - Fully qualified name of the - CustomTuningModel. + Fully qualified name of the CustomTuningModel. """ error_samples: MutableSequence[status_pb2.Status] = proto.RepeatedField( @@ -260,16 +252,15 @@ class TrainCustomModelResponse(proto.Message): class TrainCustomModelMetadata(proto.Message): - r"""Metadata related to the progress of the TrainCustomModel - operation. This is returned by the - google.longrunning.Operation.metadata field. + r"""Metadata related to the progress of the TrainCustomModel operation. + This is returned by the google.longrunning.Operation.metadata field. Attributes: create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/serving_config.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/serving_config.py index b49fd8941e64..180d7a51bfea 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/serving_config.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/serving_config.py @@ -31,9 +31,9 @@ class ServingConfig(proto.Message): - r"""Configures metadata that is used to generate serving time - results (e.g. search results or recommendation predictions). The - ServingConfig is passed in the search and predict request and + r"""Configures metadata that is used to generate serving time results + (e.g. search results or recommendation predictions). + The ServingConfig is passed in the search and predict request and generates results. This message has `oneof`_ fields (mutually exclusive fields). @@ -49,40 +49,36 @@ class ServingConfig(proto.Message): This field is a member of `oneof`_ ``vertical_config``. generic_config (google.cloud.discoveryengine_v1.types.ServingConfig.GenericConfig): - The GenericConfig of the serving - configuration. + The GenericConfig of the serving configuration. This field is a member of `oneof`_ ``vertical_config``. name (str): Immutable. Fully qualified name ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}`` display_name (str): - Required. The human readable serving config - display name. Used in Discovery UI. + Required. The human readable serving config display + name. Used in Discovery UI. - This field must be a UTF-8 encoded string with a - length limit of 128 characters. Otherwise, an - INVALID_ARGUMENT error is returned. + This field must be a UTF-8 encoded string with a length + limit of 128 characters. Otherwise, an INVALID_ARGUMENT + error is returned. solution_type (google.cloud.discoveryengine_v1.types.SolutionType): - Required. Immutable. Specifies the solution - type that a serving config can be associated - with. + Required. Immutable. Specifies the solution type that + a serving config can be associated with. model_id (str): The id of the model to use at serving time. - Currently only RecommendationModels are - supported. Can be changed but only to a - compatible model (e.g. others-you-may-like CTR - to others-you-may-like CVR). + Currently only RecommendationModels are supported. + Can be changed but only to a compatible model (e.g. + others-you-may-like CTR to others-you-may-like CVR). Required when `SolutionType - `__ - is + `__ is `SOLUTION_TYPE_RECOMMENDATION `__. diversity_level (str): - How much diversity to use in recommendation - model results e.g. ``medium-diversity`` or - ``high-diversity``. Currently supported values: + How much diversity to use in recommendation model + results e.g. ``medium-diversity`` or ``high-diversity``. + Currently supported values: * ``no-diversity`` * ``low-diversity`` @@ -98,25 +94,22 @@ class ServingConfig(proto.Message): Can only be set if `SolutionType - `__ - is `SOLUTION_TYPE_RECOMMENDATION + `__ is + `SOLUTION_TYPE_RECOMMENDATION `__. ranking_expression (str): - The ranking expression controls the customized - ranking on retrieval documents. To leverage - this, document embedding is required. The - ranking expression setting in ServingConfig - applies to all search requests served by the - serving config. However, if - ``SearchRequest.ranking_expression`` is - specified, it overrides the ServingConfig - ranking expression. - - The ranking expression is a single function or - multiple functions that are joined by "+". - - * ranking_expression = function, { " + ", - function }; + The ranking expression controls the customized ranking + on retrieval documents. To leverage this, document + embedding is required. The ranking expression setting in + ServingConfig applies to all search requests served by + the serving config. However, if + ``SearchRequest.ranking_expression`` is specified, it + overrides the ServingConfig ranking expression. + + The ranking expression is a single function or multiple + functions that are joined by "+". + + * ranking_expression = function, { " + ", function }; Supported functions: @@ -125,24 +118,20 @@ class ServingConfig(proto.Message): Function variables: - * ``relevance_score``: pre-defined keywords, - used for measure relevance between query and - document. + * ``relevance_score``: pre-defined keywords, used for + measure relevance between query and document. - * ``embedding_field_path``: the document - embedding field used with query embedding - vector. + * ``embedding_field_path``: the document embedding field + used with query embedding vector. * ``dotProduct``: embedding function between - embedding_field_path and query embedding - vector. + embedding_field_path and query embedding vector. Example ranking expression: - If document has an embedding field - doc_embedding, the ranking expression could - be ``0.5 * relevance_score + 0.3 * - dotProduct(doc_embedding)``. + If document has an embedding field doc_embedding, the + ranking expression could be ``0.5 * relevance_score + + 0.3 * dotProduct(doc_embedding)``. create_time (google.protobuf.timestamp_pb2.Timestamp): Output only. ServingConfig created timestamp. update_time (google.protobuf.timestamp_pb2.Timestamp): @@ -150,78 +139,72 @@ class ServingConfig(proto.Message): filter_control_ids (MutableSequence[str]): Filter controls to use in serving path. All triggered filter controls will be applied. - Filter controls must be in the same data store - as the serving config. Maximum of 20 filter - controls. + Filter controls must be in the same data store as the + serving config. Maximum of 20 filter controls. boost_control_ids (MutableSequence[str]): Boost controls to use in serving path. All triggered boost controls will be applied. - Boost controls must be in the same data store as - the serving config. Maximum of 20 boost - controls. + Boost controls must be in the same data store as the + serving config. Maximum of 20 boost controls. redirect_control_ids (MutableSequence[str]): - IDs of the redirect controls. Only the first - triggered redirect action is applied, even if - multiple apply. Maximum number of specifications - is 100. + IDs of the redirect controls. Only the first triggered + redirect action is applied, even if multiple apply. + Maximum number of specifications is 100. Can only be set if `SolutionType - `__ - is `SOLUTION_TYPE_SEARCH + `__ is + `SOLUTION_TYPE_SEARCH `__. synonyms_control_ids (MutableSequence[str]): - Condition synonyms specifications. If multiple - synonyms conditions match, all matching synonyms - controls in the list will execute. Maximum - number of specifications is 100. + Condition synonyms specifications. If multiple synonyms + conditions match, all matching synonyms controls in the + list will execute. Maximum number of specifications is + 100. Can only be set if `SolutionType - `__ - is `SOLUTION_TYPE_SEARCH + `__ is + `SOLUTION_TYPE_SEARCH `__. oneway_synonyms_control_ids (MutableSequence[str]): - Condition oneway synonyms specifications. If - multiple oneway synonyms conditions match, all - matching oneway synonyms controls in the list - will execute. Maximum number of specifications - is 100. + Condition oneway synonyms specifications. If multiple + oneway synonyms conditions match, all matching oneway + synonyms controls in the list will execute. Maximum + number of specifications is 100. Can only be set if `SolutionType - `__ - is `SOLUTION_TYPE_SEARCH + `__ is + `SOLUTION_TYPE_SEARCH `__. dissociate_control_ids (MutableSequence[str]): - Condition do not associate specifications. If - multiple do not associate conditions match, all - matching do not associate controls in the list - will execute. + Condition do not associate specifications. If multiple + do not associate conditions match, all matching do not + associate controls in the list will execute. Order does not matter. Maximum number of specifications is 100. Can only be set if `SolutionType - `__ - is `SOLUTION_TYPE_SEARCH + `__ is + `SOLUTION_TYPE_SEARCH `__. replacement_control_ids (MutableSequence[str]): Condition replacement specifications. Applied according to the order in the list. - A previously replaced term can not be - re-replaced. Maximum number of specifications is - 100. + A previously replaced term can not be re-replaced. + Maximum number of specifications is 100. Can only be set if `SolutionType - `__ - is `SOLUTION_TYPE_SEARCH + `__ is + `SOLUTION_TYPE_SEARCH `__. ignore_control_ids (MutableSequence[str]): - Condition ignore specifications. If multiple - ignore conditions match, all matching ignore - controls in the list will execute. + Condition ignore specifications. If multiple ignore + conditions match, all matching ignore controls in the + list will execute. Order does not matter. Maximum number of specifications is 100. promote_control_ids (MutableSequence[str]): @@ -231,23 +214,22 @@ class ServingConfig(proto.Message): """ class MediaConfig(proto.Message): - r"""Specifies the configurations needed for Media Discovery. - Currently we support: - - * ``demote_content_watched``: Threshold for watched content - demotion. Customers can specify if using watched content - demotion or use viewed detail page. Using the content watched - demotion, customers need to specify the watched minutes or - percentage exceeds the threshold, the content will be demoted in - the recommendation result. - - * ``promote_fresh_content``: cutoff days for fresh content - promotion. Customers can specify if using content freshness - promotion. If the content was published within the cutoff days, - the content will be promoted in the recommendation result. + r"""Specifies the configurations needed for Media Discovery. Currently we + support: + + * ``demote_content_watched``: Threshold for watched content demotion. + Customers can specify if using watched content demotion or use viewed + detail page. Using the content watched demotion, customers need to + specify the watched minutes or percentage exceeds the threshold, the + content will be demoted in the recommendation result. + + * ``promote_fresh_content``: cutoff days for fresh content promotion. + Customers can specify if using content freshness promotion. If the + content was published within the cutoff days, the content will be + promoted in the recommendation result. Can only be set if - `SolutionType `__ - is `SOLUTION_TYPE_RECOMMENDATION + `SolutionType `__ is + `SOLUTION_TYPE_RECOMMENDATION `__. This message has `oneof`_ fields (mutually exclusive fields). @@ -259,41 +241,38 @@ class MediaConfig(proto.Message): Attributes: content_watched_percentage_threshold (float): - Specifies the content watched percentage - threshold for demotion. Threshold value must be - between [0, 1.0] inclusive. + Specifies the content watched percentage threshold for + demotion. Threshold value must be between [0, 1.0] + inclusive. This field is a member of `oneof`_ ``demote_content_watched``. content_watched_seconds_threshold (float): - Specifies the content watched minutes - threshold for demotion. + Specifies the content watched minutes threshold for + demotion. This field is a member of `oneof`_ ``demote_content_watched``. demotion_event_type (str): Specifies the event type used for demoting - recommendation result. Currently supported - values: + recommendation result. Currently supported values: * ``view-item``: Item viewed. - * ``media-play``: Start/resume watching a video, - playing a song, etc. + * ``media-play``: Start/resume watching a video, playing + a song, etc. - * ``media-complete``: Finished or stopped midway - through a video, song, etc. + * ``media-complete``: Finished or stopped midway through + a video, song, etc. - If unset, watch history demotion will not be - applied. Content freshness demotion will still - be applied. + If unset, watch history demotion will not be applied. + Content freshness demotion will still be applied. demote_content_watched_past_days (int): - Optional. Specifies the number of days to - look back for demoting watched content. If set - to zero or unset, defaults to the maximum of 365 - days. + Optional. Specifies the number of days to look back + for demoting watched content. If set to zero or unset, + defaults to the maximum of 365 days. content_freshness_cutoff_days (int): Specifies the content freshness used for - recommendation result. Contents will be demoted - if contents were published for more than content - freshness cutoff days. + recommendation result. Contents will be demoted if + contents were published for more than content freshness + cutoff days. """ content_watched_percentage_threshold: float = proto.Field( @@ -320,17 +299,15 @@ class MediaConfig(proto.Message): ) class GenericConfig(proto.Message): - r"""Specifies the configurations needed for Generic - Discovery.Currently we support: + r"""Specifies the configurations needed for Generic Discovery.Currently we + support: - * ``content_search_spec``: configuration for generic content - search. + * ``content_search_spec``: configuration for generic content search. Attributes: content_search_spec (google.cloud.discoveryengine_v1.types.SearchRequest.ContentSearchSpec): - Specifies the expected behavior of content - search. Only valid for content-search enabled - data store. + Specifies the expected behavior of content search. + Only valid for content-search enabled data store. """ content_search_spec: search_service.SearchRequest.ContentSearchSpec = ( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/serving_config_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/serving_config_service.py index d7d62e60f5ea..aaef0d5b19a6 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/serving_config_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/serving_config_service.py @@ -39,8 +39,8 @@ class UpdateServingConfigRequest(proto.Message): update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided `ServingConfig - `__ - to update. The following are NOT supported: + `__ to + update. The following are NOT supported: * `ServingConfig.name `__ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/session.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/session.py index 4c9d8d124653..67229c91b625 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/session.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/session.py @@ -42,9 +42,9 @@ class Session(proto.Message): display_name (str): Optional. The display name of the session. - This field is used to identify the session in - the UI. By default, the display name is the - first turn query text in the session. + This field is used to identify the session in the UI. By + default, the display name is the first turn query text + in the session. state (google.cloud.discoveryengine_v1.types.Session.State): The state of the session. user_pseudo_id (str): @@ -59,9 +59,9 @@ class Session(proto.Message): end_time (google.protobuf.timestamp_pb2.Timestamp): Output only. The time the session finished. is_pinned (bool): - Optional. Whether the session is pinned, - pinned session will be displayed on the top of - the session list. + Optional. Whether the session is pinned, pinned + session will be displayed on the top of the session + list. """ class State(proto.Enum): @@ -82,14 +82,13 @@ class Turn(proto.Message): Attributes: query (google.cloud.discoveryengine_v1.types.Query): - Optional. The user query. May not be set if - this turn is merely regenerating an answer to a - different turn + Optional. The user query. May not be set if this turn + is merely regenerating an answer to a different turn answer (str): - Optional. The resource name of the answer to - the user query. - Only set if the answer generation (/answer API - call) happened in this turn. + Optional. The resource name of the answer to the user + query. + Only set if the answer generation (/answer API call) + happened in this turn. detailed_answer (google.cloud.discoveryengine_v1.types.Answer): Output only. In `ConversationalSearchService.GetSession @@ -97,8 +96,8 @@ class Turn(proto.Message): API, if `GetSessionRequest.include_answer_details `__ - is set to true, this field will be populated - when getting answer query session. + is set to true, this field will be populated when + getting answer query session. detailed_assist_answer (google.cloud.discoveryengine_v1.types.AssistAnswer): Output only. In `ConversationalSearchService.GetSession @@ -106,14 +105,14 @@ class Turn(proto.Message): API, if `GetSessionRequest.include_answer_details `__ - is set to true, this field will be populated - when getting assistant session. + is set to true, this field will be populated when + getting assistant session. query_config (MutableMapping[str, str]): - Optional. Represents metadata related to the - query config, for example LLM model and version - used, model parameters (temperature, grounding - parameters, etc.). The prefix "google." is - reserved for Google-developed functionality. + Optional. Represents metadata related to the query + config, for example LLM model and version used, model + parameters (temperature, grounding parameters, etc.). + The prefix "google." is reserved for Google-developed + functionality. """ query: "Query" = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/site_search_engine.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/site_search_engine.py index 7d2692c8233b..399aff10bcd7 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/site_search_engine.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/site_search_engine.py @@ -32,14 +32,13 @@ class SiteSearchEngine(proto.Message): - r"""SiteSearchEngine captures DataStore level site search - persisting configurations. It is a singleton value per data - store. + r"""SiteSearchEngine captures DataStore level site search persisting + configurations. It is a singleton value per data store. Attributes: name (str): - The fully qualified resource name of the site - search engine. Format: + The fully qualified resource name of the site search + engine. Format: ``projects/*/locations/*/dataStores/*/siteSearchEngine`` """ @@ -54,42 +53,37 @@ class TargetSite(proto.Message): Attributes: name (str): - Output only. The fully qualified resource name - of the target site. + Output only. The fully qualified resource name of the + target site. ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}`` The ``target_site_id`` is system-generated. provided_uri_pattern (str): - Required. Input only. The user provided URI - pattern from which the ``generated_uri_pattern`` - is generated. + Required. Input only. The user provided URI pattern from + which the ``generated_uri_pattern`` is generated. type_ (google.cloud.discoveryengine_v1.types.TargetSite.Type): - The type of the target site, e.g., whether - the site is to be included or excluded. + The type of the target site, e.g., whether the site + is to be included or excluded. exact_match (bool): - Immutable. If set to false, a uri_pattern is - generated to include all pages whose address - contains the provided_uri_pattern. If set to - true, an uri_pattern is generated to try to be - an exact match of the provided_uri_pattern or - just the specific page if the + Immutable. If set to false, a uri_pattern is generated + to include all pages whose address contains the + provided_uri_pattern. If set to true, an uri_pattern is + generated to try to be an exact match of the + provided_uri_pattern or just the specific page if the provided_uri_pattern is a specific one. - provided_uri_pattern is always normalized to - generate the URI pattern to be used by the - search engine. + provided_uri_pattern is always normalized to generate + the URI pattern to be used by the search engine. generated_uri_pattern (str): - Output only. This is system-generated based on - the provided_uri_pattern. - root_domain_uri (str): - Output only. Root domain of the + Output only. This is system-generated based on the provided_uri_pattern. + root_domain_uri (str): + Output only. Root domain of the provided_uri_pattern. site_verification_info (google.cloud.discoveryengine_v1.types.SiteVerificationInfo): - Output only. Site ownership and validity - verification status. + Output only. Site ownership and validity verification + status. indexing_status (google.cloud.discoveryengine_v1.types.TargetSite.IndexingStatus): Output only. Indexing status. update_time (google.protobuf.timestamp_pb2.Timestamp): - Output only. The target site's last updated - time. + Output only. The target site's last updated time. failure_reason (google.cloud.discoveryengine_v1.types.TargetSite.FailureReason): Output only. Failure reason. """ @@ -164,9 +158,8 @@ class QuotaFailure(proto.Message): Attributes: total_required_quota (int): - This number is an estimation on how much - total quota this project needs to successfully - complete indexing. + This number is an estimation on how much total quota + this project needs to successfully complete indexing. """ total_required_quota: int = proto.Field( @@ -229,13 +222,12 @@ class QuotaFailure(proto.Message): class SiteVerificationInfo(proto.Message): - r"""Verification information for target sites in advanced site - search. + r"""Verification information for target sites in advanced site search. Attributes: site_verification_state (google.cloud.discoveryengine_v1.types.SiteVerificationInfo.SiteVerificationState): - Site verification state indicating the - ownership and validity. + Site verification state indicating the ownership and + validity. verify_time (google.protobuf.timestamp_pb2.Timestamp): Latest site verification time. """ @@ -284,8 +276,8 @@ class Sitemap(proto.Message): This field is a member of `oneof`_ ``feed``. name (str): - Output only. The fully qualified resource name - of the sitemap. + Output only. The fully qualified resource name of the + sitemap. ``projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/sitemaps/*`` The ``sitemap_id`` suffix is system-generated. create_time (google.protobuf.timestamp_pb2.Timestamp): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/site_search_engine_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/site_search_engine_service.py index 9b7776cd9685..8e30f8336adf 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/site_search_engine_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/site_search_engine_service.py @@ -78,10 +78,9 @@ class GetSiteSearchEngineRequest(proto.Message): such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine``. - If the caller does not have permission to access - the [SiteSearchEngine], regardless of whether or - not it exists, a PERMISSION_DENIED error is - returned. + If the caller does not have permission to access the + [SiteSearchEngine], regardless of whether or not it + exists, a PERMISSION_DENIED error is returned. """ name: str = proto.Field( @@ -100,13 +99,12 @@ class CreateTargetSiteRequest(proto.Message): parent (str): Required. Parent resource name of `TargetSite - `__, - such as + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine``. target_site (google.cloud.discoveryengine_v1.types.TargetSite): Required. The `TargetSite - `__ - to create. + `__ to + create. """ parent: str = proto.Field( @@ -131,8 +129,8 @@ class CreateTargetSiteMetadata(proto.Message): create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -155,16 +153,15 @@ class BatchCreateTargetSitesRequest(proto.Message): Attributes: parent (str): - Required. The parent resource shared by all - TargetSites being created. + Required. The parent resource shared by all TargetSites + being created. ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine``. - The parent field in the CreateBookRequest - messages must either be empty or match this - field. + The parent field in the CreateBookRequest messages must + either be empty or match this field. requests (MutableSequence[google.cloud.discoveryengine_v1.types.CreateTargetSiteRequest]): Required. The request message specifying the - resources to create. A maximum of 20 TargetSites - can be created in a batch. + resources to create. A maximum of 20 TargetSites can be + created in a batch. """ parent: str = proto.Field( @@ -188,19 +185,18 @@ class GetTargetSiteRequest(proto.Message): name (str): Required. Full resource name of `TargetSite - `__, - such as + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}``. - If the caller does not have permission to access - the `TargetSite + If the caller does not have permission to access the + `TargetSite `__, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested `TargetSite - `__ - does not exist, a NOT_FOUND error is returned. + `__ does not + exist, a NOT_FOUND error is returned. """ name: str = proto.Field( @@ -218,16 +214,15 @@ class UpdateTargetSiteRequest(proto.Message): Attributes: target_site (google.cloud.discoveryengine_v1.types.TargetSite): Required. The target site to update. - If the caller does not have permission to update - the `TargetSite + If the caller does not have permission to update the + `TargetSite `__, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the `TargetSite - `__ - to update does not exist, a NOT_FOUND error is - returned. + `__ to + update does not exist, a NOT_FOUND error is returned. """ target_site: gcd_site_search_engine.TargetSite = proto.Field( @@ -248,8 +243,8 @@ class UpdateTargetSiteMetadata(proto.Message): create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -274,19 +269,18 @@ class DeleteTargetSiteRequest(proto.Message): name (str): Required. Full resource name of `TargetSite - `__, - such as + `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}``. - If the caller does not have permission to access - the `TargetSite + If the caller does not have permission to access the + `TargetSite `__, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested `TargetSite - `__ - does not exist, a NOT_FOUND error is returned. + `__ does not + exist, a NOT_FOUND error is returned. """ name: str = proto.Field( @@ -306,8 +300,8 @@ class DeleteTargetSiteMetadata(proto.Message): create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -330,33 +324,32 @@ class ListTargetSitesRequest(proto.Message): Attributes: parent (str): - Required. The parent site search engine resource - name, such as + Required. The parent site search engine resource name, + such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine``. If the caller does not have permission to list `TargetSite - `__s - under this site search engine, regardless of - whether or not this branch exists, a - PERMISSION_DENIED error is returned. + `__s under + this site search engine, regardless of whether or not + this branch exists, a PERMISSION_DENIED error is + returned. page_size (int): - Requested page size. Server may return fewer - items than requested. If unspecified, server - will pick an appropriate default. The maximum - value is 1000; values above 1000 will be coerced - to 1000. - - If this field is negative, an INVALID_ARGUMENT - error is returned. + Requested page size. Server may return fewer items than + requested. If unspecified, server will pick an + appropriate default. The maximum value is 1000; values + above 1000 will be coerced to 1000. + + If this field is negative, an INVALID_ARGUMENT error is + returned. page_token (str): A page token, received from a previous - ``ListTargetSites`` call. Provide this to - retrieve the subsequent page. + ``ListTargetSites`` call. Provide this to retrieve the + subsequent page. - When paginating, all other parameters provided - to ``ListTargetSites`` must match the call that - provided the page token. + When paginating, all other parameters provided to + ``ListTargetSites`` must match the call that provided + the page token. """ parent: str = proto.Field( @@ -383,13 +376,12 @@ class ListTargetSitesResponse(proto.Message): target_sites (MutableSequence[google.cloud.discoveryengine_v1.types.TargetSite]): List of TargetSites. next_page_token (str): - A token that can be sent as ``page_token`` to - retrieve the next page. If this field is - omitted, there are no subsequent pages. + A token that can be sent as ``page_token`` to retrieve + the next page. If this field is omitted, there are no + subsequent pages. total_size (int): - The total number of items matching the - request. This will always be populated in the - response. + The total number of items matching the request. + This will always be populated in the response. """ @property @@ -424,8 +416,8 @@ class BatchCreateTargetSiteMetadata(proto.Message): create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -475,8 +467,7 @@ class CreateSitemapRequest(proto.Message): ``projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine``. sitemap (google.cloud.discoveryengine_v1.types.Sitemap): Required. The `Sitemap - `__ to - create. + `__ to create. """ parent: str = proto.Field( @@ -499,20 +490,18 @@ class DeleteSitemapRequest(proto.Message): Attributes: name (str): Required. Full resource name of - `Sitemap - `__, + `Sitemap `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/sitemaps/{sitemap}``. - If the caller does not have permission to access - the `Sitemap - `__, + If the caller does not have permission to access the + `Sitemap `__, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested `Sitemap - `__ - does not exist, a NOT_FOUND error is returned. + `__ does not + exist, a NOT_FOUND error is returned. """ name: str = proto.Field( @@ -536,23 +525,21 @@ class FetchSitemapsRequest(proto.Message): ``projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine``. matcher (google.cloud.discoveryengine_v1.types.FetchSitemapsRequest.Matcher): Optional. If specified, fetches the matching - `Sitemap - `__s. + `Sitemap `__s. If not specified, fetches all `Sitemap - `__s in - the `DataStore + `__s in the + `DataStore `__. """ class UrisMatcher(proto.Message): - r"""Matcher for the `Sitemap - `__s by their uris. + r"""Matcher for the `Sitemap `__s + by their uris. Attributes: uris (MutableSequence[str]): The `Sitemap - `__ - uris. + `__ uris. """ uris: MutableSequence[str] = proto.RepeatedField( @@ -561,9 +548,8 @@ class UrisMatcher(proto.Message): ) class Matcher(proto.Message): - r"""Matcher for the `Sitemap - `__s. Currently only - supports uris matcher. + r"""Matcher for the `Sitemap `__s. + Currently only supports uris matcher. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -604,8 +590,8 @@ class CreateSitemapMetadata(proto.Message): create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -631,8 +617,8 @@ class DeleteSitemapMetadata(proto.Message): create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -656,13 +642,12 @@ class FetchSitemapsResponse(proto.Message): Attributes: sitemaps_metadata (MutableSequence[google.cloud.discoveryengine_v1.types.FetchSitemapsResponse.SitemapMetadata]): List of `Sitemap - `__s - fetched. + `__s fetched. """ class SitemapMetadata(proto.Message): - r"""Contains a `Sitemap `__ - and its metadata. + r"""Contains a `Sitemap `__ and its + metadata. Attributes: sitemap (google.cloud.discoveryengine_v1.types.Sitemap): @@ -724,8 +709,8 @@ class EnableAdvancedSiteSearchMetadata(proto.Message): create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -781,8 +766,8 @@ class DisableAdvancedSiteSearchMetadata(proto.Message): create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -811,12 +796,11 @@ class RecrawlUrisRequest(proto.Message): such as ``projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine``. uris (MutableSequence[str]): - Required. List of URIs to crawl. At most 10K - URIs are supported, otherwise an - INVALID_ARGUMENT error is thrown. Each URI - should match at least one `TargetSite - `__ - in ``site_search_engine``. + Required. List of URIs to crawl. At most 10K URIs are + supported, otherwise an INVALID_ARGUMENT error is + thrown. Each URI should match at least one `TargetSite + `__ in + ``site_search_engine``. site_credential (str): Optional. Credential id to use for crawling. """ @@ -843,11 +827,9 @@ class RecrawlUrisResponse(proto.Message): Attributes: failure_samples (MutableSequence[google.cloud.discoveryengine_v1.types.RecrawlUrisResponse.FailureInfo]): - Details for a sample of up to 10 - ``failed_uris``. + Details for a sample of up to 10 ``failed_uris``. failed_uris (MutableSequence[str]): - URIs that were not crawled before the LRO - terminated. + URIs that were not crawled before the LRO terminated. """ class FailureInfo(proto.Message): @@ -858,14 +840,13 @@ class FailureInfo(proto.Message): uri (str): URI that failed to be crawled. failure_reasons (MutableSequence[google.cloud.discoveryengine_v1.types.RecrawlUrisResponse.FailureInfo.FailureReason]): - List of failure reasons by corpus type (e.g. - desktop, mobile). + List of failure reasons by corpus type (e.g. desktop, + mobile). """ class FailureReason(proto.Message): - r"""Details about why crawling failed for a particular - CorpusType, e.g., DESKTOP and MOBILE crawling may fail for - different reasons. + r"""Details about why crawling failed for a particular CorpusType, e.g., + DESKTOP and MOBILE crawling may fail for different reasons. Attributes: corpus_type (google.cloud.discoveryengine_v1.types.RecrawlUrisResponse.FailureInfo.FailureReason.CorpusType): @@ -937,41 +918,37 @@ class RecrawlUrisMetadata(proto.Message): create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. invalid_uris (MutableSequence[str]): - Unique URIs in the request that have invalid - format. Sample limited to 1000. + Unique URIs in the request that have invalid format. + Sample limited to 1000. invalid_uris_count (int): - Total number of unique URIs in the request - that have invalid format. + Total number of unique URIs in the request that have + invalid format. noindex_uris (MutableSequence[str]): - URIs that have no index meta tag. Sample - limited to 1000. + URIs that have no index meta tag. Sample limited to + 1000. noindex_uris_count (int): - Total number of URIs that have no index meta - tag. + Total number of URIs that have no index meta tag. uris_not_matching_target_sites (MutableSequence[str]): - Unique URIs in the request that don't match - any TargetSite in the DataStore, only match - TargetSites that haven't been fully indexed, or - match a TargetSite with type EXCLUDE. Sample - limited to 1000. + Unique URIs in the request that don't match any + TargetSite in the DataStore, only match TargetSites that + haven't been fully indexed, or match a TargetSite with + type EXCLUDE. Sample limited to 1000. uris_not_matching_target_sites_count (int): Total number of URIs that don't match any TargetSites. valid_uris_count (int): - Total number of unique URIs in the request that - are not in invalid_uris. + Total number of unique URIs in the request that are not + in invalid_uris. success_count (int): - Total number of URIs that have been crawled - so far. + Total number of URIs that have been crawled so far. pending_count (int): - Total number of URIs that have yet to be - crawled. + Total number of URIs that have yet to be crawled. quota_exceeded_count (int): - Total number of URIs that were rejected due - to insufficient indexing resources. + Total number of URIs that were rejected due to + insufficient indexing resources. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -1034,8 +1011,8 @@ class BatchVerifyTargetSitesRequest(proto.Message): Attributes: parent (str): - Required. The parent resource shared by all - TargetSites being verified. + Required. The parent resource shared by all TargetSites + being verified. ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine``. """ @@ -1065,8 +1042,8 @@ class BatchVerifyTargetSitesMetadata(proto.Message): create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -1089,27 +1066,25 @@ class FetchDomainVerificationStatusRequest(proto.Message): Attributes: site_search_engine (str): - Required. The site search engine resource under - which we fetch all the domain verification - status. + Required. The site search engine resource under which we + fetch all the domain verification status. ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine``. page_size (int): - Requested page size. Server may return fewer - items than requested. If unspecified, server - will pick an appropriate default. The maximum - value is 1000; values above 1000 will be coerced - to 1000. - - If this field is negative, an INVALID_ARGUMENT - error is returned. + Requested page size. Server may return fewer items than + requested. If unspecified, server will pick an + appropriate default. The maximum value is 1000; values + above 1000 will be coerced to 1000. + + If this field is negative, an INVALID_ARGUMENT error is + returned. page_token (str): A page token, received from a previous - ``FetchDomainVerificationStatus`` call. Provide - this to retrieve the subsequent page. + ``FetchDomainVerificationStatus`` call. Provide this to + retrieve the subsequent page. - When paginating, all other parameters provided - to ``FetchDomainVerificationStatus`` must match - the call that provided the page token. + When paginating, all other parameters provided to + ``FetchDomainVerificationStatus`` must match the call + that provided the page token. """ site_search_engine: str = proto.Field( @@ -1134,16 +1109,15 @@ class FetchDomainVerificationStatusResponse(proto.Message): Attributes: target_sites (MutableSequence[google.cloud.discoveryengine_v1.types.TargetSite]): - List of TargetSites containing the site - verification status. + List of TargetSites containing the site verification + status. next_page_token (str): - A token that can be sent as ``page_token`` to - retrieve the next page. If this field is - omitted, there are no subsequent pages. + A token that can be sent as ``page_token`` to retrieve + the next page. If this field is omitted, there are no + subsequent pages. total_size (int): - The total number of items matching the - request. This will always be populated in the - response. + The total number of items matching the request. + This will always be populated in the response. """ @property diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/user_event.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/user_event.py index 4ab2ff6052e3..0c5d6dcbb7fe 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/user_event.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/user_event.py @@ -39,9 +39,8 @@ class UserEvent(proto.Message): - r"""UserEvent captures all metadata information Discovery Engine - API needs to know about how end users interact with your - website. + r"""UserEvent captures all metadata information Discovery Engine API + needs to know about how end users interact with your website. Attributes: event_type (str): @@ -50,147 +49,136 @@ class UserEvent(proto.Message): Generic values: * ``search``: Search for Documents. - * ``view-item``: Detailed page view of a - Document. + * ``view-item``: Detailed page view of a Document. - * ``view-item-list``: View of a panel or ordered - list of Documents. * ``view-home-page``: View of - the home page. + * ``view-item-list``: View of a panel or ordered list of + Documents. * ``view-home-page``: View of the home page. - * ``view-category-page``: View of a category - page, e.g. Home > Men > Jeans * - ``add-feedback``: Add a user feedback. + * ``view-category-page``: View of a category page, e.g. + Home > Men > Jeans * ``add-feedback``: Add a user + feedback. Retail-related values: - * ``add-to-cart``: Add an item(s) to cart, e.g. - in Retail online shopping * ``purchase``: - Purchase an item(s) + * ``add-to-cart``: Add an item(s) to cart, e.g. in + Retail online shopping * ``purchase``: Purchase an + item(s) Media-related values: - * ``media-play``: Start/resume watching a video, - playing a song, etc. * ``media-complete``: - Finished or stopped midway through a video, - song, etc. + * ``media-play``: Start/resume watching a video, playing + a song, etc. * ``media-complete``: Finished or stopped + midway through a video, song, etc. Custom conversion value: - * ``conversion``: Customer defined conversion - event. + * ``conversion``: Customer defined conversion event. conversion_type (str): Optional. Conversion type. Required if `UserEvent.event_type `__ - is ``conversion``. This is a customer-defined - conversion name in lowercase letters or numbers - separated by "-", such as "watch", "good-visit" - etc. + is ``conversion``. This is a customer-defined conversion + name in lowercase letters or numbers separated by "-", + such as "watch", "good-visit" etc. Do not set the field if `UserEvent.event_type `__ - is not ``conversion``. This mixes the custom - conversion event with predefined events like - ``search``, ``view-item`` etc. + is not ``conversion``. This mixes the custom conversion + event with predefined events like ``search``, + ``view-item`` etc. user_pseudo_id (str): - Required. A unique identifier for tracking - visitors. - For example, this could be implemented with an - HTTP cookie, which should be able to uniquely - identify a visitor on a single device. This - unique identifier should not change if the - visitor log in/out of the website. - - Do not set the field to the same fixed ID for - different users. This mixes the event history of - those users together, which results in degraded - model quality. - - The field must be a UTF-8 encoded string with a - length limit of 128 characters. Otherwise, an + Required. A unique identifier for tracking visitors. + + For example, this could be implemented with an HTTP + cookie, which should be able to uniquely identify a + visitor on a single device. This unique identifier + should not change if the visitor log in/out of the + website. + + Do not set the field to the same fixed ID for different + users. This mixes the event history of those users + together, which results in degraded model quality. + + The field must be a UTF-8 encoded string with a length + limit of 128 characters. Otherwise, an ``INVALID_ARGUMENT`` error is returned. - The field should not contain PII or user-data. - We recommend to use Google Analytics `Client + The field should not contain PII or user-data. We + recommend to use Google Analytics `Client ID `__ for this field. engine (str): - The `Engine - `__ + The `Engine `__ resource name, in the form of ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}``. Optional. Only required for - `Engine - `__ - produced user events. For example, user events - from blended search. + `Engine `__ + produced user events. For example, user events from + blended search. data_store (str): The `DataStore - `__ - resource full name, of the form + `__ resource + full name, of the form ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}``. - Optional. Only required for user events whose - data store can't by determined by + Optional. Only required for user events whose data store + can't by determined by `UserEvent.engine - `__ - or `UserEvent.documents + `__ or + `UserEvent.documents `__. If data store is set in the parent of - write/import/collect user event requests, this - field can be omitted. + write/import/collect user event requests, this field can + be omitted. event_time (google.protobuf.timestamp_pb2.Timestamp): Only required for `UserEventService.ImportUserEvents `__ - method. Timestamp of when the user event - happened. + method. Timestamp of when the user event happened. user_info (google.cloud.discoveryengine_v1.types.UserInfo): Information about the end user. direct_user_request (bool): - Should set to true if the request is made - directly from the end user, in which case the + Should set to true if the request is made directly from + the end user, in which case the `UserEvent.user_info.user_agent `__ can be populated from the HTTP request. - This flag should be set only if the API request - is made directly from the end user such as a - mobile app (and not if a gateway or a server is - processing and pushing the user events). + This flag should be set only if the API request is made + directly from the end user such as a mobile app (and not + if a gateway or a server is processing and pushing the + user events). - This should not be set when using the JavaScript - tag in `UserEventService.CollectUserEvent + This should not be set when using the JavaScript tag in + `UserEventService.CollectUserEvent `__. session_id (str): - A unique identifier for tracking a visitor - session with a length limit of 128 bytes. A - session is an aggregation of an end user - behavior in a time span. + A unique identifier for tracking a visitor session with + a length limit of 128 bytes. A session is an aggregation + of an end user behavior in a time span. A general guideline to populate the session_id: - 1. If user has no activity for 30 min, a new - session_id should be assigned. - 2. The session_id should be unique across users, - suggest use uuid or add - `UserEvent.user_pseudo_id + 1. If user has no activity for 30 min, a new session_id + should be assigned. + 2. The session_id should be unique across users, suggest + use uuid or add `UserEvent.user_pseudo_id `__ as prefix. page_info (google.cloud.discoveryengine_v1.types.PageInfo): - Page metadata such as categories and other - critical information for certain event types - such as ``view-category-page``. + Page metadata such as categories and other critical + information for certain event types such as + ``view-category-page``. attribution_token (str): - Token to attribute an API response to user - action(s) to trigger the event. - Highly recommended for user events that are the - result of `RecommendationService.Recommend + Token to attribute an API response to user action(s) to + trigger the event. + Highly recommended for user events that are the result + of `RecommendationService.Recommend `__. This field enables accurate attribution of recommendation model performance. @@ -205,56 +193,52 @@ class UserEvent(proto.Message): * `SearchResponse.attribution_token `__ - for events that are the result of - `SearchService.Search + for events that are the result of `SearchService.Search `__. - This token enables us to accurately attribute - page view or conversion completion back to the - event and the particular predict response - containing this clicked/purchased product. If - user clicks on product K in the recommendation - results, pass + This token enables us to accurately attribute page view + or conversion completion back to the event and the + particular predict response containing this + clicked/purchased product. If user clicks on product K + in the recommendation results, pass `RecommendResponse.attribution_token `__ - as a URL parameter to product K's page. When - recording events on product K's page, log the + as a URL parameter to product K's page. When recording + events on product K's page, log the `RecommendResponse.attribution_token `__ to this field. filter (str): - The filter syntax consists of an expression - language for constructing a predicate from one - or more fields of the documents being filtered. - - One example is for ``search`` events, the - associated `SearchRequest - `__ - may contain a filter expression in + The filter syntax consists of an expression language for + constructing a predicate from one or more fields of the + documents being filtered. + + One example is for ``search`` events, the associated + `SearchRequest + `__ may + contain a filter expression in `SearchRequest.filter `__ - conforming to - https://google.aip.dev/160#filtering. + conforming to https://google.aip.dev/160#filtering. - Similarly, for ``view-item-list`` events that - are generated from a `RecommendRequest + Similarly, for ``view-item-list`` events that are + generated from a `RecommendRequest `__, this field may be populated directly from `RecommendRequest.filter `__ - conforming to - https://google.aip.dev/160#filtering. + conforming to https://google.aip.dev/160#filtering. - The value must be a UTF-8 encoded string with a - length limit of 1,000 characters. Otherwise, an + The value must be a UTF-8 encoded string with a length + limit of 1,000 characters. Otherwise, an ``INVALID_ARGUMENT`` error is returned. documents (MutableSequence[google.cloud.discoveryengine_v1.types.DocumentInfo]): List of `Document `__s associated with this user event. - This field is optional except for the following - event types: + This field is optional except for the following event + types: * ``view-item`` * ``add-to-cart`` @@ -265,18 +249,16 @@ class UserEvent(proto.Message): * ``media-complete`` In a ``search`` event, this field represents the - documents returned to the end user on the - current page (the end user may have not finished - browsing the whole page yet). When a new page is - returned to the end user, after - pagination/filtering/ordering even for the same + documents returned to the end user on the current page + (the end user may have not finished browsing the whole + page yet). When a new page is returned to the end user, + after pagination/filtering/ordering even for the same query, a new ``search`` event with different `UserEvent.documents `__ is desired. panel (google.cloud.discoveryengine_v1.types.PanelInfo): - Panel metadata associated with this user - event. + Panel metadata associated with this user event. search_info (google.cloud.discoveryengine_v1.types.SearchInfo): `SearchService.Search `__ @@ -288,63 +270,59 @@ class UserEvent(proto.Message): `__ details related to the event. - This field should be set for ``search`` event - when autocomplete function is enabled and the - user clicks a suggestion for search. + This field should be set for ``search`` event when + autocomplete function is enabled and the user clicks a + suggestion for search. transaction_info (google.cloud.discoveryengine_v1.types.TransactionInfo): - The transaction metadata (if any) associated - with this user event. + The transaction metadata (if any) associated with + this user event. tag_ids (MutableSequence[str]): - A list of identifiers for the independent - experiment groups this user event belongs to. - This is used to distinguish between user events - associated with different experiment setups. + A list of identifiers for the independent experiment + groups this user event belongs to. This is used to + distinguish between user events associated with + different experiment setups. promotion_ids (MutableSequence[str]): - The promotion IDs if this is an event - associated with promotions. Currently, this - field is restricted to at most one ID. + The promotion IDs if this is an event associated with + promotions. Currently, this field is restricted to at + most one ID. attributes (MutableMapping[str, google.cloud.discoveryengine_v1.types.CustomAttribute]): Extra user event features to include in the - recommendation model. These attributes must NOT - contain data that needs to be parsed or - processed further, e.g. JSON or other encodings. - - If you provide custom attributes for ingested - user events, also include them in the user - events that you associate with prediction - requests. Custom attribute formatting must be - consistent between imported events and events - provided with prediction requests. This lets the - Discovery Engine API use those custom attributes - when training models and serving predictions, - which helps improve recommendation quality. - - This field needs to pass all below criteria, - otherwise an ``INVALID_ARGUMENT`` error is - returned: - - * The key must be a UTF-8 encoded string with a - length limit of 5,000 characters. - - * For text attributes, at most 400 values are - allowed. Empty values are not allowed. Each - value must be a UTF-8 encoded string with a - length limit of 256 characters. - - * For number attributes, at most 400 values are - allowed. - - For product recommendations, an example of extra - user information is ``traffic_channel``, which - is how a user arrives at the site. Users can - arrive - at the site by coming to the site directly, - coming through Google search, or in other ways. + recommendation model. These attributes must NOT contain + data that needs to be parsed or processed further, e.g. + JSON or other encodings. + + If you provide custom attributes for ingested user + events, also include them in the user events that you + associate with prediction requests. Custom attribute + formatting must be consistent between imported events + and events provided with prediction requests. This lets + the Discovery Engine API use those custom attributes + when training models and serving predictions, which + helps improve recommendation quality. + + This field needs to pass all below criteria, otherwise + an ``INVALID_ARGUMENT`` error is returned: + + * The key must be a UTF-8 encoded string with a length + limit of 5,000 characters. + + * For text attributes, at most 400 values are allowed. + Empty values are not allowed. Each value must be a + UTF-8 encoded string with a length limit of 256 + characters. + + * For number attributes, at most 400 values are allowed. + + For product recommendations, an example of extra user + information is ``traffic_channel``, which is how a user + arrives at the site. Users can arrive + at the site by coming to the site directly, coming + through Google search, or in other ways. media_info (google.cloud.discoveryengine_v1.types.MediaInfo): Media-specific info. panels (MutableSequence[google.cloud.discoveryengine_v1.types.PanelInfo]): - Optional. List of panels associated with this - event. Used for page-level impression data. + Optional. List of panels associated with this event. + Used for page-level impression data. """ event_type: str = proto.Field( @@ -457,50 +435,45 @@ class PageInfo(proto.Message): A unique ID of a web page view. This should be kept the same for all user events - triggered from the same pageview. For example, - an item detail page view could trigger multiple - events as the user is browsing the page. The - ``pageview_id`` property should be kept the same - for all these events so that they can be grouped - together properly. + triggered from the same pageview. For example, an item + detail page view could trigger multiple events as the + user is browsing the page. The ``pageview_id`` property + should be kept the same for all these events so that + they can be grouped together properly. When using the client side event reporting with - JavaScript pixel and Google Tag Manager, this - value is filled in automatically. + JavaScript pixel and Google Tag Manager, this value is + filled in automatically. page_category (str): - The most specific category associated with a - category page. - To represent full path of category, use '>' sign - to separate different hierarchies. If '>' is - part of the category name, replace it with other - character(s). - - Category pages include special pages such as - sales or promotions. For instance, a special - sale page may have the category hierarchy: - - ``"pageCategory" : "Sales > 2017 Black Friday - Deals"``. - - Required for ``view-category-page`` events. - Other event types should not set this field. - Otherwise, an ``INVALID_ARGUMENT`` error is - returned. + The most specific category associated with a category + page. + To represent full path of category, use '>' sign to + separate different hierarchies. If '>' is part of the + category name, replace it with other character(s). + + Category pages include special pages such as sales or + promotions. For instance, a special sale page may have + the category hierarchy: + + ``"pageCategory" : "Sales > 2017 Black Friday Deals"``. + + Required for ``view-category-page`` events. Other event + types should not set this field. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. uri (str): - Complete URL (window.location.href) of the - user's current page. + Complete URL (window.location.href) of the user's + current page. When using the client side event reporting with - JavaScript pixel and Google Tag Manager, this - value is filled in automatically. Maximum length - 5,000 characters. + JavaScript pixel and Google Tag Manager, this value is + filled in automatically. Maximum length 5,000 + characters. referrer_uri (str): The referrer URL of the current page. When using the client side event reporting with - JavaScript pixel and Google Tag Manager, this - value is filled in automatically. However, some - browser privacy restrictions may cause this - field to be empty. + JavaScript pixel and Google Tag Manager, this value is + filled in automatically. However, some browser privacy + restrictions may cause this field to be empty. """ pageview_id: str = proto.Field( @@ -535,8 +508,8 @@ class SearchInfo(proto.Message): `__ for definition. - The value must be a UTF-8 encoded string with a - length limit of 5,000 characters. Otherwise, an + The value must be a UTF-8 encoded string with a length + limit of 5,000 characters. Otherwise, an ``INVALID_ARGUMENT`` error is returned. At least one of @@ -544,44 +517,41 @@ class SearchInfo(proto.Message): `__ or `PageInfo.page_category `__ - is required for ``search`` events. Other event - types should not set this field. Otherwise, an + is required for ``search`` events. Other event types + should not set this field. Otherwise, an ``INVALID_ARGUMENT`` error is returned. order_by (str): - The order in which products are returned, if - applicable. + The order in which products are returned, if applicable. + See `SearchRequest.order_by `__ for definition and syntax. - The value must be a UTF-8 encoded string with a - length limit of 1,000 characters. Otherwise, an + The value must be a UTF-8 encoded string with a length + limit of 1,000 characters. Otherwise, an ``INVALID_ARGUMENT`` error is returned. - This can only be set for ``search`` events. - Other event types should not set this field. - Otherwise, an ``INVALID_ARGUMENT`` error is - returned. + This can only be set for ``search`` events. Other event + types should not set this field. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. offset (int): An integer that specifies the current offset for - pagination (the 0-indexed starting location, - amongst the products deemed by the API as - relevant). + pagination (the 0-indexed starting location, amongst the + products deemed by the API as relevant). See `SearchRequest.offset `__ for definition. - If this field is negative, an - ``INVALID_ARGUMENT`` is returned. - - This can only be set for ``search`` events. - Other event types should not set this field. - Otherwise, an ``INVALID_ARGUMENT`` error is + If this field is negative, an ``INVALID_ARGUMENT`` is returned. + This can only be set for ``search`` events. Other event + types should not set this field. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. + This field is a member of `oneof`_ ``_offset``. """ @@ -601,8 +571,8 @@ class SearchInfo(proto.Message): class CompletionInfo(proto.Message): - r"""Detailed completion information including completion - attribution token and clicked completion info. + r"""Detailed completion information including completion attribution + token and clicked completion info. Attributes: selected_suggestion (str): @@ -633,28 +603,26 @@ class TransactionInfo(proto.Message): Attributes: value (float): - Required. Total non-zero value associated - with the transaction. This value may include - shipping, tax, or other adjustments to the total - value that you want to include. + Required. Total non-zero value associated with the + transaction. This value may include shipping, tax, or + other adjustments to the total value that you want to + include. This field is a member of `oneof`_ ``_value``. currency (str): - Required. Currency code. Use three-character - ISO-4217 code. + Required. Currency code. Use three-character ISO-4217 + code. transaction_id (str): The transaction ID with a length limit of 128 characters. tax (float): - All the taxes associated with the - transaction. + All the taxes associated with the transaction. This field is a member of `oneof`_ ``_tax``. cost (float): - All the costs associated with the products. - These can be manufacturing costs, shipping - expenses not borne by the end user, or any other - costs, such that: + All the costs associated with the products. These can be + manufacturing costs, shipping expenses not borne by the + end user, or any other costs, such that: * Profit = `value `__ @@ -665,8 +633,8 @@ class TransactionInfo(proto.Message): This field is a member of `oneof`_ ``_cost``. discount_value (float): - The total discount(s) value applied to this - transaction. This figure should be excluded from + The total discount(s) value applied to this transaction. + This figure should be excluded from `TransactionInfo.value `__ @@ -680,8 +648,8 @@ class TransactionInfo(proto.Message): `TransactionInfo.discount_value `__ - This means that profit is calculated the same - way, regardless of the discount value, and that + This means that profit is calculated the same way, + regardless of the discount value, and that `TransactionInfo.discount_value `__ can be larger than @@ -741,55 +709,52 @@ class DocumentInfo(proto.Message): Attributes: id (str): The `Document - `__ - resource ID. + `__ resource + ID. This field is a member of `oneof`_ ``document_descriptor``. name (str): The `Document - `__ - resource full name, of the form: + `__ resource + full name, of the form: ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`` This field is a member of `oneof`_ ``document_descriptor``. uri (str): The `Document - `__ - URI - only allowed for website data stores. + `__ URI - only + allowed for website data stores. This field is a member of `oneof`_ ``document_descriptor``. quantity (int): - Quantity of the Document associated with the - user event. Defaults to 1. - For example, this field is 2 if two quantities - of the same Document are involved in a - ``add-to-cart`` event. + Quantity of the Document associated with the user event. + Defaults to 1. + For example, this field is 2 if two quantities of the + same Document are involved in a ``add-to-cart`` event. - Required for events of the following event - types: + Required for events of the following event types: * ``add-to-cart`` * ``purchase`` This field is a member of `oneof`_ ``_quantity``. promotion_ids (MutableSequence[str]): - The promotion IDs associated with this - Document. Currently, this field is restricted to - at most one ID. + The promotion IDs associated with this Document. + Currently, this field is restricted to at most one ID. joined (bool): - Output only. Whether the referenced Document - can be found in the data store. + Output only. Whether the referenced Document can be + found in the data store. conversion_value (float): - Optional. The conversion value associated with - this Document. Must be set if + Optional. The conversion value associated with this + Document. Must be set if `UserEvent.event_type `__ is "conversion". - For example, a value of 1000 signifies that 1000 - seconds were spent viewing a Document for the - ``watch`` conversion type. + For example, a value of 1000 signifies that 1000 seconds + were spent viewing a Document for the ``watch`` + conversion type. This field is a member of `oneof`_ ``_conversion_value``. """ @@ -840,24 +805,24 @@ class PanelInfo(proto.Message): display_name (str): The display name of the panel. panel_position (int): - The ordered position of the panel, if shown to - the user with other panels. If set, then + The ordered position of the panel, if shown to the user + with other panels. If set, then `total_panels `__ must also be set. This field is a member of `oneof`_ ``_panel_position``. total_panels (int): - The total number of panels, including this one, - shown to the user. Must be set if + The total number of panels, including this one, shown to + the user. Must be set if `panel_position `__ is set. This field is a member of `oneof`_ ``_total_panels``. documents (MutableSequence[google.cloud.discoveryengine_v1.types.DocumentInfo]): - Optional. The document IDs associated with - this panel. + Optional. The document IDs associated with this + panel. """ panel_id: str = proto.Field( @@ -892,24 +857,23 @@ class MediaInfo(proto.Message): Attributes: media_progress_duration (google.protobuf.duration_pb2.Duration): - The media progress time in seconds, if - applicable. For example, if the end user has - finished 90 seconds of a playback video, then + The media progress time in seconds, if applicable. + For example, if the end user has finished 90 seconds of + a playback video, then `MediaInfo.media_progress_duration.seconds - `__ should be - set to 90. + `__ should be set to + 90. media_progress_percentage (float): Media progress should be computed using only the `media_progress_duration `__ relative to the media total length. - This value must be between ``[0, 1.0]`` - inclusive. + This value must be between ``[0, 1.0]`` inclusive. - If this is not a playback or the progress cannot - be computed (e.g. ongoing livestream), this - field should be unset. + If this is not a playback or the progress cannot be + computed (e.g. ongoing livestream), this field should be + unset. This field is a member of `oneof`_ ``_media_progress_percentage``. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/user_event_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/user_event_service.py index 8dc86fdb7b50..a29d0ad9a2f7 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/user_event_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/user_event_service.py @@ -40,17 +40,17 @@ class WriteUserEventRequest(proto.Message): Required. The parent resource name. If the write user event action is applied in `DataStore - `__ - level, the format is: + `__ level, + the format is: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}``. If the write user event action is applied in - `Location `__ - level, for example, the event with `Document - `__ - across multiple `DataStore - `__, - the format is: + `Location `__ level, for + example, the event with `Document + `__ across + multiple `DataStore + `__, the + format is: ``projects/{project}/locations/{location}``. user_event (google.cloud.discoveryengine_v1.types.UserEvent): @@ -59,8 +59,8 @@ class WriteUserEventRequest(proto.Message): This field is a member of `oneof`_ ``_user_event``. write_async (bool): If set to true, the user event is written - asynchronously after validation, and the API - responds without waiting for the write. + asynchronously after validation, and the API responds + without waiting for the write. """ parent: str = proto.Field( @@ -89,35 +89,34 @@ class CollectUserEventRequest(proto.Message): Required. The parent resource name. If the collect user event action is applied in `DataStore - `__ - level, the format is: + `__ level, + the format is: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}``. If the collect user event action is applied in - `Location `__ - level, for example, the event with `Document - `__ - across multiple `DataStore - `__, - the format is: + `Location `__ level, for + example, the event with `Document + `__ across + multiple `DataStore + `__, the + format is: ``projects/{project}/locations/{location}``. user_event (str): - Required. URL encoded UserEvent proto with a - length limit of 2,000,000 characters. + Required. URL encoded UserEvent proto with a length + limit of 2,000,000 characters. uri (str): - The URL including cgi-parameters but - excluding the hash fragment with a length limit - of 5,000 characters. This is often more useful - than the referer URL, because many browsers only - send the domain for third-party requests. + The URL including cgi-parameters but excluding the + hash fragment with a length limit of 5,000 characters. + This is often more useful than the referer URL, because + many browsers only send the domain for third-party + requests. This field is a member of `oneof`_ ``_uri``. ets (int): - The event timestamp in milliseconds. This - prevents browser caching of otherwise identical - get requests. The name is abbreviated to reduce - the payload bytes. + The event timestamp in milliseconds. This prevents + browser caching of otherwise identical get requests. The + name is abbreviated to reduce the payload bytes. This field is a member of `oneof`_ ``_ets``. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/user_license.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/user_license.py index e7e6fa4bcad9..e83242199a19 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/user_license.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/user_license.py @@ -33,35 +33,32 @@ class UserLicense(proto.Message): Attributes: user_principal (str): - Required. Immutable. The user principal of - the User, could be email address or other - prinical identifier. This field is immutable. - Admin assign licenses based on the user - principal. + Required. Immutable. The user principal of the User, + could be email address or other prinical identifier. + This field is immutable. Admin assign licenses based on + the user principal. user_profile (str): Optional. The user profile. - We user user full name(First name + Last name) - as user profile. + We user user full name(First name + Last name) as user + profile. license_assignment_state (google.cloud.discoveryengine_v1.types.UserLicense.LicenseAssignmentState): - Output only. License assignment state of the - user. If the user is assigned with a license - config, the user loggin will be assigned with - the license; - If the user's license assignment state is - unassigned or unspecified, no license config - will be associated to the user; + Output only. License assignment state of the user. + If the user is assigned with a license config, the user + loggin will be assigned with the license; + If the user's license assignment state is unassigned or + unspecified, no license config will be associated to the + user; license_config (str): Optional. The full resource name of the - Subscription(LicenseConfig) assigned to the - user. + Subscription(LicenseConfig) assigned to the user. create_time (google.protobuf.timestamp_pb2.Timestamp): Output only. User created timestamp. update_time (google.protobuf.timestamp_pb2.Timestamp): Output only. User update timestamp. last_login_time (google.protobuf.timestamp_pb2.Timestamp): Output only. User last logged in time. - If the user has not logged in yet, this field - will be empty. + If the user has not logged in yet, this field will be + empty. """ class LicenseAssignmentState(proto.Enum): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/user_license_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/user_license_service.py index 4b3cd422c487..16ed5567f92a 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/user_license_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/user_license_service.py @@ -43,25 +43,25 @@ class ListUserLicensesRequest(proto.Message): Attributes: parent (str): - Required. The parent [UserStore][] resource - name, format: + Required. The parent [UserStore][] resource name, + format: ``projects/{project}/locations/{location}/userStores/{user_store_id}``. page_size (int): - Optional. Requested page size. Server may return - fewer items than requested. If unspecified, - defaults to 10. The maximum value is 50; values - above 50 will be coerced to 50. + Optional. Requested page size. Server may return fewer + items than requested. If unspecified, defaults to 10. + The maximum value is 50; values above 50 will be coerced + to 50. - If this field is negative, an INVALID_ARGUMENT - error is returned. + If this field is negative, an INVALID_ARGUMENT error is + returned. page_token (str): Optional. A page token, received from a previous - ``ListUserLicenses`` call. Provide this to - retrieve the subsequent page. + ``ListUserLicenses`` call. Provide this to retrieve the + subsequent page. - When paginating, all other parameters provided - to ``ListUserLicenses`` must match the call that - provided the page token. + When paginating, all other parameters provided to + ``ListUserLicenses`` must match the call that provided + the page token. filter (str): Optional. Filter for the list request. @@ -71,18 +71,17 @@ class ListUserLicensesRequest(proto.Message): Examples: - * ``license_assignment_state = ASSIGNED`` to - list assigned user licenses. * - ``license_assignment_state = NO_LICENSE`` to - list not licensed users. + * ``license_assignment_state = ASSIGNED`` to list + assigned user licenses. * ``license_assignment_state = + NO_LICENSE`` to list not licensed users. * ``license_assignment_state = - NO_LICENSE_ATTEMPTED_LOGIN`` to list users who - attempted login but no license assigned. + NO_LICENSE_ATTEMPTED_LOGIN`` to list users who attempted + login but no license assigned. * ``license_assignment_state != - NO_LICENSE_ATTEMPTED_LOGIN`` to filter out users - who attempted login but no license assigned. + NO_LICENSE_ATTEMPTED_LOGIN`` to filter out users who + attempted login but no license assigned. """ parent: str = proto.Field( @@ -114,9 +113,9 @@ class ListUserLicensesResponse(proto.Message): `UserLicense `__s. next_page_token (str): - A token, which can be sent as ``page_token`` to - retrieve the next page. If this field is - omitted, there are no subsequent pages. + A token, which can be sent as ``page_token`` to retrieve + the next page. If this field is omitted, there are no + subsequent pages. """ @property @@ -145,29 +144,29 @@ class BatchUpdateUserLicensesRequest(proto.Message): Attributes: inline_source (google.cloud.discoveryengine_v1.types.BatchUpdateUserLicensesRequest.InlineSource): - The inline source for the input content for - document embeddings. + The inline source for the input content for document + embeddings. This field is a member of `oneof`_ ``source``. parent (str): - Required. The parent [UserStore][] resource - name, format: + Required. The parent [UserStore][] resource name, + format: ``projects/{project}/locations/{location}/userStores/{user_store_id}``. delete_unassigned_user_licenses (bool): Optional. If true, if user licenses removed - associated license config, the user license will - be deleted. By default which is false, the user - license will be updated to unassigned state. + associated license config, the user license will be + deleted. By default which is false, the user license + will be updated to unassigned state. """ class InlineSource(proto.Message): - r"""The inline source for the input config for - BatchUpdateUserLicenses method. + r"""The inline source for the input config for BatchUpdateUserLicenses + method. Attributes: user_licenses (MutableSequence[google.cloud.discoveryengine_v1.types.UserLicense]): - Required. A list of user licenses to update. - Each user license must have a valid + Required. A list of user licenses to update. Each user + license must have a valid `UserLicense.user_principal `__. update_mask (google.protobuf.field_mask_pb2.FieldMask): @@ -212,13 +211,12 @@ class BatchUpdateUserLicensesMetadata(proto.Message): create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. success_count (int): Count of user licenses successfully updated. failure_count (int): - Count of user licenses that failed to be - updated. + Count of user licenses that failed to be updated. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -251,8 +249,8 @@ class BatchUpdateUserLicensesResponse(proto.Message): user_licenses (MutableSequence[google.cloud.discoveryengine_v1.types.UserLicense]): UserLicenses successfully updated. error_samples (MutableSequence[google.rpc.status_pb2.Status]): - A sample of errors encountered while - processing the request. + A sample of errors encountered while processing the + request. """ user_licenses: MutableSequence[user_license.UserLicense] = proto.RepeatedField( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/acl_config.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/acl_config.py index 36485abaa7c3..1d8c7e141ee6 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/acl_config.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/acl_config.py @@ -39,8 +39,8 @@ class AclConfig(proto.Message): ``projects/{project}/locations/{location}/aclConfig``. - This field must be a UTF-8 encoded string with a - length limit of 1024 characters. + This field must be a UTF-8 encoded string with a length + limit of 1024 characters. idp_config (google.cloud.discoveryengine_v1alpha.types.IdpConfig): Identity provider config. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/acl_config_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/acl_config_service.py index edfd970d39cd..2bce0347625f 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/acl_config_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/acl_config_service.py @@ -40,8 +40,8 @@ class GetAclConfigRequest(proto.Message): `__, such as ``projects/*/locations/*/aclConfig``. - If the caller does not have permission to access - the `AclConfig + If the caller does not have permission to access the + `AclConfig `__, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/answer.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/answer.py index cd29127b3837..6e08d326727c 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/answer.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/answer.py @@ -51,9 +51,9 @@ class Answer(proto.Message): query_understanding_info (google.cloud.discoveryengine_v1alpha.types.Answer.QueryUnderstandingInfo): Query understanding information. answer_skipped_reasons (MutableSequence[google.cloud.discoveryengine_v1alpha.types.Answer.AnswerSkippedReason]): - Additional answer-skipped reasons. This - provides the reason for ignored cases. If - nothing is skipped, this field is not set. + Additional answer-skipped reasons. This provides the + reason for ignored cases. If nothing is skipped, this + field is not set. create_time (google.protobuf.timestamp_pb2.Timestamp): Output only. Answer creation timestamp. complete_time (google.protobuf.timestamp_pb2.Timestamp): @@ -132,8 +132,8 @@ class Citation(proto.Message): Attributes: start_index (int): - Index indicates the start of the segment, - measured in bytes (UTF-8 unicode). + Index indicates the start of the segment, measured in + bytes (UTF-8 unicode). end_index (int): End of the attributed segment, exclusive. sources (MutableSequence[google.cloud.discoveryengine_v1alpha.types.Answer.CitationSource]): @@ -203,12 +203,12 @@ class UnstructuredDocumentInfo(proto.Message): title (str): Title. chunk_contents (MutableSequence[google.cloud.discoveryengine_v1alpha.types.Answer.Reference.UnstructuredDocumentInfo.ChunkContent]): - List of cited chunk contents derived from - document content. + List of cited chunk contents derived from document + content. struct_data (google.protobuf.struct_pb2.Struct): - The structured JSON metadata for the - document. It is populated from the struct data - from the Chunk in search result. + The structured JSON metadata for the document. + It is populated from the struct data from the Chunk in + search result. """ class ChunkContent(proto.Message): @@ -222,12 +222,12 @@ class ChunkContent(proto.Message): page_identifier (str): Page identifier. relevance_score (float): - The relevance of the chunk for a given query. - Values range from 0.0 (completely irrelevant) to - 1.0 (completely relevant). This value is for - informational purpose only. It may change for - the same query and chunk at any time due to a - model retraining or change in implementation. + The relevance of the chunk for a given query. Values + range from 0.0 (completely irrelevant) to 1.0 + (completely relevant). This value is for informational + purpose only. It may change for the same query and chunk + at any time due to a model retraining or change in + implementation. This field is a member of `oneof`_ ``_relevance_score``. """ @@ -282,12 +282,12 @@ class ChunkInfo(proto.Message): content (str): Chunk textual content. relevance_score (float): - The relevance of the chunk for a given query. - Values range from 0.0 (completely irrelevant) to - 1.0 (completely relevant). This value is for - informational purpose only. It may change for - the same query and chunk at any time due to a - model retraining or change in implementation. + The relevance of the chunk for a given query. Values + range from 0.0 (completely irrelevant) to 1.0 + (completely relevant). This value is for informational + purpose only. It may change for the same query and chunk + at any time due to a model retraining or change in + implementation. This field is a member of `oneof`_ ``_relevance_score``. document_metadata (google.cloud.discoveryengine_v1alpha.types.Answer.Reference.ChunkInfo.DocumentMetadata): @@ -307,9 +307,9 @@ class DocumentMetadata(proto.Message): page_identifier (str): Page identifier. struct_data (google.protobuf.struct_pb2.Struct): - The structured JSON metadata for the - document. It is populated from the struct data - from the Chunk in search result. + The structured JSON metadata for the document. + It is populated from the struct data from the Chunk in + search result. """ document: str = proto.Field( @@ -462,9 +462,9 @@ class Observation(proto.Message): Attributes: search_results (MutableSequence[google.cloud.discoveryengine_v1alpha.types.Answer.Step.Action.Observation.SearchResult]): - Search results observed by the search action, - it can be snippets info or chunk info, depending - on the citation type set by the user. + Search results observed by the search action, it can + be snippets info or chunk info, depending on the + citation type set by the user. """ class SearchResult(proto.Message): @@ -478,16 +478,16 @@ class SearchResult(proto.Message): title (str): Title. snippet_info (MutableSequence[google.cloud.discoveryengine_v1alpha.types.Answer.Step.Action.Observation.SearchResult.SnippetInfo]): - If citation_type is DOCUMENT_LEVEL_CITATION, - populate document level snippets. + If citation_type is DOCUMENT_LEVEL_CITATION, populate + document level snippets. chunk_info (MutableSequence[google.cloud.discoveryengine_v1alpha.types.Answer.Step.Action.Observation.SearchResult.ChunkInfo]): - If citation_type is CHUNK_LEVEL_CITATION and - chunk mode is on, populate chunk info. + If citation_type is CHUNK_LEVEL_CITATION and chunk mode + is on, populate chunk info. struct_data (google.protobuf.struct_pb2.Struct): Data representation. The structured JSON data for the document. - It's populated from the struct data from the - Document , or the Chunk in + It's populated from the struct data from the Document , + or the Chunk in search result . """ @@ -499,8 +499,7 @@ class SnippetInfo(proto.Message): snippet (str): Snippet content. snippet_status (str): - Status of the snippet defined by the search - team. + Status of the snippet defined by the search team. """ snippet: str = proto.Field( @@ -523,12 +522,12 @@ class ChunkInfo(proto.Message): content (str): Chunk textual content. relevance_score (float): - The relevance of the chunk for a given query. - Values range from 0.0 (completely irrelevant) to - 1.0 (completely relevant). This value is for - informational purpose only. It may change for - the same query and chunk at any time due to a - model retraining or change in implementation. + The relevance of the chunk for a given query. Values + range from 0.0 (completely irrelevant) to 1.0 + (completely relevant). This value is for informational + purpose only. It may change for the same query and chunk + at any time due to a model retraining or change in + implementation. This field is a member of `oneof`_ ``_relevance_score``. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/chunk.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/chunk.py index 8cdacc7e8de1..31ccf1f1099a 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/chunk.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/chunk.py @@ -42,29 +42,25 @@ class Chunk(proto.Message): ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}/chunks/{chunk_id}``. - This field must be a UTF-8 encoded string with a - length limit of 1024 characters. + This field must be a UTF-8 encoded string with a length + limit of 1024 characters. id (str): Unique chunk ID of the current chunk. content (str): - Content is a string from a document (parsed - content). + Content is a string from a document (parsed content). relevance_score (float): - Output only. Represents the relevance score - based on similarity. Higher score indicates - higher chunk relevance. The score is in range - [-1.0, 1.0]. - Only populated on - [SearchService.SearchResponse][]. + Output only. Represents the relevance score based on + similarity. Higher score indicates higher chunk + relevance. The score is in range [-1.0, 1.0]. + Only populated on [SearchService.SearchResponse][]. This field is a member of `oneof`_ ``_relevance_score``. document_metadata (google.cloud.discoveryengine_v1alpha.types.Chunk.DocumentMetadata): - Metadata of the document from the current - chunk. + Metadata of the document from the current chunk. derived_struct_data (google.protobuf.struct_pb2.Struct): Output only. This field is OUTPUT_ONLY. - It contains derived data that are not in the - original input document. + It contains derived data that are not in the original + input document. page_span (google.cloud.discoveryengine_v1alpha.types.Chunk.PageSpan): Page span of the chunk. chunk_metadata (google.cloud.discoveryengine_v1alpha.types.Chunk.ChunkMetadata): @@ -72,8 +68,8 @@ class Chunk(proto.Message): """ class DocumentMetadata(proto.Message): - r"""Document metadata contains the information of the document of - the current chunk. + r"""Document metadata contains the information of the document of the + current chunk. Attributes: uri (str): @@ -82,10 +78,10 @@ class DocumentMetadata(proto.Message): Title of the document. struct_data (google.protobuf.struct_pb2.Struct): Data representation. - The structured JSON data for the document. It - should conform to the registered `Schema - `__ - or an ``INVALID_ARGUMENT`` error is thrown. + The structured JSON data for the document. It should + conform to the registered `Schema + `__ or an + ``INVALID_ARGUMENT`` error is thrown. """ uri: str = proto.Field( @@ -124,13 +120,12 @@ class PageSpan(proto.Message): class ChunkMetadata(proto.Message): r"""Metadata of the current chunk. This field is only populated on `SearchService.Search - `__ - API. + `__ API. Attributes: previous_chunks (MutableSequence[google.cloud.discoveryengine_v1alpha.types.Chunk]): - The previous chunks of the current chunk. The - number is controlled by + The previous chunks of the current chunk. The number is + controlled by `SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks `__. This field is only populated on @@ -138,8 +133,8 @@ class ChunkMetadata(proto.Message): `__ API. next_chunks (MutableSequence[google.cloud.discoveryengine_v1alpha.types.Chunk]): - The next chunks of the current chunk. The number - is controlled by + The next chunks of the current chunk. The number is + controlled by `SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks `__. This field is only populated on diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/chunk_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/chunk_service.py index 8db00fcb35e2..3ad19f50bffb 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/chunk_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/chunk_service.py @@ -34,27 +34,23 @@ class GetChunkRequest(proto.Message): r"""Request message for `ChunkService.GetChunk - `__ - method. + `__ method. Attributes: name (str): Required. Full resource name of - `Chunk - `__, + `Chunk `__, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}``. - If the caller does not have permission to access - the `Chunk - `__, + If the caller does not have permission to access the + `Chunk `__, regardless of whether or not it exists, a ``PERMISSION_DENIED`` error is returned. If the requested `Chunk - `__ - does not exist, a ``NOT_FOUND`` error is - returned. + `__ does not + exist, a ``NOT_FOUND`` error is returned. """ name: str = proto.Field( @@ -71,25 +67,23 @@ class ListChunksRequest(proto.Message): Attributes: parent (str): - Required. The parent document resource name, - such as + Required. The parent document resource name, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}``. If the caller does not have permission to list - `Chunk - `__s - under this document, regardless of whether or - not this document exists, a - ``PERMISSION_DENIED`` error is returned. + `Chunk `__s + under this document, regardless of whether or not this + document exists, a ``PERMISSION_DENIED`` error is + returned. page_size (int): Maximum number of `Chunk - `__s - to return. If unspecified, defaults to 100. The - maximum allowed value is 1000. Values above 1000 - will be coerced to 1000. + `__s to + return. If unspecified, defaults to 100. The maximum + allowed value is 1000. Values above 1000 will be coerced + to 1000. - If this field is negative, an - ``INVALID_ARGUMENT`` error is returned. + If this field is negative, an ``INVALID_ARGUMENT`` error + is returned. page_token (str): A page token `ListChunksResponse.next_page_token @@ -97,15 +91,13 @@ class ListChunksRequest(proto.Message): received from a previous `ChunkService.ListChunks `__ - call. Provide this to retrieve the subsequent - page. + call. Provide this to retrieve the subsequent page. - When paginating, all other parameters provided - to `ChunkService.ListChunks + When paginating, all other parameters provided to + `ChunkService.ListChunks `__ - must match the call that provided the page - token. Otherwise, an ``INVALID_ARGUMENT`` error - is returned. + must match the call that provided the page token. + Otherwise, an ``INVALID_ARGUMENT`` error is returned. """ parent: str = proto.Field( @@ -136,8 +128,8 @@ class ListChunksResponse(proto.Message): A token that can be sent as `ListChunksRequest.page_token `__ - to retrieve the next page. If this field is - omitted, there are no subsequent pages. + to retrieve the next page. If this field is omitted, + there are no subsequent pages. """ @property diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/common.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/common.py index b4864d800923..6349f0a6ef7f 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/common.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/common.py @@ -112,9 +112,8 @@ class SearchUseCase(proto.Enum): class SearchTier(proto.Enum): - r"""Tiers of search features. Different tiers might have - different pricing. To learn more, check the pricing - documentation. + r"""Tiers of search features. Different tiers might have different + pricing. To learn more, check the pricing documentation. Values: SEARCH_TIER_UNSPECIFIED (0): @@ -216,9 +215,8 @@ class Interval(proto.Message): class CustomAttribute(proto.Message): - r"""A custom attribute that is not explicitly modeled in a resource, - e.g. `UserEvent - `__. + r"""A custom attribute that is not explicitly modeled in a resource, e.g. + `UserEvent `__. Attributes: text (MutableSequence[str]): @@ -235,12 +233,11 @@ class CustomAttribute(proto.Message): or `CustomAttribute.numbers `__ - should be set. Otherwise, an - ``INVALID_ARGUMENT`` error is returned. + should be set. Otherwise, an ``INVALID_ARGUMENT`` error + is returned. numbers (MutableSequence[float]): - The numerical values of this custom attribute. - For example, ``[2.3, 15.4]`` when the key is - "lengths_cm". + The numerical values of this custom attribute. For + example, ``[2.3, 15.4]`` when the key is "lengths_cm". Exactly one of `CustomAttribute.text @@ -248,8 +245,8 @@ class CustomAttribute(proto.Message): or `CustomAttribute.numbers `__ - should be set. Otherwise, an - ``INVALID_ARGUMENT`` error is returned. + should be set. Otherwise, an ``INVALID_ARGUMENT`` error + is returned. """ text: MutableSequence[str] = proto.RepeatedField( @@ -268,29 +265,27 @@ class UserInfo(proto.Message): Attributes: user_id (str): Highly recommended for logged-in users. Unique - identifier for logged-in user, such as a user - name. Don't set for anonymous users. + identifier for logged-in user, such as a user name. + Don't set for anonymous users. Always use a hashed value for this ID. - Don't set the field to the same fixed ID for - different users. This mixes the event history of - those users together, which results in degraded - model quality. + Don't set the field to the same fixed ID for different + users. This mixes the event history of those users + together, which results in degraded model quality. - The field must be a UTF-8 encoded string with a - length limit of 128 characters. Otherwise, an + The field must be a UTF-8 encoded string with a length + limit of 128 characters. Otherwise, an ``INVALID_ARGUMENT`` error is returned. user_agent (str): User agent as included in the HTTP header. - The field must be a UTF-8 encoded string with a - length limit of 1,000 characters. Otherwise, an + The field must be a UTF-8 encoded string with a length + limit of 1,000 characters. Otherwise, an ``INVALID_ARGUMENT`` error is returned. - This should not be set when using the client - side event reporting with GTM or JavaScript tag - in + This should not be set when using the client side event + reporting with GTM or JavaScript tag in `UserEventService.CollectUserEvent `__ or if @@ -310,13 +305,12 @@ class UserInfo(proto.Message): class EmbeddingConfig(proto.Message): - r"""Defines embedding config, used for bring your own embeddings - feature. + r"""Defines embedding config, used for bring your own embeddings feature. Attributes: field_path (str): - Full field path in the schema mapped as - embedding field. + Full field path in the schema mapped as embedding + field. """ field_path: str = proto.Field( @@ -344,16 +338,15 @@ class GuidedSearchSpec(proto.Message): Attributes: enable_refinement_attributes (bool): - Whether or not to enable and include - refinement attributes in gudied search result. + Whether or not to enable and include refinement + attributes in gudied search result. enable_related_questions (bool): Whether or not to enable and include related questions in search response. max_related_questions (int): - Max number of related questions to be returned. - The valid range is [1, 5]. If - enable_related_questions is true, the default - value is 3. + Max number of related questions to be returned. The + valid range is [1, 5]. If enable_related_questions is + true, the default value is 3. """ enable_refinement_attributes: bool = proto.Field( @@ -375,8 +368,8 @@ class CustomFineTuningSpec(proto.Message): Attributes: enable_search_adaptor (bool): - Whether or not to enable and include custom - fine tuned search adaptor model. + Whether or not to enable and include custom fine + tuned search adaptor model. """ enable_search_adaptor: bool = proto.Field( @@ -416,8 +409,7 @@ class ExternalIdpConfig(proto.Message): Attributes: workforce_pool_name (str): Workforce pool name. - Example: - "locations/global/workforcePools/pool_id". + Example: "locations/global/workforcePools/pool_id". """ workforce_pool_name: str = proto.Field( @@ -450,20 +442,20 @@ class Principal(proto.Message): Attributes: user_id (str): User identifier. - For Google Workspace user account, user_id - should be the google workspace user email. - For non-google identity provider user account, - user_id is the mapped user identifier configured - during the workforcepool config. + For Google Workspace user account, user_id should be the + google workspace user email. + For non-google identity provider user account, user_id + is the mapped user identifier configured during the + workforcepool config. This field is a member of `oneof`_ ``principal``. group_id (str): Group identifier. - For Google Workspace user account, group_id - should be the google workspace group email. - For non-google identity provider user account, - group_id is the mapped group identifier - configured during the workforcepool config. + For Google Workspace user account, group_id should be + the google workspace group email. + For non-google identity provider user account, group_id + is the mapped group identifier configured during the + workforcepool config. This field is a member of `oneof`_ ``principal``. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/completion.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/completion.py index 2db59e2bc98c..cf9f6461eb25 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/completion.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/completion.py @@ -29,17 +29,17 @@ class SuggestionDenyListEntry(proto.Message): - r"""Suggestion deny list entry identifying the phrase to block - from suggestions and the applied operation for the phrase. + r"""Suggestion deny list entry identifying the phrase to block from + suggestions and the applied operation for the phrase. Attributes: block_phrase (str): - Required. Phrase to block from suggestions - served. Can be maximum 125 characters. + Required. Phrase to block from suggestions served. + Can be maximum 125 characters. match_operator (google.cloud.discoveryengine_v1alpha.types.SuggestionDenyListEntry.MatchOperator): - Required. The match operator to apply for - this phrase. Whether to block the exact phrase, - or block any suggestions containing this phrase. + Required. The match operator to apply for this + phrase. Whether to block the exact phrase, or block any + suggestions containing this phrase. """ class MatchOperator(proto.Enum): @@ -82,13 +82,13 @@ class CompletionSuggestion(proto.Message): Attributes: global_score (float): - Global score of this suggestion. Control how - this suggestion would be scored / ranked. + Global score of this suggestion. Control how this + suggestion would be scored / ranked. This field is a member of `oneof`_ ``ranking_info``. frequency (int): - Frequency of this suggestion. Will be used to - rank suggestions when score is not available. + Frequency of this suggestion. Will be used to rank + suggestions when score is not available. This field is a member of `oneof`_ ``ranking_info``. suggestion (str): @@ -96,17 +96,14 @@ class CompletionSuggestion(proto.Message): language_code (str): BCP-47 language code of this suggestion. group_id (str): - If two suggestions have the same groupId, - they will not be returned together. Instead the - one ranked higher will be returned. This can be - used to deduplicate semantically identical - suggestions. + If two suggestions have the same groupId, they will + not be returned together. Instead the one ranked higher + will be returned. This can be used to deduplicate + semantically identical suggestions. group_score (float): - The score of this suggestion within its - group. + The score of this suggestion within its group. alternative_phrases (MutableSequence[str]): - Alternative matching phrases for this - suggestion. + Alternative matching phrases for this suggestion. """ global_score: float = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/completion_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/completion_service.py index 3cb8ae3490a1..7d255e14b7f3 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/completion_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/completion_service.py @@ -36,45 +36,44 @@ class CompleteQueryRequest(proto.Message): Attributes: data_store (str): - Required. The parent data store resource name - for which the completion is performed, such as + Required. The parent data store resource name for which + the completion is performed, such as ``projects/*/locations/global/collections/default_collection/dataStores/default_data_store``. query (str): Required. The typeahead input used to fetch suggestions. Maximum length is 128 characters. query_model (str): - Specifies the autocomplete data model. This - overrides any model specified in the - Configuration > Autocomplete section of the - Cloud console. Currently supported values: - - * ``document`` - Using suggestions generated - from user-imported documents. * - ``search-history`` - Using suggestions generated - from the past history of `SearchService.Search + Specifies the autocomplete data model. This overrides + any model specified in the Configuration > Autocomplete + section of the Cloud console. Currently supported + values: + + * ``document`` - Using suggestions generated from + user-imported documents. * ``search-history`` - Using + suggestions generated from the past history of + `SearchService.Search `__ - API calls. Do not use it when there is no - traffic for Search API. + API calls. Do not use it when there is no traffic for + Search API. - * ``user-event`` - Using suggestions generated - from user-imported search events. + * ``user-event`` - Using suggestions generated from + user-imported search events. - * ``document-completable`` - Using suggestions - taken directly from user-imported document - fields marked as completable. + * ``document-completable`` - Using suggestions taken + directly from user-imported document fields marked as + completable. Default values: * ``document`` is the default model for regular - dataStores. * ``search-history`` is the default - model for site search dataStores. + dataStores. * ``search-history`` is the default model + for site search dataStores. user_pseudo_id (str): - A unique identifier for tracking visitors. For - example, this could be implemented with an HTTP - cookie, which should be able to uniquely - identify a visitor on a single device. This - unique identifier should not change if the - visitor logs in or out of the website. + A unique identifier for tracking visitors. For example, + this could be implemented with an HTTP cookie, which + should be able to uniquely identify a visitor on a + single device. This unique identifier should not change + if the visitor logs in or out of the website. This field should NOT have a fixed value such as ``unknown_visitor``. @@ -86,16 +85,15 @@ class CompleteQueryRequest(proto.Message): `SearchRequest.user_pseudo_id `__. - The field must be a UTF-8 encoded string with a - length limit of 128 characters. Otherwise, an + The field must be a UTF-8 encoded string with a length + limit of 128 characters. Otherwise, an ``INVALID_ARGUMENT`` error is returned. include_tail_suggestions (bool): - Indicates if tail suggestions should be - returned if there are no suggestions that match - the full query. Even if set to true, if there - are suggestions that match the full query, those - are returned and no tail suggestions are - returned. + Indicates if tail suggestions should be returned if + there are no suggestions that match the full query. Even + if set to true, if there are suggestions that match the + full query, those are returned and no tail suggestions + are returned. """ data_store: str = proto.Field( @@ -128,16 +126,15 @@ class CompleteQueryResponse(proto.Message): Attributes: query_suggestions (MutableSequence[google.cloud.discoveryengine_v1alpha.types.CompleteQueryResponse.QuerySuggestion]): - Results of the matched query suggestions. The - result list is ordered and the first result is a - top suggestion. + Results of the matched query suggestions. The result + list is ordered and the first result is a top + suggestion. tail_match_triggered (bool): True if the returned suggestions are all tail suggestions. For tail matching to be triggered, - include_tail_suggestions in the request must be - true and there must be no suggestions that match - the full query. + include_tail_suggestions in the request must be true and + there must be no suggestions that match the full query. """ class QuerySuggestion(proto.Message): @@ -147,9 +144,9 @@ class QuerySuggestion(proto.Message): suggestion (str): The suggestion for the query. completable_field_paths (MutableSequence[str]): - The unique document field paths that serve as - the source of this suggestion if it was - generated from completable fields. + The unique document field paths that serve as the + source of this suggestion if it was generated from + completable fields. This field is only populated for the document-completable model. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/control.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/control.py index 2d83fe102ad4..68156a21a374 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/control.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/control.py @@ -32,8 +32,7 @@ class Condition(proto.Message): - r"""Defines circumstances to be checked before allowing a - behavior + r"""Defines circumstances to be checked before allowing a behavior Attributes: query_terms (MutableSequence[google.cloud.discoveryengine_v1alpha.types.Condition.QueryTerm]): @@ -42,8 +41,8 @@ class Condition(proto.Message): Maximum of 10 query terms. active_time_range (MutableSequence[google.cloud.discoveryengine_v1alpha.types.Condition.TimeRange]): - Range of time(s) specifying when condition is - active. + Range of time(s) specifying when condition is active. + Maximum of 10 time ranges. """ @@ -55,12 +54,12 @@ class QueryTerm(proto.Message): The specific query value to match against Must be lowercase, must be UTF-8. - Can have at most 3 space separated terms if - full_match is true. Cannot be an empty string. + Can have at most 3 space separated terms if full_match + is true. Cannot be an empty string. Maximum length of 5000 characters. full_match (bool): - Whether the search query needs to exactly - match the query term. + Whether the search query needs to exactly match the + query term. """ value: str = proto.Field( @@ -113,9 +112,8 @@ class TimeRange(proto.Message): class Control(proto.Message): r"""Defines a conditioned behavior to employ during serving. Must be attached to a - `ServingConfig - `__ to be - considered at serving time. Permitted actions dependent on + `ServingConfig `__ + to be considered at serving time. Permitted actions dependent on ``SolutionType``. This message has `oneof`_ fields (mutually exclusive fields). @@ -140,28 +138,27 @@ class Control(proto.Message): This field is a member of `oneof`_ ``action``. synonyms_action (google.cloud.discoveryengine_v1alpha.types.Control.SynonymsAction): - Treats a group of terms as synonyms of one - another. + Treats a group of terms as synonyms of one another. This field is a member of `oneof`_ ``action``. name (str): Immutable. Fully qualified name ``projects/*/locations/global/dataStore/*/controls/*`` display_name (str): - Required. Human readable name. The identifier - used in UI views. - Must be UTF-8 encoded string. Length limit is - 128 characters. Otherwise an INVALID ARGUMENT - error is thrown. + Required. Human readable name. The identifier used in + UI views. + Must be UTF-8 encoded string. Length limit is 128 + characters. Otherwise an INVALID ARGUMENT error is + thrown. associated_serving_config_ids (MutableSequence[str]): Output only. List of all `ServingConfig `__ - IDs this control is attached to. May take up to - 10 minutes to update after changes. + IDs this control is attached to. May take up to 10 + minutes to update after changes. solution_type (google.cloud.discoveryengine_v1alpha.types.SolutionType): - Required. Immutable. What solution the - control belongs to. + Required. Immutable. What solution the control + belongs to. Must be compatible with vertical of resource. Otherwise an INVALID ARGUMENT error is thrown. use_cases (MutableSequence[google.cloud.discoveryengine_v1alpha.types.SearchUseCase]): @@ -175,12 +172,11 @@ class Control(proto.Message): `SolutionType.SOLUTION_TYPE_SEARCH `__. conditions (MutableSequence[google.cloud.discoveryengine_v1alpha.types.Condition]): - Determines when the associated action will - trigger. + Determines when the associated action will trigger. + Omit to always apply the action. - Currently only a single condition may be - specified. Otherwise an INVALID ARGUMENT error - is thrown. + Currently only a single condition may be specified. + Otherwise an INVALID ARGUMENT error is thrown. """ class BoostAction(proto.Message): @@ -188,22 +184,21 @@ class BoostAction(proto.Message): Attributes: boost (float): - Required. Strength of the boost, which should be - in [-1, 1]. Negative boost means demotion. - Default is 0.0 (No-op). + Required. Strength of the boost, which should be in [-1, + 1]. Negative boost means demotion. Default is 0.0 + (No-op). filter (str): - Required. Specifies which products to apply - the boost to. - If no filter is provided all products will be - boosted (No-op). Syntax documentation: + Required. Specifies which products to apply the boost + to. + If no filter is provided all products will be boosted + (No-op). Syntax documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown. data_store (str): - Required. Specifies which data store's documents - can be boosted by this control. Full data store - name e.g. + Required. Specifies which data store's documents can be + boosted by this control. Full data store name e.g. projects/123/locations/global/collections/default_collection/dataStores/default_data_store """ @@ -226,18 +221,17 @@ class FilterAction(proto.Message): Attributes: filter (str): - Required. A filter to apply on the matching - condition results. + Required. A filter to apply on the matching condition + results. Required Syntax documentation: https://cloud.google.com/retail/docs/filter-and-order - Maximum length is 5000 characters. Otherwise an - INVALID ARGUMENT error is thrown. + Maximum length is 5000 characters. Otherwise an INVALID + ARGUMENT error is thrown. data_store (str): - Required. Specifies which data store's documents - can be filtered by this control. Full data store - name e.g. + Required. Specifies which data store's documents can be + filtered by this control. Full data store name e.g. projects/123/locations/global/collections/default_collection/dataStores/default_data_store """ @@ -255,12 +249,11 @@ class RedirectAction(proto.Message): Attributes: redirect_uri (str): - Required. The URI to which the shopper will - be redirected. + Required. The URI to which the shopper will be + redirected. Required. - URI must have length equal or less than 2000 - characters. Otherwise an INVALID ARGUMENT error - is thrown. + URI must have length equal or less than 2000 characters. + Otherwise an INVALID ARGUMENT error is thrown. """ redirect_uri: str = proto.Field( @@ -269,17 +262,17 @@ class RedirectAction(proto.Message): ) class SynonymsAction(proto.Message): - r"""Creates a set of terms that will act as synonyms of one - another. - Example: "happy" will also be considered as "glad", "glad" will - also be considered as "happy". + r"""Creates a set of terms that will act as synonyms of one another. + + Example: "happy" will also be considered as "glad", "glad" will also be + considered as "happy". Attributes: synonyms (MutableSequence[str]): Defines a set of synonyms. Can specify up to 100 synonyms. - Must specify at least 2 synonyms. Otherwise an - INVALID ARGUMENT error is thrown. + Must specify at least 2 synonyms. Otherwise an INVALID + ARGUMENT error is thrown. """ synonyms: MutableSequence[str] = proto.RepeatedField( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/control_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/control_service.py index e4bcbc6c3550..522ca120c89e 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/control_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/control_service.py @@ -40,17 +40,17 @@ class CreateControlRequest(proto.Message): Attributes: parent (str): - Required. Full resource name of parent data - store. Format: + Required. Full resource name of parent data store. + Format: ``projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}`` or ``projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}``. control (google.cloud.discoveryengine_v1alpha.types.Control): Required. The Control to create. control_id (str): - Required. The ID to use for the Control, which - will become the final component of the Control's - resource name. + Required. The ID to use for the Control, which will + become the final component of the Control's resource + name. This value must be within 1-63 characters. Valid characters are /`a-z <0-9>`__-_/. @@ -80,16 +80,15 @@ class UpdateControlRequest(proto.Message): update_mask (google.protobuf.field_mask_pb2.FieldMask): Optional. Indicates which fields in the provided `Control - `__ - to update. The following are NOT supported: + `__ to + update. The following are NOT supported: * `Control.name - `__ - * `Control.solution_type + `__ * + `Control.solution_type `__ - If not set or empty, all supported fields are - updated. + If not set or empty, all supported fields are updated. """ control: gcd_control.Control = proto.Field( @@ -109,8 +108,8 @@ class DeleteControlRequest(proto.Message): Attributes: name (str): - Required. The resource name of the Control to - delete. Format: + Required. The resource name of the Control to delete. + Format: ``projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`` """ @@ -125,8 +124,8 @@ class GetControlRequest(proto.Message): Attributes: name (str): - Required. The resource name of the Control to - get. Format: + Required. The resource name of the Control to get. + Format: ``projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`` """ @@ -142,22 +141,22 @@ class ListControlsRequest(proto.Message): Attributes: parent (str): Required. The data store resource name. Format: + ``projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}`` or ``projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}``. page_size (int): - Optional. Maximum number of results to - return. If unspecified, defaults to 50. Max - allowed value is 1000. + Optional. Maximum number of results to return. If + unspecified, defaults to 50. Max allowed value is 1000. page_token (str): Optional. A page token, received from a previous - ``ListControls`` call. Provide this to retrieve - the subsequent page. + ``ListControls`` call. Provide this to retrieve the + subsequent page. filter (str): Optional. A filter to apply on the list results. Supported features: - * List all the products under the parent branch - if `filter + * List all the products under the parent branch if + `filter `__ is unset. Currently this field is unsupported. """ @@ -187,8 +186,8 @@ class ListControlsResponse(proto.Message): controls (MutableSequence[google.cloud.discoveryengine_v1alpha.types.Control]): All the Controls for a given data store. next_page_token (str): - Pagination token, if not returned indicates - the last page. + Pagination token, if not returned indicates the last + page. """ @property diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/conversation.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/conversation.py index d797f3a25d0d..665f372c3543 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/conversation.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/conversation.py @@ -50,11 +50,9 @@ class Conversation(proto.Message): messages (MutableSequence[google.cloud.discoveryengine_v1alpha.types.ConversationMessage]): Conversation messages. start_time (google.protobuf.timestamp_pb2.Timestamp): - Output only. The time the conversation - started. + Output only. The time the conversation started. end_time (google.protobuf.timestamp_pb2.Timestamp): - Output only. The time the conversation - finished. + Output only. The time the conversation finished. """ class State(proto.Enum): @@ -167,9 +165,8 @@ class ConversationContext(proto.Message): Attributes: context_documents (MutableSequence[str]): - The current list of documents the user is - seeing. It contains the document resource - references. + The current list of documents the user is seeing. + It contains the document resource references. active_document (str): The current active document the user opened. It contains the document resource reference. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/conversational_search_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/conversational_search_service.py index d8b3f8da9257..9eab8a0da8a8 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/conversational_search_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/conversational_search_service.py @@ -58,49 +58,46 @@ class ConverseConversationRequest(proto.Message): Attributes: name (str): - Required. The resource name of the Conversation - to get. Format: + Required. The resource name of the Conversation to get. + Format: ``projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}``. Use ``projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-`` - to activate auto session mode, which - automatically creates a new conversation inside - a ConverseConversation session. + to activate auto session mode, which automatically + creates a new conversation inside a ConverseConversation + session. query (google.cloud.discoveryengine_v1alpha.types.TextInput): Required. Current user input. serving_config (str): - The resource name of the Serving Config to use. - Format: + The resource name of the Serving Config to use. Format: ``projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/servingConfigs/{serving_config_id}`` - If this is not set, the default serving config - will be used. + If this is not set, the default serving config will be + used. conversation (google.cloud.discoveryengine_v1alpha.types.Conversation): - The conversation to be used by auto session - only. The name field will be ignored as we - automatically assign new name for the - conversation in auto session. + The conversation to be used by auto session only. The + name field will be ignored as we automatically assign + new name for the conversation in auto session. safe_search (bool): Whether to turn on safe search. user_labels (MutableMapping[str, str]): - The user labels applied to a resource must meet - the following requirements: - * Each resource can have multiple labels, up to - a maximum of 64. + The user labels applied to a resource must meet the + following requirements: + * Each resource can have multiple labels, up to a + maximum of 64. * Each label must be a key-value pair. - * Keys have a minimum length of 1 character and - a maximum length of 63 characters and cannot - be empty. Values can be empty and have a maximum - length of 63 characters. + * Keys have a minimum length of 1 character and a + maximum length of 63 characters and cannot be empty. + Values can be empty and have a maximum length of 63 + characters. - * Keys and values can contain only lowercase - letters, numeric characters, underscores, and - dashes. All characters must use UTF-8 encoding, - and international characters are allowed. + * Keys and values can contain only lowercase letters, + numeric characters, underscores, and dashes. All + characters must use UTF-8 encoding, and international + characters are allowed. - * The key portion of a label must be unique. - However, you can use the same key with - multiple resources. + * The key portion of a label must be unique. However, + you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. @@ -110,37 +107,34 @@ class ConverseConversationRequest(proto.Message): `__ for more details. summary_spec (google.cloud.discoveryengine_v1alpha.types.SearchRequest.ContentSearchSpec.SummarySpec): - A specification for configuring the summary - returned in the response. + A specification for configuring the summary returned + in the response. filter (str): - The filter syntax consists of an expression - language for constructing a predicate from one - or more fields of the documents being filtered. - Filter expression is case-sensitive. This will - be used to filter search results which may - affect the summary response. + The filter syntax consists of an expression language for + constructing a predicate from one or more fields of the + documents being filtered. Filter expression is + case-sensitive. This will be used to filter search + results which may affect the summary response. If this field is unrecognizable, an ``INVALID_ARGUMENT`` is returned. - Filtering in Vertex AI Search is done by mapping - the LHS filter key to a key property defined in - the Vertex AI Search backend -- this mapping is - defined by the customer in their schema. For - example a media customer might have a field - 'name' in their schema. In this case the filter - would look like this: filter --> name:'ANY("king - kong")' - - For more information about filtering including - syntax and filter operators, see + Filtering in Vertex AI Search is done by mapping the LHS + filter key to a key property defined in the Vertex AI + Search backend -- this mapping is defined by the + customer in their schema. For example a media customer + might have a field 'name' in their schema. In this case + the filter would look like this: filter --> + name:'ANY("king kong")' + + For more information about filtering including syntax + and filter operators, see `Filter `__ boost_spec (google.cloud.discoveryengine_v1alpha.types.SearchRequest.BoostSpec): - Boost specification to boost certain documents - in search results which may affect the converse - response. For more information on boosting, see - `Boosting + Boost specification to boost certain documents in search + results which may affect the converse response. For more + information on boosting, see `Boosting `__ """ @@ -234,8 +228,8 @@ class CreateConversationRequest(proto.Message): Attributes: parent (str): - Required. Full resource name of parent data - store. Format: + Required. Full resource name of parent data store. + Format: ``projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`` conversation (google.cloud.discoveryengine_v1alpha.types.Conversation): Required. The conversation to create. @@ -267,8 +261,7 @@ class UpdateConversationRequest(proto.Message): * `Conversation.name `__ - If not set or empty, all supported fields are - updated. + If not set or empty, all supported fields are updated. """ conversation: gcd_conversation.Conversation = proto.Field( @@ -288,8 +281,8 @@ class DeleteConversationRequest(proto.Message): Attributes: name (str): - Required. The resource name of the Conversation - to delete. Format: + Required. The resource name of the Conversation to + delete. Format: ``projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`` """ @@ -304,8 +297,8 @@ class GetConversationRequest(proto.Message): Attributes: name (str): - Required. The resource name of the Conversation - to get. Format: + Required. The resource name of the Conversation to get. + Format: ``projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`` """ @@ -321,26 +314,26 @@ class ListConversationsRequest(proto.Message): Attributes: parent (str): Required. The data store resource name. Format: + ``projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`` page_size (int): - Maximum number of results to return. If - unspecified, defaults to 50. Max allowed value - is 1000. + Maximum number of results to return. If unspecified, + defaults to 50. Max allowed value is 1000. page_token (str): A page token, received from a previous - ``ListConversations`` call. Provide this to - retrieve the subsequent page. + ``ListConversations`` call. Provide this to retrieve the + subsequent page. filter (str): - A filter to apply on the list results. The - supported features are: user_pseudo_id, state. + A filter to apply on the list results. The supported + features are: user_pseudo_id, state. Example: "user_pseudo_id = some_id". order_by (str): - A comma-separated list of fields to order by, - sorted in ascending order. Use "desc" after a - field name for descending. Supported fields: + A comma-separated list of fields to order by, sorted in + ascending order. Use "desc" after a field name for + descending. Supported fields: * ``update_time`` * ``create_time`` @@ -382,8 +375,8 @@ class ListConversationsResponse(proto.Message): conversations (MutableSequence[google.cloud.discoveryengine_v1alpha.types.Conversation]): All the Conversations for a given data store. next_page_token (str): - Pagination token, if not returned indicates - the last page. + Pagination token, if not returned indicates the last + page. """ @property @@ -409,25 +402,24 @@ class AnswerQueryRequest(proto.Message): Attributes: serving_config (str): - Required. The resource name of the Search - serving config, such as + Required. The resource name of the Search serving + config, such as ``projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config``, or ``projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config``. - This field is used to identify the serving - configuration name, set of models used to make - the search. + This field is used to identify the serving configuration + name, set of models used to make the search. query (google.cloud.discoveryengine_v1alpha.types.Query): Required. Current user query. session (str): The session resource name. Not required. - When session field is not set, the API is in - sessionless mode. + When session field is not set, the API is in sessionless + mode. - We support auto session mode: users can use the - wildcard symbol ``-`` as session ID. A new ID - will be automatically generated and assigned. + We support auto session mode: users can use the wildcard + symbol ``-`` as session ID. A new ID will be + automatically generated and assigned. safety_spec (google.cloud.discoveryengine_v1alpha.types.AnswerQueryRequest.SafetySpec): Model specification. related_questions_spec (google.cloud.discoveryengine_v1alpha.types.AnswerQueryRequest.RelatedQuestionsSpec): @@ -442,49 +434,47 @@ class AnswerQueryRequest(proto.Message): Asynchronous mode control. If enabled, the response will be returned with - answer/session resource name without final - answer. The API users need to do the polling to - get the latest status of answer/session by - calling `ConversationalSearchService.GetAnswer + answer/session resource name without final answer. The + API users need to do the polling to get the latest + status of answer/session by calling + `ConversationalSearchService.GetAnswer `__ or `ConversationalSearchService.GetSession `__ method. user_pseudo_id (str): - A unique identifier for tracking visitors. For - example, this could be implemented with an HTTP - cookie, which should be able to uniquely - identify a visitor on a single device. This - unique identifier should not change if the - visitor logs in or out of the website. + A unique identifier for tracking visitors. For example, + this could be implemented with an HTTP cookie, which + should be able to uniquely identify a visitor on a + single device. This unique identifier should not change + if the visitor logs in or out of the website. This field should NOT have a fixed value such as ``unknown_visitor``. - The field must be a UTF-8 encoded string with a - length limit of 128 characters. Otherwise, an + The field must be a UTF-8 encoded string with a length + limit of 128 characters. Otherwise, an ``INVALID_ARGUMENT`` error is returned. user_labels (MutableMapping[str, str]): - The user labels applied to a resource must meet - the following requirements: - * Each resource can have multiple labels, up to - a maximum of 64. + The user labels applied to a resource must meet the + following requirements: + * Each resource can have multiple labels, up to a + maximum of 64. * Each label must be a key-value pair. - * Keys have a minimum length of 1 character and - a maximum length of 63 characters and cannot - be empty. Values can be empty and have a maximum - length of 63 characters. + * Keys have a minimum length of 1 character and a + maximum length of 63 characters and cannot be empty. + Values can be empty and have a maximum length of 63 + characters. - * Keys and values can contain only lowercase - letters, numeric characters, underscores, and - dashes. All characters must use UTF-8 encoding, - and international characters are allowed. + * Keys and values can contain only lowercase letters, + numeric characters, underscores, and dashes. All + characters must use UTF-8 encoding, and international + characters are allowed. - * The key portion of a label must be unique. - However, you can use the same key with - multiple resources. + * The key portion of a label must be unique. However, + you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. @@ -500,8 +490,8 @@ class SafetySpec(proto.Message): Attributes: enable (bool): - Enable the safety filtering on the answer - response. It is false by default. + Enable the safety filtering on the answer response. + It is false by default. """ enable: bool = proto.Field( @@ -533,47 +523,43 @@ class AnswerGenerationSpec(proto.Message): prompt_spec (google.cloud.discoveryengine_v1alpha.types.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec): Answer generation prompt specification. include_citations (bool): - Specifies whether to include citation metadata - in the answer. The default value is ``false``. + Specifies whether to include citation metadata in the + answer. The default value is ``false``. answer_language_code (str): - Language code for Answer. Use language tags - defined by `BCP47 - `__. - Note: This is an experimental feature. + Language code for Answer. Use language tags defined by + `BCP47 + `__. Note: + This is an experimental feature. ignore_adversarial_query (bool): - Specifies whether to filter out adversarial - queries. The default value is ``false``. - - Google employs search-query classification to - detect adversarial queries. No answer is - returned if the search query is classified as an - adversarial query. For example, a user might ask - a question regarding negative comments about the - company or submit a query designed to generate - unsafe, policy-violating output. If this field - is set to ``true``, we skip generating answers - for adversarial queries and return fallback - messages instead. + Specifies whether to filter out adversarial queries. The + default value is ``false``. + + Google employs search-query classification to detect + adversarial queries. No answer is returned if the search + query is classified as an adversarial query. For + example, a user might ask a question regarding negative + comments about the company or submit a query designed to + generate unsafe, policy-violating output. If this field + is set to ``true``, we skip generating answers for + adversarial queries and return fallback messages + instead. ignore_non_answer_seeking_query (bool): - Specifies whether to filter out queries that are - not answer-seeking. The default value is - ``false``. - - Google employs search-query classification to - detect answer-seeking queries. No answer is - returned if the search query is classified as a - non-answer seeking query. If this field is set - to ``true``, we skip generating answers for - non-answer seeking queries and return fallback - messages instead. + Specifies whether to filter out queries that are not + answer-seeking. The default value is ``false``. + + Google employs search-query classification to detect + answer-seeking queries. No answer is returned if the + search query is classified as a non-answer seeking + query. If this field is set to ``true``, we skip + generating answers for non-answer seeking queries and + return fallback messages instead. ignore_low_relevant_content (bool): - Specifies whether to filter out queries that - have low relevance. - If this field is set to ``false``, all search - results are used regardless of relevance to - generate answers. If set to ``true`` or unset, - the behavior will be determined automatically by - the service. + Specifies whether to filter out queries that have low + relevance. + If this field is set to ``false``, all search results + are used regardless of relevance to generate answers. If + set to ``true`` or unset, the behavior will be + determined automatically by the service. This field is a member of `oneof`_ ``_ignore_low_relevant_content``. """ @@ -583,9 +569,8 @@ class ModelSpec(proto.Message): Attributes: model_version (str): - Model version. If not set, it will use the - default stable model. Allowed values are: - stable, preview. + Model version. If not set, it will use the default + stable model. Allowed values are: stable, preview. """ model_version: str = proto.Field( @@ -667,62 +652,58 @@ class SearchParams(proto.Message): Number of search results to return. The default value is 10. filter (str): - The filter syntax consists of an expression - language for constructing a predicate from one - or more fields of the documents being filtered. - Filter expression is case-sensitive. This will - be used to filter search results which may - affect the Answer response. + The filter syntax consists of an expression language for + constructing a predicate from one or more fields of the + documents being filtered. Filter expression is + case-sensitive. This will be used to filter search + results which may affect the Answer response. If this field is unrecognizable, an ``INVALID_ARGUMENT`` is returned. - Filtering in Vertex AI Search is done by mapping - the LHS filter key to a key property defined in - the Vertex AI Search backend -- this mapping is - defined by the customer in their schema. For - example a media customers might have a field - 'name' in their schema. In this case the filter - would look like this: filter --> name:'ANY("king - kong")' - - For more information about filtering including - syntax and filter operators, see + Filtering in Vertex AI Search is done by mapping the LHS + filter key to a key property defined in the Vertex AI + Search backend -- this mapping is defined by the + customer in their schema. For example a media customers + might have a field 'name' in their schema. In this case + the filter would look like this: filter --> + name:'ANY("king kong")' + + For more information about filtering including syntax + and filter operators, see `Filter `__ boost_spec (google.cloud.discoveryengine_v1alpha.types.SearchRequest.BoostSpec): - Boost specification to boost certain documents - in search results which may affect the answer - query response. For more information on - boosting, see `Boosting + Boost specification to boost certain documents in search + results which may affect the answer query response. For + more information on boosting, see `Boosting `__ order_by (str): - The order in which documents are returned. - Documents can be ordered by a field in an + The order in which documents are returned. Documents can + be ordered by a field in an `Document `__ object. Leave it unset if ordered by relevance. - ``order_by`` expression is case-sensitive. For - more information on ordering, see `Ordering + ``order_by`` expression is case-sensitive. For more + information on ordering, see `Ordering `__ - If this field is unrecognizable, an - ``INVALID_ARGUMENT`` is returned. + If this field is unrecognizable, an ``INVALID_ARGUMENT`` + is returned. search_result_mode (google.cloud.discoveryengine_v1alpha.types.SearchRequest.ContentSearchSpec.SearchResultMode): - Specifies the search result mode. If - unspecified, the search result mode defaults to - ``DOCUMENTS``. See `parse and chunk + Specifies the search result mode. If unspecified, the + search result mode defaults to ``DOCUMENTS``. + See `parse and chunk documents `__ custom_fine_tuning_spec (google.cloud.discoveryengine_v1alpha.types.CustomFineTuningSpec): Custom fine tuning configs. data_store_specs (MutableSequence[google.cloud.discoveryengine_v1alpha.types.SearchRequest.DataStoreSpec]): - Specs defining dataStores to filter on in a - search call and configurations for those - dataStores. This is only considered for engines - with multiple dataStores use case. For single - dataStore within an engine, they should use the - specs at the top level. + Specs defining dataStores to filter on in a search + call and configurations for those dataStores. This is + only considered for engines with multiple dataStores use + case. For single dataStore within an engine, they should + use the specs at the top level. """ max_return_results: int = proto.Field( @@ -1101,15 +1082,15 @@ class AnswerQueryResponse(proto.Message): `__ is greater than 1, use `Answer.name - `__ - to fetch answer information using + `__ to + fetch answer information using `ConversationalSearchService.GetAnswer `__ API. session (google.cloud.discoveryengine_v1alpha.types.Session): Session resource object. - It will be only available when session field is - set and valid in the `AnswerQueryRequest + It will be only available when session field is set and + valid in the `AnswerQueryRequest `__ request. answer_query_token (str): @@ -1137,8 +1118,8 @@ class GetAnswerRequest(proto.Message): Attributes: name (str): - Required. The resource name of the Answer to - get. Format: + Required. The resource name of the Answer to get. + Format: ``projects/{project_number}/locations/{location_id}/collections/{collection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`` """ @@ -1153,8 +1134,8 @@ class CreateSessionRequest(proto.Message): Attributes: parent (str): - Required. Full resource name of parent data - store. Format: + Required. Full resource name of parent data store. + Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`` session (google.cloud.discoveryengine_v1alpha.types.Session): Required. The session to create. @@ -1180,14 +1161,13 @@ class UpdateSessionRequest(proto.Message): update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided `Session - `__ - to update. The following are NOT supported: + `__ to + update. The following are NOT supported: * `Session.name `__ - If not set or empty, all supported fields are - updated. + If not set or empty, all supported fields are updated. """ session: gcd_session.Session = proto.Field( @@ -1207,8 +1187,8 @@ class DeleteSessionRequest(proto.Message): Attributes: name (str): - Required. The resource name of the Session to - delete. Format: + Required. The resource name of the Session to delete. + Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`` """ @@ -1223,12 +1203,12 @@ class GetSessionRequest(proto.Message): Attributes: name (str): - Required. The resource name of the Session to - get. Format: + Required. The resource name of the Session to get. + Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`` include_answer_details (bool): - Optional. If set to true, the full session - including all answer details will be returned. + Optional. If set to true, the full session including + all answer details will be returned. """ name: str = proto.Field( @@ -1247,18 +1227,17 @@ class ListSessionsRequest(proto.Message): Attributes: parent (str): Required. The data store resource name. Format: + ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`` page_size (int): - Maximum number of results to return. If - unspecified, defaults to 50. Max allowed value - is 1000. + Maximum number of results to return. If unspecified, + defaults to 50. Max allowed value is 1000. page_token (str): - A page token, received from a previous - ``ListSessions`` call. Provide this to retrieve - the subsequent page. + A page token, received from a previous ``ListSessions`` + call. Provide this to retrieve the subsequent page. filter (str): - A comma-separated list of fields to filter by, - in EBNF grammar. The supported fields are: + A comma-separated list of fields to filter by, in EBNF + grammar. The supported fields are: * ``user_pseudo_id`` * ``state`` @@ -1280,9 +1259,9 @@ class ListSessionsRequest(proto.Message): "is_pinned=true AND (NOT labels:hidden)" "create_time > \"1970-01-01T12:00:00Z\"". order_by (str): - A comma-separated list of fields to order by, - sorted in ascending order. Use "desc" after a - field name for descending. Supported fields: + A comma-separated list of fields to order by, sorted in + ascending order. Use "desc" after a field name for + descending. Supported fields: * ``update_time`` * ``create_time`` @@ -1295,9 +1274,8 @@ class ListSessionsRequest(proto.Message): * "update_time desc" * "create_time" - * "is_pinned desc,update_time desc": list - sessions by is_pinned first, then by - update_time. + * "is_pinned desc,update_time desc": list sessions by + is_pinned first, then by update_time. """ parent: str = proto.Field( @@ -1329,8 +1307,8 @@ class ListSessionsResponse(proto.Message): sessions (MutableSequence[google.cloud.discoveryengine_v1alpha.types.Session]): All the Sessions for a given data store. next_page_token (str): - Pagination token, if not returned indicates - the last page. + Pagination token, if not returned indicates the last + page. """ @property diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/custom_tuning_model.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/custom_tuning_model.py index 53fa1b008b57..6a3bdb22b547 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/custom_tuning_model.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/custom_tuning_model.py @@ -33,20 +33,20 @@ class CustomTuningModel(proto.Message): Attributes: name (str): - Required. The fully qualified resource name of - the model. + Required. The fully qualified resource name of the + model. Format: ``projects/{project_number}/locations/{location}/collections/{collection}/dataStores/{data_store}/customTuningModels/{custom_tuning_model}`` - model must be an alpha-numerical string with - limit of 40 characters. + model must be an alpha-numerical string with limit of 40 + characters. display_name (str): The display name of the model. model_version (int): The version of the model. model_state (google.cloud.discoveryengine_v1alpha.types.CustomTuningModel.ModelState): - The state that the model is in (e.g.``TRAINING`` - or ``TRAINING_FAILED``). + The state that the model is in (e.g.``TRAINING`` or + ``TRAINING_FAILED``). create_time (google.protobuf.timestamp_pb2.Timestamp): Timestamp the Model was created at. training_start_time (google.protobuf.timestamp_pb2.Timestamp): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/data_store.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/data_store.py index 34f21d6e15ec..7ced54e7c439 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/data_store.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/data_store.py @@ -37,63 +37,62 @@ class DataStore(proto.Message): - r"""DataStore captures global settings and configs at the - DataStore level. + r"""DataStore captures global settings and configs at the DataStore + level. Attributes: name (str): - Immutable. The full resource name of the data - store. Format: + Immutable. The full resource name of the data store. + Format: ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}``. - This field must be a UTF-8 encoded string with a - length limit of 1024 characters. + This field must be a UTF-8 encoded string with a length + limit of 1024 characters. display_name (str): Required. The data store display name. - This field must be a UTF-8 encoded string with a - length limit of 128 characters. Otherwise, an - INVALID_ARGUMENT error is returned. + This field must be a UTF-8 encoded string with a length + limit of 128 characters. Otherwise, an INVALID_ARGUMENT + error is returned. industry_vertical (google.cloud.discoveryengine_v1alpha.types.IndustryVertical): - Immutable. The industry vertical that the - data store registers. + Immutable. The industry vertical that the data store + registers. solution_types (MutableSequence[google.cloud.discoveryengine_v1alpha.types.SolutionType]): - The solutions that the data store enrolls. - Available solutions for each `industry_vertical + The solutions that the data store enrolls. Available + solutions for each `industry_vertical `__: - * ``MEDIA``: ``SOLUTION_TYPE_RECOMMENDATION`` - and ``SOLUTION_TYPE_SEARCH``. * ``SITE_SEARCH``: - ``SOLUTION_TYPE_SEARCH`` is automatically - enrolled. Other solutions cannot be enrolled. + * ``MEDIA``: ``SOLUTION_TYPE_RECOMMENDATION`` and + ``SOLUTION_TYPE_SEARCH``. * ``SITE_SEARCH``: + ``SOLUTION_TYPE_SEARCH`` is automatically enrolled. + Other solutions cannot be enrolled. default_schema_id (str): Output only. The id of the default - `Schema - `__ + `Schema `__ asscociated to this data store. content_config (google.cloud.discoveryengine_v1alpha.types.DataStore.ContentConfig): - Immutable. The content config of the data store. - If this field is unset, the server behavior - defaults to `ContentConfig.NO_CONTENT + Immutable. The content config of the data store. If this + field is unset, the server behavior defaults to + `ContentConfig.NO_CONTENT `__. create_time (google.protobuf.timestamp_pb2.Timestamp): Output only. Timestamp the `DataStore - `__ - was created at. + `__ was + created at. language_info (google.cloud.discoveryengine_v1alpha.types.LanguageInfo): Language info for DataStore. idp_config (google.cloud.discoveryengine_v1alpha.types.IdpConfig): - Output only. Data store level identity - provider config. + Output only. Data store level identity provider + config. acl_enabled (bool): Immutable. Whether data in the `DataStore - `__ - has ACL information. If set to ``true``, the - source data must have ACL. ACL will be ingested - when data is ingested by + `__ has + ACL information. If set to ``true``, the source data + must have ACL. ACL will be ingested when data is + ingested by `DocumentService.ImportDocuments `__ methods. @@ -102,20 +101,19 @@ class DataStore(proto.Message): `DataStore `__, `Document - `__ - can't be accessed by calling + `__ can't + be accessed by calling `DocumentService.GetDocument `__ or `DocumentService.ListDocuments `__. - Currently ACL is only supported in ``GENERIC`` - industry vertical with non-``PUBLIC_WEBSITE`` - content config. + Currently ACL is only supported in ``GENERIC`` industry + vertical with non-``PUBLIC_WEBSITE`` content config. workspace_config (google.cloud.discoveryengine_v1alpha.types.WorkspaceConfig): - Config to store data store type configuration - for workspace data. This must be set when + Config to store data store type configuration for + workspace data. This must be set when `DataStore.content_config `__ is set as @@ -127,22 +125,22 @@ class DataStore(proto.Message): starting_schema (google.cloud.discoveryengine_v1alpha.types.Schema): The start schema to use for this `DataStore - `__ - when provisioning it. If unset, a default - vertical specialized schema will be used. + `__ when + provisioning it. If unset, a default vertical + specialized schema will be used. - This field is only used by [CreateDataStore][] - API, and will be ignored if used in other APIs. - This field will be omitted from all API - responses including [CreateDataStore][] API. To - retrieve a schema of a `DataStore - `__, - use `SchemaService.GetSchema + This field is only used by [CreateDataStore][] API, and + will be ignored if used in other APIs. This field will + be omitted from all API responses including + [CreateDataStore][] API. To retrieve a schema of a + `DataStore + `__, use + `SchemaService.GetSchema `__ API instead. - The provided schema will be validated against - certain rules on schema. Learn more from `this + The provided schema will be validated against certain + rules on schema. Learn more from `this doc `__. """ @@ -251,15 +249,13 @@ class LanguageInfo(proto.Message): ``en_GB``, ``en-UK`` or ``en-gb`` will have normalized_language_code of ``en-GB``. language (str): - Output only. Language part of - normalized_language_code. E.g.: ``en-US`` -> - ``en``, ``zh-Hans-HK`` -> ``zh``, ``en`` -> - ``en``. + Output only. Language part of normalized_language_code. + E.g.: ``en-US`` -> ``en``, ``zh-Hans-HK`` -> ``zh``, + ``en`` -> ``en``. region (str): - Output only. Region part of - normalized_language_code, if present. E.g.: - ``en-US`` -> ``US``, ``zh-Hans-HK`` -> ``HK``, - ``en`` -> ``. + Output only. Region part of normalized_language_code, if + present. E.g.: ``en-US`` -> ``US``, ``zh-Hans-HK`` -> + ``HK``, ``en`` -> ``. """ language_code: str = proto.Field( @@ -281,8 +277,7 @@ class LanguageInfo(proto.Message): class WorkspaceConfig(proto.Message): - r"""Config to store data store type configuration for workspace - data + r"""Config to store data store type configuration for workspace data Attributes: type_ (google.cloud.discoveryengine_v1alpha.types.WorkspaceConfig.Type): @@ -292,8 +287,7 @@ class WorkspaceConfig(proto.Message): """ class Type(proto.Enum): - r"""Specifies the type of Workspace App supported by this - DataStore + r"""Specifies the type of Workspace App supported by this DataStore Values: TYPE_UNSPECIFIED (0): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/data_store_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/data_store_service.py index ea6d22760b2a..209e947b87a1 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/data_store_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/data_store_service.py @@ -55,8 +55,8 @@ class CreateDataStoreRequest(proto.Message): ``projects/{project}/locations/{location}/collections/{collection}``. data_store (google.cloud.discoveryengine_v1alpha.types.DataStore): Required. The `DataStore - `__ - to create. + `__ to + create. data_store_id (str): Required. The ID to use for the `DataStore @@ -67,27 +67,23 @@ class CreateDataStoreRequest(proto.Message): resource name. This field must conform to `RFC-1034 - `__ - standard with a length limit of 63 characters. - Otherwise, an INVALID_ARGUMENT error is - returned. + `__ standard with a + length limit of 63 characters. Otherwise, an + INVALID_ARGUMENT error is returned. create_advanced_site_search (bool): - A boolean flag indicating whether user want to - directly create an advanced data store for site - search. If the data store is not configured as - site + A boolean flag indicating whether user want to directly + create an advanced data store for site search. + If the data store is not configured as site search (GENERIC vertical and PUBLIC_WEBSITE content_config), this flag will be ignored. skip_default_schema_creation (bool): - A boolean flag indicating whether to skip the - default schema creation for the data store. Only - enable this flag if you are certain that the - default schema is incompatible with your use - case. + A boolean flag indicating whether to skip the default + schema creation for the data store. Only enable this + flag if you are certain that the default schema is + incompatible with your use case. - If set to true, you must manually create a - schema for the data store before any documents - can be ingested. + If set to true, you must manually create a schema for + the data store before any documents can be ingested. This flag cannot be specified if ``data_store.starting_schema`` is specified. @@ -130,16 +126,16 @@ class GetDataStoreRequest(proto.Message): such as ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}``. - If the caller does not have permission to access - the `DataStore + If the caller does not have permission to access the + `DataStore `__, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested `DataStore - `__ - does not exist, a NOT_FOUND error is returned. + `__ does + not exist, a NOT_FOUND error is returned. """ name: str = proto.Field( @@ -159,8 +155,8 @@ class CreateDataStoreMetadata(proto.Message): create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -183,26 +179,25 @@ class ListDataStoresRequest(proto.Message): Attributes: parent (str): - Required. The parent branch resource name, such - as + Required. The parent branch resource name, such as ``projects/{project}/locations/{location}/collections/{collection_id}``. If the caller does not have permission to list `DataStore `__s - under this location, regardless of whether or - not this data store exists, a PERMISSION_DENIED - error is returned. + under this location, regardless of whether or not this + data store exists, a PERMISSION_DENIED error is + returned. page_size (int): Maximum number of `DataStore - `__s - to return. If unspecified, defaults to 10. The - maximum allowed value is 50. Values above 50 - will be coerced to 50. + `__s to + return. If unspecified, defaults to 10. The maximum + allowed value is 50. Values above 50 will be coerced to + 50. - If this field is negative, an INVALID_ARGUMENT - is returned. + If this field is negative, an INVALID_ARGUMENT is + returned. page_token (str): A page token `ListDataStoresResponse.next_page_token @@ -210,15 +205,13 @@ class ListDataStoresRequest(proto.Message): received from a previous `DataStoreService.ListDataStores `__ - call. Provide this to retrieve the subsequent - page. + call. Provide this to retrieve the subsequent page. - When paginating, all other parameters provided - to `DataStoreService.ListDataStores + When paginating, all other parameters provided to + `DataStoreService.ListDataStores `__ - must match the call that provided the page - token. Otherwise, an INVALID_ARGUMENT error is - returned. + must match the call that provided the page token. + Otherwise, an INVALID_ARGUMENT error is returned. filter (str): Filter by solution type . For example: ``filter = @@ -258,8 +251,8 @@ class ListDataStoresResponse(proto.Message): A token that can be sent as `ListDataStoresRequest.page_token `__ - to retrieve the next page. If this field is - omitted, there are no subsequent pages. + to retrieve the next page. If this field is omitted, + there are no subsequent pages. """ @property @@ -291,16 +284,15 @@ class DeleteDataStoreRequest(proto.Message): such as ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}``. - If the caller does not have permission to delete - the `DataStore + If the caller does not have permission to delete the + `DataStore `__, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the `DataStore - `__ - to delete does not exist, a NOT_FOUND error is - returned. + `__ to + delete does not exist, a NOT_FOUND error is returned. """ name: str = proto.Field( @@ -318,27 +310,26 @@ class UpdateDataStoreRequest(proto.Message): Attributes: data_store (google.cloud.discoveryengine_v1alpha.types.DataStore): Required. The `DataStore - `__ - to update. + `__ to + update. - If the caller does not have permission to update - the `DataStore + If the caller does not have permission to update the + `DataStore `__, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the `DataStore - `__ - to update does not exist, a NOT_FOUND error is - returned. + `__ to + update does not exist, a NOT_FOUND error is returned. update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided `DataStore - `__ - to update. + `__ to + update. - If an unsupported or unknown field is provided, - an INVALID_ARGUMENT error is returned. + If an unsupported or unknown field is provided, an + INVALID_ARGUMENT error is returned. """ data_store: gcd_data_store.DataStore = proto.Field( @@ -364,8 +355,8 @@ class DeleteDataStoreMetadata(proto.Message): create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -388,8 +379,8 @@ class GetDocumentProcessingConfigRequest(proto.Message): Attributes: name (str): - Required. Full DocumentProcessingConfig resource - name. Format: + Required. Full DocumentProcessingConfig resource name. + Format: ``projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/documentProcessingConfig`` """ @@ -412,22 +403,20 @@ class UpdateDocumentProcessingConfigRequest(proto.Message): `__ to update. - If the caller does not have permission to update - the `DocumentProcessingConfig + If the caller does not have permission to update the + `DocumentProcessingConfig `__, then a PERMISSION_DENIED error is returned. If the `DocumentProcessingConfig `__ - to update does not exist, a NOT_FOUND error is - returned. + to update does not exist, a NOT_FOUND error is returned. update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided `DocumentProcessingConfig `__ - to update. The following are the only supported - fields: + to update. The following are the only supported fields: * `DocumentProcessingConfig.ocr_config `__ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/document.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/document.py index c3f4cc8ccccc..a445fcae4224 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/document.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/document.py @@ -46,69 +46,68 @@ class Document(proto.Message): Attributes: struct_data (google.protobuf.struct_pb2.Struct): - The structured JSON data for the document. It - should conform to the registered `Schema - `__ - or an ``INVALID_ARGUMENT`` error is thrown. + The structured JSON data for the document. It should + conform to the registered `Schema + `__ or an + ``INVALID_ARGUMENT`` error is thrown. This field is a member of `oneof`_ ``data``. json_data (str): - The JSON string representation of the document. - It should conform to the registered `Schema - `__ - or an ``INVALID_ARGUMENT`` error is thrown. + The JSON string representation of the document. It + should conform to the registered `Schema + `__ or an + ``INVALID_ARGUMENT`` error is thrown. This field is a member of `oneof`_ ``data``. name (str): - Immutable. The full resource name of the - document. Format: + Immutable. The full resource name of the document. + Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}``. - This field must be a UTF-8 encoded string with a - length limit of 1024 characters. + This field must be a UTF-8 encoded string with a length + limit of 1024 characters. id (str): Immutable. The identifier of the document. Id should conform to `RFC-1034 - `__ - standard with a length limit of 63 characters. + `__ standard with a + length limit of 63 characters. schema_id (str): - The identifier of the schema located in the - same data store. + The identifier of the schema located in the same data + store. content (google.cloud.discoveryengine_v1alpha.types.Document.Content): - The unstructured data linked to this document. - Content must be set if this document is under a + The unstructured data linked to this document. Content + must be set if this document is under a ``CONTENT_REQUIRED`` data store. parent_document_id (str): The identifier of the parent document. Currently supports at most two level document hierarchy. Id should conform to `RFC-1034 - `__ - standard with a length limit of 63 characters. + `__ standard with a + length limit of 63 characters. derived_struct_data (google.protobuf.struct_pb2.Struct): Output only. This field is OUTPUT_ONLY. - It contains derived data that are not in the - original input document. + It contains derived data that are not in the original + input document. acl_info (google.cloud.discoveryengine_v1alpha.types.Document.AclInfo): Access control information for the document. index_time (google.protobuf.timestamp_pb2.Timestamp): - Output only. The last time the document was - indexed. If this field is set, the document - could be returned in search results. + Output only. The last time the document was indexed. If + this field is set, the document could be returned in + search results. This field is OUTPUT_ONLY. If this field is not - populated, it means the document has never been - indexed. + populated, it means the document has never been indexed. index_status (google.cloud.discoveryengine_v1alpha.types.Document.IndexStatus): Output only. The index status of the document. - * If document is indexed successfully, the - index_time field is populated. + * If document is indexed successfully, the index_time + field is populated. - * Otherwise, if document is not indexed due to - errors, the error_samples field is populated. + * Otherwise, if document is not indexed due to errors, + the error_samples field is populated. * Otherwise, index_status is unset. """ @@ -125,24 +124,22 @@ class Content(proto.Message): Attributes: raw_bytes (bytes): - The content represented as a stream of bytes. - The maximum length is 1,000,000 bytes (1 MB / - ~0.95 MiB). - - Note: As with all ``bytes`` fields, this field - is represented as pure binary in Protocol - Buffers and base64-encoded string in JSON. For - example, ``abc123!?$*&()'-=@~`` should be - represented as ``YWJjMTIzIT8kKiYoKSctPUB+`` in - JSON. See + The content represented as a stream of bytes. The + maximum length is 1,000,000 bytes (1 MB / ~0.95 MiB). + + Note: As with all ``bytes`` fields, this field is + represented as pure binary in Protocol Buffers and + base64-encoded string in JSON. For example, + ``abc123!?$*&()'-=@~`` should be represented as + ``YWJjMTIzIT8kKiYoKSctPUB+`` in JSON. See https://developers.google.com/protocol-buffers/docs/proto3#json. This field is a member of `oneof`_ ``content``. uri (str): - The URI of the content. Only Cloud Storage URIs - (e.g. ``gs://bucket-name/path/to/file``) are - supported. The maximum file size is 2.5 MB for - text-based formats, 200 MB for other formats. + The URI of the content. Only Cloud Storage URIs (e.g. + ``gs://bucket-name/path/to/file``) are supported. The + maximum file size is 2.5 MB for text-based formats, 200 + MB for other formats. This field is a member of `oneof`_ ``content``. mime_type (str): @@ -190,8 +187,8 @@ class AclInfo(proto.Message): class AccessRestriction(proto.Message): r"""AclRestriction to model complex inheritance restrictions. - Example: Modeling a "Both Permit" inheritance, where to access a - child document, user needs to have access to parent document. + Example: Modeling a "Both Permit" inheritance, where to access a child + document, user needs to have access to parent document. Document Hierarchy - Space_S --> Page_P. @@ -280,12 +277,12 @@ class IndexStatus(proto.Message): Attributes: index_time (google.protobuf.timestamp_pb2.Timestamp): The time when the document was indexed. - If this field is populated, it means the - document has been indexed. + If this field is populated, it means the document has + been indexed. error_samples (MutableSequence[google.rpc.status_pb2.Status]): - A sample of errors encountered while indexing - the document. If this field is populated, the - document is not indexed due to errors. + A sample of errors encountered while indexing the + document. If this field is populated, the document is + not indexed due to errors. """ index_time: timestamp_pb2.Timestamp = proto.Field( @@ -362,13 +359,13 @@ class ProcessedDocument(proto.Message): Attributes: json_data (str): - The JSON string representation of the - processed document. + The JSON string representation of the processed + document. This field is a member of `oneof`_ ``processed_data_format``. document (str): - Required. Full resource name of the referenced - document, in the format + Required. Full resource name of the referenced document, + in the format ``projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*``. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/document_processing_config.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/document_processing_config.py index a44b4416daf3..f9ea12afd93d 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/document_processing_config.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/document_processing_config.py @@ -29,52 +29,46 @@ class DocumentProcessingConfig(proto.Message): r"""A singleton resource of - `DataStore `__. - It's empty when `DataStore - `__ is created, - which defaults to digital parser. The first call to + `DataStore `__. It's + empty when `DataStore + `__ is created, which + defaults to digital parser. The first call to `DataStoreService.UpdateDocumentProcessingConfig `__ method will initialize the config. Attributes: name (str): - The full resource name of the Document - Processing Config. Format: + The full resource name of the Document Processing + Config. Format: ``projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig``. chunking_config (google.cloud.discoveryengine_v1alpha.types.DocumentProcessingConfig.ChunkingConfig): Whether chunking mode is enabled. default_parsing_config (google.cloud.discoveryengine_v1alpha.types.DocumentProcessingConfig.ParsingConfig): Configurations for default Document parser. - If not specified, we will configure it as - default DigitalParsingConfig, and the default - parsing config will be applied to all file types - for Document parsing. + If not specified, we will configure it as default + DigitalParsingConfig, and the default parsing config + will be applied to all file types for Document parsing. parsing_config_overrides (MutableMapping[str, google.cloud.discoveryengine_v1alpha.types.DocumentProcessingConfig.ParsingConfig]): - Map from file type to override the default - parsing configuration based on the file type. - Supported keys: + Map from file type to override the default parsing + configuration based on the file type. Supported keys: - * ``pdf``: Override parsing config for PDF - files, either digital parsing, ocr parsing or - layout parsing is supported. + * ``pdf``: Override parsing config for PDF files, either + digital parsing, ocr parsing or layout parsing is + supported. - * ``html``: Override parsing config for HTML - files, only digital parsing and layout parsing - are supported. + * ``html``: Override parsing config for HTML files, only + digital parsing and layout parsing are supported. - * ``docx``: Override parsing config for DOCX - files, only digital parsing and layout parsing - are supported. + * ``docx``: Override parsing config for DOCX files, only + digital parsing and layout parsing are supported. - * ``pptx``: Override parsing config for PPTX - files, only digital parsing and layout parsing - are supported. + * ``pptx``: Override parsing config for PPTX files, only + digital parsing and layout parsing are supported. - * ``xlsx``: Override parsing config for XLSX - files, only digital parsing and layout parsing - are supported. + * ``xlsx``: Override parsing config for XLSX files, only + digital parsing and layout parsing are supported. """ class ChunkingConfig(proto.Message): @@ -99,9 +93,9 @@ class LayoutBasedChunkingConfig(proto.Message): Supported values: 100-500 (inclusive). Default value: 500. include_ancestor_headings (bool): - Whether to include appending different levels - of headings to chunks from the middle of the - document to prevent context loss. + Whether to include appending different levels of + headings to chunks from the middle of the document to + prevent context loss. Default value: False. """ @@ -123,8 +117,7 @@ class LayoutBasedChunkingConfig(proto.Message): ) class ParsingConfig(proto.Message): - r"""Related configurations applied to a specific type of document - parser. + r"""Related configurations applied to a specific type of document parser. This message has `oneof`_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. @@ -139,8 +132,8 @@ class ParsingConfig(proto.Message): This field is a member of `oneof`_ ``type_dedicated_config``. ocr_parsing_config (google.cloud.discoveryengine_v1alpha.types.DocumentProcessingConfig.ParsingConfig.OcrParsingConfig): - Configurations applied to OCR parser. - Currently it only applies to PDFs. + Configurations applied to OCR parser. Currently it + only applies to PDFs. This field is a member of `oneof`_ ``type_dedicated_config``. layout_parsing_config (google.cloud.discoveryengine_v1alpha.types.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig): @@ -157,13 +150,12 @@ class OcrParsingConfig(proto.Message): Attributes: enhanced_document_elements (MutableSequence[str]): - [DEPRECATED] This field is deprecated. To use - the additional enhanced document elements - processing, please switch to - ``layout_parsing_config``. + [DEPRECATED] This field is deprecated. To use the + additional enhanced document elements processing, please + switch to ``layout_parsing_config``. use_native_text (bool): - If true, will use native text instead of OCR - text on pages containing native text. + If true, will use native text instead of OCR text on + pages containing native text. """ enhanced_document_elements: MutableSequence[str] = proto.RepeatedField( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/document_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/document_service.py index f3dc02e8cba8..fee112f825de 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/document_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/document_service.py @@ -49,20 +49,19 @@ class GetDocumentRequest(proto.Message): name (str): Required. Full resource name of `Document - `__, - such as + `__, such + as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}``. - If the caller does not have permission to access - the `Document + If the caller does not have permission to access the + `Document `__, regardless of whether or not it exists, a ``PERMISSION_DENIED`` error is returned. If the requested `Document - `__ - does not exist, a ``NOT_FOUND`` error is - returned. + `__ does + not exist, a ``NOT_FOUND`` error is returned. """ name: str = proto.Field( @@ -79,8 +78,7 @@ class ListDocumentsRequest(proto.Message): Attributes: parent (str): - Required. The parent branch resource name, such - as + Required. The parent branch resource name, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}``. Use ``default_branch`` as the branch ID, to list documents under the default branch. @@ -88,19 +86,19 @@ class ListDocumentsRequest(proto.Message): If the caller does not have permission to list `Document `__s - under this branch, regardless of whether or not - this branch exists, a ``PERMISSION_DENIED`` - error is returned. + under this branch, regardless of whether or not this + branch exists, a ``PERMISSION_DENIED`` error is + returned. page_size (int): Maximum number of `Document - `__s - to return. If unspecified, defaults to 100. The - maximum allowed value is 1000. Values above 1000 - are set to 1000. + `__s to + return. If unspecified, defaults to 100. The maximum + allowed value is 1000. Values above 1000 are set to + 1000. - If this field is negative, an - ``INVALID_ARGUMENT`` error is returned. + If this field is negative, an ``INVALID_ARGUMENT`` error + is returned. page_token (str): A page token `ListDocumentsResponse.next_page_token @@ -108,15 +106,13 @@ class ListDocumentsRequest(proto.Message): received from a previous `DocumentService.ListDocuments `__ - call. Provide this to retrieve the subsequent - page. + call. Provide this to retrieve the subsequent page. - When paginating, all other parameters provided - to `DocumentService.ListDocuments + When paginating, all other parameters provided to + `DocumentService.ListDocuments `__ - must match the call that provided the page - token. Otherwise, an ``INVALID_ARGUMENT`` error - is returned. + must match the call that provided the page token. + Otherwise, an ``INVALID_ARGUMENT`` error is returned. """ parent: str = proto.Field( @@ -147,8 +143,8 @@ class ListDocumentsResponse(proto.Message): A token that can be sent as `ListDocumentsRequest.page_token `__ - to retrieve the next page. If this field is - omitted, there are no subsequent pages. + to retrieve the next page. If this field is omitted, + there are no subsequent pages. """ @property @@ -178,8 +174,8 @@ class CreateDocumentRequest(proto.Message): ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}``. document (google.cloud.discoveryengine_v1alpha.types.Document): Required. The `Document - `__ - to create. + `__ to + create. document_id (str): Required. The ID to use for the `Document @@ -188,25 +184,23 @@ class CreateDocumentRequest(proto.Message): `Document.name `__. - If the caller does not have permission to create - the `Document + If the caller does not have permission to create the + `Document `__, regardless of whether or not it exists, a ``PERMISSION_DENIED`` error is returned. This field must be unique among all `Document - `__s - with the same `parent + `__s with + the same `parent `__. - Otherwise, an ``ALREADY_EXISTS`` error is - returned. + Otherwise, an ``ALREADY_EXISTS`` error is returned. This field must conform to `RFC-1034 - `__ - standard with a length limit of 63 characters. - Otherwise, an ``INVALID_ARGUMENT`` error is - returned. + `__ standard with a + length limit of 63 characters. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. """ parent: str = proto.Field( @@ -234,29 +228,29 @@ class UpdateDocumentRequest(proto.Message): document (google.cloud.discoveryengine_v1alpha.types.Document): Required. The document to update/create. - If the caller does not have permission to update - the `Document + If the caller does not have permission to update the + `Document `__, regardless of whether or not it exists, a ``PERMISSION_DENIED`` error is returned. If the `Document - `__ - to update does not exist and + `__ to + update does not exist and `allow_missing `__ is not set, a ``NOT_FOUND`` error is returned. allow_missing (bool): If set to ``true`` and the `Document - `__ - is not found, a new `Document - `__ - is be created. + `__ is + not found, a new `Document + `__ is be + created. update_mask (google.protobuf.field_mask_pb2.FieldMask): - Indicates which fields in the provided - imported 'document' to update. If not set, by - default updates all fields. + Indicates which fields in the provided imported + 'document' to update. If not set, by default updates all + fields. """ document: gcd_document.Document = proto.Field( @@ -285,20 +279,20 @@ class DeleteDocumentRequest(proto.Message): name (str): Required. Full resource name of `Document - `__, - such as + `__, such + as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}``. - If the caller does not have permission to delete - the `Document + If the caller does not have permission to delete the + `Document `__, regardless of whether or not it exists, a ``PERMISSION_DENIED`` error is returned. If the `Document - `__ - to delete does not exist, a ``NOT_FOUND`` error - is returned. + `__ to + delete does not exist, a ``NOT_FOUND`` error is + returned. """ name: str = proto.Field( @@ -317,25 +311,24 @@ class GetProcessedDocumentRequest(proto.Message): name (str): Required. Full resource name of `Document - `__, - such as + `__, such + as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}``. - If the caller does not have permission to access - the `Document + If the caller does not have permission to access the + `Document `__, regardless of whether or not it exists, a ``PERMISSION_DENIED`` error is returned. If the requested `Document - `__ - does not exist, a ``NOT_FOUND`` error is - returned. + `__ does + not exist, a ``NOT_FOUND`` error is returned. processed_document_type (google.cloud.discoveryengine_v1alpha.types.GetProcessedDocumentRequest.ProcessedDocumentType): Required. What type of processing to return. processed_document_format (google.cloud.discoveryengine_v1alpha.types.GetProcessedDocumentRequest.ProcessedDocumentFormat): - What format output should be. If - unspecified, defaults to JSON. + What format output should be. If unspecified, + defaults to JSON. """ class ProcessedDocumentType(proto.Enum): @@ -359,8 +352,8 @@ class ProcessedDocumentType(proto.Enum): PNG_CONVERTED_DOCUMENT = 3 class ProcessedDocumentFormat(proto.Enum): - r"""The format of the returned processed document. If - unspecified, defaults to JSON. + r"""The format of the returned processed document. If unspecified, + defaults to JSON. Values: PROCESSED_DOCUMENT_FORMAT_UNSPECIFIED (0): @@ -396,8 +389,7 @@ class BatchGetDocumentsMetadataRequest(proto.Message): Attributes: parent (str): - Required. The parent branch resource name, such - as + Required. The parent branch resource name, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}``. matcher (google.cloud.discoveryengine_v1alpha.types.BatchGetDocumentsMetadataRequest.Matcher): Required. Matcher for the @@ -407,8 +399,7 @@ class BatchGetDocumentsMetadataRequest(proto.Message): class UrisMatcher(proto.Message): r"""Matcher for the `Document - `__s by exact - uris. + `__s by exact uris. Attributes: uris (MutableSequence[str]): @@ -422,8 +413,8 @@ class UrisMatcher(proto.Message): class Matcher(proto.Message): r"""Matcher for the `Document - `__s. Currently - supports matching by exact URIs. + `__s. Currently supports + matching by exact URIs. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -499,16 +490,16 @@ class DocumentMetadata(proto.Message): Attributes: matcher_value (google.cloud.discoveryengine_v1alpha.types.BatchGetDocumentsMetadataResponse.DocumentMetadata.MatcherValue): - The value of the matcher that was used to match - the `Document + The value of the matcher that was used to match the + `Document `__. state (google.cloud.discoveryengine_v1alpha.types.BatchGetDocumentsMetadataResponse.State): The state of the document. last_refreshed_time (google.protobuf.timestamp_pb2.Timestamp): The timestamp of the last time the `Document - `__ - was last indexed. + `__ was + last indexed. """ class MatcherValue(proto.Message): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/engine.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/engine.py index a9b431637ce4..cd678f3e2690 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/engine.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/engine.py @@ -31,8 +31,8 @@ class Engine(proto.Message): - r"""Metadata that describes the training and serving parameters of - an `Engine `__. + r"""Metadata that describes the training and serving parameters of an + `Engine `__. This message has `oneof`_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. @@ -43,13 +43,12 @@ class Engine(proto.Message): Attributes: similar_documents_config (google.cloud.discoveryengine_v1alpha.types.Engine.SimilarDocumentsEngineConfig): - Additional config specs for a ``similar-items`` - engine. + Additional config specs for a ``similar-items`` engine. This field is a member of `oneof`_ ``engine_config``. chat_engine_config (google.cloud.discoveryengine_v1alpha.types.Engine.ChatEngineConfig): - Configurations for the Chat Engine. Only - applicable if `solution_type + Configurations for the Chat Engine. Only applicable if + `solution_type `__ is `SOLUTION_TYPE_CHAT @@ -57,8 +56,8 @@ class Engine(proto.Message): This field is a member of `oneof`_ ``engine_config``. search_engine_config (google.cloud.discoveryengine_v1alpha.types.Engine.SearchEngineConfig): - Configurations for the Search Engine. Only - applicable if `solution_type + Configurations for the Search Engine. Only applicable if + `solution_type `__ is `SOLUTION_TYPE_SEARCH @@ -66,8 +65,8 @@ class Engine(proto.Message): This field is a member of `oneof`_ ``engine_config``. media_recommendation_engine_config (google.cloud.discoveryengine_v1alpha.types.Engine.MediaRecommendationEngineConfig): - Configurations for the Media Engine. Only - applicable on the data stores with + Configurations for the Media Engine. Only applicable on + the data stores with `solution_type `__ `SOLUTION_TYPE_RECOMMENDATION @@ -79,8 +78,8 @@ class Engine(proto.Message): This field is a member of `oneof`_ ``engine_config``. recommendation_metadata (google.cloud.discoveryengine_v1alpha.types.Engine.RecommendationMetadata): - Output only. Additional information of a - recommendation engine. Only applicable if + Output only. Additional information of a recommendation + engine. Only applicable if `solution_type `__ is @@ -89,8 +88,8 @@ class Engine(proto.Message): This field is a member of `oneof`_ ``engine_metadata``. chat_engine_metadata (google.cloud.discoveryengine_v1alpha.types.Engine.ChatEngineMetadata): - Output only. Additional information of the Chat - Engine. Only applicable if + Output only. Additional information of the Chat Engine. + Only applicable if `solution_type `__ is @@ -99,28 +98,27 @@ class Engine(proto.Message): This field is a member of `oneof`_ ``engine_metadata``. name (str): - Immutable. The fully qualified resource name of - the engine. - This field must be a UTF-8 encoded string with a - length limit of 1024 characters. + Immutable. The fully qualified resource name of the + engine. + This field must be a UTF-8 encoded string with a length + limit of 1024 characters. Format: ``projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}`` - engine should be 1-63 characters, and valid - characters are /`a-z0-9 `__*/. - Otherwise, an INVALID_ARGUMENT error is - returned. + engine should be 1-63 characters, and valid characters + are /`a-z0-9 `__*/. Otherwise, an + INVALID_ARGUMENT error is returned. display_name (str): - Required. The display name of the engine. - Should be human readable. UTF-8 encoded string - with limit of 1024 characters. + Required. The display name of the engine. Should be + human readable. UTF-8 encoded string with limit of 1024 + characters. create_time (google.protobuf.timestamp_pb2.Timestamp): - Output only. Timestamp the Recommendation - Engine was created at. + Output only. Timestamp the Recommendation Engine was + created at. update_time (google.protobuf.timestamp_pb2.Timestamp): - Output only. Timestamp the Recommendation - Engine was last updated. + Output only. Timestamp the Recommendation Engine was + last updated. data_store_ids (MutableSequence[str]): The data stores associated with this engine. @@ -130,8 +128,8 @@ class Engine(proto.Message): and `SOLUTION_TYPE_RECOMMENDATION `__ - type of engines, they can only associate with at - most one data store. + type of engines, they can only associate with at most + one data store. If `solution_type @@ -140,29 +138,29 @@ class Engine(proto.Message): `SOLUTION_TYPE_CHAT `__, multiple `DataStore - `__s - in the same `Collection - `__ - can be associated here. + `__s in + the same `Collection + `__ can + be associated here. Note that when used in `CreateEngineRequest `__, - one DataStore id must be provided as the system - will use it for necessary initializations. + one DataStore id must be provided as the system will use + it for necessary initializations. solution_type (google.cloud.discoveryengine_v1alpha.types.SolutionType): Required. The solutions of the engine. industry_vertical (google.cloud.discoveryengine_v1alpha.types.IndustryVertical): The industry vertical that the engine registers. - The restriction of the Engine industry vertical - is based on `DataStore - `__: - If unspecified, default to ``GENERIC``. Vertical - on Engine has to match vertical of the DataStore - linked to the engine. + The restriction of the Engine industry vertical is based + on `DataStore + `__: If + unspecified, default to ``GENERIC``. Vertical on Engine + has to match vertical of the DataStore linked to the + engine. common_config (google.cloud.discoveryengine_v1alpha.types.Engine.CommonConfig): - Common config spec that specifies the - metadata of the engine. + Common config spec that specifies the metadata of the + engine. """ class SearchEngineConfig(proto.Message): @@ -173,8 +171,7 @@ class SearchEngineConfig(proto.Message): The search feature tier of this engine. Different tiers might have different - pricing. To learn more, check the pricing - documentation. + pricing. To learn more, check the pricing documentation. Defaults to `SearchTier.SEARCH_TIER_STANDARD @@ -207,12 +204,10 @@ class MediaRecommendationEngineConfig(proto.Message): ``recommended-for-you``. This field together with `optimization_objective - `__ describe - engine metadata to use to control engine - training and serving. + `__ describe engine + metadata to use to control engine training and serving. - Currently supported values: - ``recommended-for-you``, + Currently supported values: ``recommended-for-you``, ``others-you-may-like``, ``more-like-this``, ``most-popular-items``. optimization_objective (str): @@ -221,42 +216,37 @@ class MediaRecommendationEngineConfig(proto.Message): This field together with `optimization_objective `__ - describe engine metadata to use to control - engine training and serving. + describe engine metadata to use to control engine + training and serving. Currently supported values: ``ctr``, ``cvr``. - If not specified, we choose default based on - engine type. Default depends on type of - recommendation: + If not specified, we choose default based on engine + type. Default depends on type of recommendation: ``recommended-for-you`` => ``ctr`` ``others-you-may-like`` => ``ctr`` optimization_objective_config (google.cloud.discoveryengine_v1alpha.types.Engine.MediaRecommendationEngineConfig.OptimizationObjectiveConfig): Name and value of the custom threshold for cvr - optimization_objective. For target_field - ``watch-time``, target_field_value must be an - integer value indicating the media progress time - in seconds between (0, 86400] (excludes 0, - includes 86400) (e.g., 90). + optimization_objective. For target_field ``watch-time``, + target_field_value must be an integer value indicating + the media progress time in seconds between (0, 86400] + (excludes 0, includes 86400) (e.g., 90). For target_field ``watch-percentage``, the - target_field_value must be a valid float value - between (0, 1.0] (excludes 0, includes 1.0) - (e.g., 0.5). + target_field_value must be a valid float value between + (0, 1.0] (excludes 0, includes 1.0) (e.g., 0.5). training_state (google.cloud.discoveryengine_v1alpha.types.Engine.MediaRecommendationEngineConfig.TrainingState): The training state that the engine is in (e.g. ``TRAINING`` or ``PAUSED``). - Since part of the cost of running the service is - frequency of training - this can be used to - determine when to train engine in order to - control cost. If not specified: the default - value for ``CreateEngine`` method is - ``TRAINING``. The default value for - ``UpdateEngine`` method is to keep the state the - same as before. + Since part of the cost of running the service + is frequency of training - this can be used to determine + when to train engine in order to control cost. If not + specified: the default value for ``CreateEngine`` method + is ``TRAINING``. The default value for ``UpdateEngine`` + method is to keep the state the same as before. """ class TrainingState(proto.Enum): @@ -279,12 +269,11 @@ class OptimizationObjectiveConfig(proto.Message): Attributes: target_field (str): - Required. The name of the field to target. - Currently supported values: - ``watch-percentage``, ``watch-time``. + Required. The name of the field to target. Currently + supported values: ``watch-percentage``, ``watch-time``. target_field_value_float (float): - Required. The threshold to be applied to the - target (e.g., 0.5). + Required. The threshold to be applied to the target + (e.g., 0.5). """ target_field: str = proto.Field( @@ -322,32 +311,29 @@ class ChatEngineConfig(proto.Message): Attributes: agent_creation_config (google.cloud.discoveryengine_v1alpha.types.Engine.ChatEngineConfig.AgentCreationConfig): - The configurationt generate the Dialogflow agent - that is associated to this Engine. + The configurationt generate the Dialogflow agent that is + associated to this Engine. - Note that these configurations are one-time - consumed by and passed to Dialogflow service. It - means they cannot be retrieved using - `EngineService.GetEngine + Note that these configurations are one-time consumed by + and passed to Dialogflow service. It means they cannot + be retrieved using `EngineService.GetEngine `__ or `EngineService.ListEngines `__ API after engine creation. dialogflow_agent_to_link (str): - The resource name of an exist Dialogflow agent - to link to this Chat Engine. Customers can - either provide ``agent_creation_config`` to - create agent or provide an agent name that links - the agent with the Chat engine. - - Format: ``projects//locations//agents/``. - - Note that the ``dialogflow_agent_to_link`` are - one-time consumed by and passed to Dialogflow - service. It means they cannot be retrieved using - `EngineService.GetEngine + The resource name of an exist Dialogflow agent to link + to this Chat Engine. Customers can either provide + ``agent_creation_config`` to create agent or provide an + agent name that links the agent with the Chat engine. + + Format: ``projects//locations//agents/``. + + Note that the ``dialogflow_agent_to_link`` are one-time + consumed by and passed to Dialogflow service. It means + they cannot be retrieved using `EngineService.GetEngine `__ or `EngineService.ListEngines @@ -355,46 +341,40 @@ class ChatEngineConfig(proto.Message): API after engine creation. Use `ChatEngineMetadata.dialogflow_agent `__ - for actual agent association after Engine is - created. + for actual agent association after Engine is created. """ class AgentCreationConfig(proto.Message): r"""Configurations for generating a Dialogflow agent. - Note that these configurations are one-time consumed by and - passed to Dialogflow service. It means they cannot be retrieved + Note that these configurations are one-time consumed by + and passed to Dialogflow service. It means they cannot be retrieved using `EngineService.GetEngine - `__ - or + `__ or `EngineService.ListEngines - `__ - API after engine creation. + `__ API + after engine creation. Attributes: business (str): - Name of the company, organization or other - entity that the agent represents. Used for - knowledge connector LLM prompt and for knowledge - search. + Name of the company, organization or other entity + that the agent represents. Used for knowledge connector + LLM prompt and for knowledge search. default_language_code (str): Required. The default language of the agent as a language tag. See `Language Support `__ - for a list of the currently supported language - codes. + for a list of the currently supported language codes. time_zone (str): - Required. The time zone of the agent from the - `time zone database - `__, e.g., + Required. The time zone of the agent from the `time zone + database `__, e.g., America/New_York, Europe/Paris. location (str): - Agent location for Agent creation, supported - values: global/us/eu. If not provided, us Engine - will create Agent using us-central-1 by default; - eu Engine will create Agent using eu-west-1 by - default. + Agent location for Agent creation, supported values: + global/us/eu. If not provided, us Engine will create + Agent using us-central-1 by default; eu Engine will + create Agent using eu-west-1 by default. """ business: str = proto.Field( @@ -431,9 +411,9 @@ class CommonConfig(proto.Message): Attributes: company_name (str): - The name of the company, business or entity - that is associated with the engine. Setting this - may help improve LLM related features. + The name of the company, business or entity that is + associated with the engine. Setting this may help + improve LLM related features. """ company_name: str = proto.Field( @@ -449,31 +429,30 @@ class RecommendationMetadata(proto.Message): Output only. The serving state of the engine: ``ACTIVE``, ``NOT_ACTIVE``. data_state (google.cloud.discoveryengine_v1alpha.types.Engine.RecommendationMetadata.DataState): - Output only. The state of data requirements for - this engine: ``DATA_OK`` and ``DATA_ERROR``. + Output only. The state of data requirements for this + engine: ``DATA_OK`` and ``DATA_ERROR``. Engine cannot be trained if the data is in - ``DATA_ERROR`` state. Engine can have - ``DATA_ERROR`` state even if serving state is - ``ACTIVE``: engines were trained successfully - before, but cannot be refreshed because the - underlying engine no longer has sufficient data - for training. + ``DATA_ERROR`` state. Engine can have ``DATA_ERROR`` + state even if serving state is ``ACTIVE``: engines were + trained successfully before, but cannot be refreshed + because the underlying engine no longer has sufficient + data for training. last_tune_time (google.protobuf.timestamp_pb2.Timestamp): - Output only. The timestamp when the latest - successful tune finished. Only applicable on - Media Recommendation engines. + Output only. The timestamp when the latest successful + tune finished. Only applicable on Media Recommendation + engines. tuning_operation (str): - Output only. The latest tune operation id - associated with the engine. Only applicable on - Media Recommendation engines. - - If present, this operation id can be used to - determine if there is an ongoing tune for this - engine. To check the operation status, send the - GetOperation request with this operation id in - the engine resource format. If no tuning has - happened for this engine, the string is empty. + Output only. The latest tune operation id associated + with the engine. Only applicable on Media Recommendation + engines. + + If present, this operation id can be used to determine + if there is an ongoing tune for this engine. To check + the operation status, send the GetOperation request with + this operation id in the engine resource format. If no + tuning has happened for this engine, the string is + empty. """ class ServingState(proto.Enum): @@ -540,11 +519,11 @@ class ChatEngineMetadata(proto.Message): Attributes: dialogflow_agent (str): - The resource name of a Dialogflow agent, that - this Chat Engine refers to. + The resource name of a Dialogflow agent, that this Chat + Engine refers to. - Format: ``projects//locations//agents/``. + Format: ``projects//locations//agents/``. """ dialogflow_agent: str = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/engine_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/engine_service.py index ca43613d6b73..d5041b50ad13 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/engine_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/engine_service.py @@ -55,22 +55,21 @@ class CreateEngineRequest(proto.Message): ``projects/{project}/locations/{location}/collections/{collection}``. engine (google.cloud.discoveryengine_v1alpha.types.Engine): Required. The `Engine - `__ - to create. + `__ to + create. engine_id (str): Required. The ID to use for the `Engine - `__, - which will become the final component of the + `__, which + will become the final component of the `Engine `__'s resource name. This field must conform to `RFC-1034 - `__ - standard with a length limit of 63 characters. - Otherwise, an INVALID_ARGUMENT error is - returned. + `__ standard with a + length limit of 63 characters. Otherwise, an + INVALID_ARGUMENT error is returned. """ parent: str = proto.Field( @@ -99,8 +98,8 @@ class CreateEngineMetadata(proto.Message): create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -125,20 +124,19 @@ class DeleteEngineRequest(proto.Message): name (str): Required. Full resource name of `Engine - `__, - such as + `__, such + as ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}``. - If the caller does not have permission to delete - the `Engine + If the caller does not have permission to delete the + `Engine `__, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the `Engine - `__ - to delete does not exist, a NOT_FOUND error is - returned. + `__ to + delete does not exist, a NOT_FOUND error is returned. """ name: str = proto.Field( @@ -158,8 +156,8 @@ class DeleteEngineMetadata(proto.Message): create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -184,8 +182,8 @@ class GetEngineRequest(proto.Message): name (str): Required. Full resource name of `Engine - `__, - such as + `__, such + as ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}``. """ @@ -211,6 +209,7 @@ class ListEnginesRequest(proto.Message): Optional. Not supported. filter (str): Optional. Filter by solution type. For example: + solution_type=SOLUTION_TYPE_SEARCH """ @@ -270,27 +269,25 @@ class UpdateEngineRequest(proto.Message): Attributes: engine (google.cloud.discoveryengine_v1alpha.types.Engine): Required. The `Engine - `__ - to update. + `__ to + update. - If the caller does not have permission to update - the `Engine + If the caller does not have permission to update the + `Engine `__, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the `Engine - `__ - to update does not exist, a NOT_FOUND error is - returned. + `__ to + update does not exist, a NOT_FOUND error is returned. update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided - `Engine - `__ + `Engine `__ to update. - If an unsupported or unknown field is provided, - an INVALID_ARGUMENT error is returned. + If an unsupported or unknown field is provided, an + INVALID_ARGUMENT error is returned. """ engine: gcd_engine.Engine = proto.Field( @@ -340,13 +337,13 @@ class ResumeEngineRequest(proto.Message): class TuneEngineRequest(proto.Message): - r"""Request to manually start a tuning process now (instead of - waiting for the periodically scheduled tuning to happen). + r"""Request to manually start a tuning process now (instead of waiting + for the periodically scheduled tuning to happen). Attributes: name (str): - Required. The resource name of the engine to - tune. Format: + Required. The resource name of the engine to tune. + Format: ``projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`` """ @@ -362,8 +359,8 @@ class TuneEngineMetadata(proto.Message): Attributes: engine (str): - Required. The resource name of the engine that - this tune applies to. Format: + Required. The resource name of the engine that this tune + applies to. Format: ``projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`` """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/estimate_billing_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/estimate_billing_service.py index ef0106d2d7f5..5dccf042fdce 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/estimate_billing_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/estimate_billing_service.py @@ -55,8 +55,7 @@ class EstimateDataSizeRequest(proto.Message): This field is a member of `oneof`_ ``data_source``. location (str): - Required. Full resource name of the location, - such as + Required. Full resource name of the location, such as ``projects/{project}/locations/{location}``. """ @@ -66,9 +65,9 @@ class WebsiteDataSource(proto.Message): Attributes: estimator_uri_patterns (MutableSequence[google.cloud.discoveryengine_v1alpha.types.EstimateDataSizeRequest.WebsiteDataSource.EstimatorUriPattern]): - Required. The URI patterns to estimate the data - sizes. At most 10 patterns are allowed, - otherwise an INVALID_ARGUMENT error is thrown. + Required. The URI patterns to estimate the data sizes. + At most 10 patterns are allowed, otherwise an + INVALID_ARGUMENT error is thrown. """ class EstimatorUriPattern(proto.Message): @@ -79,13 +78,13 @@ class EstimatorUriPattern(proto.Message): User provided URI pattern. For example, ``foo.com/bar/*``. exact_match (bool): - Whether we infer the generated URI or use the - exact provided one. + Whether we infer the generated URI or use the exact + provided one. exclusive (bool): - Whether the pattern is exclusive or not. If - set to true, the pattern is considered - exclusive. If unset or set to false, the pattern - is considered inclusive by default. + Whether the pattern is exclusive or not. If set to + true, the pattern is considered exclusive. If unset or + set to false, the pattern is considered inclusive by + default. """ provided_uri_pattern: str = proto.Field( @@ -110,8 +109,7 @@ class EstimatorUriPattern(proto.Message): ) class FileDataSource(proto.Message): - r"""Data source contains files either in Cloud Storage or - BigQuery. + r"""Data source contains files either in Cloud Storage or BigQuery. This message has `oneof`_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. @@ -165,8 +163,8 @@ class FileDataSource(proto.Message): class EstimateDataSizeResponse(proto.Message): r"""Response of the EstimateDataSize request. If the long running operation was successful, then this message is returned by the - google.longrunning.Operations.response field if the operation - was successful. + google.longrunning.Operations.response field if the operation was + successful. Attributes: data_size_bytes (int): @@ -186,9 +184,8 @@ class EstimateDataSizeResponse(proto.Message): class EstimateDataSizeMetadata(proto.Message): - r"""Metadata related to the progress of the EstimateDataSize - operation. This is returned by the - google.longrunning.Operation.metadata field. + r"""Metadata related to the progress of the EstimateDataSize operation. + This is returned by the google.longrunning.Operation.metadata field. Attributes: create_time (google.protobuf.timestamp_pb2.Timestamp): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/evaluation.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/evaluation.py index bd120e099eb7..edebff4cc4bd 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/evaluation.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/evaluation.py @@ -34,50 +34,48 @@ class Evaluation(proto.Message): r"""An evaluation is a single execution (or run) of an evaluation - process. It encapsulates the state of the evaluation and the - resulting data. + process. It encapsulates the state of the evaluation and the resulting + data. Attributes: name (str): Identifier. The full resource name of the `Evaluation - `__, - in the format of + `__, in + the format of ``projects/{project}/locations/{location}/evaluations/{evaluation}``. - This field must be a UTF-8 encoded string with a - length limit of 1024 characters. + This field must be a UTF-8 encoded string with a length + limit of 1024 characters. evaluation_spec (google.cloud.discoveryengine_v1alpha.types.Evaluation.EvaluationSpec): - Required. The specification of the - evaluation. + Required. The specification of the evaluation. quality_metrics (google.cloud.discoveryengine_v1alpha.types.QualityMetrics): - Output only. The metrics produced by the - evaluation, averaged across all `SampleQuery + Output only. The metrics produced by the evaluation, + averaged across all `SampleQuery `__s in the `SampleQuerySet `__. - Only populated when the evaluation's state is - SUCCEEDED. + Only populated when the evaluation's state is SUCCEEDED. state (google.cloud.discoveryengine_v1alpha.types.Evaluation.State): Output only. The state of the evaluation. error (google.rpc.status_pb2.Status): Output only. The error that occurred during - evaluation. Only populated when the evaluation's - state is FAILED. + evaluation. Only populated when the evaluation's state + is FAILED. create_time (google.protobuf.timestamp_pb2.Timestamp): Output only. Timestamp the `Evaluation - `__ - was created at. + `__ was + created at. end_time (google.protobuf.timestamp_pb2.Timestamp): Output only. Timestamp the `Evaluation - `__ - was completed at. + `__ was + completed at. error_samples (MutableSequence[google.rpc.status_pb2.Status]): - Output only. A sample of errors encountered - while processing the request. + Output only. A sample of errors encountered while + processing the request. """ class State(proto.Enum): @@ -109,11 +107,11 @@ class EvaluationSpec(proto.Message): Attributes: search_request (google.cloud.discoveryengine_v1alpha.types.SearchRequest): - Required. The search request that is used to - perform the evaluation. - Only the following fields within SearchRequest - are supported; if any other fields are provided, - an UNSUPPORTED error will be returned: + Required. The search request that is used to perform the + evaluation. + Only the following fields within SearchRequest are + supported; if any other fields are provided, an + UNSUPPORTED error will be returned: * `SearchRequest.serving_config `__ @@ -213,31 +211,31 @@ class QualityMetrics(proto.Message): Attributes: doc_recall (google.cloud.discoveryengine_v1alpha.types.QualityMetrics.TopkMetrics): - Recall per document, at various top-k cutoff - levels. - Recall is the fraction of relevant documents - retrieved out of all relevant documents. + Recall per document, at various top-k cutoff levels. + + Recall is the fraction of relevant documents retrieved + out of all relevant documents. Example (top-5): * For a single `SampleQuery `__, - If 3 out of 5 relevant documents are retrieved - in the top-5, recall@5 = 3/5 = 0.6 + If 3 out of 5 relevant documents are retrieved in the + top-5, recall@5 = 3/5 = 0.6 doc_precision (google.cloud.discoveryengine_v1alpha.types.QualityMetrics.TopkMetrics): - Precision per document, at various top-k cutoff - levels. - Precision is the fraction of retrieved documents - that are relevant. + Precision per document, at various top-k cutoff levels. + + Precision is the fraction of retrieved documents that + are relevant. Example (top-5): * For a single `SampleQuery `__, - If 4 out of 5 retrieved documents in the top-5 - are relevant, precision@5 = 4/5 = 0.8 + If 4 out of 5 retrieved documents in the top-5 are + relevant, precision@5 = 4/5 = 0.8 doc_ndcg (google.cloud.discoveryengine_v1alpha.types.QualityMetrics.TopkMetrics): Normalized discounted cumulative gain (NDCG) per document, at various top-k cutoff levels. @@ -249,9 +247,9 @@ class QualityMetrics(proto.Message): Suppose `SampleQuery `__ - with three retrieved documents (D1, D2, D3) and - binary relevance judgements (1 for relevant, 0 - for not relevant): + with three retrieved documents (D1, D2, D3) and binary + relevance judgements (1 for relevant, 0 for not + relevant): Retrieved: [D3 (0), D1 (1), D2 (1)] Ideal: [D1 (1), D2 (1), D3 (0)] @@ -260,27 +258,27 @@ class QualityMetrics(proto.Message): `SampleQuery `__: - * DCG@3: 0/log2(1+1) + 1/log2(2+1) + 1/log2(3+1) - = 1.13 * Ideal DCG@3: 1/log2(1+1) + - 1/log2(2+1) + 0/log2(3+1) = 1.63 + * DCG@3: 0/log2(1+1) + 1/log2(2+1) + 1/log2(3+1) = 1.13 + * Ideal DCG@3: 1/log2(1+1) + 1/log2(2+1) + 0/log2(3+1) = + 1.63 * NDCG@3: 1.13/1.63 = 0.693 page_recall (google.cloud.discoveryengine_v1alpha.types.QualityMetrics.TopkMetrics): Recall per page, at various top-k cutoff levels. - Recall is the fraction of relevant pages - retrieved out of all relevant pages. + Recall is the fraction of relevant pages retrieved out + of all relevant pages. Example (top-5): * For a single `SampleQuery `__, - if 3 out of 5 relevant pages are retrieved in - the top-5, recall@5 = 3/5 = 0.6 + if 3 out of 5 relevant pages are retrieved in the + top-5, recall@5 = 3/5 = 0.6 page_ndcg (google.cloud.discoveryengine_v1alpha.types.QualityMetrics.TopkMetrics): - Normalized discounted cumulative gain (NDCG) per - page, at various top-k cutoff levels. + Normalized discounted cumulative gain (NDCG) per page, + at various top-k cutoff levels. NDCG measures the ranking quality, giving higher relevance to top results. @@ -289,9 +287,9 @@ class QualityMetrics(proto.Message): Suppose `SampleQuery `__ - with three retrieved pages (P1, P2, P3) and - binary relevance judgements (1 for relevant, 0 - for not relevant): + with three retrieved pages (P1, P2, P3) and binary + relevance judgements (1 for relevant, 0 for not + relevant): Retrieved: [P3 (0), P1 (1), P2 (1)] Ideal: [P1 (1), P2 (1), P3 (0)] @@ -300,9 +298,9 @@ class QualityMetrics(proto.Message): `SampleQuery `__: - * DCG@3: 0/log2(1+1) + 1/log2(2+1) + 1/log2(3+1) - = 1.13 * Ideal DCG@3: 1/log2(1+1) + - 1/log2(2+1) + 0/log2(3+1) = 1.63 + * DCG@3: 0/log2(1+1) + 1/log2(2+1) + 1/log2(3+1) = 1.13 + * Ideal DCG@3: 1/log2(1+1) + 1/log2(2+1) + 0/log2(3+1) = + 1.63 * NDCG@3: 1.13/1.63 = 0.693 """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/evaluation_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/evaluation_service.py index 0b21d9c0312b..f86637dde295 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/evaluation_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/evaluation_service.py @@ -50,8 +50,8 @@ class GetEvaluationRequest(proto.Message): such as ``projects/{project}/locations/{location}/evaluations/{evaluation}``. - If the caller does not have permission to access - the `Evaluation + If the caller does not have permission to access the + `Evaluation `__, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. @@ -76,26 +76,25 @@ class ListEvaluationsRequest(proto.Message): Attributes: parent (str): - Required. The parent location resource name, - such as + Required. The parent location resource name, such as ``projects/{project}/locations/{location}``. If the caller does not have permission to list `Evaluation `__s - under this location, regardless of whether or - not this location exists, a - ``PERMISSION_DENIED`` error is returned. + under this location, regardless of whether or not this + location exists, a ``PERMISSION_DENIED`` error is + returned. page_size (int): Maximum number of `Evaluation - `__s - to return. If unspecified, defaults to 100. The - maximum allowed value is 1000. Values above 1000 - will be coerced to 1000. + `__s to + return. If unspecified, defaults to 100. The maximum + allowed value is 1000. Values above 1000 will be coerced + to 1000. - If this field is negative, an - ``INVALID_ARGUMENT`` error is returned. + If this field is negative, an ``INVALID_ARGUMENT`` error + is returned. page_token (str): A page token `ListEvaluationsResponse.next_page_token @@ -103,15 +102,13 @@ class ListEvaluationsRequest(proto.Message): received from a previous `EvaluationService.ListEvaluations `__ - call. Provide this to retrieve the subsequent - page. + call. Provide this to retrieve the subsequent page. - When paginating, all other parameters provided - to `EvaluationService.ListEvaluations + When paginating, all other parameters provided to + `EvaluationService.ListEvaluations `__ - must match the call that provided the page - token. Otherwise, an ``INVALID_ARGUMENT`` error - is returned. + must match the call that provided the page token. + Otherwise, an ``INVALID_ARGUMENT`` error is returned. """ parent: str = proto.Field( @@ -142,8 +139,8 @@ class ListEvaluationsResponse(proto.Message): A token that can be sent as `ListEvaluationsRequest.page_token `__ - to retrieve the next page. If this field is - omitted, there are no subsequent pages. + to retrieve the next page. If this field is omitted, + there are no subsequent pages. """ @property @@ -173,8 +170,8 @@ class CreateEvaluationRequest(proto.Message): ``projects/{project}/locations/{location}``. evaluation (google.cloud.discoveryengine_v1alpha.types.Evaluation): Required. The `Evaluation - `__ - to create. + `__ to + create. """ parent: str = proto.Field( @@ -209,18 +206,16 @@ class ListEvaluationResultsRequest(proto.Message): ``projects/{project}/locations/{location}/evaluations/{evaluation}``. If the caller does not have permission to list - [EvaluationResult][] under this evaluation, - regardless of whether or not this evaluation set - exists, a ``PERMISSION_DENIED`` error is - returned. + [EvaluationResult][] under this evaluation, regardless + of whether or not this evaluation set exists, a + ``PERMISSION_DENIED`` error is returned. page_size (int): - Maximum number of [EvaluationResult][] to - return. If unspecified, defaults to 100. The - maximum allowed value is 1000. Values above 1000 - will be coerced to 1000. + Maximum number of [EvaluationResult][] to return. If + unspecified, defaults to 100. The maximum allowed value + is 1000. Values above 1000 will be coerced to 1000. - If this field is negative, an - ``INVALID_ARGUMENT`` error is returned. + If this field is negative, an ``INVALID_ARGUMENT`` error + is returned. page_token (str): A page token `ListEvaluationResultsResponse.next_page_token @@ -228,15 +223,13 @@ class ListEvaluationResultsRequest(proto.Message): received from a previous `EvaluationService.ListEvaluationResults `__ - call. Provide this to retrieve the subsequent - page. + call. Provide this to retrieve the subsequent page. - When paginating, all other parameters provided - to `EvaluationService.ListEvaluationResults + When paginating, all other parameters provided to + `EvaluationService.ListEvaluationResults `__ - must match the call that provided the page - token. Otherwise, an ``INVALID_ARGUMENT`` error - is returned. + must match the call that provided the page token. + Otherwise, an ``INVALID_ARGUMENT`` error is returned. """ evaluation: str = proto.Field( @@ -268,14 +261,13 @@ class ListEvaluationResultsResponse(proto.Message): A token that can be sent as `ListEvaluationResultsRequest.page_token `__ - to retrieve the next page. If this field is - omitted, there are no subsequent pages. + to retrieve the next page. If this field is omitted, + there are no subsequent pages. """ class EvaluationResult(proto.Message): r"""Represents the results of an evaluation for a single - `SampleQuery - `__. + `SampleQuery `__. Attributes: sample_query (google.cloud.discoveryengine_v1alpha.types.SampleQuery): @@ -284,8 +276,8 @@ class EvaluationResult(proto.Message): `__ that was evaluated. quality_metrics (google.cloud.discoveryengine_v1alpha.types.QualityMetrics): - Output only. The metrics produced by the - evaluation, for a given `SampleQuery + Output only. The metrics produced by the evaluation, for + a given `SampleQuery `__. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/grounded_generation_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/grounded_generation_service.py index 6d7bc949ef53..06ceb943fe6b 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/grounded_generation_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/grounded_generation_service.py @@ -38,12 +38,11 @@ class CheckGroundingSpec(proto.Message): Attributes: citation_threshold (float): - The threshold (in [0,1]) used for determining - whether a fact must be cited for a claim in the - answer candidate. Choosing a higher threshold - will lead to fewer but very strong citations, - while choosing a lower threshold may lead to - more but somewhat weaker citations. If unset, + The threshold (in [0,1]) used for determining whether a + fact must be cited for a claim in the answer candidate. + Choosing a higher threshold will lead to fewer but very + strong citations, while choosing a lower threshold may + lead to more but somewhat weaker citations. If unset, the threshold will default to 0.6. This field is a member of `oneof`_ ``_citation_threshold``. @@ -64,37 +63,36 @@ class CheckGroundingRequest(proto.Message): Attributes: grounding_config (str): - Required. The resource name of the grounding - config, such as + Required. The resource name of the grounding config, + such as ``projects/*/locations/global/groundingConfigs/default_grounding_config``. answer_candidate (str): - Answer candidate to check. Can have a maximum - length of 1024 characters. + Answer candidate to check. Can have a maximum length + of 1024 characters. facts (MutableSequence[google.cloud.discoveryengine_v1alpha.types.GroundingFact]): List of facts for the grounding check. We support up to 200 facts. grounding_spec (google.cloud.discoveryengine_v1alpha.types.CheckGroundingSpec): Configuration of the grounding check. user_labels (MutableMapping[str, str]): - The user labels applied to a resource must meet - the following requirements: - * Each resource can have multiple labels, up to - a maximum of 64. + The user labels applied to a resource must meet the + following requirements: + * Each resource can have multiple labels, up to a + maximum of 64. * Each label must be a key-value pair. - * Keys have a minimum length of 1 character and - a maximum length of 63 characters and cannot - be empty. Values can be empty and have a maximum - length of 63 characters. + * Keys have a minimum length of 1 character and a + maximum length of 63 characters and cannot be empty. + Values can be empty and have a maximum length of 63 + characters. - * Keys and values can contain only lowercase - letters, numeric characters, underscores, and - dashes. All characters must use UTF-8 encoding, - and international characters are allowed. + * Keys and values can contain only lowercase letters, + numeric characters, underscores, and dashes. All + characters must use UTF-8 encoding, and international + characters are allowed. - * The key portion of a label must be unique. - However, you can use the same key with - multiple resources. + * The key portion of a label must be unique. However, + you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. @@ -141,20 +139,19 @@ class CheckGroundingResponse(proto.Message): Attributes: support_score (float): - The support score for the input answer - candidate. Higher the score, higher is the - fraction of claims that are supported by the - provided facts. This is always set when a - response is returned. + The support score for the input answer candidate. + Higher the score, higher is the fraction of claims that + are supported by the provided facts. This is always set + when a response is returned. This field is a member of `oneof`_ ``_support_score``. cited_chunks (MutableSequence[google.cloud.discoveryengine_v1alpha.types.FactChunk]): - List of facts cited across all claims in the - answer candidate. These are derived from the - facts supplied in the request. + List of facts cited across all claims in the answer + candidate. These are derived from the facts supplied in + the request. claims (MutableSequence[google.cloud.discoveryengine_v1alpha.types.CheckGroundingResponse.Claim]): - Claim texts and citation info across all - claims in the answer candidate. + Claim texts and citation info across all claims in + the answer candidate. """ class Claim(proto.Message): @@ -164,34 +161,32 @@ class Claim(proto.Message): Attributes: start_pos (int): - Position indicating the start of the claim in - the answer candidate, measured in bytes. + Position indicating the start of the claim in the + answer candidate, measured in bytes. This field is a member of `oneof`_ ``_start_pos``. end_pos (int): - Position indicating the end of the claim in - the answer candidate, exclusive. + Position indicating the end of the claim in the + answer candidate, exclusive. This field is a member of `oneof`_ ``_end_pos``. claim_text (str): - Text for the claim in the answer candidate. - Always provided regardless of whether citations - or anti-citations are found. + Text for the claim in the answer candidate. Always + provided regardless of whether citations or + anti-citations are found. citation_indices (MutableSequence[int]): - A list of indices (into 'cited_chunks') - specifying the citations associated with the - claim. For instance [1,3,4] means that - cited_chunks[1], cited_chunks[3], - cited_chunks[4] are the facts cited supporting - for the claim. A citation to a fact indicates - that the claim is supported by the fact. + A list of indices (into 'cited_chunks') specifying the + citations associated with the claim. For instance + [1,3,4] means that cited_chunks[1], cited_chunks[3], + cited_chunks[4] are the facts cited supporting for the + claim. A citation to a fact indicates that the claim is + supported by the fact. grounding_check_required (bool): - Indicates that this claim required grounding - check. When the system decided this claim - doesn't require attribution/grounding check, - this field will be set to false. In that case, - no grounding check was done for the claim and - therefore + Indicates that this claim required grounding check. When + the system decided this claim doesn't require + attribution/grounding check, this field will be set to + false. In that case, no grounding check was done for the + claim and therefore `citation_indices `__, `anti_citation_indices diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/grounding.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/grounding.py index f6944ecba357..45e22b4014f5 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/grounding.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/grounding.py @@ -37,9 +37,9 @@ class GroundingFact(proto.Message): characters long. attributes (MutableMapping[str, str]): Attributes associated with the fact. - Common attributes include ``source`` (indicating - where the fact was sourced from), ``author`` - (indicating the author of the fact), and so on. + Common attributes include ``source`` (indicating where + the fact was sourced from), ``author`` (indicating the + author of the fact), and so on. """ fact_text: str = proto.Field( @@ -58,17 +58,16 @@ class FactChunk(proto.Message): Attributes: chunk_text (str): - Text content of the fact chunk. Can be at - most 10K characters long. + Text content of the fact chunk. Can be at most 10K + characters long. source (str): - Source from which this fact chunk was - retrieved. If it was retrieved from the - GroundingFacts provided in the request then this - field will contain the index of the specific - fact from which this chunk was retrieved. + Source from which this fact chunk was retrieved. If + it was retrieved from the GroundingFacts provided in the + request then this field will contain the index of the + specific fact from which this chunk was retrieved. index (int): - The index of this chunk. Currently, only used - for the streaming mode. + The index of this chunk. Currently, only used for the + streaming mode. source_metadata (MutableMapping[str, str]): More fine-grained information for the source reference. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/import_config.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/import_config.py index 1bfc46af660f..cf6b14a45df0 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/import_config.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/import_config.py @@ -67,56 +67,54 @@ class GcsSource(proto.Message): Attributes: input_uris (MutableSequence[str]): - Required. Cloud Storage URIs to input files. - Each URI can be up to 2000 characters long. URIs - can match the full object path (for example, - ``gs://bucket/directory/object.json``) or a - pattern matching one or more files, such as + Required. Cloud Storage URIs to input files. Each URI + can be up to 2000 characters long. URIs can match the + full object path (for example, + ``gs://bucket/directory/object.json``) or a pattern + matching one or more files, such as ``gs://bucket/directory/*.json``. - A request can contain at most 100 files (or - 100,000 files if ``data_schema`` is - ``content``). Each file can be up to 2 GB (or - 100 MB if ``data_schema`` is ``content``). + A request can contain at most 100 files (or 100,000 + files if ``data_schema`` is ``content``). Each file can + be up to 2 GB (or 100 MB if ``data_schema`` is + ``content``). data_schema (str): - The schema to use when parsing the data from the - source. + The schema to use when parsing the data from the source. + Supported values for document imports: * ``document`` (default): One JSON `Document - `__ - per line. Each document must + `__ per + line. Each document must have a valid `Document.id `__. - * ``content``: Unstructured data (e.g. PDF, - HTML). Each file matched by ``input_uris`` - becomes a document, with the ID set to the first - 128 bits of SHA256(URI) encoded as a hex - string. - - * ``custom``: One custom data JSON per row in - arbitrary format that conforms to the defined - `Schema - `__ - of the data store. This can only be used by - the GENERIC Data Store vertical. - - * ``csv``: A CSV file with header conforming to - the defined `Schema - `__ - of the data store. Each entry after the header - is imported as a Document. This can only be - used by the GENERIC Data Store vertical. + * ``content``: Unstructured data (e.g. PDF, HTML). Each + file matched by ``input_uris`` becomes a document, + with the ID set to the first 128 bits of SHA256(URI) + encoded as a hex string. + + * ``custom``: One custom data JSON per row in arbitrary + format that conforms to the defined `Schema + `__ of + the data store. This can only be used by the GENERIC + Data Store vertical. + + * ``csv``: A CSV file with header conforming to the + defined `Schema + `__ of the + data store. Each entry after the header is imported as a + Document. This can only be used by the GENERIC Data + Store vertical. Supported values for user event imports: * ``user_event`` (default): One JSON `UserEvent - `__ - per line. + `__ per + line. """ input_uris: MutableSequence[str] = proto.RepeatedField( @@ -136,45 +134,42 @@ class BigQuerySource(proto.Message): Attributes: partition_date (google.type.date_pb2.Date): - BigQuery time partitioned table's _PARTITIONDATE - in YYYY-MM-DD format. + BigQuery time partitioned table's _PARTITIONDATE in + YYYY-MM-DD format. This field is a member of `oneof`_ ``partition``. project_id (str): - The project ID or the project number that - contains the BigQuery source. Has a length limit - of 128 characters. If not specified, inherits - the project ID from the parent request. + The project ID or the project number that contains + the BigQuery source. Has a length limit of 128 + characters. If not specified, inherits the project ID + from the parent request. dataset_id (str): - Required. The BigQuery data set to copy the - data from with a length limit of 1,024 - characters. + Required. The BigQuery data set to copy the data from + with a length limit of 1,024 characters. table_id (str): - Required. The BigQuery table to copy the data - from with a length limit of 1,024 characters. + Required. The BigQuery table to copy the data from + with a length limit of 1,024 characters. gcs_staging_dir (str): - Intermediate Cloud Storage directory used for - the import with a length limit of 2,000 - characters. Can be specified if one wants to - have the BigQuery export to a specific Cloud - Storage directory. + Intermediate Cloud Storage directory used for the + import with a length limit of 2,000 characters. Can be + specified if one wants to have the BigQuery export to a + specific Cloud Storage directory. data_schema (str): - The schema to use when parsing the data from the - source. + The schema to use when parsing the data from the source. + Supported values for user event imports: * ``user_event`` (default): One `UserEvent - `__ - per row. + `__ per + row. Supported values for document imports: * ``document`` (default): One `Document `__ - format per row. Each document must have a - valid + format per row. Each document must have a valid `Document.id `__ and one of @@ -184,12 +179,11 @@ class BigQuerySource(proto.Message): `Document.struct_data `__. - * ``custom``: One custom data per row in - arbitrary format that conforms to the defined - `Schema - `__ - of the data store. This can only be used by - the GENERIC Data Store vertical. + * ``custom``: One custom data per row in arbitrary + format that conforms to the defined `Schema + `__ of the + data store. This can only be used by the GENERIC Data + Store vertical. """ partition_date: date_pb2.Date = proto.Field( @@ -225,23 +219,22 @@ class SpannerSource(proto.Message): Attributes: project_id (str): - The project ID that contains the Spanner - source. Has a length limit of 128 characters. If - not specified, inherits the project ID from the - parent request. + The project ID that contains the Spanner source. Has + a length limit of 128 characters. If not specified, + inherits the project ID from the parent request. instance_id (str): - Required. The instance ID of the source - Spanner table. + Required. The instance ID of the source Spanner + table. database_id (str): - Required. The database ID of the source - Spanner table. + Required. The database ID of the source Spanner + table. table_id (str): - Required. The table name of the Spanner - database that needs to be imported. + Required. The table name of the Spanner database that + needs to be imported. enable_data_boost (bool): - Whether to apply data boost on Spanner export. - Enabling this option will incur additional cost. - More info can be found `here + Whether to apply data boost on Spanner export. Enabling + this option will incur additional cost. More info can be + found `here `__. """ @@ -268,19 +261,19 @@ class SpannerSource(proto.Message): class BigtableOptions(proto.Message): - r"""The Bigtable Options object that contains information to - support the import. + r"""The Bigtable Options object that contains information to support + the import. Attributes: key_field_name (str): - The field name used for saving row key value in - the document. The name has to match the pattern - ```a-zA-Z0-9 `__*``. + The field name used for saving row key value in the + document. The name has to match the pattern ```a-zA-Z0-9 + `__*``. families (MutableMapping[str, google.cloud.discoveryengine_v1alpha.types.BigtableOptions.BigtableColumnFamily]): - The mapping from family names to an object - that contains column families level information - for the given column family. If a family is not - present in this map it will be ignored. + The mapping from family names to an object that + contains column families level information for the given + column family. If a family is not present in this map it + will be ignored. """ class Type(proto.Enum): @@ -338,32 +331,30 @@ class BigtableColumnFamily(proto.Message): Attributes: field_name (str): - The field name to use for this column family in - the document. The name has to match the pattern - ```a-zA-Z0-9 `__*``. If not set, it - is parsed from the family name with best effort. - However, due to different naming patterns, field - name collisions could happen, where parsing - behavior is undefined. + The field name to use for this column family in the + document. The name has to match the pattern ```a-zA-Z0-9 + `__*``. If not set, it is parsed from the + family name with best effort. However, due to different + naming patterns, field name collisions could happen, + where parsing behavior is undefined. encoding (google.cloud.discoveryengine_v1alpha.types.BigtableOptions.Encoding): - The encoding mode of the values when the type is - not STRING. Acceptable encoding values are: - - * ``TEXT``: indicates values are alphanumeric - text strings. * ``BINARY``: indicates values are - encoded using ``HBase Bytes.toBytes`` family of - functions. This can be overridden for a specific - column by listing that column in ``columns`` and - specifying an encoding for it. + The encoding mode of the values when the type is not + STRING. Acceptable encoding values are: + + * ``TEXT``: indicates values are alphanumeric text + strings. * ``BINARY``: indicates values are encoded + using ``HBase Bytes.toBytes`` family of functions. This + can be overridden for a specific column by listing that + column in ``columns`` and specifying an encoding for it. type_ (google.cloud.discoveryengine_v1alpha.types.BigtableOptions.Type): The type of values in this column family. - The values are expected to be encoded using - ``HBase Bytes.toBytes`` function when the - encoding value is set to ``BINARY``. + The values are expected to be encoded using ``HBase + Bytes.toBytes`` function when the encoding value is set + to ``BINARY``. columns (MutableSequence[google.cloud.discoveryengine_v1alpha.types.BigtableOptions.BigtableColumn]): - The list of objects that contains column - level information for each column. If a column - is not present in this list it will be ignored. + The list of objects that contains column level + information for each column. If a column is not present + in this list it will be ignored. """ field_name: str = proto.Field( @@ -393,32 +384,30 @@ class BigtableColumn(proto.Message): Attributes: qualifier (bytes): - Required. Qualifier of the column. If it - cannot be decoded with utf-8, use a base-64 - encoded string instead. + Required. Qualifier of the column. If it cannot be + decoded with utf-8, use a base-64 encoded string + instead. field_name (str): - The field name to use for this column in the - document. The name has to match the pattern - ```a-zA-Z0-9 `__*``. If not set, it - is parsed from the qualifier bytes with best - effort. However, due to different naming - patterns, field name collisions could happen, - where parsing behavior is undefined. + The field name to use for this column in the document. + The name has to match the pattern ```a-zA-Z0-9 + `__*``. If not set, it is parsed from the + qualifier bytes with best effort. However, due to + different naming patterns, field name collisions could + happen, where parsing behavior is undefined. encoding (google.cloud.discoveryengine_v1alpha.types.BigtableOptions.Encoding): - The encoding mode of the values when the type is - not ``STRING``. Acceptable encoding values are: - - * ``TEXT``: indicates values are alphanumeric - text strings. * ``BINARY``: indicates values are - encoded using ``HBase Bytes.toBytes`` family of - functions. This can be overridden for a specific - column by listing that column in ``columns`` and - specifying an encoding for it. + The encoding mode of the values when the type is not + ``STRING``. Acceptable encoding values are: + + * ``TEXT``: indicates values are alphanumeric text + strings. * ``BINARY``: indicates values are encoded + using ``HBase Bytes.toBytes`` family of functions. This + can be overridden for a specific column by listing that + column in ``columns`` and specifying an encoding for it. type_ (google.cloud.discoveryengine_v1alpha.types.BigtableOptions.Type): The type of values in this column family. - The values are expected to be encoded using - ``HBase Bytes.toBytes`` function when the - encoding value is set to ``BINARY``. + The values are expected to be encoded using ``HBase + Bytes.toBytes`` function when the encoding value is set + to ``BINARY``. """ qualifier: bytes = proto.Field( @@ -457,21 +446,19 @@ class BigtableSource(proto.Message): Attributes: project_id (str): - The project ID that contains the Bigtable - source. Has a length limit of 128 characters. If - not specified, inherits the project ID from the - parent request. + The project ID that contains the Bigtable source. Has + a length limit of 128 characters. If not specified, + inherits the project ID from the parent request. instance_id (str): - Required. The instance ID of the Cloud - Bigtable that needs to be imported. + Required. The instance ID of the Cloud Bigtable that + needs to be imported. table_id (str): - Required. The table ID of the Cloud Bigtable - that needs to be imported. + Required. The table ID of the Cloud Bigtable that + needs to be imported. bigtable_options (google.cloud.discoveryengine_v1alpha.types.BigtableOptions): - Required. Bigtable options that contains - information needed when parsing data into typed - structures. For example, column type - annotations. + Required. Bigtable options that contains information + needed when parsing data into typed structures. For + example, column type annotations. """ project_id: str = proto.Field( @@ -498,22 +485,20 @@ class FhirStoreSource(proto.Message): Attributes: fhir_store (str): - Required. The full resource name of the FHIR - store to import data from, in the format of + Required. The full resource name of the FHIR store to + import data from, in the format of ``projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}``. gcs_staging_dir (str): - Intermediate Cloud Storage directory used for - the import with a length limit of 2,000 - characters. Can be specified if one wants to - have the FhirStore export to a specific Cloud - Storage directory. + Intermediate Cloud Storage directory used for the + import with a length limit of 2,000 characters. Can be + specified if one wants to have the FhirStore export to a + specific Cloud Storage directory. resource_types (MutableSequence[str]): - The FHIR resource types to import. The resource - types should be a subset of all `supported FHIR - resource types + The FHIR resource types to import. The resource types + should be a subset of all `supported FHIR resource + types `__. - Default to all supported FHIR resource types if - empty. + Default to all supported FHIR resource types if empty. """ fhir_store: str = proto.Field( @@ -535,33 +520,31 @@ class CloudSqlSource(proto.Message): Attributes: project_id (str): - The project ID that contains the Cloud SQL - source. Has a length limit of 128 characters. If - not specified, inherits the project ID from the - parent request. + The project ID that contains the Cloud SQL source. + Has a length limit of 128 characters. If not specified, + inherits the project ID from the parent request. instance_id (str): - Required. The Cloud SQL instance to copy the - data from with a length limit of 256 characters. + Required. The Cloud SQL instance to copy the data + from with a length limit of 256 characters. database_id (str): - Required. The Cloud SQL database to copy the - data from with a length limit of 256 characters. + Required. The Cloud SQL database to copy the data + from with a length limit of 256 characters. table_id (str): - Required. The Cloud SQL table to copy the - data from with a length limit of 256 characters. + Required. The Cloud SQL table to copy the data from + with a length limit of 256 characters. gcs_staging_dir (str): - Intermediate Cloud Storage directory used for - the import with a length limit of 2,000 - characters. Can be specified if one wants to - have the Cloud SQL export to a specific Cloud - Storage directory. - - Ensure that the Cloud SQL service account has - the necessary Cloud Storage Admin permissions to - access the specified Cloud Storage directory. + Intermediate Cloud Storage directory used for the + import with a length limit of 2,000 characters. Can be + specified if one wants to have the Cloud SQL export to a + specific Cloud Storage directory. + + Ensure that the Cloud SQL service account has the + necessary Cloud Storage Admin permissions to access the + specified Cloud Storage directory. offload (bool): - Option for serverless export. Enabling this - option will incur additional cost. More info can - be found `here + Option for serverless export. Enabling this option will + incur additional cost. More info can be found + `here `__. """ @@ -596,32 +579,30 @@ class AlloyDbSource(proto.Message): Attributes: project_id (str): - The project ID that contains the AlloyDB - source. Has a length limit of 128 characters. If - not specified, inherits the project ID from the - parent request. + The project ID that contains the AlloyDB source. + Has a length limit of 128 characters. If not specified, + inherits the project ID from the parent request. location_id (str): - Required. The AlloyDB location to copy the - data from with a length limit of 256 characters. + Required. The AlloyDB location to copy the data from + with a length limit of 256 characters. cluster_id (str): - Required. The AlloyDB cluster to copy the - data from with a length limit of 256 characters. + Required. The AlloyDB cluster to copy the data from + with a length limit of 256 characters. database_id (str): - Required. The AlloyDB database to copy the - data from with a length limit of 256 characters. + Required. The AlloyDB database to copy the data from + with a length limit of 256 characters. table_id (str): - Required. The AlloyDB table to copy the data - from with a length limit of 256 characters. + Required. The AlloyDB table to copy the data from + with a length limit of 256 characters. gcs_staging_dir (str): - Intermediate Cloud Storage directory used for - the import with a length limit of 2,000 - characters. Can be specified if one wants to - have the AlloyDB export to a specific Cloud - Storage directory. + Intermediate Cloud Storage directory used for the + import with a length limit of 2,000 characters. Can be + specified if one wants to have the AlloyDB export to a + specific Cloud Storage directory. Ensure that the AlloyDB service account has the - necessary Cloud Storage Admin permissions to - access the specified Cloud Storage directory. + necessary Cloud Storage Admin permissions to access the + specified Cloud Storage directory. """ project_id: str = proto.Field( @@ -655,27 +636,25 @@ class FirestoreSource(proto.Message): Attributes: project_id (str): - The project ID that the Cloud SQL source is - in with a length limit of 128 characters. If not - specified, inherits the project ID from the - parent request. + The project ID that the Cloud SQL source is in with a + length limit of 128 characters. If not specified, + inherits the project ID from the parent request. database_id (str): - Required. The Firestore database to copy the - data from with a length limit of 256 characters. + Required. The Firestore database to copy the data + from with a length limit of 256 characters. collection_id (str): - Required. The Firestore collection (or - entity) to copy the data from with a length - limit of 1,500 characters. + Required. The Firestore collection (or entity) to + copy the data from with a length limit of 1,500 + characters. gcs_staging_dir (str): - Intermediate Cloud Storage directory used for - the import with a length limit of 2,000 - characters. Can be specified if one wants to - have the Firestore export to a specific Cloud - Storage directory. - - Ensure that the Firestore service account has - the necessary Cloud Storage Admin permissions to - access the specified Cloud Storage directory. + Intermediate Cloud Storage directory used for the + import with a length limit of 2,000 characters. Can be + specified if one wants to have the Firestore export to a + specific Cloud Storage directory. + + Ensure that the Firestore service account has the + necessary Cloud Storage Admin permissions to access the + specified Cloud Storage directory. """ project_id: str = proto.Field( @@ -703,11 +682,10 @@ class ImportErrorConfig(proto.Message): Attributes: gcs_prefix (str): - Cloud Storage prefix for import errors. This - must be an empty, existing Cloud Storage - directory. Import errors are written to sharded - files in this directory, one per line, as a - JSON-encoded ``google.rpc.Status`` message. + Cloud Storage prefix for import errors. This must be an + empty, existing Cloud Storage directory. Import errors + are written to sharded files in this directory, one per + line, as a JSON-encoded ``google.rpc.Status`` message. This field is a member of `oneof`_ ``destination``. """ @@ -744,18 +722,15 @@ class ImportUserEventsRequest(proto.Message): This field is a member of `oneof`_ ``source``. parent (str): - Required. Parent DataStore resource name, of the - form + Required. Parent DataStore resource name, of the form ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`` error_config (google.cloud.discoveryengine_v1alpha.types.ImportErrorConfig): - The desired location of errors incurred - during the Import. Cannot be set for inline user - event imports. + The desired location of errors incurred during the + Import. Cannot be set for inline user event imports. """ class InlineSource(proto.Message): - r"""The inline source for the input config for ImportUserEvents - method. + r"""The inline source for the input config for ImportUserEvents method. Attributes: user_events (MutableSequence[google.cloud.discoveryengine_v1alpha.types.UserEvent]): @@ -801,23 +776,22 @@ class InlineSource(proto.Message): class ImportUserEventsResponse(proto.Message): r"""Response of the ImportUserEventsRequest. If the long running operation was successful, then this message is returned by the - google.longrunning.Operations.response field if the operation - was successful. + google.longrunning.Operations.response field if the operation was + successful. Attributes: error_samples (MutableSequence[google.rpc.status_pb2.Status]): - A sample of errors encountered while - processing the request. + A sample of errors encountered while processing the + request. error_config (google.cloud.discoveryengine_v1alpha.types.ImportErrorConfig): - Echoes the destination for the complete - errors if this field was set in the request. + Echoes the destination for the complete errors if + this field was set in the request. joined_events_count (int): - Count of user events imported with complete - existing Documents. + Count of user events imported with complete existing + Documents. unjoined_events_count (int): - Count of user events imported, but with - Document information not found in the existing - Branch. + Count of user events imported, but with Document + information not found in the existing Branch. """ error_samples: MutableSequence[status_pb2.Status] = proto.RepeatedField( @@ -841,22 +815,20 @@ class ImportUserEventsResponse(proto.Message): class ImportUserEventsMetadata(proto.Message): - r"""Metadata related to the progress of the Import operation. - This is returned by the google.longrunning.Operation.metadata - field. + r"""Metadata related to the progress of the Import operation. This is + returned by the google.longrunning.Operation.metadata field. Attributes: create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. success_count (int): - Count of entries that were processed - successfully. + Count of entries that were processed successfully. failure_count (int): - Count of entries that encountered errors - while processing. + Count of entries that encountered errors while + processing. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -880,22 +852,20 @@ class ImportUserEventsMetadata(proto.Message): class ImportDocumentsMetadata(proto.Message): - r"""Metadata related to the progress of the ImportDocuments - operation. This is returned by the - google.longrunning.Operation.metadata field. + r"""Metadata related to the progress of the ImportDocuments operation. + This is returned by the google.longrunning.Operation.metadata field. Attributes: create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. success_count (int): - Count of entries that were processed - successfully. + Count of entries that were processed successfully. failure_count (int): - Count of entries that encountered errors - while processing. + Count of entries that encountered errors while + processing. total_count (int): Total count of entries that were processed. """ @@ -973,42 +943,38 @@ class ImportDocumentsRequest(proto.Message): This field is a member of `oneof`_ ``source``. parent (str): - Required. The parent branch resource name, such - as + Required. The parent branch resource name, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}``. Requires create/update permission. error_config (google.cloud.discoveryengine_v1alpha.types.ImportErrorConfig): - The desired location of errors incurred - during the Import. + The desired location of errors incurred during the + Import. reconciliation_mode (google.cloud.discoveryengine_v1alpha.types.ImportDocumentsRequest.ReconciliationMode): - The mode of reconciliation between existing - documents and the documents to be imported. - Defaults to `ReconciliationMode.INCREMENTAL + The mode of reconciliation between existing documents + and the documents to be imported. Defaults to + `ReconciliationMode.INCREMENTAL `__. update_mask (google.protobuf.field_mask_pb2.FieldMask): - Indicates which fields in the provided - imported documents to update. If not set, the - default is to update all fields. + Indicates which fields in the provided imported + documents to update. If not set, the default is to + update all fields. auto_generate_ids (bool): - Whether to automatically generate IDs for the - documents if absent. + Whether to automatically generate IDs for the documents + if absent. If set to ``true``, `Document.id `__s - are automatically generated based on the hash of - the payload, where IDs may not be consistent - during multiple imports. In which case - `ReconciliationMode.FULL + are automatically generated based on the hash of the + payload, where IDs may not be consistent during multiple + imports. In which case `ReconciliationMode.FULL `__ - is highly recommended to avoid duplicate - contents. If unset or set to ``false``, - `Document.id + is highly recommended to avoid duplicate contents. If + unset or set to ``false``, `Document.id `__s have to be specified using `id_field `__, - otherwise, documents without IDs fail to be - imported. + otherwise, documents without IDs fail to be imported. Supported data sources: @@ -1036,28 +1002,26 @@ class ImportDocumentsRequest(proto.Message): * `BigtableSource `__. id_field (str): - The field indicates the ID field or column to be - used as unique IDs of the documents. + The field indicates the ID field or column to be used as + unique IDs of the documents. For `GcsSource - `__ - it is the key of the JSON field. For instance, - ``my_id`` for JSON ``{"my_id": + `__ it + is the key of the JSON field. For instance, ``my_id`` + for JSON ``{"my_id": - "some_uuid"}``. For others, it may be the column - name of the table where the unique ids are - stored. + "some_uuid"}``. For others, it may be the column name of + the table where the unique ids are stored. - The values of the JSON field or the table column - are used as the `Document.id + The values of the JSON field or the table column are + used as the `Document.id `__s. - The JSON field or the table column must be of - string type, and the values must be set as valid - strings conform to - `RFC-1034 - `__ with - 1-63 characters. Otherwise, documents without - valid IDs fail to be imported. + The JSON field or the table column must be of string + type, and the values must be set as valid strings + conform to + `RFC-1034 `__ with + 1-63 characters. Otherwise, documents without valid IDs + fail to be imported. Only set this field when `auto_generate_ids @@ -1065,8 +1029,8 @@ class ImportDocumentsRequest(proto.Message): is unset or set as ``false``. Otherwise, an INVALID_ARGUMENT error is thrown. - If it is unset, a default value ``_id`` is used - when importing from the allowed data sources. + If it is unset, a default value ``_id`` is used when + importing from the allowed data sources. Supported data sources: @@ -1096,8 +1060,8 @@ class ImportDocumentsRequest(proto.Message): """ class ReconciliationMode(proto.Enum): - r"""Indicates how imported documents are reconciled with the - existing documents created or imported before. + r"""Indicates how imported documents are reconciled with the existing + documents created or imported before. Values: RECONCILIATION_MODE_UNSPECIFIED (0): @@ -1116,13 +1080,12 @@ class ReconciliationMode(proto.Enum): FULL = 2 class InlineSource(proto.Message): - r"""The inline source for the input config for ImportDocuments - method. + r"""The inline source for the input config for ImportDocuments method. Attributes: documents (MutableSequence[google.cloud.discoveryengine_v1alpha.types.Document]): - Required. A list of documents to update/create. - Each document must have a valid `Document.id + Required. A list of documents to update/create. Each + document must have a valid `Document.id `__. Recommended max of 100 items. """ @@ -1219,18 +1182,18 @@ class InlineSource(proto.Message): class ImportDocumentsResponse(proto.Message): r"""Response of the `ImportDocumentsRequest - `__. - If the long running operation is done, then this message is - returned by the google.longrunning.Operations.response field if - the operation was successful. + `__. If the + long running operation is done, then this message is returned by the + google.longrunning.Operations.response field if the operation was + successful. Attributes: error_samples (MutableSequence[google.rpc.status_pb2.Status]): - A sample of errors encountered while - processing the request. + A sample of errors encountered while processing the + request. error_config (google.cloud.discoveryengine_v1alpha.types.ImportErrorConfig): - Echoes the destination for the complete - errors in the request if set. + Echoes the destination for the complete errors in the + request if set. """ error_samples: MutableSequence[status_pb2.Status] = proto.RepeatedField( @@ -1267,19 +1230,17 @@ class ImportSuggestionDenyListEntriesRequest(proto.Message): gcs_source (google.cloud.discoveryengine_v1alpha.types.GcsSource): Cloud Storage location for the input content. - Only 1 file can be specified that contains all - entries to import. Supported values - ``gcs_source.schema`` for autocomplete - suggestion deny list entry imports: + Only 1 file can be specified that contains all entries + to import. Supported values ``gcs_source.schema`` for + autocomplete suggestion deny list entry imports: * ``suggestion_deny_list`` (default): One JSON [SuggestionDenyListEntry] per line. This field is a member of `oneof`_ ``source``. parent (str): - Required. The parent data store resource name - for which to import denylist entries. Follows - pattern + Required. The parent data store resource name for which + to import denylist entries. Follows pattern projects/*/locations/*/collections/*/dataStores/*. """ @@ -1288,8 +1249,8 @@ class InlineSource(proto.Message): Attributes: entries (MutableSequence[google.cloud.discoveryengine_v1alpha.types.SuggestionDenyListEntry]): - Required. A list of all denylist entries to - import. Max of 1000 items. + Required. A list of all denylist entries to import. + Max of 1000 items. """ entries: MutableSequence[ @@ -1326,11 +1287,10 @@ class ImportSuggestionDenyListEntriesResponse(proto.Message): Attributes: error_samples (MutableSequence[google.rpc.status_pb2.Status]): - A sample of errors encountered while - processing the request. + A sample of errors encountered while processing the + request. imported_entries_count (int): - Count of deny list entries successfully - imported. + Count of deny list entries successfully imported. failed_entries_count (int): Count of deny list entries that failed to be imported. @@ -1353,15 +1313,15 @@ class ImportSuggestionDenyListEntriesResponse(proto.Message): class ImportSuggestionDenyListEntriesMetadata(proto.Message): r"""Metadata related to the progress of the - ImportSuggestionDenyListEntries operation. This is returned by - the google.longrunning.Operation.metadata field. + ImportSuggestionDenyListEntries operation. This is returned by the + google.longrunning.Operation.metadata field. Attributes: create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -1403,15 +1363,14 @@ class ImportCompletionSuggestionsRequest(proto.Message): This field is a member of `oneof`_ ``source``. parent (str): - Required. The parent data store resource name - for which to import customer autocomplete - suggestions. + Required. The parent data store resource name for which + to import customer autocomplete suggestions. Follows pattern ``projects/*/locations/*/collections/*/dataStores/*`` error_config (google.cloud.discoveryengine_v1alpha.types.ImportErrorConfig): - The desired location of errors incurred - during the Import. + The desired location of errors incurred during the + Import. """ class InlineSource(proto.Message): @@ -1419,8 +1378,8 @@ class InlineSource(proto.Message): Attributes: suggestions (MutableSequence[google.cloud.discoveryengine_v1alpha.types.CompletionSuggestion]): - Required. A list of all denylist entries to - import. Max of 1000 items. + Required. A list of all denylist entries to import. + Max of 1000 items. """ suggestions: MutableSequence[ @@ -1464,17 +1423,17 @@ class ImportCompletionSuggestionsResponse(proto.Message): r"""Response of the `CompletionService.ImportCompletionSuggestions `__ - method. If the long running operation is done, this message is - returned by the google.longrunning.Operations.response field if - the operation is successful. + method. If the long running operation is done, this message is returned + by the google.longrunning.Operations.response field if the operation is + successful. Attributes: error_samples (MutableSequence[google.rpc.status_pb2.Status]): - A sample of errors encountered while - processing the request. + A sample of errors encountered while processing the + request. error_config (google.cloud.discoveryengine_v1alpha.types.ImportErrorConfig): - The desired location of errors incurred - during the Import. + The desired location of errors incurred during the + Import. """ error_samples: MutableSequence[status_pb2.Status] = proto.RepeatedField( @@ -1490,16 +1449,16 @@ class ImportCompletionSuggestionsResponse(proto.Message): class ImportCompletionSuggestionsMetadata(proto.Message): - r"""Metadata related to the progress of the - ImportCompletionSuggestions operation. This will be returned by - the google.longrunning.Operation.metadata field. + r"""Metadata related to the progress of the ImportCompletionSuggestions + operation. This will be returned by the + google.longrunning.Operation.metadata field. Attributes: create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. success_count (int): Count of `CompletionSuggestion @@ -1559,25 +1518,24 @@ class ImportSampleQueriesRequest(proto.Message): This field is a member of `oneof`_ ``source``. parent (str): - Required. The parent sample query set resource - name, such as + Required. The parent sample query set resource name, + such as ``projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}``. If the caller does not have permission to list `SampleQuery `__s - under this sample query set, regardless of - whether or not this sample query set exists, a + under this sample query set, regardless of whether or + not this sample query set exists, a ``PERMISSION_DENIED`` error is returned. error_config (google.cloud.discoveryengine_v1alpha.types.ImportErrorConfig): - The desired location of errors incurred - during the Import. + The desired location of errors incurred during the + Import. """ class InlineSource(proto.Message): r"""The inline source for - `SampleQuery - `__s. + `SampleQuery `__s. Attributes: sample_queries (MutableSequence[google.cloud.discoveryengine_v1alpha.types.SampleQuery]): @@ -1626,17 +1584,17 @@ class ImportSampleQueriesResponse(proto.Message): r"""Response of the `SampleQueryService.ImportSampleQueries `__ - method. If the long running operation is done, this message is - returned by the google.longrunning.Operations.response field if - the operation is successful. + method. If the long running operation is done, this message is returned + by the google.longrunning.Operations.response field if the operation is + successful. Attributes: error_samples (MutableSequence[google.rpc.status_pb2.Status]): - A sample of errors encountered while - processing the request. + A sample of errors encountered while processing the + request. error_config (google.cloud.discoveryengine_v1alpha.types.ImportErrorConfig): - The desired location of errors incurred - during the Import. + The desired location of errors incurred during the + Import. """ error_samples: MutableSequence[status_pb2.Status] = proto.RepeatedField( @@ -1660,9 +1618,8 @@ class ImportSampleQueriesMetadata(proto.Message): create_time (google.protobuf.timestamp_pb2.Timestamp): ImportSampleQueries operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - ImportSampleQueries operation last update - time. If the operation is done, this is also the - finish time. + ImportSampleQueries operation last update time. If + the operation is done, this is also the finish time. success_count (int): Count of `SampleQuery `__s diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/project.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/project.py index 6d6dfbc5402a..e993e5b78217 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/project.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/project.py @@ -34,22 +34,21 @@ class Project(proto.Message): Attributes: name (str): - Output only. Full resource name of the project, - for example ``projects/{project_number}``. - Note that when making requests, project number - and project id are both acceptable, but the - server will always respond in project number. + Output only. Full resource name of the project, for + example ``projects/{project_number}``. + Note that when making requests, project number and + project id are both acceptable, but the server will + always respond in project number. create_time (google.protobuf.timestamp_pb2.Timestamp): - Output only. The timestamp when this project - is created. + Output only. The timestamp when this project is + created. provision_completion_time (google.protobuf.timestamp_pb2.Timestamp): - Output only. The timestamp when this project - is successfully provisioned. Empty value means - this project is still provisioning and is not - ready for use. + Output only. The timestamp when this project is + successfully provisioned. Empty value means this project + is still provisioning and is not ready for use. service_terms_map (MutableMapping[str, google.cloud.discoveryengine_v1alpha.types.Project.ServiceTerms]): - Output only. A map of terms of services. The key - is the ``id`` of `ServiceTerms + Output only. A map of terms of services. The key is the + ``id`` of `ServiceTerms `__. """ @@ -62,8 +61,7 @@ class ServiceTerms(proto.Message): Available terms: * ``GA_DATA_USE_TERMS``: `Terms for data - use - `__. + use `__. When using this as ``id``, the acceptable `version `__ @@ -75,14 +73,14 @@ class ServiceTerms(proto.Message): `__ above. state (google.cloud.discoveryengine_v1alpha.types.Project.ServiceTerms.State): - Whether the project has accepted/rejected the - service terms or it is still pending. + Whether the project has accepted/rejected the service + terms or it is still pending. accept_time (google.protobuf.timestamp_pb2.Timestamp): - The last time when the project agreed to the - terms of service. + The last time when the project agreed to the terms of + service. decline_time (google.protobuf.timestamp_pb2.Timestamp): - The last time when the project declined or - revoked the agreement to terms of service. + The last time when the project declined or revoked + the agreement to terms of service. """ class State(proto.Enum): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/project_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/project_service.py index 15f667615dd1..818aef11a4a7 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/project_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/project_service.py @@ -40,8 +40,8 @@ class GetProjectRequest(proto.Message): name (str): Required. Full resource name of a `Project - `__, - such as ``projects/{project_id_or_number}``. + `__, such + as ``projects/{project_id_or_number}``. """ name: str = proto.Field( @@ -60,22 +60,20 @@ class ProvisionProjectRequest(proto.Message): name (str): Required. Full resource name of a `Project - `__, - such as ``projects/{project_id_or_number}``. + `__, such + as ``projects/{project_id_or_number}``. accept_data_use_terms (bool): - Required. Set to ``true`` to specify that caller - has read and would like to give consent to the - `Terms for data use + Required. Set to ``true`` to specify that caller has + read and would like to give consent to the `Terms for + data use `__. data_use_terms_version (str): Required. The version of the `Terms for data - use - `__ - that caller has read and would like to give - consent to. + use `__ + that caller has read and would like to give consent to. - Acceptable version is ``2022-11-23``, and this - may change over time. + Acceptable version is ``2022-11-23``, and this may + change over time. """ name: str = proto.Field( @@ -101,28 +99,27 @@ class ReportConsentChangeRequest(proto.Message): Attributes: consent_change_action (google.cloud.discoveryengine_v1alpha.types.ReportConsentChangeRequest.ConsentChangeAction): - Required. Whether customer decides to accept - or decline service term. + Required. Whether customer decides to accept or + decline service term. At this moment, only accept action is supported. project (str): Required. Full resource name of a `Project - `__, - such as ``projects/{project_id_or_number}``. + `__, such + as ``projects/{project_id_or_number}``. service_term_id (str): - Required. The unique identifier of the terms of - service to update. Available term ids: + Required. The unique identifier of the terms of service + to update. Available term ids: * ``GA_DATA_USE_TERMS``: `Terms for data - use - `__. + use `__. When using this service term id, the acceptable `service_term_version `__ to provide is ``2022-11-23``. service_term_version (str): - Required. The version string of the terms of - service to update. + Required. The version string of the terms of service + to update. """ class ConsentChangeAction(proto.Enum): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/purge_config.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/purge_config.py index 9fc134596445..c13148ced0f4 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/purge_config.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/purge_config.py @@ -48,14 +48,13 @@ class PurgeUserEventsRequest(proto.Message): Attributes: parent (str): - Required. The resource name of the catalog under - which the events are created. The format is + Required. The resource name of the catalog under which + the events are created. The format is ``projects/${projectId}/locations/global/collections/{$collectionId}/dataStores/${dataStoreId}`` filter (str): - Required. The filter string to specify the - events to be deleted with a length limit of - 5,000 characters. The eligible fields for - filtering are: + Required. The filter string to specify the events to be + deleted with a length limit of 5,000 characters. The + eligible fields for filtering are: * ``eventType``: Double quoted `UserEvent.event_type @@ -63,13 +62,11 @@ class PurgeUserEventsRequest(proto.Message): string. * ``eventTime``: in ISO 8601 "zulu" format. - * ``userPseudoId``: Double quoted string. - Specifying this will delete all events - associated with a visitor. + * ``userPseudoId``: Double quoted string. Specifying + this will delete all events associated with a visitor. - * ``userId``: Double quoted string. Specifying - this will delete all events associated with a - user. + * ``userId``: Double quoted string. Specifying this will + delete all events associated with a user. Examples: @@ -90,18 +87,17 @@ class PurgeUserEventsRequest(proto.Message): ``*`` - The filtering fields are assumed to have an - implicit AND. + The filtering fields are assumed to have an implicit + AND. force (bool): - The ``force`` field is currently not supported. - Purge user event requests will permanently - delete all purgeable events. Once the - development is complete: - - If ``force`` is set to false, the method will - return the expected purge count without deleting - any user events. This field will default to - false if not included in the request. + The ``force`` field is currently not supported. Purge + user event requests will permanently delete all + purgeable events. Once the development is complete: + + If ``force`` is set to false, the method will return the + expected purge count without deleting any user events. + This field will default to false if not included in the + request. """ parent: str = proto.Field( @@ -119,14 +115,14 @@ class PurgeUserEventsRequest(proto.Message): class PurgeUserEventsResponse(proto.Message): - r"""Response of the PurgeUserEventsRequest. If the long running - operation is successfully done, then this message is returned by - the google.longrunning.Operations.response field. + r"""Response of the PurgeUserEventsRequest. If the long running operation + is successfully done, then this message is returned by the + google.longrunning.Operations.response field. Attributes: purge_count (int): - The total count of events purged as a result - of the operation. + The total count of events purged as a result of the + operation. """ purge_count: int = proto.Field( @@ -136,22 +132,21 @@ class PurgeUserEventsResponse(proto.Message): class PurgeUserEventsMetadata(proto.Message): - r"""Metadata related to the progress of the PurgeUserEvents - operation. This will be returned by the - google.longrunning.Operation.metadata field. + r"""Metadata related to the progress of the PurgeUserEvents operation. + This will be returned by the google.longrunning.Operation.metadata + field. Attributes: create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. success_count (int): - Count of entries that were deleted - successfully. + Count of entries that were deleted successfully. failure_count (int): - Count of entries that encountered errors - while processing. + Count of entries that encountered errors while + processing. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -181,11 +176,10 @@ class PurgeErrorConfig(proto.Message): Attributes: gcs_prefix (str): - Cloud Storage prefix for purge errors. This must - be an empty, existing Cloud Storage directory. - Purge errors are written to sharded files in - this directory, one per line, as a JSON-encoded - ``google.rpc.Status`` message. + Cloud Storage prefix for purge errors. This must be an + empty, existing Cloud Storage directory. Purge errors + are written to sharded files in this directory, one per + line, as a JSON-encoded ``google.rpc.Status`` message. This field is a member of `oneof`_ ``destination``. """ @@ -222,24 +216,23 @@ class PurgeDocumentsRequest(proto.Message): This field is a member of `oneof`_ ``source``. inline_source (google.cloud.discoveryengine_v1alpha.types.PurgeDocumentsRequest.InlineSource): - Inline source for the input content for - purge. + Inline source for the input content for purge. This field is a member of `oneof`_ ``source``. parent (str): Required. The parent resource name, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}``. filter (str): - Required. Filter matching documents to purge. - Only currently supported value is + Required. Filter matching documents to purge. Only + currently supported value is ``*`` (all items). error_config (google.cloud.discoveryengine_v1alpha.types.PurgeErrorConfig): - The desired location of errors incurred - during the purge. + The desired location of errors incurred during the + purge. force (bool): - Actually performs the purge. If ``force`` is set - to false, return the expected purge count - without deleting any documents. + Actually performs the purge. If ``force`` is set to + false, return the expected purge count without deleting + any documents. """ class InlineSource(proto.Message): @@ -250,8 +243,8 @@ class InlineSource(proto.Message): Attributes: documents (MutableSequence[str]): - Required. A list of full resource name of - documents to purge. In the format + Required. A list of full resource name of documents to + purge. In the format ``projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*``. Recommended max of 100 items. """ @@ -296,19 +289,18 @@ class PurgeDocumentsResponse(proto.Message): r"""Response message for `DocumentService.PurgeDocuments `__ - method. If the long running operation is successfully done, then - this message is returned by the - google.longrunning.Operations.response field. + method. If the long running operation is successfully done, then this + message is returned by the google.longrunning.Operations.response field. Attributes: purge_count (int): - The total count of documents purged as a - result of the operation. + The total count of documents purged as a result of + the operation. purge_sample (MutableSequence[str]): - A sample of document names that will be deleted. - Only populated if ``force`` is set to false. A - max of 100 names will be returned and the names - are chosen at random. + A sample of document names that will be deleted. Only + populated if ``force`` is set to false. A max of 100 + names will be returned and the names are chosen at + random. """ purge_count: int = proto.Field( @@ -322,25 +314,24 @@ class PurgeDocumentsResponse(proto.Message): class PurgeDocumentsMetadata(proto.Message): - r"""Metadata related to the progress of the PurgeDocuments - operation. This will be returned by the - google.longrunning.Operation.metadata field. + r"""Metadata related to the progress of the PurgeDocuments operation. + This will be returned by the google.longrunning.Operation.metadata + field. Attributes: create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. success_count (int): - Count of entries that were deleted - successfully. + Count of entries that were deleted successfully. failure_count (int): - Count of entries that encountered errors - while processing. + Count of entries that encountered errors while + processing. ignored_count (int): - Count of entries that were ignored as entries - were not found. + Count of entries that were ignored as entries were + not found. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -375,9 +366,8 @@ class PurgeSuggestionDenyListEntriesRequest(proto.Message): Attributes: parent (str): - Required. The parent data store resource name - for which to import denylist entries. Follows - pattern + Required. The parent data store resource name for which + to import denylist entries. Follows pattern projects/*/locations/*/collections/*/dataStores/*. """ @@ -395,11 +385,10 @@ class PurgeSuggestionDenyListEntriesResponse(proto.Message): Attributes: purge_count (int): - Number of suggestion deny list entries - purged. + Number of suggestion deny list entries purged. error_samples (MutableSequence[google.rpc.status_pb2.Status]): - A sample of errors encountered while - processing the request. + A sample of errors encountered while processing the + request. """ purge_count: int = proto.Field( @@ -415,15 +404,15 @@ class PurgeSuggestionDenyListEntriesResponse(proto.Message): class PurgeSuggestionDenyListEntriesMetadata(proto.Message): r"""Metadata related to the progress of the - PurgeSuggestionDenyListEntries operation. This is returned by - the google.longrunning.Operation.metadata field. + PurgeSuggestionDenyListEntries operation. This is returned by the + google.longrunning.Operation.metadata field. Attributes: create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -446,9 +435,8 @@ class PurgeCompletionSuggestionsRequest(proto.Message): Attributes: parent (str): - Required. The parent data store resource name - for which to purge completion suggestions. - Follows pattern + Required. The parent data store resource name for which + to purge completion suggestions. Follows pattern projects/*/locations/*/collections/*/dataStores/*. """ @@ -466,11 +454,11 @@ class PurgeCompletionSuggestionsResponse(proto.Message): Attributes: purge_succeeded (bool): - Whether the completion suggestions were - successfully purged. + Whether the completion suggestions were successfully + purged. error_samples (MutableSequence[google.rpc.status_pb2.Status]): - A sample of errors encountered while - processing the request. + A sample of errors encountered while processing the + request. """ purge_succeeded: bool = proto.Field( @@ -485,16 +473,16 @@ class PurgeCompletionSuggestionsResponse(proto.Message): class PurgeCompletionSuggestionsMetadata(proto.Message): - r"""Metadata related to the progress of the - PurgeCompletionSuggestions operation. This is returned by the - google.longrunning.Operation.metadata field. + r"""Metadata related to the progress of the PurgeCompletionSuggestions + operation. This is returned by the google.longrunning.Operation.metadata + field. Attributes: create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/rank_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/rank_service.py index 63ad582f49a7..cd235653303c 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/rank_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/rank_service.py @@ -32,8 +32,7 @@ class RankingRecord(proto.Message): r"""Record message for `RankService.Rank - `__ - method. + `__ method. Attributes: id (str): @@ -45,8 +44,8 @@ class RankingRecord(proto.Message): `__ or `content `__ - should be set otherwise an INVALID_ARGUMENT - error is thrown. + should be set otherwise an INVALID_ARGUMENT error is + thrown. content (str): The content of the record. Empty by default. At least one of @@ -54,11 +53,11 @@ class RankingRecord(proto.Message): `__ or `content `__ - should be set otherwise an INVALID_ARGUMENT - error is thrown. + should be set otherwise an INVALID_ARGUMENT error is + thrown. score (float): - The score of this record based on the given - query and selected model. + The score of this record based on the given query and + selected model. """ id: str = proto.Field( @@ -82,55 +81,52 @@ class RankingRecord(proto.Message): class RankRequest(proto.Message): r"""Request message for `RankService.Rank - `__ - method. + `__ method. Attributes: ranking_config (str): - Required. The resource name of the rank service - config, such as + Required. The resource name of the rank service config, + such as ``projects/{project_num}/locations/{location_id}/rankingConfigs/default_ranking_config``. model (str): - The identifier of the model to use. It is one - of: - * ``semantic-ranker-512@latest``: Semantic - ranking model with maxiumn input token size 512. + The identifier of the model to use. It is one of: - It is set to ``semantic-ranker-512@latest`` by - default if unspecified. + * ``semantic-ranker-512@latest``: Semantic ranking model + with maxiumn input token size 512. + + It is set to ``semantic-ranker-512@latest`` by default + if unspecified. top_n (int): - The number of results to return. If this is - unset or no bigger than zero, returns all - results. + The number of results to return. If this is unset or + no bigger than zero, returns all results. query (str): The query to use. records (MutableSequence[google.cloud.discoveryengine_v1alpha.types.RankingRecord]): - Required. A list of records to rank. At most - 200 records to rank. + Required. A list of records to rank. At most 200 + records to rank. ignore_record_details_in_response (bool): - If true, the response will contain only - record ID and score. By default, it is false, - the response will contain record details. + If true, the response will contain only record ID and + score. By default, it is false, the response will + contain record details. user_labels (MutableMapping[str, str]): - The user labels applied to a resource must meet - the following requirements: - * Each resource can have multiple labels, up to - a maximum of 64. + The user labels applied to a resource must meet the + following requirements: + * Each resource can have multiple labels, up to a + maximum of 64. * Each label must be a key-value pair. - * Keys have a minimum length of 1 character and - a maximum length of 63 characters and cannot - be empty. Values can be empty and have a maximum - length of 63 characters. + * Keys have a minimum length of 1 character and a + maximum length of 63 characters and cannot be empty. + Values can be empty and have a maximum length of 63 + characters. - * Keys and values can contain only lowercase - letters, numeric characters, underscores, and - dashes. All characters must use UTF-8 encoding, - and international characters are allowed. + * Keys and values can contain only lowercase letters, + numeric characters, underscores, and dashes. All + characters must use UTF-8 encoding, and international + characters are allowed. - * The key portion of a label must be unique. - However, you can use the same key with - multiple resources. + * The key portion of a label must be unique. However, + you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. @@ -176,8 +172,7 @@ class RankRequest(proto.Message): class RankResponse(proto.Message): r"""Response message for `RankService.Rank - `__ - method. + `__ method. Attributes: records (MutableSequence[google.cloud.discoveryengine_v1alpha.types.RankingRecord]): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/recommendation_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/recommendation_service.py index 9b70a8da62c1..7551ff0d7241 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/recommendation_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/recommendation_service.py @@ -45,10 +45,10 @@ class RecommendRequest(proto.Message): or ``projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*`` - One default serving config is created along with - your recommendation engine creation. The engine - ID is used as the ID of the default serving - config. For example, for Engine + One default serving config is created along with your + recommendation engine creation. The engine ID is used as + the ID of the default serving config. For example, for + Engine ``projects/*/locations/global/collections/*/engines/my-engine``, you can use ``projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine`` @@ -57,12 +57,11 @@ class RecommendRequest(proto.Message): `__ requests. user_event (google.cloud.discoveryengine_v1alpha.types.UserEvent): - Required. Context about the user, what they are - looking at and what action they took to trigger - the Recommend request. Note that this user event - detail won't be ingested to userEvent logs. - Thus, a separate userEvent write request is - required for event logging. + Required. Context about the user, what they are looking + at and what action they took to trigger the Recommend + request. Note that this user event detail won't be + ingested to userEvent logs. Thus, a separate userEvent + write request is required for event logging. Don't set `UserEvent.user_pseudo_id @@ -70,11 +69,10 @@ class RecommendRequest(proto.Message): or `UserEvent.user_info.user_id `__ - to the same fixed ID for different users. If you - are trying to receive non-personalized - recommendations (not recommended; this can - negatively impact model performance), instead - set + to the same fixed ID for different users. If you are + trying to receive non-personalized recommendations (not + recommended; this can negatively impact model + performance), instead set `UserEvent.user_pseudo_id `__ to a random unique ID and leave @@ -83,82 +81,77 @@ class RecommendRequest(proto.Message): unset. page_size (int): Maximum number of results to return. Set this - property to the number of recommendation results - needed. If zero, the service chooses a - reasonable default. The maximum allowed value is - 100. Values above 100 are set to 100. + property to the number of recommendation results needed. + If zero, the service chooses a reasonable default. The + maximum allowed value is 100. Values above 100 are set + to 100. filter (str): - Filter for restricting recommendation results - with a length limit of 5,000 characters. - Currently, only filter expressions on the - ``filter_tags`` attribute is supported. + Filter for restricting recommendation results with a + length limit of 5,000 characters. Currently, only filter + expressions on the ``filter_tags`` attribute is + supported. Examples: - * ``(filter_tags: ANY("Red", "Blue") OR - filter_tags: ANY("Hot", "Cold"))`` * - ``(filter_tags: ANY("Red", "Blue")) AND NOT - (filter_tags: ANY("Green"))`` + * ``(filter_tags: ANY("Red", "Blue") OR filter_tags: + ANY("Hot", "Cold"))`` * ``(filter_tags: ANY("Red", + "Blue")) AND NOT (filter_tags: ANY("Green"))`` - If ``attributeFilteringSyntax`` is set to true - under the ``params`` field, then attribute-based - expressions are expected instead of the above - described tag-based syntax. Examples: + If ``attributeFilteringSyntax`` is set to true under the + ``params`` field, then attribute-based expressions are + expected instead of the above described tag-based + syntax. Examples: - * (launguage: ANY("en", "es")) AND NOT - (categories: ANY("Movie")) * (available: true) - AND + * (launguage: ANY("en", "es")) AND NOT (categories: + ANY("Movie")) * (available: true) AND (launguage: ANY("en", "es")) OR (categories: ANY("Movie")) - If your filter blocks all results, the API - returns generic (unfiltered) popular Documents. - If you only want results strictly matching the - filters, set ``strictFiltering`` to ``true`` in + If your filter blocks all results, the API returns + generic (unfiltered) popular Documents. If you only want + results strictly matching the filters, set + ``strictFiltering`` to ``true`` in `RecommendRequest.params `__ to receive empty results instead. Note that the API never returns `Document - `__s - with ``storageStatus`` as ``EXPIRED`` or - ``DELETED`` regardless of filter choices. + `__s with + ``storageStatus`` as ``EXPIRED`` or ``DELETED`` + regardless of filter choices. validate_only (bool): - Use validate only mode for this recommendation - query. If set to ``true``, a fake model is used - that returns arbitrary Document IDs. Note that - the validate only mode should only be used for - testing the API, or if the model is not ready. + Use validate only mode for this recommendation query. If + set to ``true``, a fake model is used that returns + arbitrary Document IDs. Note that the validate only mode + should only be used for testing the API, or if the model + is not ready. params (MutableMapping[str, google.protobuf.struct_pb2.Value]): Additional domain specific parameters for the recommendations. Allowed values: - * ``returnDocument``: Boolean. If set to - ``true``, the associated Document object is - returned in - `RecommendResponse.RecommendationResult.document + * ``returnDocument``: Boolean. If set to ``true``, the + associated Document object is returned in + `RecommendResponse.RecommendationResult.document `__. * ``returnScore``: Boolean. If set to true, the - recommendation score corresponding to each - returned Document is set in + recommendation score corresponding to each returned + Document is set in `RecommendResponse.RecommendationResult.metadata `__. - The given score indicates the probability of a - Document conversion given the user's context - and history. + The given score indicates the probability of a Document + conversion given the user's context and history. - * ``strictFiltering``: Boolean. True by default. - If set to ``false``, the service - returns generic (unfiltered) popular - Documents instead of empty if your filter - blocks all recommendation results. + * ``strictFiltering``: Boolean. True by default. If set + to ``false``, the service + returns generic (unfiltered) popular Documents + instead of empty if your filter blocks all + recommendation results. - * ``diversityLevel``: String. Default empty. If - set to be non-empty, then it needs to be one - of: + * ``diversityLevel``: String. Default empty. If set to + be non-empty, then it needs to be one of: * ``no-diversity`` * ``low-diversity`` @@ -168,33 +161,31 @@ class RecommendRequest(proto.Message): * ``auto-diversity`` This gives request-level control and adjusts - recommendation results based on Document - category. + recommendation results based on Document category. - * ``attributeFilteringSyntax``: Boolean. False - by default. If set to true, the ``filter`` - field is interpreted according to the new, - attribute-based syntax. + * ``attributeFilteringSyntax``: Boolean. False by + default. If set to true, the ``filter`` field is + interpreted according to the new, attribute-based + syntax. user_labels (MutableMapping[str, str]): - The user labels applied to a resource must meet - the following requirements: - * Each resource can have multiple labels, up to - a maximum of 64. + The user labels applied to a resource must meet the + following requirements: + * Each resource can have multiple labels, up to a + maximum of 64. * Each label must be a key-value pair. - * Keys have a minimum length of 1 character and - a maximum length of 63 characters and cannot - be empty. Values can be empty and have a maximum - length of 63 characters. + * Keys have a minimum length of 1 character and a + maximum length of 63 characters and cannot be empty. + Values can be empty and have a maximum length of 63 + characters. - * Keys and values can contain only lowercase - letters, numeric characters, underscores, and - dashes. All characters must use UTF-8 encoding, - and international characters are allowed. + * Keys and values can contain only lowercase letters, + numeric characters, underscores, and dashes. All + characters must use UTF-8 encoding, and international + characters are allowed. - * The key portion of a label must be unique. - However, you can use the same key with - multiple resources. + * The key portion of a label must be unique. However, + you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. @@ -244,20 +235,20 @@ class RecommendResponse(proto.Message): Attributes: results (MutableSequence[google.cloud.discoveryengine_v1alpha.types.RecommendResponse.RecommendationResult]): - A list of recommended Documents. The order - represents the ranking (from the most relevant - Document to the least). + A list of recommended Documents. The order represents + the ranking (from the most relevant Document to the + least). attribution_token (str): - A unique attribution token. This should be - included in the `UserEvent - `__ - logs resulting from this recommendation, which - enables accurate attribution of recommendation - model performance. + A unique attribution token. This should be included in + the `UserEvent + `__ logs + resulting from this recommendation, which enables + accurate attribution of recommendation model + performance. missing_ids (MutableSequence[str]): - IDs of documents in the request that were - missing from the default Branch associated with - the requested ServingConfig. + IDs of documents in the request that were missing + from the default Branch associated with the requested + ServingConfig. validate_only (bool): True if `RecommendRequest.validate_only @@ -266,8 +257,8 @@ class RecommendResponse(proto.Message): """ class RecommendationResult(proto.Message): - r"""RecommendationResult represents a generic recommendation - result with associated metadata. + r"""RecommendationResult represents a generic recommendation result with + associated metadata. Attributes: id (str): @@ -281,9 +272,8 @@ class RecommendationResult(proto.Message): Possible values: - * ``score``: Recommendation score in double - value. Is set if ``returnScore`` is set to - true in + * ``score``: Recommendation score in double value. Is + set if ``returnScore`` is set to true in `RecommendRequest.params `__. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/sample_query.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/sample_query.py index 2ad69ae91c1f..c078b349bdea 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/sample_query.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/sample_query.py @@ -39,12 +39,12 @@ class SampleQuery(proto.Message): This field is a member of `oneof`_ ``content``. name (str): - Identifier. The full resource name of the sample - query, in the format of + Identifier. The full resource name of the sample query, + in the format of ``projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}/sampleQueries/{sample_query}``. - This field must be a UTF-8 encoded string with a - length limit of 1024 characters. + This field must be a UTF-8 encoded string with a length + limit of 1024 characters. create_time (google.protobuf.timestamp_pb2.Timestamp): Output only. Timestamp the `SampleQuery @@ -53,8 +53,7 @@ class SampleQuery(proto.Message): """ class QueryEntry(proto.Message): - r"""Query Entry captures metadata to be used for search - evaluation. + r"""Query Entry captures metadata to be used for search evaluation. Attributes: query (str): @@ -72,11 +71,10 @@ class Target(proto.Message): uri (str): Expected uri of the target. - This field must be a UTF-8 encoded string with a - length limit of 2048 characters. + This field must be a UTF-8 encoded string with a length + limit of 2048 characters. - Example of valid uris: - ``https://example.com/abc``, + Example of valid uris: ``https://example.com/abc``, ``gcs://example/example.pdf``. page_numbers (MutableSequence[int]): Expected page numbers of the target. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/sample_query_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/sample_query_service.py index ff9fe427dc4b..dfbd9eaa74e0 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/sample_query_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/sample_query_service.py @@ -49,8 +49,8 @@ class GetSampleQueryRequest(proto.Message): such as ``projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}/sampleQueries/{sample_query}``. - If the caller does not have permission to access - the `SampleQuery + If the caller does not have permission to access the + `SampleQuery `__, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. @@ -75,26 +75,26 @@ class ListSampleQueriesRequest(proto.Message): Attributes: parent (str): - Required. The parent sample query set resource - name, such as + Required. The parent sample query set resource name, + such as ``projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}``. If the caller does not have permission to list `SampleQuery `__s - under this sample query set, regardless of - whether or not this sample query set exists, a + under this sample query set, regardless of whether or + not this sample query set exists, a ``PERMISSION_DENIED`` error is returned. page_size (int): Maximum number of `SampleQuery `__s - to return. If unspecified, defaults to 100. The - maximum allowed value is 1000. Values above 1000 - will be coerced to 1000. + to return. If unspecified, defaults to 100. The maximum + allowed value is 1000. Values above 1000 will be coerced + to 1000. - If this field is negative, an - ``INVALID_ARGUMENT`` error is returned. + If this field is negative, an ``INVALID_ARGUMENT`` error + is returned. page_token (str): A page token `ListSampleQueriesResponse.next_page_token @@ -102,15 +102,13 @@ class ListSampleQueriesRequest(proto.Message): received from a previous `SampleQueryService.ListSampleQueries `__ - call. Provide this to retrieve the subsequent - page. + call. Provide this to retrieve the subsequent page. - When paginating, all other parameters provided - to `SampleQueryService.ListSampleQueries + When paginating, all other parameters provided to + `SampleQueryService.ListSampleQueries `__ - must match the call that provided the page - token. Otherwise, an ``INVALID_ARGUMENT`` error - is returned. + must match the call that provided the page token. + Otherwise, an ``INVALID_ARGUMENT`` error is returned. """ parent: str = proto.Field( @@ -141,8 +139,8 @@ class ListSampleQueriesResponse(proto.Message): A token that can be sent as `ListSampleQueriesRequest.page_token `__ - to retrieve the next page. If this field is - omitted, there are no subsequent pages. + to retrieve the next page. If this field is omitted, + there are no subsequent pages. """ @property @@ -173,8 +171,8 @@ class CreateSampleQueryRequest(proto.Message): sample_query (google.cloud.discoveryengine_v1alpha.types.SampleQuery): Required. The `SampleQuery - `__ - to create. + `__ to + create. sample_query_id (str): Required. The ID to use for the `SampleQuery @@ -183,8 +181,8 @@ class CreateSampleQueryRequest(proto.Message): `SampleQuery.name `__. - If the caller does not have permission to create - the `SampleQuery + If the caller does not have permission to create the + `SampleQuery `__, regardless of whether or not it exists, a ``PERMISSION_DENIED`` error is returned. @@ -195,14 +193,12 @@ class CreateSampleQueryRequest(proto.Message): with the same `parent `__. - Otherwise, an ``ALREADY_EXISTS`` error is - returned. + Otherwise, an ``ALREADY_EXISTS`` error is returned. This field must conform to `RFC-1034 - `__ - standard with a length limit of 63 characters. - Otherwise, an ``INVALID_ARGUMENT`` error is - returned. + `__ standard with a + length limit of 63 characters. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. """ parent: str = proto.Field( @@ -230,20 +226,19 @@ class UpdateSampleQueryRequest(proto.Message): sample_query (google.cloud.discoveryengine_v1alpha.types.SampleQuery): Required. The simple query to update. - If the caller does not have permission to update - the `SampleQuery + If the caller does not have permission to update the + `SampleQuery `__, regardless of whether or not it exists, a ``PERMISSION_DENIED`` error is returned. If the `SampleQuery - `__ - to update does not exist a ``NOT_FOUND`` error - is returned. + `__ to + update does not exist a ``NOT_FOUND`` error is returned. update_mask (google.protobuf.field_mask_pb2.FieldMask): - Indicates which fields in the provided - imported 'simple query' to update. If not set, - will by default update all fields. + Indicates which fields in the provided imported + 'simple query' to update. If not set, will by default + update all fields. """ sample_query: gcd_sample_query.SampleQuery = proto.Field( @@ -272,16 +267,16 @@ class DeleteSampleQueryRequest(proto.Message): such as ``projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}/sampleQueries/{sample_query}``. - If the caller does not have permission to delete - the `SampleQuery + If the caller does not have permission to delete the + `SampleQuery `__, regardless of whether or not it exists, a ``PERMISSION_DENIED`` error is returned. If the `SampleQuery - `__ - to delete does not exist, a ``NOT_FOUND`` error - is returned. + `__ to + delete does not exist, a ``NOT_FOUND`` error is + returned. """ name: str = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/sample_query_set.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/sample_query_set.py index 130925d33577..086114d2b0d4 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/sample_query_set.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/sample_query_set.py @@ -29,8 +29,8 @@ class SampleQuerySet(proto.Message): - r"""A SampleQuerySet is the parent resource of SampleQuery, and - contains the configurations shared by all SampleQuery under it. + r"""A SampleQuerySet is the parent resource of SampleQuery, and contains + the configurations shared by all SampleQuery under it. Attributes: name (str): @@ -40,13 +40,13 @@ class SampleQuerySet(proto.Message): in the format of ``projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}``. - This field must be a UTF-8 encoded string with a - length limit of 1024 characters. + This field must be a UTF-8 encoded string with a length + limit of 1024 characters. display_name (str): Required. The sample query set display name. - This field must be a UTF-8 encoded string with a - length limit of 128 characters. + This field must be a UTF-8 encoded string with a length + limit of 128 characters. create_time (google.protobuf.timestamp_pb2.Timestamp): Output only. Timestamp the `SampleQuerySet diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/sample_query_set_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/sample_query_set_service.py index a7f2512907fc..806c6d603842 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/sample_query_set_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/sample_query_set_service.py @@ -51,8 +51,8 @@ class GetSampleQuerySetRequest(proto.Message): such as ``projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}``. - If the caller does not have permission to access - the `SampleQuerySet + If the caller does not have permission to access the + `SampleQuerySet `__, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. @@ -77,26 +77,25 @@ class ListSampleQuerySetsRequest(proto.Message): Attributes: parent (str): - Required. The parent location resource name, - such as + Required. The parent location resource name, such as ``projects/{project}/locations/{location}``. If the caller does not have permission to list `SampleQuerySet `__s - under this location, regardless of whether or - not this location exists, a - ``PERMISSION_DENIED`` error is returned. + under this location, regardless of whether or not this + location exists, a ``PERMISSION_DENIED`` error is + returned. page_size (int): Maximum number of `SampleQuerySet `__s - to return. If unspecified, defaults to 100. The - maximum allowed value is 1000. Values above 1000 - will be coerced to 1000. + to return. If unspecified, defaults to 100. The maximum + allowed value is 1000. Values above 1000 will be coerced + to 1000. - If this field is negative, an - ``INVALID_ARGUMENT`` error is returned. + If this field is negative, an ``INVALID_ARGUMENT`` error + is returned. page_token (str): A page token `ListSampleQuerySetsResponse.next_page_token @@ -104,15 +103,13 @@ class ListSampleQuerySetsRequest(proto.Message): received from a previous `SampleQuerySetService.ListSampleQuerySets `__ - call. Provide this to retrieve the subsequent - page. + call. Provide this to retrieve the subsequent page. - When paginating, all other parameters provided - to `SampleQuerySetService.ListSampleQuerySets + When paginating, all other parameters provided to + `SampleQuerySetService.ListSampleQuerySets `__ - must match the call that provided the page - token. Otherwise, an ``INVALID_ARGUMENT`` error - is returned. + must match the call that provided the page token. + Otherwise, an ``INVALID_ARGUMENT`` error is returned. """ parent: str = proto.Field( @@ -143,8 +140,8 @@ class ListSampleQuerySetsResponse(proto.Message): A token that can be sent as `ListSampleQuerySetsRequest.page_token `__ - to retrieve the next page. If this field is - omitted, there are no subsequent pages. + to retrieve the next page. If this field is omitted, + there are no subsequent pages. """ @property @@ -187,8 +184,8 @@ class CreateSampleQuerySetRequest(proto.Message): `SampleQuerySet.name `__. - If the caller does not have permission to create - the `SampleQuerySet + If the caller does not have permission to create the + `SampleQuerySet `__, regardless of whether or not it exists, a ``PERMISSION_DENIED`` error is returned. @@ -199,14 +196,12 @@ class CreateSampleQuerySetRequest(proto.Message): with the same `parent `__. - Otherwise, an ``ALREADY_EXISTS`` error is - returned. + Otherwise, an ``ALREADY_EXISTS`` error is returned. This field must conform to `RFC-1034 - `__ - standard with a length limit of 63 characters. - Otherwise, an ``INVALID_ARGUMENT`` error is - returned. + `__ standard with a + length limit of 63 characters. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. """ parent: str = proto.Field( @@ -234,8 +229,8 @@ class UpdateSampleQuerySetRequest(proto.Message): sample_query_set (google.cloud.discoveryengine_v1alpha.types.SampleQuerySet): Required. The sample query set to update. - If the caller does not have permission to update - the `SampleQuerySet + If the caller does not have permission to update the + `SampleQuerySet `__, regardless of whether or not it exists, a ``PERMISSION_DENIED`` error is returned. @@ -243,12 +238,12 @@ class UpdateSampleQuerySetRequest(proto.Message): If the `SampleQuerySet `__ - to update does not exist a ``NOT_FOUND`` error - is returned. + to update does not exist a ``NOT_FOUND`` error is + returned. update_mask (google.protobuf.field_mask_pb2.FieldMask): - Indicates which fields in the provided - imported 'sample query set' to update. If not - set, will by default update all fields. + Indicates which fields in the provided imported + 'sample query set' to update. If not set, will by + default update all fields. """ sample_query_set: gcd_sample_query_set.SampleQuerySet = proto.Field( @@ -277,8 +272,8 @@ class DeleteSampleQuerySetRequest(proto.Message): such as ``projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}``. - If the caller does not have permission to delete - the `SampleQuerySet + If the caller does not have permission to delete the + `SampleQuerySet `__, regardless of whether or not it exists, a ``PERMISSION_DENIED`` error is returned. @@ -286,8 +281,8 @@ class DeleteSampleQuerySetRequest(proto.Message): If the `SampleQuerySet `__ - to delete does not exist, a ``NOT_FOUND`` error - is returned. + to delete does not exist, a ``NOT_FOUND`` error is + returned. """ name: str = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/schema.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/schema.py index 2196466f1dce..fd2a8ee2e0eb 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/schema.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/schema.py @@ -49,15 +49,14 @@ class Schema(proto.Message): This field is a member of `oneof`_ ``schema``. name (str): - Immutable. The full resource name of the schema, - in the format of + Immutable. The full resource name of the schema, in the + format of ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}``. - This field must be a UTF-8 encoded string with a - length limit of 1024 characters. + This field must be a UTF-8 encoded string with a length + limit of 1024 characters. field_configs (MutableSequence[google.cloud.discoveryengine_v1alpha.types.FieldConfig]): - Output only. Configurations for fields of the - schema. + Output only. Configurations for fields of the schema. """ struct_schema: struct_pb2.Struct = proto.Field( @@ -83,8 +82,8 @@ class Schema(proto.Message): class FieldConfig(proto.Message): - r"""Configurations for fields of a schema. For example, - configuring a field is indexable, or searchable. + r"""Configurations for fields of a schema. For example, configuring a + field is indexable, or searchable. Attributes: field_path (str): @@ -100,8 +99,8 @@ class FieldConfig(proto.Message): is `INDEXABLE_ENABLED `__, - field values are indexed so that it can be - filtered or faceted in `SearchService.Search + field values are indexed so that it can be filtered or + faceted in `SearchService.Search `__. If @@ -110,18 +109,16 @@ class FieldConfig(proto.Message): is unset, the server behavior defaults to `INDEXABLE_DISABLED `__ - for fields that support setting indexable - options. For those fields that do not support - setting indexable options, such as ``object`` - and ``boolean`` and key properties, the server - will skip + for fields that support setting indexable options. For + those fields that do not support setting indexable + options, such as ``object`` and ``boolean`` and key + properties, the server will skip `indexable_option `__ setting, and setting `indexable_option `__ - for those fields will throw ``INVALID_ARGUMENT`` - error. + for those fields will throw ``INVALID_ARGUMENT`` error. dynamic_facetable_option (google.cloud.discoveryengine_v1alpha.types.FieldConfig.DynamicFacetableOption): If `dynamic_facetable_option @@ -129,8 +126,8 @@ class FieldConfig(proto.Message): is `DYNAMIC_FACETABLE_ENABLED `__, - field values are available for dynamic facet. - Could only be `DYNAMIC_FACETABLE_DISABLED + field values are available for dynamic facet. Could only + be `DYNAMIC_FACETABLE_DISABLED `__ if `FieldConfig.indexable_option @@ -147,16 +144,14 @@ class FieldConfig(proto.Message): is unset, the server behavior defaults to `DYNAMIC_FACETABLE_DISABLED `__ - for fields that support setting dynamic - facetable options. For those fields that do not - support setting dynamic facetable options, such - as ``object`` and ``boolean``, the server will - skip dynamic facetable option setting, and - setting + for fields that support setting dynamic facetable + options. For those fields that do not support setting + dynamic facetable options, such as ``object`` and + ``boolean``, the server will skip dynamic facetable + option setting, and setting `dynamic_facetable_option `__ - for those fields will throw ``INVALID_ARGUMENT`` - error. + for those fields will throw ``INVALID_ARGUMENT`` error. searchable_option (google.cloud.discoveryengine_v1alpha.types.FieldConfig.SearchableOption): If `searchable_option @@ -171,12 +166,12 @@ class FieldConfig(proto.Message): If `SEARCHABLE_ENABLED `__ - but field type is numerical, field values will - not be searchable by text queries in + but field type is numerical, field values will not be + searchable by text queries in `SearchService.Search `__, - as there are no text values associated to - numerical fields. + as there are no text values associated to numerical + fields. If `searchable_option @@ -184,19 +179,18 @@ class FieldConfig(proto.Message): is unset, the server behavior defaults to `SEARCHABLE_DISABLED `__ - for fields that support setting searchable - options. Only ``string`` fields that have no key - property mapping support setting + for fields that support setting searchable options. Only + ``string`` fields that have no key property mapping + support setting `searchable_option `__. - For those fields that do not support setting - searchable options, the server will skip - searchable option setting, and setting + For those fields that do not support setting searchable + options, the server will skip searchable option setting, + and setting `searchable_option `__ - for those fields will throw ``INVALID_ARGUMENT`` - error. + for those fields will throw ``INVALID_ARGUMENT`` error. retrievable_option (google.cloud.discoveryengine_v1alpha.types.FieldConfig.RetrievableOption): If `retrievable_option @@ -212,15 +206,13 @@ class FieldConfig(proto.Message): is unset, the server behavior defaults to `RETRIEVABLE_DISABLED `__ - for fields that support setting retrievable - options. For those fields that do not support - setting retrievable options, such as ``object`` - and ``boolean``, the server will skip - retrievable option setting, and setting + for fields that support setting retrievable options. For + those fields that do not support setting retrievable + options, such as ``object`` and ``boolean``, the server + will skip retrievable option setting, and setting `retrievable_option `__ - for those fields will throw ``INVALID_ARGUMENT`` - error. + for those fields will throw ``INVALID_ARGUMENT`` error. completable_option (google.cloud.discoveryengine_v1alpha.types.FieldConfig.CompletableOption): If `completable_option @@ -239,15 +231,13 @@ class FieldConfig(proto.Message): is unset, the server behavior defaults to `COMPLETABLE_DISABLED `__ - for fields that support setting completable - options, which are just ``string`` fields. For - those fields that do not support setting - completable options, the server will skip - completable option setting, and setting + for fields that support setting completable options, + which are just ``string`` fields. For those fields that + do not support setting completable options, the server + will skip completable option setting, and setting `completable_option `__ - for those fields will throw ``INVALID_ARGUMENT`` - error. + for those fields will throw ``INVALID_ARGUMENT`` error. recs_filterable_option (google.cloud.discoveryengine_v1alpha.types.FieldConfig.FilterableOption): If `recs_filterable_option @@ -255,15 +245,15 @@ class FieldConfig(proto.Message): is `FILTERABLE_ENABLED `__, - field values are filterable by filter expression - in `RecommendationService.Recommend + field values are filterable by filter expression in + `RecommendationService.Recommend `__. If `FILTERABLE_ENABLED `__ - but the field type is numerical, field values - are not filterable by text queries in + but the field type is numerical, field values are not + filterable by text queries in `RecommendationService.Recommend `__. Only textual fields are supported. @@ -274,51 +264,45 @@ class FieldConfig(proto.Message): is unset, the default setting is `FILTERABLE_DISABLED `__ - for fields that support setting filterable - options. + for fields that support setting filterable options. - When a field set to [FILTERABLE_DISABLED] is - filtered, a warning is generated and an empty - result is returned. + When a field set to [FILTERABLE_DISABLED] is filtered, a + warning is generated and an empty result is returned. key_property_type (str): - Output only. Type of the key property that this - field is mapped to. Empty string if this is not - annotated as mapped to a key property. + Output only. Type of the key property that this field is + mapped to. Empty string if this is not annotated as + mapped to a key property. - Example types are ``title``, ``description``. - Full list is defined by ``keyPropertyMapping`` - in the schema field annotation. + Example types are ``title``, ``description``. Full list + is defined by ``keyPropertyMapping`` in the schema field + annotation. If the schema field has a ``KeyPropertyMapping`` annotation, ``indexable_option`` and - ``searchable_option`` of this field cannot be - modified. + ``searchable_option`` of this field cannot be modified. advanced_site_search_data_sources (MutableSequence[google.cloud.discoveryengine_v1alpha.types.FieldConfig.AdvancedSiteSearchDataSource]): - If this field is set, only the corresponding - source will be indexed for this field. - Otherwise, the values from different sources are - merged. - - Assuming a page with ```` in meta - tag, and ```` in page map: - - if this enum is set to METATAGS, we will only - index ````; if this enum is not set, - we will merge them and index ````. + If this field is set, only the corresponding source will + be indexed for this field. Otherwise, the values from + different sources are merged. + + Assuming a page with ```` in meta tag, and + ```` in page map: + + if this enum is set to METATAGS, we will only index + ````; if this enum is not set, we will merge + them and index ````. schema_org_paths (MutableSequence[str]): Field paths for indexing custom attribute from - schema.org data. More details of schema.org and - its defined types can be found at `schema.org + schema.org data. More details of schema.org and its + defined types can be found at `schema.org `__. It is only used on advanced site search schema. - Currently only support full path from root. The - full path to a field is constructed by - concatenating field names, starting from - ``_root``, with a period ``.`` as the delimiter. - Examples: + Currently only support full path from root. The full + path to a field is constructed by concatenating field + names, starting from ``_root``, with a period ``.`` as + the delimiter. Examples: * Publish date of the root: _root.datePublished * Publish date of the reviews: diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/schema_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/schema_service.py index b97565b58844..af8692f2fe00 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/schema_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/schema_service.py @@ -46,8 +46,8 @@ class GetSchemaRequest(proto.Message): Attributes: name (str): - Required. The full resource name of the schema, - in the format of + Required. The full resource name of the schema, in the + format of ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}``. """ @@ -65,35 +65,32 @@ class ListSchemasRequest(proto.Message): Attributes: parent (str): - Required. The parent data store resource name, - in the format of + Required. The parent data store resource name, in the + format of ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}``. page_size (int): The maximum number of `Schema - `__s - to return. The service may return fewer than - this value. + `__s to + return. The service may return fewer than this value. If unspecified, at most 100 `Schema - `__s - are returned. + `__s are + returned. - The maximum value is 1000; values above 1000 are - set to 1000. + The maximum value is 1000; values above 1000 are set to + 1000. page_token (str): A page token, received from a previous `SchemaService.ListSchemas `__ - call. Provide this to retrieve the subsequent - page. + call. Provide this to retrieve the subsequent page. - When paginating, all other parameters provided - to `SchemaService.ListSchemas + When paginating, all other parameters provided to + `SchemaService.ListSchemas `__ - must match the call that provided the page - token. + must match the call that provided the page token. """ parent: str = proto.Field( @@ -124,8 +121,8 @@ class ListSchemasResponse(proto.Message): A token that can be sent as `ListSchemasRequest.page_token `__ - to retrieve the next page. If this field is - omitted, there are no subsequent pages. + to retrieve the next page. If this field is omitted, + there are no subsequent pages. """ @property @@ -151,24 +148,23 @@ class CreateSchemaRequest(proto.Message): Attributes: parent (str): - Required. The parent data store resource name, - in the format of + Required. The parent data store resource name, in the + format of ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}``. schema (google.cloud.discoveryengine_v1alpha.types.Schema): Required. The `Schema - `__ - to create. + `__ to + create. schema_id (str): Required. The ID to use for the `Schema - `__, - which becomes the final component of the + `__, which + becomes the final component of the `Schema.name `__. This field should conform to - `RFC-1034 - `__ + `RFC-1034 `__ standard with a length limit of 63 characters. """ @@ -196,16 +192,14 @@ class UpdateSchemaRequest(proto.Message): Attributes: schema (google.cloud.discoveryengine_v1alpha.types.Schema): Required. The `Schema - `__ - to update. + `__ to + update. allow_missing (bool): If set to true, and the - `Schema - `__ + `Schema `__ is not found, a new `Schema - `__ - is created. In this situation, ``update_mask`` - is ignored. + `__ is + created. In this situation, ``update_mask`` is ignored. """ schema: gcd_schema.Schema = proto.Field( @@ -227,8 +221,8 @@ class DeleteSchemaRequest(proto.Message): Attributes: name (str): - Required. The full resource name of the schema, - in the format of + Required. The full resource name of the schema, in the + format of ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}``. """ @@ -245,8 +239,8 @@ class CreateSchemaMetadata(proto.Message): create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -268,8 +262,8 @@ class UpdateSchemaMetadata(proto.Message): create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -291,8 +285,8 @@ class DeleteSchemaMetadata(proto.Message): create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/search_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/search_service.py index 0b5a5ac6097a..b6638dac321e 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/search_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/search_service.py @@ -36,26 +36,24 @@ class SearchRequest(proto.Message): r"""Request message for `SearchService.Search - `__ - method. + `__ method. Attributes: serving_config (str): - Required. The resource name of the Search - serving config, such as + Required. The resource name of the Search serving + config, such as ``projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config``, or ``projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config``. - This field is used to identify the serving - configuration name, set of models used to make - the search. + This field is used to identify the serving configuration + name, set of models used to make the search. branch (str): The branch resource name, such as ``projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0``. - Use ``default_branch`` as the branch ID or leave - this field empty, to search documents under the - default branch. + Use ``default_branch`` as the branch ID or leave this + field empty, to search documents under the default + branch. query (str): Raw search query. image_query (google.cloud.discoveryengine_v1alpha.types.SearchRequest.ImageQuery): @@ -63,110 +61,103 @@ class SearchRequest(proto.Message): page_size (int): Maximum number of `Document - `__s - to return. The maximum allowed value depends on - the data type. Values above the maximum value - are coerced to the maximum value. + `__s to + return. The maximum allowed value depends on the data + type. Values above the maximum value are coerced to the + maximum value. - * Websites with basic indexing: Default ``10``, - Maximum ``25``. * Websites with advanced - indexing: Default ``25``, Maximum ``50``. + * Websites with basic indexing: Default ``10``, Maximum + ``25``. * Websites with advanced indexing: Default + ``25``, Maximum ``50``. * Other: Default ``50``, Maximum ``100``. - If this field is negative, an - ``INVALID_ARGUMENT`` is returned. + If this field is negative, an ``INVALID_ARGUMENT`` is + returned. page_token (str): A page token received from a previous `SearchService.Search `__ - call. Provide this to retrieve the subsequent - page. + call. Provide this to retrieve the subsequent page. - When paginating, all other parameters provided - to `SearchService.Search + When paginating, all other parameters provided to + `SearchService.Search `__ - must match the call that provided the page - token. Otherwise, an ``INVALID_ARGUMENT`` - error is returned. + must match the call that provided the page token. + Otherwise, an ``INVALID_ARGUMENT`` error is returned. offset (int): - A 0-indexed integer that specifies the current - offset (that is, starting result location, - amongst the `Document + A 0-indexed integer that specifies the current offset + (that is, starting result location, amongst the + `Document `__s - deemed by the API as relevant) in search - results. This field is only considered if - `page_token + deemed by the API as relevant) in search results. This + field is only considered if `page_token `__ is unset. - If this field is negative, an - ``INVALID_ARGUMENT`` is returned. + If this field is negative, an ``INVALID_ARGUMENT`` is + returned. data_store_specs (MutableSequence[google.cloud.discoveryengine_v1alpha.types.SearchRequest.DataStoreSpec]): - Specs defining dataStores to filter on in a - search call and configurations for those - dataStores. This is only considered for engines - with multiple dataStores use case. For single - dataStore within an engine, they should use the - specs at the top level. + Specs defining dataStores to filter on in a search + call and configurations for those dataStores. This is + only considered for engines with multiple dataStores use + case. For single dataStore within an engine, they should + use the specs at the top level. filter (str): - The filter syntax consists of an expression - language for constructing a predicate from one - or more fields of the documents being filtered. - Filter expression is case-sensitive. + The filter syntax consists of an expression language for + constructing a predicate from one or more fields of the + documents being filtered. Filter expression is + case-sensitive. If this field is unrecognizable, an ``INVALID_ARGUMENT`` is returned. - Filtering in Vertex AI Search is done by mapping - the LHS filter key to a key property defined in - the Vertex AI Search backend -- this mapping is - defined by the customer in their schema. For - example a media customer might have a field - 'name' in their schema. In this case the filter - would look like this: filter --> name:'ANY("king - kong")' - - For more information about filtering including - syntax and filter operators, see + Filtering in Vertex AI Search is done by mapping the LHS + filter key to a key property defined in the Vertex AI + Search backend -- this mapping is defined by the + customer in their schema. For example a media customer + might have a field 'name' in their schema. In this case + the filter would look like this: filter --> + name:'ANY("king kong")' + + For more information about filtering including syntax + and filter operators, see `Filter `__ canonical_filter (str): - The default filter that is applied when a user - performs a search without checking any filters - on the search page. - - The filter applied to every search request when - quality improvement such as query expansion is - needed. In the case a query does not have a - sufficient amount of results this filter will be - used to determine whether or not to enable the - query expansion flow. The original filter will - still be used for the query expanded search. - This field is strongly recommended to achieve - high search quality. + The default filter that is applied when a user performs + a search without checking any filters on the search + page. + + The filter applied to every search request when quality + improvement such as query expansion is needed. In the + case a query does not have a sufficient amount of + results this filter will be used to determine whether or + not to enable the query expansion flow. The original + filter will still be used for the query expanded search. + This field is strongly recommended to achieve high + search quality. For more information about filter syntax, see `SearchRequest.filter `__. order_by (str): - The order in which documents are returned. - Documents can be ordered by a field in an - `Document + The order in which documents are returned. Documents can + be ordered by a field in an `Document `__ object. Leave it unset if ordered by relevance. ``order_by`` expression is case-sensitive. - For more information on ordering the website - search results, see `Order web search + For more information on ordering the website search + results, see `Order web search results `__. - For more information on ordering the healthcare - search results, see `Order healthcare search + For more information on ordering the healthcare search + results, see `Order healthcare search results `__. - If this field is unrecognizable, an - ``INVALID_ARGUMENT`` is returned. + If this field is unrecognizable, an ``INVALID_ARGUMENT`` + is returned. user_info (google.cloud.discoveryengine_v1alpha.types.UserInfo): Information about the end user. Highly recommended for analytics. @@ -174,26 +165,25 @@ class SearchRequest(proto.Message): `__ is used to deduce ``device_type`` for analytics. language_code (str): - The BCP-47 language code, such as "en-US" or - "sr-Latn". For more information, see `Standard + The BCP-47 language code, such as "en-US" or "sr-Latn". + For more information, see `Standard fields `__. - This field helps to better interpret the query. - If a value isn't specified, the query language - code is automatically detected, which may not be - accurate. + This field helps to better interpret the query. If a + value isn't specified, the query language code is + automatically detected, which may not be accurate. region_code (str): - The Unicode country/region code (CLDR) of a - location, such as "US" and "419". For more - information, see `Standard fields + The Unicode country/region code (CLDR) of a location, + such as "US" and "419". For more information, see + `Standard fields `__. - If set, then results will be boosted based on - the region_code provided. + If set, then results will be boosted based on the + region_code provided. facet_specs (MutableSequence[google.cloud.discoveryengine_v1alpha.types.SearchRequest.FacetSpec]): - Facet specifications for faceted search. If - empty, no facets are returned. - A maximum of 100 values are allowed. Otherwise, - an ``INVALID_ARGUMENT`` error is returned. + Facet specifications for faceted search. If empty, no + facets are returned. + A maximum of 100 values are allowed. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. boost_spec (google.cloud.discoveryengine_v1alpha.types.SearchRequest.BoostSpec): Boost specification to boost certain documents. For more information on boosting, see @@ -202,38 +192,34 @@ class SearchRequest(proto.Message): params (MutableMapping[str, google.protobuf.struct_pb2.Value]): Additional search parameters. - For public website search only, supported values - are: + For public website search only, supported values are: - * ``user_country_code``: string. Default empty. - If set to non-empty, results are restricted - or boosted based on the location provided. - For example, ``user_country_code: "au"`` + * ``user_country_code``: string. Default empty. If set + to non-empty, results are restricted or boosted based + on the location provided. For example, + ``user_country_code: "au"`` For available codes see `Country Codes `__ - * ``search_type``: double. Default empty. - Enables non-webpage searching depending on - the value. The only valid non-default value is - 1, which enables image searching. + * ``search_type``: double. Default empty. Enables + non-webpage searching depending on the value. The + only valid non-default value is 1, which enables + image searching. For example, ``search_type: 1`` query_expansion_spec (google.cloud.discoveryengine_v1alpha.types.SearchRequest.QueryExpansionSpec): - The query expansion specification that - specifies the conditions under which query - expansion occurs. + The query expansion specification that specifies the + conditions under which query expansion occurs. spell_correction_spec (google.cloud.discoveryengine_v1alpha.types.SearchRequest.SpellCorrectionSpec): - The spell correction specification that - specifies the mode under which spell correction - takes effect. + The spell correction specification that specifies the + mode under which spell correction takes effect. user_pseudo_id (str): - A unique identifier for tracking visitors. For - example, this could be implemented with an HTTP - cookie, which should be able to uniquely - identify a visitor on a single device. This - unique identifier should not change if the - visitor logs in or out of the website. + A unique identifier for tracking visitors. For example, + this could be implemented with an HTTP cookie, which + should be able to uniquely identify a visitor on a + single device. This unique identifier should not change + if the visitor logs in or out of the website. This field should NOT have a fixed value such as ``unknown_visitor``. @@ -245,16 +231,16 @@ class SearchRequest(proto.Message): `CompleteQueryRequest.user_pseudo_id `__ - The field must be a UTF-8 encoded string with a - length limit of 128 characters. Otherwise, an + The field must be a UTF-8 encoded string with a length + limit of 128 characters. Otherwise, an ``INVALID_ARGUMENT`` error is returned. content_search_spec (google.cloud.discoveryengine_v1alpha.types.SearchRequest.ContentSearchSpec): - A specification for configuring the behavior - of content search. + A specification for configuring the behavior of + content search. embedding_spec (google.cloud.discoveryengine_v1alpha.types.SearchRequest.EmbeddingSpec): - Uses the provided embedding to do additional - semantic document retrieval. The retrieval is - based on the dot product of + Uses the provided embedding to do additional semantic + document retrieval. The retrieval is based on the dot + product of `SearchRequest.EmbeddingSpec.EmbeddingVector.vector `__ and the document embedding that is provided in @@ -327,25 +313,24 @@ class SearchRequest(proto.Message): Whether to turn on safe search. This is only supported for website search. user_labels (MutableMapping[str, str]): - The user labels applied to a resource must meet - the following requirements: - * Each resource can have multiple labels, up to - a maximum of 64. + The user labels applied to a resource must meet the + following requirements: + * Each resource can have multiple labels, up to a + maximum of 64. * Each label must be a key-value pair. - * Keys have a minimum length of 1 character and - a maximum length of 63 characters and cannot - be empty. Values can be empty and have a maximum - length of 63 characters. + * Keys have a minimum length of 1 character and a + maximum length of 63 characters and cannot be empty. + Values can be empty and have a maximum length of 63 + characters. - * Keys and values can contain only lowercase - letters, numeric characters, underscores, and - dashes. All characters must use UTF-8 encoding, - and international characters are allowed. + * Keys and values can contain only lowercase letters, + numeric characters, underscores, and dashes. All + characters must use UTF-8 encoding, and international + characters are allowed. - * The key portion of a label must be unique. - However, you can use the same key with - multiple resources. + * The key portion of a label must be unique. However, + you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. @@ -355,66 +340,64 @@ class SearchRequest(proto.Message): `__ for more details. natural_language_query_understanding_spec (google.cloud.discoveryengine_v1alpha.types.SearchRequest.NaturalLanguageQueryUnderstandingSpec): - If ``naturalLanguageQueryUnderstandingSpec`` is - not specified, no additional natural language - query understanding will be done. + If ``naturalLanguageQueryUnderstandingSpec`` is not + specified, no additional natural language query + understanding will be done. search_as_you_type_spec (google.cloud.discoveryengine_v1alpha.types.SearchRequest.SearchAsYouTypeSpec): - Search as you type configuration. Only supported - for the `IndustryVertical.MEDIA + Search as you type configuration. Only supported for the + `IndustryVertical.MEDIA `__ vertical. custom_fine_tuning_spec (google.cloud.discoveryengine_v1alpha.types.CustomFineTuningSpec): Custom fine tuning configs. - If set, it has higher priority than the configs - set in `ServingConfig.custom_fine_tuning_spec + If set, it has higher priority than the configs set in + `ServingConfig.custom_fine_tuning_spec `__. session (str): The session resource name. Optional. - Session allows users to do multi-turn /search - API calls or coordination between /search API - calls and /answer API calls. + Session allows users to do multi-turn /search API calls + or coordination between /search API calls and /answer + API calls. Example #1 (multi-turn /search API calls): - - Call /search API with the session ID generated - in the first call. Here, the previous search - query gets considered in query standing. I.e., - if the first query is "How did Alphabet do in - 2022?" and the current query is "How about - 2023?", the current query will be interpreted - as "How did Alphabet do in 2023?". - - Example #2 (coordination between /search API - calls and /answer API calls): - - - Call /answer API with the session ID generated - in the first call. Here, the answer generation - happens in the context of the search results - from the first search call. - - Multi-turn Search feature is currently at - private GA stage. Please use v1alpha or v1beta - version instead before we launch this feature to - public GA. Or ask for allowlisting through - Google Support team. + Call /search API with the session ID generated in the + first call. Here, the previous search query gets + considered in query standing. I.e., if the first query + is "How did Alphabet do in 2022?" and the current + query is "How about 2023?", the current query will be + interpreted as "How did Alphabet do in 2023?". + + Example #2 (coordination between /search API calls and + /answer API calls): + + Call /answer API with the session ID generated in the + first call. Here, the answer generation happens in the + context of the search results from the first search + call. + + Multi-turn Search feature is currently at private GA + stage. Please use v1alpha or v1beta version instead + before we launch this feature to public GA. Or ask for + allowlisting through Google Support team. session_spec (google.cloud.discoveryengine_v1alpha.types.SearchRequest.SessionSpec): Session specification. Can be used only when ``session`` is set. relevance_threshold (google.cloud.discoveryengine_v1alpha.types.SearchRequest.RelevanceThreshold): - The relevance threshold of the search - results. - Default to Google defined threshold, leveraging - a balance of precision and recall to deliver - both highly accurate results and comprehensive - coverage of relevant information. + The relevance threshold of the search results. + + Default to Google defined threshold, leveraging a + balance of precision and recall to deliver both highly + accurate results and comprehensive coverage of relevant + information. """ class RelevanceThreshold(proto.Enum): - r"""The relevance threshold of the search results. The higher - relevance threshold is, the higher relevant results are shown - and the less number of results are returned. + r"""The relevance threshold of the search results. The higher relevance + threshold is, the higher relevant results are shown and the less number + of results are returned. Values: RELEVANCE_THRESHOLD_UNSPECIFIED (0): @@ -459,8 +442,8 @@ class ImageQuery(proto.Message): Attributes: image_bytes (str): - Base64 encoded image bytes. Supported image - formats: JPEG, PNG, and BMP. + Base64 encoded image bytes. Supported image formats: + JPEG, PNG, and BMP. This field is a member of `oneof`_ ``image``. """ @@ -473,8 +456,8 @@ class ImageQuery(proto.Message): class DataStoreSpec(proto.Message): r"""A struct to define data stores to filter on in a search call and - configurations for those data stores. Otherwise, an - ``INVALID_ARGUMENT`` error is returned. + configurations for those data stores. Otherwise, an ``INVALID_ARGUMENT`` + error is returned. Attributes: data_store (str): @@ -497,75 +480,70 @@ class FacetSpec(proto.Message): facet_key (google.cloud.discoveryengine_v1alpha.types.SearchRequest.FacetSpec.FacetKey): Required. The facet key specification. limit (int): - Maximum facet values that are returned for this - facet. If unspecified, defaults to 20. The - maximum allowed value is 300. Values above 300 - are coerced to 300. + Maximum facet values that are returned for this facet. + If unspecified, defaults to 20. The maximum allowed + value is 300. Values above 300 are coerced to 300. For aggregation in healthcare search, when the - [FacetKey.key] is "healthcare_aggregation_key", - the limit will be overridden to 10,000 - internally, regardless of the value set here. + [FacetKey.key] is "healthcare_aggregation_key", the + limit will be overridden to 10,000 internally, + regardless of the value set here. - If this field is negative, an - ``INVALID_ARGUMENT`` is returned. + If this field is negative, an ``INVALID_ARGUMENT`` is + returned. excluded_filter_keys (MutableSequence[str]): List of keys to exclude when faceting. By default, `FacetKey.key `__ - is not excluded from the filter unless it is - listed in this field. - - Listing a facet key in this field allows its - values to appear as facet results, even when - they are filtered out of search results. Using - this field does not affect what search results - are returned. - - For example, suppose there are 100 documents - with the color facet "Red" and 200 documents - with the color facet "Blue". A query containing - the filter "color:ANY("Red")" and having "color" - as `FacetKey.key + is not excluded from the filter unless it is listed in + this field. + + Listing a facet key in this field allows its values to + appear as facet results, even when they are filtered out + of search results. Using this field does not affect what + search results are returned. + + For example, suppose there are 100 documents with the + color facet "Red" and 200 documents with the color facet + "Blue". A query containing the filter "color:ANY("Red")" + and having "color" as + `FacetKey.key `__ - would by default return only "Red" documents in - the search results, and also return "Red" with - count 100 as the only color facet. Although - there are also blue documents available, "Blue" - would not be shown as an available facet value. - - If "color" is listed in "excludedFilterKeys", - then the query returns the facet values "Red" - with count 100 and "Blue" with count 200, - because the "color" key is now excluded from the - filter. Because this field doesn't affect search - results, the search results are still correctly - filtered to return only "Red" documents. - - A maximum of 100 values are allowed. Otherwise, - an ``INVALID_ARGUMENT`` error is returned. + would by default return only "Red" documents in the + search results, and also return "Red" with count 100 as + the only color facet. Although there are also blue + documents available, "Blue" would not be shown as an + available facet value. + + If "color" is listed in "excludedFilterKeys", then the + query returns the facet values "Red" with count 100 and + "Blue" with count 200, because the "color" key is now + excluded from the filter. Because this field doesn't + affect search results, the search results are still + correctly filtered to return only "Red" documents. + + A maximum of 100 values are allowed. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. enable_dynamic_position (bool): - Enables dynamic position for this facet. If set - to true, the position of this facet among all - facets in the response is determined - automatically. If dynamic facets are enabled, it - is ordered together. If set to false, the - position of this facet in the response is the - same as in the request, and it is ranked before - the facets with dynamic position enable and all + Enables dynamic position for this facet. If set to true, + the position of this facet among all facets in the + response is determined automatically. If dynamic facets + are enabled, it is ordered together. If set to false, + the position of this facet in the + response is the same as in the request, and it is ranked + before the facets with dynamic position enable and all dynamic facets. - For example, you may always want to have rating - facet returned in the response, but it's not - necessarily to always display the rating facet - at the top. In that case, you can set - enable_dynamic_position to true so that the - position of rating facet in response is + For example, you may always want to have rating facet + returned in the response, but it's not necessarily to + always display the rating facet at the top. In that + case, you can set enable_dynamic_position to true so + that the position of rating facet in response is determined automatically. - Another example, assuming you have the following - facets in the request: + Another example, assuming you have the following facets + in the request: * "rating", enable_dynamic_position = true @@ -573,14 +551,13 @@ class FacetSpec(proto.Message): * "brands", enable_dynamic_position = false - And also you have a dynamic facets enabled, - which generates a facet ``gender``. Then the - final order of the facets in the response can be - ("price", "brands", "rating", "gender") or - ("price", "brands", "gender", "rating") depends - on how API orders "gender" and "rating" facets. - However, notice that "price" and "brands" are - always ranked at first and second position + And also you have a dynamic facets enabled, which + generates a facet ``gender``. Then the final order of + the facets in the response can be ("price", "brands", + "rating", "gender") or ("price", "brands", "gender", + "rating") depends on how API orders "gender" and + "rating" facets. However, notice that "price" and + "brands" are always ranked at first and second position because their enable_dynamic_position is false. """ @@ -589,45 +566,42 @@ class FacetKey(proto.Message): Attributes: key (str): - Required. Supported textual and numerical facet - keys in `Document + Required. Supported textual and numerical facet keys in + `Document `__ - object, over which the facet values are - computed. Facet key is case-sensitive. + object, over which the facet values are computed. Facet + key is case-sensitive. intervals (MutableSequence[google.cloud.discoveryengine_v1alpha.types.Interval]): - Set only if values should be bucketed into - intervals. Must be set for facets with numerical - values. Must not be set for facet with text - values. Maximum number of intervals is 30. + Set only if values should be bucketed into intervals. + Must be set for facets with numerical values. Must not + be set for facet with text values. Maximum number of + intervals is 30. restricted_values (MutableSequence[str]): - Only get facet for the given restricted values. - Only supported on textual fields. For example, - suppose "category" has three values "Action > - 2022", "Action > 2021" and "Sci-Fi > 2022". If - set "restricted_values" to "Action > 2022", the - "category" facet only contains "Action > 2022". - Only supported on textual fields. Maximum is 10. + Only get facet for the given restricted values. Only + supported on textual fields. For example, suppose + "category" has three values "Action > 2022", "Action > + 2021" and "Sci-Fi > 2022". If set "restricted_values" to + "Action > 2022", the "category" facet only contains + "Action > 2022". Only supported on textual fields. + Maximum is 10. prefixes (MutableSequence[str]): - Only get facet values that start with the - given string prefix. For example, suppose - "category" has three values "Action > 2022", - "Action > 2021" and "Sci-Fi > 2022". If set - "prefixes" to "Action", the "category" facet - only contains "Action > 2022" and "Action > - 2021". Only supported on textual fields. Maximum - is 10. + Only get facet values that start with the given + string prefix. For example, suppose "category" has three + values "Action > 2022", "Action > 2021" and "Sci-Fi > + 2022". If set "prefixes" to "Action", the "category" + facet only contains "Action > 2022" and "Action > 2021". + Only supported on textual fields. Maximum is 10. contains (MutableSequence[str]): - Only get facet values that contain the given - strings. For example, suppose "category" has - three values "Action > 2022", "Action > 2021" - and "Sci-Fi > 2022". If set "contains" to - "2022", the "category" facet only contains - "Action > 2022" and "Sci-Fi > 2022". Only - supported on textual fields. Maximum is 10. + Only get facet values that contain the given strings. + For example, suppose "category" has three values "Action + > 2022", "Action > 2021" and "Sci-Fi > 2022". If set + "contains" to "2022", the "category" facet only contains + "Action > 2022" and "Sci-Fi > 2022". Only supported on + textual fields. Maximum is 10. case_insensitive (bool): - True to make facet keys case insensitive when - getting faceting values with prefixes or - contains; false otherwise. + True to make facet keys case insensitive when getting + faceting values with prefixes or contains; false + otherwise. order_by (str): The order in which documents are returned. @@ -644,11 +618,10 @@ class FacetKey(proto.Message): descending. Only applies to textual facets. - If not set, textual values are sorted in - `natural order + If not set, textual values are sorted in `natural + order `__; - numerical intervals are sorted in the order - given by + numerical intervals are sorted in the order given by `FacetSpec.FacetKey.intervals `__. """ @@ -706,12 +679,11 @@ class BoostSpec(proto.Message): Attributes: condition_boost_specs (MutableSequence[google.cloud.discoveryengine_v1alpha.types.SearchRequest.BoostSpec.ConditionBoostSpec]): - Condition boost specifications. If a document - matches multiple conditions in the - specifictions, boost scores from these - specifications are all applied and combined in a - non-linear way. Maximum number of specifications - is 20. + Condition boost specifications. If a document matches + multiple conditions in the specifictions, boost scores + from these specifications are all applied and combined + in a non-linear way. Maximum number of specifications is + 20. """ class ConditionBoostSpec(proto.Message): @@ -719,9 +691,9 @@ class ConditionBoostSpec(proto.Message): Attributes: condition (str): - An expression which specifies a boost condition. - The syntax and supported fields are the same as - a filter expression. See `SearchRequest.filter + An expression which specifies a boost condition. The + syntax and supported fields are the same as a filter + expression. See `SearchRequest.filter `__ for detail syntax and limitations. @@ -730,71 +702,66 @@ class ConditionBoostSpec(proto.Message): * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": - ``(document_id: ANY("doc_1", "doc_2")) AND - (color: ANY("Red", "Blue"))`` + ``(document_id: ANY("doc_1", "doc_2")) AND (color: + ANY("Red", "Blue"))`` boost (float): - Strength of the condition boost, which should be - in [-1, 1]. Negative boost means demotion. - Default is 0.0. - - Setting to 1.0 gives the document a big - promotion. However, it does not necessarily mean - that the boosted document will be the top result - at all times, nor that other documents will be - excluded. Results could still be shown even when - none of them matches the condition. And results - that are significantly more relevant to the - search query can still trump your heavily - favored but irrelevant documents. - - Setting to -1.0 gives the document a big - demotion. However, results that are deeply - relevant might still be shown. The document will - have an upstream battle to get a fairly high - ranking, but it is not blocked out completely. - - Setting to 0.0 means no boost applied. The - boosting condition is ignored. Only one of the - (condition, boost) combination or the - boost_control_spec below are set. If both are - set then the global boost is ignored and the + Strength of the condition boost, which should be in [-1, + 1]. Negative boost means demotion. Default is 0.0. + + Setting to 1.0 gives the document a big promotion. + However, it does not necessarily mean that the boosted + document will be the top result at all times, nor that + other documents will be excluded. Results could still be + shown even when none of them matches the condition. And + results that are significantly more relevant to the + search query can still trump your heavily favored but + irrelevant documents. + + Setting to -1.0 gives the document a big demotion. + However, results that are deeply relevant might still be + shown. The document will have an upstream battle to get + a fairly high ranking, but it is not blocked out + completely. + + Setting to 0.0 means no boost applied. The boosting + condition is ignored. Only one of the (condition, boost) + combination or the boost_control_spec below are set. If + both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied. boost_control_spec (google.cloud.discoveryengine_v1alpha.types.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec): - Complex specification for custom ranking - based on customer defined attribute value. + Complex specification for custom ranking based on + customer defined attribute value. """ class BoostControlSpec(proto.Message): r"""Specification for custom ranking based on customer specified - attribute value. It provides more controls for customized - ranking than the simple (condition, boost) combination above. + attribute value. It provides more controls for customized ranking than + the simple (condition, boost) combination above. Attributes: field_name (str): - The name of the field whose value will be - used to determine the boost amount. + The name of the field whose value will be used to + determine the boost amount. attribute_type (google.cloud.discoveryengine_v1alpha.types.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.AttributeType): - The attribute type to be used to determine the - boost amount. The attribute value can be derived - from the field value of the specified - field_name. In the case of numerical it is - straightforward i.e. attribute_value = - numerical_field_value. In the case of freshness - however, attribute_value = (time.now() - - datetime_field_value). + The attribute type to be used to determine the boost + amount. The attribute value can be derived from the + field value of the specified field_name. In the case of + numerical it is straightforward i.e. attribute_value = + numerical_field_value. In the case of freshness however, + attribute_value = (time.now() - datetime_field_value). interpolation_type (google.cloud.discoveryengine_v1alpha.types.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.InterpolationType): - The interpolation type to be applied to - connect the control points listed below. + The interpolation type to be applied to connect the + control points listed below. control_points (MutableSequence[google.cloud.discoveryengine_v1alpha.types.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint]): The control points used to define the curve. The monotonic function (defined through the - interpolation_type above) passes through the - control points listed here. + interpolation_type above) passes through the control + points listed here. """ class AttributeType(proto.Enum): - r"""The attribute(or function) for which the custom ranking is to - be applied. + r"""The attribute(or function) for which the custom ranking is to be + applied. Values: ATTRIBUTE_TYPE_UNSPECIFIED (0): @@ -836,9 +803,9 @@ class InterpolationType(proto.Enum): LINEAR = 1 class ControlPoint(proto.Message): - r"""The control points used to define the curve. The curve - defined through these control points can only be monotonically - increasing or decreasing(constant values are acceptable). + r"""The control points used to define the curve. The curve defined + through these control points can only be monotonically increasing or + decreasing(constant values are acceptable). Attributes: attribute_value (str): @@ -848,13 +815,13 @@ class ControlPoint(proto.Message): 2. The duration spec for freshness: The value must be formatted as an XSD - ``dayTimeDuration`` value (a restricted subset - of an ISO 8601 duration value). The pattern for - this is: ```nD `__`nM `__]``. + ``dayTimeDuration`` value (a restricted subset of an ISO + 8601 duration value). The pattern for this is: ```nD + `__`nM `__]``. boost_amount (float): - The value between -1 to 1 by which to boost the - score if the attribute_value evaluates to the - value specified above. + The value between -1 to 1 by which to boost the score if + the attribute_value evaluates to the value specified + above. """ attribute_value: str = proto.Field( @@ -911,24 +878,22 @@ class ControlPoint(proto.Message): ) class QueryExpansionSpec(proto.Message): - r"""Specification to determine under which conditions query - expansion should occur. + r"""Specification to determine under which conditions query expansion + should occur. Attributes: condition (google.cloud.discoveryengine_v1alpha.types.SearchRequest.QueryExpansionSpec.Condition): - The condition under which query expansion should - occur. Default to `Condition.DISABLED + The condition under which query expansion should occur. + Default to `Condition.DISABLED `__. pin_unexpanded_results (bool): - Whether to pin unexpanded results. If this - field is set to true, unexpanded products are - always at the top of the search results, - followed by the expanded results. + Whether to pin unexpanded results. If this field is + set to true, unexpanded products are always at the top + of the search results, followed by the expanded results. """ class Condition(proto.Enum): - r"""Enum describing under which condition query expansion should - occur. + r"""Enum describing under which condition query expansion should occur. Values: CONDITION_UNSPECIFIED (0): @@ -972,8 +937,7 @@ class SpellCorrectionSpec(proto.Message): """ class Mode(proto.Enum): - r"""Enum describing under which mode spell correction should - occur. + r"""Enum describing under which mode spell correction should occur. Values: MODE_UNSPECIFIED (0): @@ -1004,27 +968,24 @@ class Mode(proto.Enum): ) class ContentSearchSpec(proto.Message): - r"""A specification for configuring the behavior of content - search. + r"""A specification for configuring the behavior of content search. Attributes: snippet_spec (google.cloud.discoveryengine_v1alpha.types.SearchRequest.ContentSearchSpec.SnippetSpec): - If ``snippetSpec`` is not specified, snippets - are not included in the search response. + If ``snippetSpec`` is not specified, snippets are not + included in the search response. summary_spec (google.cloud.discoveryengine_v1alpha.types.SearchRequest.ContentSearchSpec.SummarySpec): - If ``summarySpec`` is not specified, summaries - are not included in the search response. + If ``summarySpec`` is not specified, summaries are not + included in the search response. extractive_content_spec (google.cloud.discoveryengine_v1alpha.types.SearchRequest.ContentSearchSpec.ExtractiveContentSpec): - If there is no extractive_content_spec provided, - there will be no extractive answer in the search - response. + If there is no extractive_content_spec provided, there + will be no extractive answer in the search response. search_result_mode (google.cloud.discoveryengine_v1alpha.types.SearchRequest.ContentSearchSpec.SearchResultMode): - Specifies the search result mode. If - unspecified, the search result mode defaults to - ``DOCUMENTS``. + Specifies the search result mode. If unspecified, the + search result mode defaults to ``DOCUMENTS``. chunk_spec (google.cloud.discoveryengine_v1alpha.types.SearchRequest.ContentSearchSpec.ChunkSpec): - Specifies the chunk spec to be returned from the - search response. Only available if the + Specifies the chunk spec to be returned from the search + response. Only available if the `SearchRequest.ContentSearchSpec.search_result_mode `__ is set to @@ -1052,24 +1013,22 @@ class SearchResultMode(proto.Enum): CHUNKS = 2 class SnippetSpec(proto.Message): - r"""A specification for configuring snippets in a search - response. + r"""A specification for configuring snippets in a search response. Attributes: max_snippet_count (int): - [DEPRECATED] This field is deprecated. To - control snippet return, use ``return_snippet`` - field. For backwards compatibility, we will - return snippet if max_snippet_count > 0. + [DEPRECATED] This field is deprecated. To control + snippet return, use ``return_snippet`` field. For + backwards compatibility, we will return snippet if + max_snippet_count > 0. reference_only (bool): - [DEPRECATED] This field is deprecated and will - have no affect on the snippet. + [DEPRECATED] This field is deprecated and will have no + affect on the snippet. return_snippet (bool): - If ``true``, then return snippet. If no snippet - can be generated, we return "No snippet is - available for this page." A ``snippet_status`` - with ``SUCCESS`` or ``NO_SNIPPET_AVAILABLE`` - will also be returned. + If ``true``, then return snippet. If no snippet can be + generated, we return "No snippet is available for this + page." A ``snippet_status`` with ``SUCCESS`` or + ``NO_SNIPPET_AVAILABLE`` will also be returned. """ max_snippet_count: int = proto.Field( @@ -1086,107 +1045,98 @@ class SnippetSpec(proto.Message): ) class SummarySpec(proto.Message): - r"""A specification for configuring a summary returned in a - search response. + r"""A specification for configuring a summary returned in a search + response. Attributes: summary_result_count (int): - The number of top results to generate the - summary from. If the number of results returned - is less than ``summaryResultCount``, the summary - is generated from all of the results. - - At most 10 results for documents mode, or 50 for - chunks mode, can be used to generate a summary. - The chunks mode is used when + The number of top results to generate the summary from. + If the number of results returned is less than + ``summaryResultCount``, the summary is generated from + all of the results. + + At most 10 results for documents mode, or 50 for chunks + mode, can be used to generate a summary. The chunks mode + is used when `SearchRequest.ContentSearchSpec.search_result_mode `__ is set to `CHUNKS `__. include_citations (bool): - Specifies whether to include citations in the - summary. The default value is ``false``. + Specifies whether to include citations in the summary. + The default value is ``false``. - When this field is set to ``true``, summaries - include in-line citation numbers. + When this field is set to ``true``, summaries include + in-line citation numbers. Example summary including citations: - BigQuery is Google Cloud's fully managed and - completely serverless enterprise data warehouse - [1]. BigQuery supports all data types, works - across clouds, and has built-in machine learning - and business intelligence, all within a unified - platform [2, 3]. - - The citation numbers refer to the returned - search results and are 1-indexed. For example, - [1] means that the sentence is attributed to the - first search result. [2, 3] means that the - sentence is attributed to both the second and - third search results. + BigQuery is Google Cloud's fully managed and completely + serverless enterprise data warehouse [1]. BigQuery + supports all data types, works across clouds, and has + built-in machine learning and business intelligence, all + within a unified platform [2, 3]. + + The citation numbers refer to the returned search + results and are 1-indexed. For example, [1] means that + the sentence is attributed to the first search result. + [2, 3] means that the sentence is attributed to both the + second and third search results. ignore_adversarial_query (bool): - Specifies whether to filter out adversarial - queries. The default value is ``false``. - - Google employs search-query classification to - detect adversarial queries. No summary is - returned if the search query is classified as an - adversarial query. For example, a user might ask - a question regarding negative comments about the - company or submit a query designed to generate - unsafe, policy-violating output. If this field - is set to ``true``, we skip generating summaries - for adversarial queries and return fallback - messages instead. + Specifies whether to filter out adversarial queries. The + default value is ``false``. + + Google employs search-query classification to detect + adversarial queries. No summary is returned if the + search query is classified as an adversarial query. For + example, a user might ask a question regarding negative + comments about the company or submit a query designed to + generate unsafe, policy-violating output. If this field + is set to ``true``, we skip generating summaries for + adversarial queries and return fallback messages + instead. ignore_non_summary_seeking_query (bool): - Specifies whether to filter out queries that are - not summary-seeking. The default value is - ``false``. - - Google employs search-query classification to - detect summary-seeking queries. No summary is - returned if the search query is classified as a - non-summary seeking query. For example, ``why is - the sky blue`` and ``Who is the best soccer - player in the world?`` are summary-seeking - queries, but ``SFO airport`` and ``world cup - 2026`` are not. They are most likely - navigational queries. If this field is set to - ``true``, we skip generating summaries for - non-summary seeking queries and return fallback - messages instead. + Specifies whether to filter out queries that are not + summary-seeking. The default value is ``false``. + + Google employs search-query classification to detect + summary-seeking queries. No summary is returned if the + search query is classified as a non-summary seeking + query. For example, ``why is the sky blue`` and ``Who is + the best soccer player in the world?`` are + summary-seeking queries, but ``SFO airport`` and ``world + cup 2026`` are not. They are most likely navigational + queries. If this field is set to ``true``, we skip + generating summaries for non-summary seeking queries and + return fallback messages instead. ignore_low_relevant_content (bool): - Specifies whether to filter out queries that - have low relevance. The default value is - ``false``. - - If this field is set to ``false``, all search - results are used regardless of relevance to - generate answers. If set to ``true``, only - queries with high relevance search results will - generate answers. + Specifies whether to filter out queries that have low + relevance. The default value is ``false``. + + If this field is set to ``false``, all search results + are used regardless of relevance to generate answers. If + set to ``true``, only queries with high relevance search + results will generate answers. model_prompt_spec (google.cloud.discoveryengine_v1alpha.types.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec): - If specified, the spec will be used to modify - the prompt provided to the LLM. + If specified, the spec will be used to modify the + prompt provided to the LLM. language_code (str): - Language code for Summary. Use language tags - defined by `BCP47 - `__. - Note: This is an experimental feature. + Language code for Summary. Use language tags defined by + `BCP47 + `__. Note: + This is an experimental feature. model_spec (google.cloud.discoveryengine_v1alpha.types.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec): - If specified, the spec will be used to modify - the model specification provided to the LLM. + If specified, the spec will be used to modify the + model specification provided to the LLM. use_semantic_chunks (bool): - If true, answer will be generated from most - relevant chunks from top search results. This - feature will improve summary quality. Note that - with this feature enabled, not all top search - results will be referenced and included in the - reference list, so the citation source index - only points to the search results listed in the - reference list. + If true, answer will be generated from most relevant + chunks from top search results. This feature will + improve summary quality. Note that with this feature + enabled, not all top search results will be referenced + and included in the reference list, so the citation + source index only points to the search results listed in + the reference list. """ class ModelPromptSpec(proto.Message): @@ -1194,9 +1144,8 @@ class ModelPromptSpec(proto.Message): Attributes: preamble (str): - Text at the beginning of the prompt that - instructs the assistant. Examples are available - in the user guide. + Text at the beginning of the prompt that instructs + the assistant. Examples are available in the user guide. """ preamble: str = proto.Field( @@ -1213,16 +1162,15 @@ class ModelSpec(proto.Message): Supported values are: - * ``stable``: string. Default value when no - value is specified. Uses a generally - available, fine-tuned model. For more - information, see `Answer generation model - versions and + * ``stable``: string. Default value when no value is + specified. Uses a generally available, fine-tuned + model. For more information, see `Answer generation + model versions and lifecycle `__. - * ``preview``: string. (Public preview) Uses a - preview model. For more information, see + * ``preview``: string. (Public preview) Uses a preview + model. For more information, see `Answer generation model versions and lifecycle `__. @@ -1275,34 +1223,32 @@ class ModelSpec(proto.Message): ) class ExtractiveContentSpec(proto.Message): - r"""A specification for configuring the extractive content in a - search response. + r"""A specification for configuring the extractive content in a search + response. Attributes: max_extractive_answer_count (int): - The maximum number of extractive answers - returned in each search result. + The maximum number of extractive answers returned in + each search result. - An extractive answer is a verbatim answer - extracted from the original document, which - provides a precise and contextually relevant - answer to the search query. + An extractive answer is a verbatim answer extracted from + the original document, which provides a precise and + contextually relevant answer to the search query. - If the number of matching answers is less than - the ``max_extractive_answer_count``, return all - of the answers. Otherwise, return the + If the number of matching answers is less than the + ``max_extractive_answer_count``, return all of the + answers. Otherwise, return the ``max_extractive_answer_count``. At most five answers are returned for each `SearchResult `__. max_extractive_segment_count (int): - The max number of extractive segments returned - in each search result. Only applied if the + The max number of extractive segments returned in each + search result. Only applied if the `DataStore - `__ - is set to - `DataStore.ContentConfig.CONTENT_REQUIRED + `__ is + set to `DataStore.ContentConfig.CONTENT_REQUIRED `__ or `DataStore.solution_types @@ -1311,32 +1257,30 @@ class ExtractiveContentSpec(proto.Message): `SOLUTION_TYPE_CHAT `__. - An extractive segment is a text segment - extracted from the original document that is - relevant to the search query, and, in general, - more verbose than an extractive answer. The - segment could then be used as input for LLMs to - generate summaries and answers. + An extractive segment is a text segment extracted from + the original document that is relevant to the search + query, and, in general, more verbose than an extractive + answer. The segment could then be used as input for LLMs + to generate summaries and answers. If the number of matching segments is less than - ``max_extractive_segment_count``, return all of - the segments. Otherwise, return the + ``max_extractive_segment_count``, return all of the + segments. Otherwise, return the ``max_extractive_segment_count``. return_extractive_segment_score (bool): - Specifies whether to return the confidence score - from the extractive segments in each search - result. This feature is available only for new - or allowlisted data stores. To allowlist your - data store, contact your Customer Engineer. The - default value is ``false``. + Specifies whether to return the confidence score from + the extractive segments in each search result. This + feature is available only for new or allowlisted data + stores. To allowlist your data store, contact your + Customer Engineer. The default value is ``false``. num_previous_segments (int): - Specifies whether to also include the adjacent - from each selected segments. - Return at most ``num_previous_segments`` - segments before each selected segments. + Specifies whether to also include the adjacent from each + selected segments. + Return at most ``num_previous_segments`` segments before + each selected segments. num_next_segments (int): - Return at most ``num_next_segments`` segments - after each selected segments. + Return at most ``num_next_segments`` segments after each + selected segments. """ max_extractive_answer_count: int = proto.Field( @@ -1361,8 +1305,8 @@ class ExtractiveContentSpec(proto.Message): ) class ChunkSpec(proto.Message): - r"""Specifies the chunk spec to be returned from the search - response. Only available if the + r"""Specifies the chunk spec to be returned from the search response. + Only available if the `SearchRequest.ContentSearchSpec.search_result_mode `__ is set to @@ -1371,15 +1315,13 @@ class ChunkSpec(proto.Message): Attributes: num_previous_chunks (int): - The number of previous chunks to be returned - of the current chunk. The maximum allowed value - is 3. If not specified, no previous chunks will - be returned. + The number of previous chunks to be returned of the + current chunk. The maximum allowed value is 3. + If not specified, no previous chunks will be returned. num_next_chunks (int): - The number of next chunks to be returned of - the current chunk. The maximum allowed value is - 3. If not specified, no next chunks will be - returned. + The number of next chunks to be returned of the + current chunk. The maximum allowed value is 3. + If not specified, no next chunks will be returned. """ num_previous_chunks: int = proto.Field( @@ -1420,13 +1362,12 @@ class ChunkSpec(proto.Message): ) class EmbeddingSpec(proto.Message): - r"""The specification that uses customized query embedding vector - to do semantic document retrieval. + r"""The specification that uses customized query embedding vector to do + semantic document retrieval. Attributes: embedding_vectors (MutableSequence[google.cloud.discoveryengine_v1alpha.types.SearchRequest.EmbeddingSpec.EmbeddingVector]): - The embedding vector used for retrieval. - Limit to 1. + The embedding vector used for retrieval. Limit to 1. """ class EmbeddingVector(proto.Message): @@ -1457,29 +1398,26 @@ class EmbeddingVector(proto.Message): ) class NaturalLanguageQueryUnderstandingSpec(proto.Message): - r"""Specification to enable natural language understanding - capabilities for search requests. + r"""Specification to enable natural language understanding capabilities + for search requests. Attributes: filter_extraction_condition (google.cloud.discoveryengine_v1alpha.types.SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition): - The condition under which filter extraction - should occur. Default to [Condition.DISABLED][]. + The condition under which filter extraction should + occur. Default to [Condition.DISABLED][]. geo_search_query_detection_field_names (MutableSequence[str]): - Field names used for location-based filtering, - where geolocation filters are detected in - natural language search queries. Only valid when - the FilterExtractionCondition is set to - ``ENABLED``. - - If this field is set, it overrides the field - names set in - `ServingConfig.geo_search_query_detection_field_names + Field names used for location-based filtering, where + geolocation filters are detected in natural language + search queries. Only valid when the + FilterExtractionCondition is set to ``ENABLED``. + + If this field is set, it overrides the field names set + in `ServingConfig.geo_search_query_detection_field_names `__. """ class FilterExtractionCondition(proto.Enum): - r"""Enum describing under which condition filter extraction - should occur. + r"""Enum describing under which condition filter extraction should occur. Values: CONDITION_UNSPECIFIED (0): @@ -1511,15 +1449,15 @@ class SearchAsYouTypeSpec(proto.Message): Attributes: condition (google.cloud.discoveryengine_v1alpha.types.SearchRequest.SearchAsYouTypeSpec.Condition): - The condition under which search as you type - should occur. Default to + The condition under which search as you type should + occur. Default to `Condition.DISABLED `__. """ class Condition(proto.Enum): - r"""Enum describing under which condition search as you type - should occur. + r"""Enum describing under which condition search as you type should + occur. Values: CONDITION_UNSPECIFIED (0): @@ -1544,18 +1482,17 @@ class Condition(proto.Enum): class SessionSpec(proto.Message): r"""Session specification. - Multi-turn Search feature is currently at private GA stage. - Please use v1alpha or v1beta version instead before we launch - this feature to public GA. Or ask for allowlisting through - Google Support team. + Multi-turn Search feature is currently at private GA stage. Please use + v1alpha or v1beta version instead before we launch this feature to + public GA. Or ask for allowlisting through Google Support team. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: query_id (str): - If set, the search result gets stored to the - "turn" specified by this query ID. + If set, the search result gets stored to the "turn" + specified by this query ID. Example: Let's say the session looks like this: @@ -1566,36 +1503,33 @@ class SessionSpec(proto.Message): ".../questions/yyy" } answer: "Foo is ..." } turns { - query { text: "How about bar then?" - query_id: ".../questions/zzz" } } + query { text: "How about bar then?" query_id: + ".../questions/zzz" } } } - The user can call /search API with a request - like this: + The user can call /search API with a request like this: session: ".../sessions/xxx" - session_spec { query_id: ".../questions/zzz" - } - - Then, the API stores the search result, - associated with the last turn. The stored search - result can be used by a subsequent /answer API - call (with the session ID and the query ID - specified). Also, it is possible to call /search - and /answer in parallel with the same session ID + session_spec { query_id: ".../questions/zzz" } + + Then, the API stores the search result, associated with + the last turn. The stored search result can be used by a + subsequent /answer API call (with the session ID and the + query ID specified). Also, it is possible to call + /search and /answer in parallel with the same session ID & query ID. search_result_persistence_count (int): The number of top search results to persist. The - persisted search results can be used for the - subsequent /answer api call. + persisted search results can be used for the subsequent + /answer api call. - This field is simliar to the - ``summary_result_count`` field in + This field is simliar to the ``summary_result_count`` + field in `SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count `__. - At most 10 results for documents mode, or 50 for - chunks mode. + At most 10 results for documents mode, or 50 for chunks + mode. This field is a member of `oneof`_ ``_search_result_persistence_count``. """ @@ -1763,20 +1697,19 @@ class SessionSpec(proto.Message): class SearchResponse(proto.Message): r"""Response message for `SearchService.Search - `__ - method. + `__ method. Attributes: results (MutableSequence[google.cloud.discoveryengine_v1alpha.types.SearchResponse.SearchResult]): - A list of matched documents. The order - represents the ranking. + A list of matched documents. The order represents the + ranking. facets (MutableSequence[google.cloud.discoveryengine_v1alpha.types.SearchResponse.Facet]): Results of facets requested by user. guided_search_result (google.cloud.discoveryengine_v1alpha.types.SearchResponse.GuidedSearchResult): Guided search result. total_size (int): - The estimated total count of matched items - irrespective of pagination. The count of + The estimated total count of matched items irrespective + of pagination. The count of `results `__ returned by pagination may be less than the @@ -1784,17 +1717,17 @@ class SearchResponse(proto.Message): `__ that matches. attribution_token (str): - A unique search token. This should be included - in the `UserEvent - `__ - logs resulting from this search, which enables - accurate attribution of search model - performance. This also helps to identify a - request during the customer support scenarios. + A unique search token. This should be included in the + `UserEvent + `__ logs + resulting from this search, which enables accurate + attribution of search model performance. This also helps + to identify a request during the customer support + scenarios. redirect_uri (str): - The URI of a customer-defined redirect page. If - redirect action is triggered, no search is - performed, and only `redirect_uri + The URI of a customer-defined redirect page. If redirect + action is triggered, no search is performed, and only + `redirect_uri `__ and `attribution_token @@ -1804,13 +1737,13 @@ class SearchResponse(proto.Message): A token that can be sent as `SearchRequest.page_token `__ - to retrieve the next page. If this field is - omitted, there are no subsequent pages. + to retrieve the next page. If this field is omitted, + there are no subsequent pages. corrected_query (str): - Contains the spell corrected query, if found. If - the spell correction type is AUTOMATIC, then the - search results are based on corrected_query. - Otherwise the original query is used for search. + Contains the spell corrected query, if found. If the + spell correction type is AUTOMATIC, then the search + results are based on corrected_query. Otherwise the + original query is used for search. summary (google.cloud.discoveryengine_v1alpha.types.SearchResponse.Summary): A summary as part of the search results. This field is only returned if @@ -1818,27 +1751,24 @@ class SearchResponse(proto.Message): `__ is set. applied_controls (MutableSequence[str]): - Controls applied as part of the Control - service. + Controls applied as part of the Control service. geo_search_debug_info (MutableSequence[google.cloud.discoveryengine_v1alpha.types.SearchResponse.GeoSearchDebugInfo]): query_expansion_info (google.cloud.discoveryengine_v1alpha.types.SearchResponse.QueryExpansionInfo): - Query expansion information for the returned - results. + Query expansion information for the returned results. natural_language_query_understanding_info (google.cloud.discoveryengine_v1alpha.types.SearchResponse.NaturalLanguageQueryUnderstandingInfo): - Natural language query understanding - information for the returned results. + Natural language query understanding information for + the returned results. session_info (google.cloud.discoveryengine_v1alpha.types.SearchResponse.SessionInfo): Session information. Only set if `SearchRequest.session `__ - is provided. See its description for more - details. + is provided. See its description for more details. one_box_results (MutableSequence[google.cloud.discoveryengine_v1alpha.types.SearchResponse.OneBoxResult]): - A list of One Box results. There can be - multiple One Box results of different types. + A list of One Box results. There can be multiple One + Box results of different types. """ class SearchResult(proto.Message): @@ -1847,13 +1777,12 @@ class SearchResult(proto.Message): Attributes: id (str): `Document.id - `__ - of the searched `Document + `__ of + the searched `Document `__. document (google.cloud.discoveryengine_v1alpha.types.Document): - The document data snippet in the search - response. Only fields that are marked as - ``retrievable`` are populated. + The document data snippet in the search response. Only + fields that are marked as ``retrievable`` are populated. chunk (google.cloud.discoveryengine_v1alpha.types.Chunk): The chunk data in the search response if the `SearchRequest.ContentSearchSpec.search_result_mode @@ -1864,8 +1793,7 @@ class SearchResult(proto.Message): model_scores (MutableMapping[str, google.cloud.discoveryengine_v1alpha.types.DoubleList]): Google provided available scores. rank_signals (google.cloud.discoveryengine_v1alpha.types.SearchResponse.SearchResult.RankSignals): - A set of ranking signals associated with the - result. + A set of ranking signals associated with the result. """ class RankSignals(proto.Message): @@ -1887,8 +1815,7 @@ class RankSignals(proto.Message): This field is a member of `oneof`_ ``_semantic_similarity_score``. pctr_rank (float): - Predicted conversion rate adjustment as a - rank. + Predicted conversion rate adjustment as a rank. This field is a member of `oneof`_ ``_pctr_rank``. topicality_rank (float): @@ -1916,8 +1843,8 @@ class CustomSignal(proto.Message): name (str): Name of the signal. value (float): - Float value representing the ranking signal - (e.g. 1.25 for BM25). + Float value representing the ranking signal (e.g. + 1.25 for BM25). """ name: str = proto.Field( @@ -2007,8 +1934,8 @@ class Facet(proto.Message): Attributes: key (str): - The key for this facet. For example, - ``"colors"`` or ``"price"``. It matches + The key for this facet. For example, ``"colors"`` or + ``"price"``. It matches `SearchRequest.FacetSpec.FacetKey.key `__. values (MutableSequence[google.cloud.discoveryengine_v1alpha.types.SearchResponse.Facet.FacetValue]): @@ -2029,13 +1956,13 @@ class FacetValue(proto.Message): Attributes: value (str): - Text value of a facet, such as "Black" for - facet "colors". + Text value of a facet, such as "Black" for facet + "colors". This field is a member of `oneof`_ ``facet_value``. interval (google.cloud.discoveryengine_v1alpha.types.Interval): - Interval value for a facet, such as `10, 20) for - facet "price". It matches + Interval value for a facet, such as `10, 20) for facet + "price". It matches [SearchRequest.FacetSpec.FacetKey.intervals `__. @@ -2077,9 +2004,9 @@ class FacetValue(proto.Message): ) class GuidedSearchResult(proto.Message): - r"""Guided search result. The guided search helps user to refine - the search results and narrow down to the real needs from a - broaded search results. + r"""Guided search result. The guided search helps user to refine the + search results and narrow down to the real needs from a broaded search + results. Attributes: refinement_attributes (MutableSequence[google.cloud.discoveryengine_v1alpha.types.SearchResponse.GuidedSearchResult.RefinementAttribute]): @@ -2093,11 +2020,11 @@ class RefinementAttribute(proto.Message): Attributes: attribute_key (str): - Attribute key used to refine the results. For - example, ``"movie_type"``. + Attribute key used to refine the results. For example, + ``"movie_type"``. attribute_value (str): - Attribute value used to refine the results. For - example, ``"drama"``. + Attribute value used to refine the results. For example, + ``"drama"``. """ attribute_key: str = proto.Field( @@ -2122,19 +2049,18 @@ class RefinementAttribute(proto.Message): ) class Summary(proto.Message): - r"""Summary of the top N search results specified by the summary - spec. + r"""Summary of the top N search results specified by the summary spec. Attributes: summary_text (str): The summary content. summary_skipped_reasons (MutableSequence[google.cloud.discoveryengine_v1alpha.types.SearchResponse.Summary.SummarySkippedReason]): - Additional summary-skipped reasons. This - provides the reason for ignored cases. If - nothing is skipped, this field is not set. + Additional summary-skipped reasons. This provides the + reason for ignored cases. If nothing is skipped, this + field is not set. safety_attributes (google.cloud.discoveryengine_v1alpha.types.SearchResponse.Summary.SafetyAttributes): - A collection of Safety Attribute categories - and their associated confidence scores. + A collection of Safety Attribute categories and their + associated confidence scores. summary_with_metadata (google.cloud.discoveryengine_v1alpha.types.SearchResponse.Summary.SummaryWithMetadata): Summary with metadata information. """ @@ -2216,18 +2142,17 @@ class SummarySkippedReason(proto.Enum): NON_SUMMARY_SEEKING_QUERY_IGNORED_V2 = 9 class SafetyAttributes(proto.Message): - r"""Safety Attribute categories and their associated confidence - scores. + r"""Safety Attribute categories and their associated confidence scores. Attributes: categories (MutableSequence[str]): - The display names of Safety Attribute - categories associated with the generated - content. Order matches the Scores. + The display names of Safety Attribute categories + associated with the generated content. Order matches the + Scores. scores (MutableSequence[float]): - The confidence scores of the each category, - higher value means higher confidence. Order - matches the Categories. + The confidence scores of the each category, higher + value means higher confidence. Order matches the + Categories. """ categories: MutableSequence[str] = proto.RepeatedField( @@ -2260,8 +2185,8 @@ class Citation(proto.Message): Attributes: start_index (int): - Index indicates the start of the segment, - measured in bytes/unicode. + Index indicates the start of the segment, measured in + bytes/unicode. end_index (int): End of the attributed segment, exclusive. sources (MutableSequence[google.cloud.discoveryengine_v1alpha.types.SearchResponse.Summary.CitationSource]): @@ -2290,9 +2215,9 @@ class CitationSource(proto.Message): Attributes: reference_index (int): Document reference index from - SummaryWithMetadata.references. It is 0-indexed - and the value will be zero if the - reference_index is not set explicitly. + SummaryWithMetadata.references. It is 0-indexed and the + value will be zero if the reference_index is not set + explicitly. """ reference_index: int = proto.Field( @@ -2310,14 +2235,14 @@ class Reference(proto.Message): Required. `Document.name `__ - of the document. Full resource name of the - referenced document, in the format + of the document. Full resource name of the referenced + document, in the format ``projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*``. uri (str): Cloud Storage or HTTP uri for the document. chunk_contents (MutableSequence[google.cloud.discoveryengine_v1alpha.types.SearchResponse.Summary.Reference.ChunkContent]): - List of cited chunk contents derived from - document content. + List of cited chunk contents derived from document + content. """ class ChunkContent(proto.Message): @@ -2413,13 +2338,13 @@ class SummaryWithMetadata(proto.Message): ) class GeoSearchDebugInfo(proto.Message): - r"""Debug information specifically related to forward geocoding - issues arising from Geolocation Search. + r"""Debug information specifically related to forward geocoding issues + arising from Geolocation Search. Attributes: original_address_query (str): - The address from which forward geocoding - ingestion produced issues. + The address from which forward geocoding ingestion + produced issues. error_message (str): The error produced. """ @@ -2434,16 +2359,15 @@ class GeoSearchDebugInfo(proto.Message): ) class QueryExpansionInfo(proto.Message): - r"""Information describing query expansion including whether - expansion has occurred. + r"""Information describing query expansion including whether expansion + has occurred. Attributes: expanded_query (bool): - Bool describing whether query expansion has - occurred. + Bool describing whether query expansion has occurred. pinned_result_count (int): - Number of pinned results. This field will only - be set when expansion happens and + Number of pinned results. This field will only be set + when expansion happens and `SearchRequest.QueryExpansionSpec.pin_unexpanded_results `__ is set to true. @@ -2459,34 +2383,31 @@ class QueryExpansionInfo(proto.Message): ) class NaturalLanguageQueryUnderstandingInfo(proto.Message): - r"""Information describing what natural language understanding - was done on the input query. + r"""Information describing what natural language understanding was + done on the input query. Attributes: extracted_filters (str): - The filters that were extracted from the - input query. + The filters that were extracted from the input query. rewritten_query (str): - Rewritten input query minus the extracted - filters. + Rewritten input query minus the extracted filters. structured_extracted_filter (google.cloud.discoveryengine_v1alpha.types.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter): - The filters that were extracted from the - input query represented in a structured form. + The filters that were extracted from the input query + represented in a structured form. """ class StructuredExtractedFilter(proto.Message): - r"""The filters that were extracted from the input query - represented in a structured form. + r"""The filters that were extracted from the input query represented in a + structured form. Attributes: expression (google.cloud.discoveryengine_v1alpha.types.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression): - The expression denoting the filter that was - extracted from the input query in a structured - form. It can be a simple expression denoting a - single string, numerical or geolocation - constraint or a compound expression which is a - combination of multiple expressions connected - using logical (OR and AND) operators. + The expression denoting the filter that was extracted + from the input query in a structured form. It can be a + simple expression denoting a single string, numerical or + geolocation constraint or a compound expression which is + a combination of multiple expressions connected using + logical (OR and AND) operators. """ class StringConstraint(proto.Message): @@ -2494,15 +2415,14 @@ class StringConstraint(proto.Message): Attributes: field_name (str): - Name of the string field as defined in the - schema. + Name of the string field as defined in the schema. values (MutableSequence[str]): - Values of the string field. The record will - only be returned if the field value matches one - of the values specified here. + Values of the string field. The record will only be + returned if the field value matches one of the values + specified here. query_segment (str): - Identifies the keywords within the search - query that match a filter. + Identifies the keywords within the search query that + match a filter. """ field_name: str = proto.Field( @@ -2519,23 +2439,19 @@ class StringConstraint(proto.Message): ) class NumberConstraint(proto.Message): - r"""Constraint expression of a number field. Example: price < - 100. + r"""Constraint expression of a number field. Example: price < 100. Attributes: field_name (str): - Name of the numerical field as defined in the - schema. + Name of the numerical field as defined in the schema. comparison (google.cloud.discoveryengine_v1alpha.types.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.NumberConstraint.Comparison): - The comparison operation performed between - the field value and the value specified in the - constraint. + The comparison operation performed between the field + value and the value specified in the constraint. value (float): - The value specified in the numerical - constraint. + The value specified in the numerical constraint. query_segment (str): - Identifies the keywords within the search - query that match a filter. + Identifies the keywords within the search query that + match a filter. """ class Comparison(proto.Enum): @@ -2587,23 +2503,23 @@ class GeolocationConstraint(proto.Message): Attributes: field_name (str): - The name of the geolocation field as defined - in the schema. + The name of the geolocation field as defined in the + schema. address (str): - The reference address that was inferred from - the input query. The proximity of the reference - address to the geolocation field will be used to - filter the results. + The reference address that was inferred from the + input query. The proximity of the reference address to + the geolocation field will be used to filter the + results. latitude (float): - The latitude of the geolocation inferred from - the input query. + The latitude of the geolocation inferred from the + input query. longitude (float): - The longitude of the geolocation inferred - from the input query. + The longitude of the geolocation inferred from the + input query. radius_in_meters (float): - The radius in meters around the address. The - record is returned if the location of the - geolocation field is within the radius. + The radius in meters around the address. The record + is returned if the location of the geolocation field is + within the radius. """ field_name: str = proto.Field( @@ -2660,8 +2576,8 @@ class OrExpression(proto.Message): ) class Expression(proto.Message): - r"""The expression denoting the filter that was extracted from - the input query. + r"""The expression denoting the filter that was extracted from the input + query. This message has `oneof`_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. @@ -2684,13 +2600,13 @@ class Expression(proto.Message): This field is a member of `oneof`_ ``expr``. and_expr (google.cloud.discoveryengine_v1alpha.types.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.AndExpression): - Logical "And" compound operator connecting - multiple expressions. + Logical "And" compound operator connecting multiple + expressions. This field is a member of `oneof`_ ``expr``. or_expr (google.cloud.discoveryengine_v1alpha.types.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.OrExpression): - Logical "Or" compound operator connecting - multiple expressions. + Logical "Or" compound operator connecting multiple + expressions. This field is a member of `oneof`_ ``expr``. """ @@ -2755,17 +2671,16 @@ class SessionInfo(proto.Message): If the auto-session mode is used (when `SearchRequest.session `__ - ends with "-"), this field holds the newly - generated session name. + ends with "-"), this field holds the newly generated + session name. query_id (str): - Query ID that corresponds to this search API - call. One session can have multiple turns, each - with a unique query ID. - - By specifying the session name and this query ID - in the Answer API call, the answer generation - happens in the context of the search results - from this search call. + Query ID that corresponds to this search API call. + One session can have multiple turns, each with a unique + query ID. + + By specifying the session name and this query ID in the + Answer API call, the answer generation happens in the + context of the search results from this search call. """ name: str = proto.Field( @@ -2778,8 +2693,8 @@ class SessionInfo(proto.Message): ) class OneBoxResult(proto.Message): - r"""OneBoxResult is a holder for all results of specific type - that we want to display in UI differently. + r"""OneBoxResult is a holder for all results of specific type that we + want to display in UI differently. Attributes: one_box_type (google.cloud.discoveryengine_v1alpha.types.SearchResponse.OneBoxResult.OneBoxType): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/search_tuning_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/search_tuning_service.py index 7beafc9fe1a5..8b714149781a 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/search_tuning_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/search_tuning_service.py @@ -46,11 +46,11 @@ class ListCustomModelsRequest(proto.Message): Attributes: data_store (str): - Required. The resource name of the parent Data - Store, such as + Required. The resource name of the parent Data Store, + such as ``projects/*/locations/global/collections/default_collection/dataStores/default_data_store``. - This field is used to identify the data store - where to fetch the models from. + This field is used to identify the data store where to + fetch the models from. """ data_store: str = proto.Field( @@ -94,19 +94,18 @@ class TrainCustomModelRequest(proto.Message): This field is a member of `oneof`_ ``training_input``. data_store (str): - Required. The resource name of the Data Store, - such as + Required. The resource name of the Data Store, such as ``projects/*/locations/global/collections/default_collection/dataStores/default_data_store``. - This field is used to identify the data store - where to train the models. + This field is used to identify the data store where to + train the models. model_type (str): Model to be trained. Supported values are: - * **search-tuning**: Fine tuning the search - system based on data provided. + * **search-tuning**: Fine tuning the search system based + on data provided. error_config (google.cloud.discoveryengine_v1alpha.types.ImportErrorConfig): - The desired location of errors incurred - during the data ingestion and training. + The desired location of errors incurred during the + data ingestion and training. model_id (str): If not provided, a UUID will be generated. """ @@ -116,45 +115,42 @@ class GcsTrainingInput(proto.Message): Attributes: corpus_data_path (str): - The Cloud Storage corpus data which could be - associated in train data. The data path format - is ``gs:///``. - A newline delimited jsonl/ndjson file. + The Cloud Storage corpus data which could be associated + in train data. The data path format is + ``gs:///``. A newline + delimited jsonl/ndjson file. - For search-tuning model, each line should have - the _id, title and text. Example: + For search-tuning model, each line should have the _id, + title and text. Example: ``{"_id": "doc1", title: "relevant doc", "text": "relevant text"}`` query_data_path (str): - The gcs query data which could be associated in - train data. The data path format is - ``gs:///``. A - newline delimited jsonl/ndjson file. - - For search-tuning model, each line should have - the _id and text. Example: {"_id": "query1", - "text": "example query"} + The gcs query data which could be associated in train + data. The data path format is + ``gs:///``. A newline + delimited jsonl/ndjson file. + + For search-tuning model, each line should have the _id + and text. Example: {"_id": "query1", "text": "example + query"} train_data_path (str): - Cloud Storage training data path whose format - should be - ``gs:///``. The - file should be in tsv format. Each line should - have the doc_id and query_id and score (number). - - For search-tuning model, it should have the - query-id corpus-id score as tsv file header. The - score should be a number in ``[0, inf+)``. The - larger the number is, the more relevant the pair - is. Example: + Cloud Storage training data path whose format should be + ``gs:///``. The file + should be in tsv format. Each line should have the + doc_id and query_id and score (number). + + For search-tuning model, it should have the query-id + corpus-id score as tsv file header. The score should be + a number in ``[0, inf+)``. The larger the number is, the + more relevant the pair is. Example: * ``query-id\tcorpus-id\tscore`` * ``query1\tdoc1\t1`` test_data_path (str): - Cloud Storage test data. Same format as - train_data_path. If not provided, a random 80/20 - train/test split will be performed on - train_data_path. + Cloud Storage test data. Same format as train_data_path. + If not provided, a random 80/20 train/test split will be + performed on train_data_path. """ corpus_data_path: str = proto.Field( @@ -202,39 +198,35 @@ class GcsTrainingInput(proto.Message): class TrainCustomModelResponse(proto.Message): r"""Response of the `TrainCustomModelRequest - `__. - This message is returned by the - google.longrunning.Operations.response field. + `__. This + message is returned by the google.longrunning.Operations.response field. Attributes: error_samples (MutableSequence[google.rpc.status_pb2.Status]): - A sample of errors encountered while - processing the data. + A sample of errors encountered while processing the + data. error_config (google.cloud.discoveryengine_v1alpha.types.ImportErrorConfig): - Echoes the destination for the complete - errors in the request if set. + Echoes the destination for the complete errors in the + request if set. model_status (str): The trained model status. Possible values are: - * **bad-data**: The training data quality is - bad. + * **bad-data**: The training data quality is bad. - * **no-improvement**: Tuning didn't improve - performance. Won't deploy. * **in-progress**: - Model training job creation is in progress. + * **no-improvement**: Tuning didn't improve performance. + Won't deploy. * **in-progress**: Model training job + creation is in progress. * **training**: Model is actively training. - * **evaluating**: The model is evaluating - trained metrics. + * **evaluating**: The model is evaluating trained + metrics. - * **indexing**: The model trained metrics are - indexing. * **ready**: The model is ready for - serving. + * **indexing**: The model trained metrics are indexing. + * **ready**: The model is ready for serving. metrics (MutableMapping[str, float]): The metrics of the trained model. model_name (str): - Fully qualified name of the - CustomTuningModel. + Fully qualified name of the CustomTuningModel. """ error_samples: MutableSequence[status_pb2.Status] = proto.RepeatedField( @@ -263,16 +255,15 @@ class TrainCustomModelResponse(proto.Message): class TrainCustomModelMetadata(proto.Message): - r"""Metadata related to the progress of the TrainCustomModel - operation. This is returned by the - google.longrunning.Operation.metadata field. + r"""Metadata related to the progress of the TrainCustomModel operation. + This is returned by the google.longrunning.Operation.metadata field. Attributes: create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/serving_config.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/serving_config.py index 71a4991120f2..2d7751d77398 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/serving_config.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/serving_config.py @@ -31,9 +31,9 @@ class ServingConfig(proto.Message): - r"""Configures metadata that is used to generate serving time - results (e.g. search results or recommendation predictions). The - ServingConfig is passed in the search and predict request and + r"""Configures metadata that is used to generate serving time results + (e.g. search results or recommendation predictions). + The ServingConfig is passed in the search and predict request and generates results. This message has `oneof`_ fields (mutually exclusive fields). @@ -49,30 +49,27 @@ class ServingConfig(proto.Message): This field is a member of `oneof`_ ``vertical_config``. generic_config (google.cloud.discoveryengine_v1alpha.types.ServingConfig.GenericConfig): - The GenericConfig of the serving - configuration. + The GenericConfig of the serving configuration. This field is a member of `oneof`_ ``vertical_config``. name (str): Immutable. Fully qualified name ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}`` display_name (str): - Required. The human readable serving config - display name. Used in Discovery UI. + Required. The human readable serving config display + name. Used in Discovery UI. - This field must be a UTF-8 encoded string with a - length limit of 128 characters. Otherwise, an - INVALID_ARGUMENT error is returned. + This field must be a UTF-8 encoded string with a length + limit of 128 characters. Otherwise, an INVALID_ARGUMENT + error is returned. solution_type (google.cloud.discoveryengine_v1alpha.types.SolutionType): - Required. Immutable. Specifies the solution - type that a serving config can be associated - with. + Required. Immutable. Specifies the solution type that + a serving config can be associated with. model_id (str): The id of the model to use at serving time. - Currently only RecommendationModels are - supported. Can be changed but only to a - compatible model (e.g. others-you-may-like CTR - to others-you-may-like CVR). + Currently only RecommendationModels are supported. + Can be changed but only to a compatible model (e.g. + others-you-may-like CTR to others-you-may-like CVR). Required when `SolutionType @@ -80,9 +77,9 @@ class ServingConfig(proto.Message): is `SOLUTION_TYPE_RECOMMENDATION `__. diversity_level (str): - How much diversity to use in recommendation - model results e.g. ``medium-diversity`` or - ``high-diversity``. Currently supported values: + How much diversity to use in recommendation model + results e.g. ``medium-diversity`` or ``high-diversity``. + Currently supported values: * ``no-diversity`` * ``low-diversity`` @@ -102,35 +99,33 @@ class ServingConfig(proto.Message): is `SOLUTION_TYPE_RECOMMENDATION `__. embedding_config (google.cloud.discoveryengine_v1alpha.types.EmbeddingConfig): - Bring your own embedding config. The config is - used for search semantic retrieval. The - retrieval is based on the dot product of + Bring your own embedding config. The config is used for + search semantic retrieval. The retrieval is based on the + dot product of `SearchRequest.EmbeddingSpec.EmbeddingVector.vector `__ - and the document embeddings that are provided by - this EmbeddingConfig. If + and the document embeddings that are provided by this + EmbeddingConfig. If `SearchRequest.EmbeddingSpec.EmbeddingVector.vector `__ is provided, it overrides this `ServingConfig.embedding_config `__. ranking_expression (str): - The ranking expression controls the customized - ranking on retrieval documents. To leverage - this, document embedding is required. The - ranking expression setting in ServingConfig - applies to all search requests served by the - serving config. However, if + The ranking expression controls the customized ranking + on retrieval documents. To leverage this, document + embedding is required. The ranking expression setting in + ServingConfig applies to all search requests served by + the serving config. However, if `SearchRequest.ranking_expression `__ - is specified, it overrides the ServingConfig - ranking expression. + is specified, it overrides the ServingConfig ranking + expression. - The ranking expression is a single function or - multiple functions that are joined by "+". + The ranking expression is a single function or multiple + functions that are joined by "+". - * ranking_expression = function, { " + ", - function }; + * ranking_expression = function, { " + ", function }; Supported functions: @@ -139,24 +134,20 @@ class ServingConfig(proto.Message): Function variables: - * ``relevance_score``: pre-defined keywords, - used for measure relevance between query and - document. + * ``relevance_score``: pre-defined keywords, used for + measure relevance between query and document. - * ``embedding_field_path``: the document - embedding field used with query embedding - vector. + * ``embedding_field_path``: the document embedding field + used with query embedding vector. * ``dotProduct``: embedding function between - embedding_field_path and query embedding - vector. + embedding_field_path and query embedding vector. Example ranking expression: - If document has an embedding field - doc_embedding, the ranking expression could - be ``0.5 * relevance_score + 0.3 * - dotProduct(doc_embedding)``. + If document has an embedding field doc_embedding, the + ranking expression could be ``0.5 * relevance_score + + 0.3 * dotProduct(doc_embedding)``. guided_search_spec (google.cloud.discoveryengine_v1alpha.types.GuidedSearchSpec): Guided search configs. custom_fine_tuning_spec (google.cloud.discoveryengine_v1alpha.types.CustomFineTuningSpec): @@ -164,8 +155,8 @@ class ServingConfig(proto.Message): If `SearchRequest.custom_fine_tuning_spec `__ - is set, it has higher priority than the configs - set here. + is set, it has higher priority than the configs set + here. create_time (google.protobuf.timestamp_pb2.Timestamp): Output only. ServingConfig created timestamp. update_time (google.protobuf.timestamp_pb2.Timestamp): @@ -173,20 +164,17 @@ class ServingConfig(proto.Message): filter_control_ids (MutableSequence[str]): Filter controls to use in serving path. All triggered filter controls will be applied. - Filter controls must be in the same data store - as the serving config. Maximum of 20 filter - controls. + Filter controls must be in the same data store as the + serving config. Maximum of 20 filter controls. boost_control_ids (MutableSequence[str]): Boost controls to use in serving path. All triggered boost controls will be applied. - Boost controls must be in the same data store as - the serving config. Maximum of 20 boost - controls. + Boost controls must be in the same data store as the + serving config. Maximum of 20 boost controls. redirect_control_ids (MutableSequence[str]): - IDs of the redirect controls. Only the first - triggered redirect action is applied, even if - multiple apply. Maximum number of specifications - is 100. + IDs of the redirect controls. Only the first triggered + redirect action is applied, even if multiple apply. + Maximum number of specifications is 100. Can only be set if `SolutionType @@ -194,10 +182,10 @@ class ServingConfig(proto.Message): is `SOLUTION_TYPE_SEARCH `__. synonyms_control_ids (MutableSequence[str]): - Condition synonyms specifications. If multiple - synonyms conditions match, all matching synonyms - controls in the list will execute. Maximum - number of specifications is 100. + Condition synonyms specifications. If multiple synonyms + conditions match, all matching synonyms controls in the + list will execute. Maximum number of specifications is + 100. Can only be set if `SolutionType @@ -205,11 +193,10 @@ class ServingConfig(proto.Message): is `SOLUTION_TYPE_SEARCH `__. oneway_synonyms_control_ids (MutableSequence[str]): - Condition oneway synonyms specifications. If - multiple oneway synonyms conditions match, all - matching oneway synonyms controls in the list - will execute. Maximum number of specifications - is 100. + Condition oneway synonyms specifications. If multiple + oneway synonyms conditions match, all matching oneway + synonyms controls in the list will execute. Maximum + number of specifications is 100. Can only be set if `SolutionType @@ -217,10 +204,9 @@ class ServingConfig(proto.Message): is `SOLUTION_TYPE_SEARCH `__. dissociate_control_ids (MutableSequence[str]): - Condition do not associate specifications. If - multiple do not associate conditions match, all - matching do not associate controls in the list - will execute. + Condition do not associate specifications. If multiple + do not associate conditions match, all matching do not + associate controls in the list will execute. Order does not matter. Maximum number of specifications is 100. @@ -232,9 +218,8 @@ class ServingConfig(proto.Message): replacement_control_ids (MutableSequence[str]): Condition replacement specifications. Applied according to the order in the list. - A previously replaced term can not be - re-replaced. Maximum number of specifications is - 100. + A previously replaced term can not be re-replaced. + Maximum number of specifications is 100. Can only be set if `SolutionType @@ -242,31 +227,29 @@ class ServingConfig(proto.Message): is `SOLUTION_TYPE_SEARCH `__. ignore_control_ids (MutableSequence[str]): - Condition ignore specifications. If multiple - ignore conditions match, all matching ignore - controls in the list will execute. + Condition ignore specifications. If multiple ignore + conditions match, all matching ignore controls in the + list will execute. Order does not matter. Maximum number of specifications is 100. """ class MediaConfig(proto.Message): - r"""Specifies the configurations needed for Media Discovery. - Currently we support: - - * ``demote_content_watched``: Threshold for watched content - demotion. Customers can specify if using watched content - demotion or use viewed detail page. Using the content watched - demotion, customers need to specify the watched minutes or - percentage exceeds the threshold, the content will be demoted in - the recommendation result. - - * ``promote_fresh_content``: cutoff days for fresh content - promotion. Customers can specify if using content freshness - promotion. If the content was published within the cutoff days, - the content will be promoted in the recommendation result. + r"""Specifies the configurations needed for Media Discovery. Currently we + support: + + * ``demote_content_watched``: Threshold for watched content demotion. + Customers can specify if using watched content demotion or use viewed + detail page. Using the content watched demotion, customers need to + specify the watched minutes or percentage exceeds the threshold, the + content will be demoted in the recommendation result. + + * ``promote_fresh_content``: cutoff days for fresh content promotion. + Customers can specify if using content freshness promotion. If the + content was published within the cutoff days, the content will be + promoted in the recommendation result. Can only be set if - `SolutionType - `__ is + `SolutionType `__ is `SOLUTION_TYPE_RECOMMENDATION `__. @@ -279,36 +262,34 @@ class MediaConfig(proto.Message): Attributes: content_watched_percentage_threshold (float): - Specifies the content watched percentage - threshold for demotion. Threshold value must be - between [0, 1.0] inclusive. + Specifies the content watched percentage threshold for + demotion. Threshold value must be between [0, 1.0] + inclusive. This field is a member of `oneof`_ ``demote_content_watched``. content_watched_seconds_threshold (float): - Specifies the content watched minutes - threshold for demotion. + Specifies the content watched minutes threshold for + demotion. This field is a member of `oneof`_ ``demote_content_watched``. demotion_event_type (str): Specifies the event type used for demoting - recommendation result. Currently supported - values: + recommendation result. Currently supported values: * ``view-item``: Item viewed. - * ``media-play``: Start/resume watching a video, - playing a song, etc. + * ``media-play``: Start/resume watching a video, playing + a song, etc. - * ``media-complete``: Finished or stopped midway - through a video, song, etc. + * ``media-complete``: Finished or stopped midway through + a video, song, etc. - If unset, watch history demotion will not be - applied. Content freshness demotion will still - be applied. + If unset, watch history demotion will not be applied. + Content freshness demotion will still be applied. content_freshness_cutoff_days (int): Specifies the content freshness used for - recommendation result. Contents will be demoted - if contents were published for more than content - freshness cutoff days. + recommendation result. Contents will be demoted if + contents were published for more than content freshness + cutoff days. """ content_watched_percentage_threshold: float = proto.Field( @@ -331,17 +312,15 @@ class MediaConfig(proto.Message): ) class GenericConfig(proto.Message): - r"""Specifies the configurations needed for Generic - Discovery.Currently we support: + r"""Specifies the configurations needed for Generic Discovery.Currently we + support: - * ``content_search_spec``: configuration for generic content - search. + * ``content_search_spec``: configuration for generic content search. Attributes: content_search_spec (google.cloud.discoveryengine_v1alpha.types.SearchRequest.ContentSearchSpec): - Specifies the expected behavior of content - search. Only valid for content-search enabled - data store. + Specifies the expected behavior of content search. + Only valid for content-search enabled data store. """ content_search_spec: search_service.SearchRequest.ContentSearchSpec = ( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/serving_config_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/serving_config_service.py index 2c08ed12b5f7..229e2ae8c9e3 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/serving_config_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/serving_config_service.py @@ -70,8 +70,8 @@ class GetServingConfigRequest(proto.Message): Attributes: name (str): - Required. The resource name of the ServingConfig - to get. Format: + Required. The resource name of the ServingConfig to get. + Format: ``projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config_id}`` """ @@ -86,18 +86,17 @@ class ListServingConfigsRequest(proto.Message): Attributes: parent (str): - Required. Full resource name of the parent - resource. Format: + Required. Full resource name of the parent resource. + Format: ``projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}`` page_size (int): - Optional. Maximum number of results to - return. If unspecified, defaults to 100. If a - value greater than 100 is provided, at most 100 - results are returned. + Optional. Maximum number of results to return. If + unspecified, defaults to 100. If a value greater than + 100 is provided, at most 100 results are returned. page_token (str): Optional. A page token, received from a previous - ``ListServingConfigs`` call. Provide this to - retrieve the subsequent page. + ``ListServingConfigs`` call. Provide this to retrieve + the subsequent page. """ parent: str = proto.Field( @@ -121,8 +120,8 @@ class ListServingConfigsResponse(proto.Message): serving_configs (MutableSequence[google.cloud.discoveryengine_v1alpha.types.ServingConfig]): All the ServingConfigs for a given dataStore. next_page_token (str): - Pagination token, if not returned indicates - the last page. + Pagination token, if not returned indicates the last + page. """ @property diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/session.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/session.py index dfc3b3ae5a2d..6453ae7524af 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/session.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/session.py @@ -76,9 +76,9 @@ class Session(proto.Message): display_name (str): Optional. The display name of the session. - This field is used to identify the session in - the UI. By default, the display name is the - first turn query text in the session. + This field is used to identify the session in the UI. By + default, the display name is the first turn query text + in the session. state (google.cloud.discoveryengine_v1alpha.types.Session.State): The state of the session. user_pseudo_id (str): @@ -90,9 +90,9 @@ class Session(proto.Message): end_time (google.protobuf.timestamp_pb2.Timestamp): Output only. The time the session finished. is_pinned (bool): - Optional. Whether the session is pinned, - pinned session will be displayed on the top of - the session list. + Optional. Whether the session is pinned, pinned + session will be displayed on the top of the session + list. """ class State(proto.Enum): @@ -113,14 +113,13 @@ class Turn(proto.Message): Attributes: query (google.cloud.discoveryengine_v1alpha.types.Query): - Optional. The user query. May not be set if - this turn is merely regenerating an answer to a - different turn + Optional. The user query. May not be set if this turn + is merely regenerating an answer to a different turn answer (str): - Optional. The resource name of the answer to - the user query. - Only set if the answer generation (/answer API - call) happened in this turn. + Optional. The resource name of the answer to the user + query. + Only set if the answer generation (/answer API call) + happened in this turn. detailed_answer (google.cloud.discoveryengine_v1alpha.types.Answer): Output only. In `ConversationalSearchService.GetSession @@ -128,14 +127,14 @@ class Turn(proto.Message): API, if `GetSessionRequest.include_answer_details `__ - is set to true, this field will be populated - when getting answer query session. + is set to true, this field will be populated when + getting answer query session. query_config (MutableMapping[str, str]): - Optional. Represents metadata related to the - query config, for example LLM model and version - used, model parameters (temperature, grounding - parameters, etc.). The prefix "google." is - reserved for Google-developed functionality. + Optional. Represents metadata related to the query + config, for example LLM model and version used, model + parameters (temperature, grounding parameters, etc.). + The prefix "google." is reserved for Google-developed + functionality. """ query: "Query" = proto.Field( @@ -230,16 +229,15 @@ class ImageCharacteristics(proto.Message): height (int): Output only. Image height in pixels. color_space (google.cloud.discoveryengine_v1alpha.types.ImageCharacteristics.ColorSpace): - Output only. Color space of the image (e.g., - "RGB", "CMYK", "Grayscale"). + Output only. Color space of the image (e.g., "RGB", + "CMYK", "Grayscale"). bit_depth (int): - Output only. Bit depth of the image (e.g., - 8-bit, 16-bit). + Output only. Bit depth of the image (e.g., 8-bit, + 16-bit). """ class ColorSpace(proto.Enum): - r"""Possible color spaces of an image (e.g., "RGB", "CMYK", - "Grayscale"). + r"""Possible color spaces of an image (e.g., "RGB", "CMYK", "Grayscale"). Values: COLOR_SPACE_UNSPECIFIED (0): @@ -354,9 +352,8 @@ class FileCharacteristics(proto.Message): class FileView(proto.Message): - r"""Represents a specific alternate version or "view" of a file - object, such as a summary, a thumbnail, a translated version, - etc. + r"""Represents a specific alternate version or "view" of a file object, + such as a summary, a thumbnail, a translated version, etc. This message has `oneof`_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. @@ -367,26 +364,22 @@ class FileView(proto.Message): Attributes: image_characteristics (google.cloud.discoveryengine_v1alpha.types.ImageCharacteristics): - Output only. Characteristics of an image - media view. + Output only. Characteristics of an image media view. This field is a member of `oneof`_ ``characteristics``. video_characteristics (google.cloud.discoveryengine_v1alpha.types.VideoCharacteristics): - Output only. Characteristics of a video media - view. + Output only. Characteristics of a video media view. This field is a member of `oneof`_ ``characteristics``. file_characteristics (google.cloud.discoveryengine_v1alpha.types.FileCharacteristics): - Output only. Characteristics of other file - types. + Output only. Characteristics of other file types. This field is a member of `oneof`_ ``characteristics``. view_id (str): - Output only. Globally Unique id for this - specific view. - uri (str): - Output only. The URI to access this media + Output only. Globally Unique id for this specific view. + uri (str): + Output only. The URI to access this media view. mime_type (str): Output only. MIME type (e.g., "image/jpeg", "image/png", "text/plain", "video/mp4") @@ -449,58 +442,53 @@ class FileMetadata(proto.Message): The content type of the file, see https://www.iana.org/assignments/media-types/media-types.xhtml. byte_size (int): - Output only. The size of the context file in - bytes. + Output only. The size of the context file in bytes. original_uri (str): - Optional. The original location of the file. - It may be a local file path, or any other URI - that allows accessing the file in an external - system. There are two scenarios in which this - url may be empty: - - 1. If the file was sent as inline data (e.g. - pasted from the clipboard). + Optional. The original location of the file. It may + be a local file path, or any other URI that allows + accessing the file in an external system. There are two + scenarios in which this url may be empty: + + 1. If the file was sent as inline data (e.g. pasted from + the clipboard). 2. If the original location is not available. - Note that there's no guarantee that the URI will - be pointing to a valid or actually existing - file. For example, a file might have been - uploaded to the session, and then deleted from - the original source. + Note that there's no guarantee that the URI will be + pointing to a valid or actually existing file. For + example, a file might have been uploaded to the session, + and then deleted from the original source. original_source_type (google.cloud.discoveryengine_v1alpha.types.FileSource): - Optional. The type of the original source of - the file. + Optional. The type of the original source of the + file. upload_time (google.protobuf.timestamp_pb2.Timestamp): - Output only. The time the file was uploaded - (If this is a file generated by an internal - process and then made available to the session, - this indicates the moment it happened). + Output only. The time the file was uploaded (If this + is a file generated by an internal process and then made + available to the session, this indicates the moment it + happened). last_add_time (google.protobuf.timestamp_pb2.Timestamp): - Output only. The time the file was added to - the session. Note that if a file was added, then - modified externally, then added again, the add - time will be updated. + Output only. The time the file was added to the + session. Note that if a file was added, then modified + externally, then added again, the add time will be + updated. metadata (MutableMapping[str, str]): - Optional. Represents metadata related to the - file that can suit particular use cases. The - prefix "google." is reserved for the key for use - by Google, but other prefixes can be freely - used. + Optional. Represents metadata related to the file + that can suit particular use cases. The prefix "google." + is reserved for the key for use by Google, but other + prefixes can be freely used. download_uri (str): Output only. The `AssistantService.DownloadSessionFile `__ - URL to download the file. This URL will need the - same credentials as - `AssistantService.ListSessionFileMetadata + URL to download the file. This URL will need the same + credentials as `AssistantService.ListSessionFileMetadata `__ method and will provide the resource. file_origin_type (google.cloud.discoveryengine_v1alpha.types.FileOriginType): Optional. The origin of the file. views (MutableMapping[str, google.cloud.discoveryengine_v1alpha.types.FileView]): - Output only. Alternate views of this file - object. Each file view is attached to a specific - role. Possible example keys: + Output only. Alternate views of this file object. Each + file view is attached to a specific role. Possible + example keys: - "thumbnail" - "mobile_thumbnail" diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/session_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/session_service.py index 2e2285805418..0f3ebe450546 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/session_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/session_service.py @@ -42,14 +42,12 @@ class ListFilesRequest(proto.Message): Format: ``projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}`` - Name of the session resource to which the file - belong. + Name of the session resource to which the file belong. filter (str): - Optional. The filter syntax consists of an - expression language for constructing a predicate - from one or more fields of the files being - filtered. Filter expression is case-sensitive. - Currently supported field names are: + Optional. The filter syntax consists of an expression + language for constructing a predicate from one or more + fields of the files being filtered. Filter expression is + case-sensitive. Currently supported field names are: * upload_time * last_add_time @@ -62,30 +60,28 @@ class ListFilesRequest(proto.Message): Some examples of filters would be: * "file_name = 'file_1'" - * "file_name = 'file_1' AND mime_type = - 'text/plain'" + * "file_name = 'file_1' AND mime_type = 'text/plain'" * "last_use_time > '2025-06-14T12:00:00Z'" - For a full description of the filter format, - please see https://google.aip.dev/160. + For a full description of the filter format, please see + https://google.aip.dev/160. page_size (int): - Optional. The maximum number of files to return. - The service may return fewer than this value. If - unspecified, at most 100 files will be returned. - The maximum value is 1000; values above 1000 - will be coerced to 1000. If user specifies a - value less than or equal to 0 - the request will - be rejected with an INVALID_ARGUMENT error. + Optional. The maximum number of files to return. The + service may return fewer than this value. If + unspecified, at most 100 files will be returned. The + maximum value is 1000; values above 1000 will be coerced + to 1000. If user specifies a value less than or equal to + 0 - the request will be rejected with an + INVALID_ARGUMENT error. page_token (str): Optional. A page token received from a previous ``ListFiles`` call. Provide this to retrieve the subsequent page. - When paginating, all other parameters provided - to ``ListFiles`` must match the call that - provided the page token (except ``page_size``, - which may differ). + When paginating, all other parameters provided to + ``ListFiles`` must match the call that provided the page + token (except ``page_size``, which may differ). """ parent: str = proto.Field( @@ -121,8 +117,8 @@ class ListFilesResponse(proto.Message): Pass this value in the `ListFilesRequest.page_token `__ - field in the subsequent call to ``ListFiles`` - method to retrieve the next page of results. + field in the subsequent call to ``ListFiles`` method to + retrieve the next page of results. """ @property diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/site_search_engine.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/site_search_engine.py index 8c459a291b31..a2183ab2311d 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/site_search_engine.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/site_search_engine.py @@ -31,14 +31,13 @@ class SiteSearchEngine(proto.Message): - r"""SiteSearchEngine captures DataStore level site search - persisting configurations. It is a singleton value per data - store. + r"""SiteSearchEngine captures DataStore level site search persisting + configurations. It is a singleton value per data store. Attributes: name (str): - The fully qualified resource name of the site - search engine. Format: + The fully qualified resource name of the site search + engine. Format: ``projects/*/locations/*/dataStores/*/siteSearchEngine`` """ @@ -53,42 +52,37 @@ class TargetSite(proto.Message): Attributes: name (str): - Output only. The fully qualified resource name - of the target site. + Output only. The fully qualified resource name of the + target site. ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}`` The ``target_site_id`` is system-generated. provided_uri_pattern (str): - Required. Input only. The user provided URI - pattern from which the ``generated_uri_pattern`` - is generated. + Required. Input only. The user provided URI pattern from + which the ``generated_uri_pattern`` is generated. type_ (google.cloud.discoveryengine_v1alpha.types.TargetSite.Type): - The type of the target site, e.g., whether - the site is to be included or excluded. + The type of the target site, e.g., whether the site + is to be included or excluded. exact_match (bool): - Input only. If set to false, a uri_pattern is - generated to include all pages whose address - contains the provided_uri_pattern. If set to - true, an uri_pattern is generated to try to be - an exact match of the provided_uri_pattern or - just the specific page if the + Input only. If set to false, a uri_pattern is generated + to include all pages whose address contains the + provided_uri_pattern. If set to true, an uri_pattern is + generated to try to be an exact match of the + provided_uri_pattern or just the specific page if the provided_uri_pattern is a specific one. - provided_uri_pattern is always normalized to - generate the URI pattern to be used by the - search engine. + provided_uri_pattern is always normalized to generate + the URI pattern to be used by the search engine. generated_uri_pattern (str): - Output only. This is system-generated based on - the provided_uri_pattern. - root_domain_uri (str): - Output only. Root domain of the + Output only. This is system-generated based on the provided_uri_pattern. + root_domain_uri (str): + Output only. Root domain of the provided_uri_pattern. site_verification_info (google.cloud.discoveryengine_v1alpha.types.SiteVerificationInfo): - Output only. Site ownership and validity - verification status. + Output only. Site ownership and validity verification + status. indexing_status (google.cloud.discoveryengine_v1alpha.types.TargetSite.IndexingStatus): Output only. Indexing status. update_time (google.protobuf.timestamp_pb2.Timestamp): - Output only. The target site's last updated - time. + Output only. The target site's last updated time. failure_reason (google.cloud.discoveryengine_v1alpha.types.TargetSite.FailureReason): Output only. Failure reason. """ @@ -156,9 +150,8 @@ class QuotaFailure(proto.Message): Attributes: total_required_quota (int): - This number is an estimation on how much - total quota this project needs to successfully - complete indexing. + This number is an estimation on how much total quota + this project needs to successfully complete indexing. """ total_required_quota: int = proto.Field( @@ -221,13 +214,12 @@ class QuotaFailure(proto.Message): class SiteVerificationInfo(proto.Message): - r"""Verification information for target sites in advanced site - search. + r"""Verification information for target sites in advanced site search. Attributes: site_verification_state (google.cloud.discoveryengine_v1alpha.types.SiteVerificationInfo.SiteVerificationState): - Site verification state indicating the - ownership and validity. + Site verification state indicating the ownership and + validity. verify_time (google.protobuf.timestamp_pb2.Timestamp): Latest site verification time. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/site_search_engine_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/site_search_engine_service.py index c1778ba6cb1a..14fe55941666 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/site_search_engine_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/site_search_engine_service.py @@ -78,10 +78,9 @@ class GetSiteSearchEngineRequest(proto.Message): such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine``. - If the caller does not have permission to access - the [SiteSearchEngine], regardless of whether or - not it exists, a PERMISSION_DENIED error is - returned. + If the caller does not have permission to access the + [SiteSearchEngine], regardless of whether or not it + exists, a PERMISSION_DENIED error is returned. """ name: str = proto.Field( @@ -105,8 +104,8 @@ class CreateTargetSiteRequest(proto.Message): ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine``. target_site (google.cloud.discoveryengine_v1alpha.types.TargetSite): Required. The `TargetSite - `__ - to create. + `__ to + create. """ parent: str = proto.Field( @@ -131,8 +130,8 @@ class CreateTargetSiteMetadata(proto.Message): create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -155,16 +154,15 @@ class BatchCreateTargetSitesRequest(proto.Message): Attributes: parent (str): - Required. The parent resource shared by all - TargetSites being created. + Required. The parent resource shared by all TargetSites + being created. ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine``. - The parent field in the CreateBookRequest - messages must either be empty or match this - field. + The parent field in the CreateBookRequest messages must + either be empty or match this field. requests (MutableSequence[google.cloud.discoveryengine_v1alpha.types.CreateTargetSiteRequest]): Required. The request message specifying the - resources to create. A maximum of 20 TargetSites - can be created in a batch. + resources to create. A maximum of 20 TargetSites can be + created in a batch. """ parent: str = proto.Field( @@ -192,8 +190,8 @@ class GetTargetSiteRequest(proto.Message): such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}``. - If the caller does not have permission to access - the `TargetSite + If the caller does not have permission to access the + `TargetSite `__, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. @@ -219,16 +217,15 @@ class UpdateTargetSiteRequest(proto.Message): Attributes: target_site (google.cloud.discoveryengine_v1alpha.types.TargetSite): Required. The target site to update. - If the caller does not have permission to update - the `TargetSite + If the caller does not have permission to update the + `TargetSite `__, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the `TargetSite - `__ - to update does not exist, a NOT_FOUND error is - returned. + `__ to + update does not exist, a NOT_FOUND error is returned. """ target_site: gcd_site_search_engine.TargetSite = proto.Field( @@ -249,8 +246,8 @@ class UpdateTargetSiteMetadata(proto.Message): create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -279,8 +276,8 @@ class DeleteTargetSiteRequest(proto.Message): such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}``. - If the caller does not have permission to access - the `TargetSite + If the caller does not have permission to access the + `TargetSite `__, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. @@ -308,8 +305,8 @@ class DeleteTargetSiteMetadata(proto.Message): create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -332,33 +329,32 @@ class ListTargetSitesRequest(proto.Message): Attributes: parent (str): - Required. The parent site search engine resource - name, such as + Required. The parent site search engine resource name, + such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine``. If the caller does not have permission to list `TargetSite `__s - under this site search engine, regardless of - whether or not this branch exists, a - PERMISSION_DENIED error is returned. + under this site search engine, regardless of whether or + not this branch exists, a PERMISSION_DENIED error is + returned. page_size (int): - Requested page size. Server may return fewer - items than requested. If unspecified, server - will pick an appropriate default. The maximum - value is 1000; values above 1000 will be coerced - to 1000. - - If this field is negative, an INVALID_ARGUMENT - error is returned. + Requested page size. Server may return fewer items than + requested. If unspecified, server will pick an + appropriate default. The maximum value is 1000; values + above 1000 will be coerced to 1000. + + If this field is negative, an INVALID_ARGUMENT error is + returned. page_token (str): A page token, received from a previous - ``ListTargetSites`` call. Provide this to - retrieve the subsequent page. + ``ListTargetSites`` call. Provide this to retrieve the + subsequent page. - When paginating, all other parameters provided - to ``ListTargetSites`` must match the call that - provided the page token. + When paginating, all other parameters provided to + ``ListTargetSites`` must match the call that provided + the page token. """ parent: str = proto.Field( @@ -385,13 +381,12 @@ class ListTargetSitesResponse(proto.Message): target_sites (MutableSequence[google.cloud.discoveryengine_v1alpha.types.TargetSite]): List of TargetSites. next_page_token (str): - A token that can be sent as ``page_token`` to - retrieve the next page. If this field is - omitted, there are no subsequent pages. + A token that can be sent as ``page_token`` to retrieve + the next page. If this field is omitted, there are no + subsequent pages. total_size (int): - The total number of items matching the - request. This will always be populated in the - response. + The total number of items matching the request. + This will always be populated in the response. """ @property @@ -426,8 +421,8 @@ class BatchCreateTargetSiteMetadata(proto.Message): create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -503,8 +498,8 @@ class EnableAdvancedSiteSearchMetadata(proto.Message): create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -560,8 +555,8 @@ class DisableAdvancedSiteSearchMetadata(proto.Message): create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -590,12 +585,11 @@ class RecrawlUrisRequest(proto.Message): such as ``projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine``. uris (MutableSequence[str]): - Required. List of URIs to crawl. At most 10K - URIs are supported, otherwise an - INVALID_ARGUMENT error is thrown. Each URI - should match at least one `TargetSite - `__ - in ``site_search_engine``. + Required. List of URIs to crawl. At most 10K URIs are + supported, otherwise an INVALID_ARGUMENT error is + thrown. Each URI should match at least one `TargetSite + `__ in + ``site_search_engine``. """ site_search_engine: str = proto.Field( @@ -616,11 +610,9 @@ class RecrawlUrisResponse(proto.Message): Attributes: failure_samples (MutableSequence[google.cloud.discoveryengine_v1alpha.types.RecrawlUrisResponse.FailureInfo]): - Details for a sample of up to 10 - ``failed_uris``. + Details for a sample of up to 10 ``failed_uris``. failed_uris (MutableSequence[str]): - URIs that were not crawled before the LRO - terminated. + URIs that were not crawled before the LRO terminated. """ class FailureInfo(proto.Message): @@ -631,14 +623,13 @@ class FailureInfo(proto.Message): uri (str): URI that failed to be crawled. failure_reasons (MutableSequence[google.cloud.discoveryengine_v1alpha.types.RecrawlUrisResponse.FailureInfo.FailureReason]): - List of failure reasons by corpus type (e.g. - desktop, mobile). + List of failure reasons by corpus type (e.g. desktop, + mobile). """ class FailureReason(proto.Message): - r"""Details about why crawling failed for a particular - CorpusType, e.g., DESKTOP and MOBILE crawling may fail for - different reasons. + r"""Details about why crawling failed for a particular CorpusType, e.g., + DESKTOP and MOBILE crawling may fail for different reasons. Attributes: corpus_type (google.cloud.discoveryengine_v1alpha.types.RecrawlUrisResponse.FailureInfo.FailureReason.CorpusType): @@ -710,25 +701,23 @@ class RecrawlUrisMetadata(proto.Message): create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. invalid_uris (MutableSequence[str]): - Unique URIs in the request that don't match - any TargetSite in the DataStore, only match - TargetSites that haven't been fully indexed, or - match a TargetSite with type EXCLUDE. + Unique URIs in the request that don't match any + TargetSite in the DataStore, only match TargetSites that + haven't been fully indexed, or match a TargetSite with + type EXCLUDE. valid_uris_count (int): - Total number of unique URIs in the request that - are not in invalid_uris. + Total number of unique URIs in the request that are not + in invalid_uris. success_count (int): - Total number of URIs that have been crawled - so far. + Total number of URIs that have been crawled so far. pending_count (int): - Total number of URIs that have yet to be - crawled. + Total number of URIs that have yet to be crawled. quota_exceeded_count (int): - Total number of URIs that were rejected due - to insufficient indexing resources. + Total number of URIs that were rejected due to + insufficient indexing resources. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -771,8 +760,8 @@ class BatchVerifyTargetSitesRequest(proto.Message): Attributes: parent (str): - Required. The parent resource shared by all - TargetSites being verified. + Required. The parent resource shared by all TargetSites + being verified. ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine``. """ @@ -802,8 +791,8 @@ class BatchVerifyTargetSitesMetadata(proto.Message): create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -826,27 +815,25 @@ class FetchDomainVerificationStatusRequest(proto.Message): Attributes: site_search_engine (str): - Required. The site search engine resource under - which we fetch all the domain verification - status. + Required. The site search engine resource under which we + fetch all the domain verification status. ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine``. page_size (int): - Requested page size. Server may return fewer - items than requested. If unspecified, server - will pick an appropriate default. The maximum - value is 1000; values above 1000 will be coerced - to 1000. - - If this field is negative, an INVALID_ARGUMENT - error is returned. + Requested page size. Server may return fewer items than + requested. If unspecified, server will pick an + appropriate default. The maximum value is 1000; values + above 1000 will be coerced to 1000. + + If this field is negative, an INVALID_ARGUMENT error is + returned. page_token (str): A page token, received from a previous - ``FetchDomainVerificationStatus`` call. Provide - this to retrieve the subsequent page. + ``FetchDomainVerificationStatus`` call. Provide this to + retrieve the subsequent page. - When paginating, all other parameters provided - to ``FetchDomainVerificationStatus`` must match - the call that provided the page token. + When paginating, all other parameters provided to + ``FetchDomainVerificationStatus`` must match the call + that provided the page token. """ site_search_engine: str = proto.Field( @@ -871,16 +858,15 @@ class FetchDomainVerificationStatusResponse(proto.Message): Attributes: target_sites (MutableSequence[google.cloud.discoveryengine_v1alpha.types.TargetSite]): - List of TargetSites containing the site - verification status. + List of TargetSites containing the site verification + status. next_page_token (str): - A token that can be sent as ``page_token`` to - retrieve the next page. If this field is - omitted, there are no subsequent pages. + A token that can be sent as ``page_token`` to retrieve + the next page. If this field is omitted, there are no + subsequent pages. total_size (int): - The total number of items matching the - request. This will always be populated in the - response. + The total number of items matching the request. + This will always be populated in the response. """ @property @@ -918,13 +904,12 @@ class SetUriPatternDocumentDataRequest(proto.Message): such as ``projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine``. document_data_map (MutableMapping[str, google.protobuf.struct_pb2.Struct]): - Document data keyed by URI pattern. Each entry - must be consistent with the `Schema - `__. - For example: + Document data keyed by URI pattern. Each entry must be + consistent with the `Schema + `__. For + example: - `Schema - `__ + `Schema `__ = { "type": "object", "properties": { "Categories": { @@ -951,12 +936,11 @@ class SetUriPatternDocumentDataRequest(proto.Message): must be empty. schema (google.protobuf.struct_pb2.Struct): Optional. If not provided, the current - `Schema - `__ + `Schema `__ is used. If provided, validates and updates the `Schema - `__. - If validation fails, an error is returned. + `__. If + validation fails, an error is returned. """ site_search_engine: str = proto.Field( @@ -1000,8 +984,8 @@ class SetUriPatternDocumentDataMetadata(proto.Message): create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -1046,6 +1030,7 @@ class GetUriPatternDocumentDataResponse(proto.Message): Attributes: document_data_map (MutableMapping[str, google.protobuf.struct_pb2.Struct]): Document data keyed by URI pattern. For example: + document_data_map = { "www.url1.com/*": { "Categories": ["category1", "category2"] diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/user_event.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/user_event.py index 34394c51629d..1716446867ec 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/user_event.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/user_event.py @@ -39,9 +39,8 @@ class UserEvent(proto.Message): - r"""UserEvent captures all metadata information Discovery Engine - API needs to know about how end users interact with your - website. + r"""UserEvent captures all metadata information Discovery Engine API + needs to know about how end users interact with your website. Attributes: event_type (str): @@ -50,48 +49,44 @@ class UserEvent(proto.Message): Generic values: * ``search``: Search for Documents. - * ``view-item``: Detailed page view of a - Document. + * ``view-item``: Detailed page view of a Document. - * ``view-item-list``: View of a panel or ordered - list of Documents. * ``view-home-page``: View of - the home page. + * ``view-item-list``: View of a panel or ordered list of + Documents. * ``view-home-page``: View of the home page. - * ``view-category-page``: View of a category - page, e.g. Home > Men > Jeans + * ``view-category-page``: View of a category page, e.g. + Home > Men > Jeans Retail-related values: - * ``add-to-cart``: Add an item(s) to cart, e.g. - in Retail online shopping * ``purchase``: - Purchase an item(s) + * ``add-to-cart``: Add an item(s) to cart, e.g. in + Retail online shopping * ``purchase``: Purchase an + item(s) Media-related values: - * ``media-play``: Start/resume watching a video, - playing a song, etc. * ``media-complete``: - Finished or stopped midway through a video, - song, etc. + * ``media-play``: Start/resume watching a video, playing + a song, etc. * ``media-complete``: Finished or stopped + midway through a video, song, etc. user_pseudo_id (str): - Required. A unique identifier for tracking - visitors. - For example, this could be implemented with an - HTTP cookie, which should be able to uniquely - identify a visitor on a single device. This - unique identifier should not change if the - visitor log in/out of the website. - - Do not set the field to the same fixed ID for - different users. This mixes the event history of - those users together, which results in degraded - model quality. - - The field must be a UTF-8 encoded string with a - length limit of 128 characters. Otherwise, an + Required. A unique identifier for tracking visitors. + + For example, this could be implemented with an HTTP + cookie, which should be able to uniquely identify a + visitor on a single device. This unique identifier + should not change if the visitor log in/out of the + website. + + Do not set the field to the same fixed ID for different + users. This mixes the event history of those users + together, which results in degraded model quality. + + The field must be a UTF-8 encoded string with a length + limit of 128 characters. Otherwise, an ``INVALID_ARGUMENT`` error is returned. - The field should not contain PII or user-data. - We recommend to use Google Analytics `Client + The field should not contain PII or user-data. We + recommend to use Google Analytics `Client ID `__ for this field. @@ -102,73 +97,69 @@ class UserEvent(proto.Message): ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}``. Optional. Only required for - `Engine - `__ - produced user events. For example, user events - from blended search. + `Engine `__ + produced user events. For example, user events from + blended search. data_store (str): The `DataStore `__ resource full name, of the form ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}``. - Optional. Only required for user events whose - data store can't by determined by + Optional. Only required for user events whose data store + can't by determined by `UserEvent.engine `__ or `UserEvent.documents `__. If data store is set in the parent of - write/import/collect user event requests, this - field can be omitted. + write/import/collect user event requests, this field can + be omitted. event_time (google.protobuf.timestamp_pb2.Timestamp): Only required for `UserEventService.ImportUserEvents `__ - method. Timestamp of when the user event - happened. + method. Timestamp of when the user event happened. user_info (google.cloud.discoveryengine_v1alpha.types.UserInfo): Information about the end user. direct_user_request (bool): - Should set to true if the request is made - directly from the end user, in which case the + Should set to true if the request is made directly from + the end user, in which case the `UserEvent.user_info.user_agent `__ can be populated from the HTTP request. - This flag should be set only if the API request - is made directly from the end user such as a - mobile app (and not if a gateway or a server is - processing and pushing the user events). + This flag should be set only if the API request is made + directly from the end user such as a mobile app (and not + if a gateway or a server is processing and pushing the + user events). - This should not be set when using the JavaScript - tag in `UserEventService.CollectUserEvent + This should not be set when using the JavaScript tag in + `UserEventService.CollectUserEvent `__. session_id (str): - A unique identifier for tracking a visitor - session with a length limit of 128 bytes. A - session is an aggregation of an end user - behavior in a time span. + A unique identifier for tracking a visitor session with + a length limit of 128 bytes. A session is an aggregation + of an end user behavior in a time span. A general guideline to populate the session_id: - 1. If user has no activity for 30 min, a new - session_id should be assigned. - 2. The session_id should be unique across users, - suggest use uuid or add - `UserEvent.user_pseudo_id + 1. If user has no activity for 30 min, a new session_id + should be assigned. + 2. The session_id should be unique across users, suggest + use uuid or add `UserEvent.user_pseudo_id `__ as prefix. page_info (google.cloud.discoveryengine_v1alpha.types.PageInfo): - Page metadata such as categories and other - critical information for certain event types - such as ``view-category-page``. + Page metadata such as categories and other critical + information for certain event types such as + ``view-category-page``. attribution_token (str): - Token to attribute an API response to user - action(s) to trigger the event. - Highly recommended for user events that are the - result of `RecommendationService.Recommend + Token to attribute an API response to user action(s) to + trigger the event. + Highly recommended for user events that are the result + of `RecommendationService.Recommend `__. This field enables accurate attribution of recommendation model performance. @@ -183,56 +174,52 @@ class UserEvent(proto.Message): * `SearchResponse.attribution_token `__ - for events that are the result of - `SearchService.Search + for events that are the result of `SearchService.Search `__. - This token enables us to accurately attribute - page view or conversion completion back to the - event and the particular predict response - containing this clicked/purchased product. If - user clicks on product K in the recommendation - results, pass + This token enables us to accurately attribute page view + or conversion completion back to the event and the + particular predict response containing this + clicked/purchased product. If user clicks on product K + in the recommendation results, pass `RecommendResponse.attribution_token `__ - as a URL parameter to product K's page. When - recording events on product K's page, log the + as a URL parameter to product K's page. When recording + events on product K's page, log the `RecommendResponse.attribution_token `__ to this field. filter (str): - The filter syntax consists of an expression - language for constructing a predicate from one - or more fields of the documents being filtered. + The filter syntax consists of an expression language for + constructing a predicate from one or more fields of the + documents being filtered. - One example is for ``search`` events, the - associated `SearchRequest + One example is for ``search`` events, the associated + `SearchRequest `__ may contain a filter expression in `SearchRequest.filter `__ - conforming to - https://google.aip.dev/160#filtering. + conforming to https://google.aip.dev/160#filtering. - Similarly, for ``view-item-list`` events that - are generated from a `RecommendRequest + Similarly, for ``view-item-list`` events that are + generated from a `RecommendRequest `__, this field may be populated directly from `RecommendRequest.filter `__ - conforming to - https://google.aip.dev/160#filtering. + conforming to https://google.aip.dev/160#filtering. - The value must be a UTF-8 encoded string with a - length limit of 1,000 characters. Otherwise, an + The value must be a UTF-8 encoded string with a length + limit of 1,000 characters. Otherwise, an ``INVALID_ARGUMENT`` error is returned. documents (MutableSequence[google.cloud.discoveryengine_v1alpha.types.DocumentInfo]): List of `Document `__s associated with this user event. - This field is optional except for the following - event types: + This field is optional except for the following event + types: * ``view-item`` * ``add-to-cart`` @@ -243,18 +230,16 @@ class UserEvent(proto.Message): * ``media-complete`` In a ``search`` event, this field represents the - documents returned to the end user on the - current page (the end user may have not finished - browsing the whole page yet). When a new page is - returned to the end user, after - pagination/filtering/ordering even for the same + documents returned to the end user on the current page + (the end user may have not finished browsing the whole + page yet). When a new page is returned to the end user, + after pagination/filtering/ordering even for the same query, a new ``search`` event with different `UserEvent.documents `__ is desired. panel (google.cloud.discoveryengine_v1alpha.types.PanelInfo): - Panel metadata associated with this user - event. + Panel metadata associated with this user event. search_info (google.cloud.discoveryengine_v1alpha.types.SearchInfo): `SearchService.Search `__ @@ -266,58 +251,54 @@ class UserEvent(proto.Message): `__ details related to the event. - This field should be set for ``search`` event - when autocomplete function is enabled and the - user clicks a suggestion for search. + This field should be set for ``search`` event when + autocomplete function is enabled and the user clicks a + suggestion for search. transaction_info (google.cloud.discoveryengine_v1alpha.types.TransactionInfo): - The transaction metadata (if any) associated - with this user event. + The transaction metadata (if any) associated with + this user event. tag_ids (MutableSequence[str]): - A list of identifiers for the independent - experiment groups this user event belongs to. - This is used to distinguish between user events - associated with different experiment setups. + A list of identifiers for the independent experiment + groups this user event belongs to. This is used to + distinguish between user events associated with + different experiment setups. promotion_ids (MutableSequence[str]): - The promotion IDs if this is an event - associated with promotions. Currently, this - field is restricted to at most one ID. + The promotion IDs if this is an event associated with + promotions. Currently, this field is restricted to at + most one ID. attributes (MutableMapping[str, google.cloud.discoveryengine_v1alpha.types.CustomAttribute]): Extra user event features to include in the - recommendation model. These attributes must NOT - contain data that needs to be parsed or - processed further, e.g. JSON or other encodings. - - If you provide custom attributes for ingested - user events, also include them in the user - events that you associate with prediction - requests. Custom attribute formatting must be - consistent between imported events and events - provided with prediction requests. This lets the - Discovery Engine API use those custom attributes - when training models and serving predictions, - which helps improve recommendation quality. - - This field needs to pass all below criteria, - otherwise an ``INVALID_ARGUMENT`` error is - returned: - - * The key must be a UTF-8 encoded string with a - length limit of 5,000 characters. - - * For text attributes, at most 400 values are - allowed. Empty values are not allowed. Each - value must be a UTF-8 encoded string with a - length limit of 256 characters. - - * For number attributes, at most 400 values are - allowed. - - For product recommendations, an example of extra - user information is ``traffic_channel``, which - is how a user arrives at the site. Users can - arrive - at the site by coming to the site directly, - coming through Google search, or in other ways. + recommendation model. These attributes must NOT contain + data that needs to be parsed or processed further, e.g. + JSON or other encodings. + + If you provide custom attributes for ingested user + events, also include them in the user events that you + associate with prediction requests. Custom attribute + formatting must be consistent between imported events + and events provided with prediction requests. This lets + the Discovery Engine API use those custom attributes + when training models and serving predictions, which + helps improve recommendation quality. + + This field needs to pass all below criteria, otherwise + an ``INVALID_ARGUMENT`` error is returned: + + * The key must be a UTF-8 encoded string with a length + limit of 5,000 characters. + + * For text attributes, at most 400 values are allowed. + Empty values are not allowed. Each value must be a + UTF-8 encoded string with a length limit of 256 + characters. + + * For number attributes, at most 400 values are allowed. + + For product recommendations, an example of extra user + information is ``traffic_channel``, which is how a user + arrives at the site. Users can arrive + at the site by coming to the site directly, coming + through Google search, or in other ways. media_info (google.cloud.discoveryengine_v1alpha.types.MediaInfo): Media-specific info. """ @@ -423,50 +404,45 @@ class PageInfo(proto.Message): A unique ID of a web page view. This should be kept the same for all user events - triggered from the same pageview. For example, - an item detail page view could trigger multiple - events as the user is browsing the page. The - ``pageview_id`` property should be kept the same - for all these events so that they can be grouped - together properly. + triggered from the same pageview. For example, an item + detail page view could trigger multiple events as the + user is browsing the page. The ``pageview_id`` property + should be kept the same for all these events so that + they can be grouped together properly. When using the client side event reporting with - JavaScript pixel and Google Tag Manager, this - value is filled in automatically. + JavaScript pixel and Google Tag Manager, this value is + filled in automatically. page_category (str): - The most specific category associated with a - category page. - To represent full path of category, use '>' sign - to separate different hierarchies. If '>' is - part of the category name, replace it with other - character(s). - - Category pages include special pages such as - sales or promotions. For instance, a special - sale page may have the category hierarchy: - - ``"pageCategory" : "Sales > 2017 Black Friday - Deals"``. - - Required for ``view-category-page`` events. - Other event types should not set this field. - Otherwise, an ``INVALID_ARGUMENT`` error is - returned. + The most specific category associated with a category + page. + To represent full path of category, use '>' sign to + separate different hierarchies. If '>' is part of the + category name, replace it with other character(s). + + Category pages include special pages such as sales or + promotions. For instance, a special sale page may have + the category hierarchy: + + ``"pageCategory" : "Sales > 2017 Black Friday Deals"``. + + Required for ``view-category-page`` events. Other event + types should not set this field. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. uri (str): - Complete URL (window.location.href) of the - user's current page. + Complete URL (window.location.href) of the user's + current page. When using the client side event reporting with - JavaScript pixel and Google Tag Manager, this - value is filled in automatically. Maximum length - 5,000 characters. + JavaScript pixel and Google Tag Manager, this value is + filled in automatically. Maximum length 5,000 + characters. referrer_uri (str): The referrer URL of the current page. When using the client side event reporting with - JavaScript pixel and Google Tag Manager, this - value is filled in automatically. However, some - browser privacy restrictions may cause this - field to be empty. + JavaScript pixel and Google Tag Manager, this value is + filled in automatically. However, some browser privacy + restrictions may cause this field to be empty. """ pageview_id: str = proto.Field( @@ -501,8 +477,8 @@ class SearchInfo(proto.Message): `__ for definition. - The value must be a UTF-8 encoded string with a - length limit of 5,000 characters. Otherwise, an + The value must be a UTF-8 encoded string with a length + limit of 5,000 characters. Otherwise, an ``INVALID_ARGUMENT`` error is returned. At least one of @@ -511,44 +487,41 @@ class SearchInfo(proto.Message): or `PageInfo.page_category `__ - is required for ``search`` events. Other event - types should not set this field. Otherwise, an + is required for ``search`` events. Other event types + should not set this field. Otherwise, an ``INVALID_ARGUMENT`` error is returned. order_by (str): - The order in which products are returned, if - applicable. + The order in which products are returned, if applicable. + See `SearchRequest.order_by `__ for definition and syntax. - The value must be a UTF-8 encoded string with a - length limit of 1,000 characters. Otherwise, an + The value must be a UTF-8 encoded string with a length + limit of 1,000 characters. Otherwise, an ``INVALID_ARGUMENT`` error is returned. - This can only be set for ``search`` events. - Other event types should not set this field. - Otherwise, an ``INVALID_ARGUMENT`` error is - returned. + This can only be set for ``search`` events. Other event + types should not set this field. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. offset (int): An integer that specifies the current offset for - pagination (the 0-indexed starting location, - amongst the products deemed by the API as - relevant). + pagination (the 0-indexed starting location, amongst the + products deemed by the API as relevant). See `SearchRequest.offset `__ for definition. - If this field is negative, an - ``INVALID_ARGUMENT`` is returned. - - This can only be set for ``search`` events. - Other event types should not set this field. - Otherwise, an ``INVALID_ARGUMENT`` error is + If this field is negative, an ``INVALID_ARGUMENT`` is returned. + This can only be set for ``search`` events. Other event + types should not set this field. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. + This field is a member of `oneof`_ ``_offset``. """ @@ -568,8 +541,8 @@ class SearchInfo(proto.Message): class CompletionInfo(proto.Message): - r"""Detailed completion information including completion - attribution token and clicked completion info. + r"""Detailed completion information including completion attribution + token and clicked completion info. Attributes: selected_suggestion (str): @@ -600,28 +573,26 @@ class TransactionInfo(proto.Message): Attributes: value (float): - Required. Total non-zero value associated - with the transaction. This value may include - shipping, tax, or other adjustments to the total - value that you want to include. + Required. Total non-zero value associated with the + transaction. This value may include shipping, tax, or + other adjustments to the total value that you want to + include. This field is a member of `oneof`_ ``_value``. currency (str): - Required. Currency code. Use three-character - ISO-4217 code. + Required. Currency code. Use three-character ISO-4217 + code. transaction_id (str): The transaction ID with a length limit of 128 characters. tax (float): - All the taxes associated with the - transaction. + All the taxes associated with the transaction. This field is a member of `oneof`_ ``_tax``. cost (float): - All the costs associated with the products. - These can be manufacturing costs, shipping - expenses not borne by the end user, or any other - costs, such that: + All the costs associated with the products. These can be + manufacturing costs, shipping expenses not borne by the + end user, or any other costs, such that: * Profit = `value @@ -633,8 +604,8 @@ class TransactionInfo(proto.Message): This field is a member of `oneof`_ ``_cost``. discount_value (float): - The total discount(s) value applied to this - transaction. This figure should be excluded from + The total discount(s) value applied to this transaction. + This figure should be excluded from `TransactionInfo.value `__ @@ -648,8 +619,8 @@ class TransactionInfo(proto.Message): `TransactionInfo.discount_value `__ - This means that profit is calculated the same - way, regardless of the discount value, and that + This means that profit is calculated the same way, + regardless of the discount value, and that `TransactionInfo.discount_value `__ can be larger than @@ -724,31 +695,28 @@ class DocumentInfo(proto.Message): This field is a member of `oneof`_ ``document_descriptor``. uri (str): The `Document - `__ - URI - only allowed for website data stores. + `__ URI - + only allowed for website data stores. This field is a member of `oneof`_ ``document_descriptor``. quantity (int): - Quantity of the Document associated with the - user event. Defaults to 1. - For example, this field is 2 if two quantities - of the same Document are involved in a - ``add-to-cart`` event. + Quantity of the Document associated with the user event. + Defaults to 1. + For example, this field is 2 if two quantities of the + same Document are involved in a ``add-to-cart`` event. - Required for events of the following event - types: + Required for events of the following event types: * ``add-to-cart`` * ``purchase`` This field is a member of `oneof`_ ``_quantity``. promotion_ids (MutableSequence[str]): - The promotion IDs associated with this - Document. Currently, this field is restricted to - at most one ID. + The promotion IDs associated with this Document. + Currently, this field is restricted to at most one ID. joined (bool): - Output only. Whether the referenced Document - can be found in the data store. + Output only. Whether the referenced Document can be + found in the data store. """ id: str = proto.Field( @@ -792,16 +760,16 @@ class PanelInfo(proto.Message): display_name (str): The display name of the panel. panel_position (int): - The ordered position of the panel, if shown to - the user with other panels. If set, then + The ordered position of the panel, if shown to the user + with other panels. If set, then `total_panels `__ must also be set. This field is a member of `oneof`_ ``_panel_position``. total_panels (int): - The total number of panels, including this one, - shown to the user. Must be set if + The total number of panels, including this one, shown to + the user. Must be set if `panel_position `__ is set. @@ -836,24 +804,23 @@ class MediaInfo(proto.Message): Attributes: media_progress_duration (google.protobuf.duration_pb2.Duration): - The media progress time in seconds, if - applicable. For example, if the end user has - finished 90 seconds of a playback video, then + The media progress time in seconds, if applicable. + For example, if the end user has finished 90 seconds of + a playback video, then `MediaInfo.media_progress_duration.seconds - `__ should be - set to 90. + `__ should be set to + 90. media_progress_percentage (float): Media progress should be computed using only the `media_progress_duration `__ relative to the media total length. - This value must be between ``[0, 1.0]`` - inclusive. + This value must be between ``[0, 1.0]`` inclusive. - If this is not a playback or the progress cannot - be computed (e.g. ongoing livestream), this - field should be unset. + If this is not a playback or the progress cannot be + computed (e.g. ongoing livestream), this field should be + unset. This field is a member of `oneof`_ ``_media_progress_percentage``. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/user_event_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/user_event_service.py index 45b7f1b3f846..e98b3df830d7 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/user_event_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1alpha/types/user_event_service.py @@ -49,8 +49,8 @@ class WriteUserEventRequest(proto.Message): `Document `__ across multiple `DataStore - `__, - the format is: + `__, the + format is: ``projects/{project}/locations/{location}``. user_event (google.cloud.discoveryengine_v1alpha.types.UserEvent): @@ -59,8 +59,8 @@ class WriteUserEventRequest(proto.Message): This field is a member of `oneof`_ ``_user_event``. write_async (bool): If set to true, the user event is written - asynchronously after validation, and the API - responds without waiting for the write. + asynchronously after validation, and the API responds + without waiting for the write. """ parent: str = proto.Field( @@ -86,25 +86,23 @@ class CollectUserEventRequest(proto.Message): Attributes: parent (str): - Required. The parent DataStore resource name, - such as + Required. The parent DataStore resource name, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}``. user_event (str): - Required. URL encoded UserEvent proto with a - length limit of 2,000,000 characters. + Required. URL encoded UserEvent proto with a length + limit of 2,000,000 characters. uri (str): - The URL including cgi-parameters but - excluding the hash fragment with a length limit - of 5,000 characters. This is often more useful - than the referer URL, because many browsers only - send the domain for third-party requests. + The URL including cgi-parameters but excluding the + hash fragment with a length limit of 5,000 characters. + This is often more useful than the referer URL, because + many browsers only send the domain for third-party + requests. This field is a member of `oneof`_ ``_uri``. ets (int): - The event timestamp in milliseconds. This - prevents browser caching of otherwise identical - get requests. The name is abbreviated to reduce - the payload bytes. + The event timestamp in milliseconds. This prevents + browser caching of otherwise identical get requests. The + name is abbreviated to reduce the payload bytes. This field is a member of `oneof`_ ``_ets``. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/answer.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/answer.py index 163b33de1f48..011f4ac8618d 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/answer.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/answer.py @@ -51,9 +51,9 @@ class Answer(proto.Message): query_understanding_info (google.cloud.discoveryengine_v1beta.types.Answer.QueryUnderstandingInfo): Query understanding information. answer_skipped_reasons (MutableSequence[google.cloud.discoveryengine_v1beta.types.Answer.AnswerSkippedReason]): - Additional answer-skipped reasons. This - provides the reason for ignored cases. If - nothing is skipped, this field is not set. + Additional answer-skipped reasons. This provides the + reason for ignored cases. If nothing is skipped, this + field is not set. create_time (google.protobuf.timestamp_pb2.Timestamp): Output only. Answer creation timestamp. complete_time (google.protobuf.timestamp_pb2.Timestamp): @@ -147,8 +147,8 @@ class Citation(proto.Message): Attributes: start_index (int): - Index indicates the start of the segment, - measured in bytes (UTF-8 unicode). + Index indicates the start of the segment, measured in + bytes (UTF-8 unicode). end_index (int): End of the attributed segment, exclusive. sources (MutableSequence[google.cloud.discoveryengine_v1beta.types.Answer.CitationSource]): @@ -218,12 +218,12 @@ class UnstructuredDocumentInfo(proto.Message): title (str): Title. chunk_contents (MutableSequence[google.cloud.discoveryengine_v1beta.types.Answer.Reference.UnstructuredDocumentInfo.ChunkContent]): - List of cited chunk contents derived from - document content. + List of cited chunk contents derived from document + content. struct_data (google.protobuf.struct_pb2.Struct): - The structured JSON metadata for the - document. It is populated from the struct data - from the Chunk in search result. + The structured JSON metadata for the document. + It is populated from the struct data from the Chunk in + search result. """ class ChunkContent(proto.Message): @@ -237,12 +237,12 @@ class ChunkContent(proto.Message): page_identifier (str): Page identifier. relevance_score (float): - The relevance of the chunk for a given query. - Values range from 0.0 (completely irrelevant) to - 1.0 (completely relevant). This value is for - informational purpose only. It may change for - the same query and chunk at any time due to a - model retraining or change in implementation. + The relevance of the chunk for a given query. Values + range from 0.0 (completely irrelevant) to 1.0 + (completely relevant). This value is for informational + purpose only. It may change for the same query and chunk + at any time due to a model retraining or change in + implementation. This field is a member of `oneof`_ ``_relevance_score``. """ @@ -297,12 +297,12 @@ class ChunkInfo(proto.Message): content (str): Chunk textual content. relevance_score (float): - The relevance of the chunk for a given query. - Values range from 0.0 (completely irrelevant) to - 1.0 (completely relevant). This value is for - informational purpose only. It may change for - the same query and chunk at any time due to a - model retraining or change in implementation. + The relevance of the chunk for a given query. Values + range from 0.0 (completely irrelevant) to 1.0 + (completely relevant). This value is for informational + purpose only. It may change for the same query and chunk + at any time due to a model retraining or change in + implementation. This field is a member of `oneof`_ ``_relevance_score``. document_metadata (google.cloud.discoveryengine_v1beta.types.Answer.Reference.ChunkInfo.DocumentMetadata): @@ -322,9 +322,9 @@ class DocumentMetadata(proto.Message): page_identifier (str): Page identifier. struct_data (google.protobuf.struct_pb2.Struct): - The structured JSON metadata for the - document. It is populated from the struct data - from the Chunk in search result. + The structured JSON metadata for the document. + It is populated from the struct data from the Chunk in + search result. """ document: str = proto.Field( @@ -477,9 +477,9 @@ class Observation(proto.Message): Attributes: search_results (MutableSequence[google.cloud.discoveryengine_v1beta.types.Answer.Step.Action.Observation.SearchResult]): - Search results observed by the search action, - it can be snippets info or chunk info, depending - on the citation type set by the user. + Search results observed by the search action, it can + be snippets info or chunk info, depending on the + citation type set by the user. """ class SearchResult(proto.Message): @@ -493,16 +493,16 @@ class SearchResult(proto.Message): title (str): Title. snippet_info (MutableSequence[google.cloud.discoveryengine_v1beta.types.Answer.Step.Action.Observation.SearchResult.SnippetInfo]): - If citation_type is DOCUMENT_LEVEL_CITATION, - populate document level snippets. + If citation_type is DOCUMENT_LEVEL_CITATION, populate + document level snippets. chunk_info (MutableSequence[google.cloud.discoveryengine_v1beta.types.Answer.Step.Action.Observation.SearchResult.ChunkInfo]): - If citation_type is CHUNK_LEVEL_CITATION and - chunk mode is on, populate chunk info. + If citation_type is CHUNK_LEVEL_CITATION and chunk mode + is on, populate chunk info. struct_data (google.protobuf.struct_pb2.Struct): Data representation. The structured JSON data for the document. - It's populated from the struct data from the - Document, or the Chunk in search result. + It's populated from the struct data from the Document, + or the Chunk in search result. """ class SnippetInfo(proto.Message): @@ -512,8 +512,7 @@ class SnippetInfo(proto.Message): snippet (str): Snippet content. snippet_status (str): - Status of the snippet defined by the search - team. + Status of the snippet defined by the search team. """ snippet: str = proto.Field( @@ -536,12 +535,12 @@ class ChunkInfo(proto.Message): content (str): Chunk textual content. relevance_score (float): - The relevance of the chunk for a given query. - Values range from 0.0 (completely irrelevant) to - 1.0 (completely relevant). This value is for - informational purpose only. It may change for - the same query and chunk at any time due to a - model retraining or change in implementation. + The relevance of the chunk for a given query. Values + range from 0.0 (completely irrelevant) to 1.0 + (completely relevant). This value is for informational + purpose only. It may change for the same query and chunk + at any time due to a model retraining or change in + implementation. This field is a member of `oneof`_ ``_relevance_score``. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/chunk.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/chunk.py index a295ec95bdab..f19786a39ecc 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/chunk.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/chunk.py @@ -42,29 +42,25 @@ class Chunk(proto.Message): ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}/chunks/{chunk_id}``. - This field must be a UTF-8 encoded string with a - length limit of 1024 characters. + This field must be a UTF-8 encoded string with a length + limit of 1024 characters. id (str): Unique chunk ID of the current chunk. content (str): - Content is a string from a document (parsed - content). + Content is a string from a document (parsed content). relevance_score (float): - Output only. Represents the relevance score - based on similarity. Higher score indicates - higher chunk relevance. The score is in range - [-1.0, 1.0]. - Only populated on - [SearchService.SearchResponse][]. + Output only. Represents the relevance score based on + similarity. Higher score indicates higher chunk + relevance. The score is in range [-1.0, 1.0]. + Only populated on [SearchService.SearchResponse][]. This field is a member of `oneof`_ ``_relevance_score``. document_metadata (google.cloud.discoveryengine_v1beta.types.Chunk.DocumentMetadata): - Metadata of the document from the current - chunk. + Metadata of the document from the current chunk. derived_struct_data (google.protobuf.struct_pb2.Struct): Output only. This field is OUTPUT_ONLY. - It contains derived data that are not in the - original input document. + It contains derived data that are not in the original + input document. page_span (google.cloud.discoveryengine_v1beta.types.Chunk.PageSpan): Page span of the chunk. chunk_metadata (google.cloud.discoveryengine_v1beta.types.Chunk.ChunkMetadata): @@ -72,8 +68,8 @@ class Chunk(proto.Message): """ class DocumentMetadata(proto.Message): - r"""Document metadata contains the information of the document of - the current chunk. + r"""Document metadata contains the information of the document of the + current chunk. Attributes: uri (str): @@ -82,10 +78,10 @@ class DocumentMetadata(proto.Message): Title of the document. struct_data (google.protobuf.struct_pb2.Struct): Data representation. - The structured JSON data for the document. It - should conform to the registered `Schema - `__ - or an ``INVALID_ARGUMENT`` error is thrown. + The structured JSON data for the document. It should + conform to the registered `Schema + `__ or an + ``INVALID_ARGUMENT`` error is thrown. """ uri: str = proto.Field( @@ -124,13 +120,12 @@ class PageSpan(proto.Message): class ChunkMetadata(proto.Message): r"""Metadata of the current chunk. This field is only populated on `SearchService.Search - `__ - API. + `__ API. Attributes: previous_chunks (MutableSequence[google.cloud.discoveryengine_v1beta.types.Chunk]): - The previous chunks of the current chunk. The - number is controlled by + The previous chunks of the current chunk. The number is + controlled by `SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks `__. This field is only populated on @@ -138,8 +133,8 @@ class ChunkMetadata(proto.Message): `__ API. next_chunks (MutableSequence[google.cloud.discoveryengine_v1beta.types.Chunk]): - The next chunks of the current chunk. The number - is controlled by + The next chunks of the current chunk. The number is + controlled by `SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks `__. This field is only populated on diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/common.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/common.py index 209fa4c13a3e..97978c5aa6e5 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/common.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/common.py @@ -107,9 +107,8 @@ class SearchUseCase(proto.Enum): class SearchTier(proto.Enum): - r"""Tiers of search features. Different tiers might have - different pricing. To learn more, check the pricing - documentation. + r"""Tiers of search features. Different tiers might have different + pricing. To learn more, check the pricing documentation. Values: SEARCH_TIER_UNSPECIFIED (0): @@ -191,9 +190,8 @@ class Interval(proto.Message): class CustomAttribute(proto.Message): - r"""A custom attribute that is not explicitly modeled in a resource, - e.g. `UserEvent - `__. + r"""A custom attribute that is not explicitly modeled in a resource, e.g. + `UserEvent `__. Attributes: text (MutableSequence[str]): @@ -210,12 +208,11 @@ class CustomAttribute(proto.Message): or `CustomAttribute.numbers `__ - should be set. Otherwise, an - ``INVALID_ARGUMENT`` error is returned. + should be set. Otherwise, an ``INVALID_ARGUMENT`` error + is returned. numbers (MutableSequence[float]): - The numerical values of this custom attribute. - For example, ``[2.3, 15.4]`` when the key is - "lengths_cm". + The numerical values of this custom attribute. For + example, ``[2.3, 15.4]`` when the key is "lengths_cm". Exactly one of `CustomAttribute.text @@ -223,8 +220,8 @@ class CustomAttribute(proto.Message): or `CustomAttribute.numbers `__ - should be set. Otherwise, an - ``INVALID_ARGUMENT`` error is returned. + should be set. Otherwise, an ``INVALID_ARGUMENT`` error + is returned. """ text: MutableSequence[str] = proto.RepeatedField( @@ -243,29 +240,27 @@ class UserInfo(proto.Message): Attributes: user_id (str): Highly recommended for logged-in users. Unique - identifier for logged-in user, such as a user - name. Don't set for anonymous users. + identifier for logged-in user, such as a user name. + Don't set for anonymous users. Always use a hashed value for this ID. - Don't set the field to the same fixed ID for - different users. This mixes the event history of - those users together, which results in degraded - model quality. + Don't set the field to the same fixed ID for different + users. This mixes the event history of those users + together, which results in degraded model quality. - The field must be a UTF-8 encoded string with a - length limit of 128 characters. Otherwise, an + The field must be a UTF-8 encoded string with a length + limit of 128 characters. Otherwise, an ``INVALID_ARGUMENT`` error is returned. user_agent (str): User agent as included in the HTTP header. - The field must be a UTF-8 encoded string with a - length limit of 1,000 characters. Otherwise, an + The field must be a UTF-8 encoded string with a length + limit of 1,000 characters. Otherwise, an ``INVALID_ARGUMENT`` error is returned. - This should not be set when using the client - side event reporting with GTM or JavaScript tag - in + This should not be set when using the client side event + reporting with GTM or JavaScript tag in `UserEventService.CollectUserEvent `__ or if @@ -285,13 +280,12 @@ class UserInfo(proto.Message): class EmbeddingConfig(proto.Message): - r"""Defines embedding config, used for bring your own embeddings - feature. + r"""Defines embedding config, used for bring your own embeddings feature. Attributes: field_path (str): - Full field path in the schema mapped as - embedding field. + Full field path in the schema mapped as embedding + field. """ field_path: str = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/completion.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/completion.py index 88fa88fd0f41..602af3263213 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/completion.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/completion.py @@ -29,17 +29,17 @@ class SuggestionDenyListEntry(proto.Message): - r"""Suggestion deny list entry identifying the phrase to block - from suggestions and the applied operation for the phrase. + r"""Suggestion deny list entry identifying the phrase to block from + suggestions and the applied operation for the phrase. Attributes: block_phrase (str): - Required. Phrase to block from suggestions - served. Can be maximum 125 characters. + Required. Phrase to block from suggestions served. + Can be maximum 125 characters. match_operator (google.cloud.discoveryengine_v1beta.types.SuggestionDenyListEntry.MatchOperator): - Required. The match operator to apply for - this phrase. Whether to block the exact phrase, - or block any suggestions containing this phrase. + Required. The match operator to apply for this + phrase. Whether to block the exact phrase, or block any + suggestions containing this phrase. """ class MatchOperator(proto.Enum): @@ -82,13 +82,13 @@ class CompletionSuggestion(proto.Message): Attributes: global_score (float): - Global score of this suggestion. Control how - this suggestion would be scored / ranked. + Global score of this suggestion. Control how this + suggestion would be scored / ranked. This field is a member of `oneof`_ ``ranking_info``. frequency (int): - Frequency of this suggestion. Will be used to - rank suggestions when score is not available. + Frequency of this suggestion. Will be used to rank + suggestions when score is not available. This field is a member of `oneof`_ ``ranking_info``. suggestion (str): @@ -96,17 +96,14 @@ class CompletionSuggestion(proto.Message): language_code (str): BCP-47 language code of this suggestion. group_id (str): - If two suggestions have the same groupId, - they will not be returned together. Instead the - one ranked higher will be returned. This can be - used to deduplicate semantically identical - suggestions. + If two suggestions have the same groupId, they will + not be returned together. Instead the one ranked higher + will be returned. This can be used to deduplicate + semantically identical suggestions. group_score (float): - The score of this suggestion within its - group. + The score of this suggestion within its group. alternative_phrases (MutableSequence[str]): - Alternative matching phrases for this - suggestion. + Alternative matching phrases for this suggestion. """ global_score: float = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/completion_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/completion_service.py index 84dee5a8ffe7..d47b5aa53ad4 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/completion_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/completion_service.py @@ -42,45 +42,44 @@ class CompleteQueryRequest(proto.Message): Attributes: data_store (str): - Required. The parent data store resource name - for which the completion is performed, such as + Required. The parent data store resource name for which + the completion is performed, such as ``projects/*/locations/global/collections/default_collection/dataStores/default_data_store``. query (str): Required. The typeahead input used to fetch suggestions. Maximum length is 128 characters. query_model (str): - Specifies the autocomplete data model. This - overrides any model specified in the - Configuration > Autocomplete section of the - Cloud console. Currently supported values: - - * ``document`` - Using suggestions generated - from user-imported documents. * - ``search-history`` - Using suggestions generated - from the past history of `SearchService.Search + Specifies the autocomplete data model. This overrides + any model specified in the Configuration > Autocomplete + section of the Cloud console. Currently supported + values: + + * ``document`` - Using suggestions generated from + user-imported documents. * ``search-history`` - Using + suggestions generated from the past history of + `SearchService.Search `__ - API calls. Do not use it when there is no - traffic for Search API. + API calls. Do not use it when there is no traffic for + Search API. - * ``user-event`` - Using suggestions generated - from user-imported search events. + * ``user-event`` - Using suggestions generated from + user-imported search events. - * ``document-completable`` - Using suggestions - taken directly from user-imported document - fields marked as completable. + * ``document-completable`` - Using suggestions taken + directly from user-imported document fields marked as + completable. Default values: * ``document`` is the default model for regular - dataStores. * ``search-history`` is the default - model for site search dataStores. + dataStores. * ``search-history`` is the default model + for site search dataStores. user_pseudo_id (str): - A unique identifier for tracking visitors. For - example, this could be implemented with an HTTP - cookie, which should be able to uniquely - identify a visitor on a single device. This - unique identifier should not change if the - visitor logs in or out of the website. + A unique identifier for tracking visitors. For example, + this could be implemented with an HTTP cookie, which + should be able to uniquely identify a visitor on a + single device. This unique identifier should not change + if the visitor logs in or out of the website. This field should NOT have a fixed value such as ``unknown_visitor``. @@ -92,16 +91,15 @@ class CompleteQueryRequest(proto.Message): `SearchRequest.user_pseudo_id `__. - The field must be a UTF-8 encoded string with a - length limit of 128 characters. Otherwise, an + The field must be a UTF-8 encoded string with a length + limit of 128 characters. Otherwise, an ``INVALID_ARGUMENT`` error is returned. include_tail_suggestions (bool): - Indicates if tail suggestions should be - returned if there are no suggestions that match - the full query. Even if set to true, if there - are suggestions that match the full query, those - are returned and no tail suggestions are - returned. + Indicates if tail suggestions should be returned if + there are no suggestions that match the full query. Even + if set to true, if there are suggestions that match the + full query, those are returned and no tail suggestions + are returned. """ data_store: str = proto.Field( @@ -134,16 +132,15 @@ class CompleteQueryResponse(proto.Message): Attributes: query_suggestions (MutableSequence[google.cloud.discoveryengine_v1beta.types.CompleteQueryResponse.QuerySuggestion]): - Results of the matched query suggestions. The - result list is ordered and the first result is a - top suggestion. + Results of the matched query suggestions. The result + list is ordered and the first result is a top + suggestion. tail_match_triggered (bool): True if the returned suggestions are all tail suggestions. For tail matching to be triggered, - include_tail_suggestions in the request must be - true and there must be no suggestions that match - the full query. + include_tail_suggestions in the request must be true and + there must be no suggestions that match the full query. """ class QuerySuggestion(proto.Message): @@ -153,9 +150,9 @@ class QuerySuggestion(proto.Message): suggestion (str): The suggestion for the query. completable_field_paths (MutableSequence[str]): - The unique document field paths that serve as - the source of this suggestion if it was - generated from completable fields. + The unique document field paths that serve as the + source of this suggestion if it was generated from + completable fields. This field is only populated for the document-completable model. @@ -190,56 +187,54 @@ class AdvancedCompleteQueryRequest(proto.Message): Attributes: completion_config (str): - Required. The completion_config of the parent - dataStore or engine resource name for which the - completion is performed, such as + Required. The completion_config of the parent dataStore + or engine resource name for which the completion is + performed, such as ``projects/*/locations/global/collections/default_collection/dataStores/*/completionConfig`` ``projects/*/locations/global/collections/default_collection/engines/*/completionConfig``. query (str): - Required. The typeahead input used to fetch - suggestions. Maximum length is 128 characters. - - The query can not be empty for most of the - suggestion types. If it is empty, an - ``INVALID_ARGUMENT`` error is returned. The - exception is when the suggestion_types contains - only the type ``RECENT_SEARCH``, the query can - be an empty string. The is called "zero prefix" - feature, which returns user's recently searched - queries given the empty query. + Required. The typeahead input used to fetch suggestions. + Maximum length is 128 characters. + + The query can not be empty for most of the suggestion + types. If it is empty, an ``INVALID_ARGUMENT`` error is + returned. The exception is when the suggestion_types + contains only the type ``RECENT_SEARCH``, the query can + be an empty string. The is called "zero prefix" feature, + which returns user's recently searched queries given the + empty query. query_model (str): - Specifies the autocomplete data model. This - overrides any model specified in the - Configuration > Autocomplete section of the - Cloud console. Currently supported values: - - * ``document`` - Using suggestions generated - from user-imported documents. * - ``search-history`` - Using suggestions generated - from the past history of `SearchService.Search + Specifies the autocomplete data model. This overrides + any model specified in the Configuration > Autocomplete + section of the Cloud console. Currently supported + values: + + * ``document`` - Using suggestions generated from + user-imported documents. * ``search-history`` - Using + suggestions generated from the past history of + `SearchService.Search `__ - API calls. Do not use it when there is no - traffic for Search API. + API calls. Do not use it when there is no traffic for + Search API. - * ``user-event`` - Using suggestions generated - from user-imported search events. + * ``user-event`` - Using suggestions generated from + user-imported search events. - * ``document-completable`` - Using suggestions - taken directly from user-imported document - fields marked as completable. + * ``document-completable`` - Using suggestions taken + directly from user-imported document fields marked as + completable. Default values: * ``document`` is the default model for regular - dataStores. * ``search-history`` is the default - model for site search dataStores. + dataStores. * ``search-history`` is the default model + for site search dataStores. user_pseudo_id (str): - A unique identifier for tracking visitors. For - example, this could be implemented with an HTTP - cookie, which should be able to uniquely - identify a visitor on a single device. This - unique identifier should not change if the - visitor logs in or out of the website. + A unique identifier for tracking visitors. For example, + this could be implemented with an HTTP cookie, which + should be able to uniquely identify a visitor on a + single device. This unique identifier should not change + if the visitor logs in or out of the website. This field should NOT have a fixed value such as ``unknown_visitor``. @@ -251,32 +246,30 @@ class AdvancedCompleteQueryRequest(proto.Message): `SearchRequest.user_pseudo_id `__. - The field must be a UTF-8 encoded string with a - length limit of 128 + The field must be a UTF-8 encoded string with a length + limit of 128 user_info (google.cloud.discoveryengine_v1beta.types.UserInfo): Optional. Information about the end user. - This should be the same identifier information - as `UserEvent.user_info + This should be the same identifier information as + `UserEvent.user_info `__ and `SearchRequest.user_info `__. include_tail_suggestions (bool): - Indicates if tail suggestions should be - returned if there are no suggestions that match - the full query. Even if set to true, if there - are suggestions that match the full query, those - are returned and no tail suggestions are - returned. + Indicates if tail suggestions should be returned if + there are no suggestions that match the full query. Even + if set to true, if there are suggestions that match the + full query, those are returned and no tail suggestions + are returned. boost_spec (google.cloud.discoveryengine_v1beta.types.AdvancedCompleteQueryRequest.BoostSpec): - Optional. Specification to boost suggestions - matching the condition. + Optional. Specification to boost suggestions matching + the condition. suggestion_types (MutableSequence[google.cloud.discoveryengine_v1beta.types.AdvancedCompleteQueryRequest.SuggestionType]): - Optional. Suggestion types to return. If - empty or unspecified, query suggestions are - returned. Only one suggestion type is supported - at the moment. + Optional. Suggestion types to return. If empty or + unspecified, query suggestions are returned. Only one + suggestion type is supported at the moment. """ class SuggestionType(proto.Enum): @@ -304,20 +297,18 @@ class SuggestionType(proto.Enum): GOOGLE_WORKSPACE = 5 class BoostSpec(proto.Message): - r"""Specification to boost suggestions based on the condtion of - the suggestion. + r"""Specification to boost suggestions based on the condtion of the + suggestion. Attributes: condition_boost_specs (MutableSequence[google.cloud.discoveryengine_v1beta.types.AdvancedCompleteQueryRequest.BoostSpec.ConditionBoostSpec]): - Condition boost specifications. If a - suggestion matches multiple conditions in the - specifictions, boost values from these - specifications are all applied and combined in a - non-linear way. Maximum number of specifications - is 20. - - Note: Currently only support language condition - boost. + Condition boost specifications. If a suggestion + matches multiple conditions in the specifictions, boost + values from these specifications are all applied and + combined in a non-linear way. Maximum number of + specifications is 20. + + Note: Currently only support language condition boost. """ class ConditionBoostSpec(proto.Message): @@ -325,35 +316,32 @@ class ConditionBoostSpec(proto.Message): Attributes: condition (str): - An expression which specifies a boost condition. - The syntax is the same as `filter expression + An expression which specifies a boost condition. The + syntax is the same as `filter expression syntax `__. - Currently, the only supported condition is a - list of BCP-47 lang codes. + Currently, the only supported condition is a list of + BCP-47 lang codes. Example: - * To boost suggestions in languages ``en`` or - ``fr``: + * To boost suggestions in languages ``en`` or ``fr``: ``(lang_code: ANY("en", "fr"))`` boost (float): - Strength of the boost, which should be in [-1, - 1]. Negative boost means demotion. Default is - 0.0. + Strength of the boost, which should be in [-1, 1]. + Negative boost means demotion. Default is 0.0. - Setting to 1.0 gives the suggestions a big - promotion. However, it does not necessarily mean - that the top result will be a boosted - suggestion. + Setting to 1.0 gives the suggestions a big promotion. + However, it does not necessarily mean that the top + result will be a boosted suggestion. - Setting to -1.0 gives the suggestions a big - demotion. However, other suggestions that are - relevant might still be shown. + Setting to -1.0 gives the suggestions a big demotion. + However, other suggestions that are relevant might still + be shown. - Setting to 0.0 means no boost applied. The - boosting condition is ignored. + Setting to 0.0 means no boost applied. The boosting + condition is ignored. """ condition: str = proto.Field( @@ -418,28 +406,27 @@ class AdvancedCompleteQueryResponse(proto.Message): Attributes: query_suggestions (MutableSequence[google.cloud.discoveryengine_v1beta.types.AdvancedCompleteQueryResponse.QuerySuggestion]): - Results of the matched query suggestions. The - result list is ordered and the first result is a - top suggestion. + Results of the matched query suggestions. The result + list is ordered and the first result is a top + suggestion. tail_match_triggered (bool): True if the returned suggestions are all tail suggestions. For tail matching to be triggered, - include_tail_suggestions in the request must be - true and there must be no suggestions that match - the full query. + include_tail_suggestions in the request must be true and + there must be no suggestions that match the full query. people_suggestions (MutableSequence[google.cloud.discoveryengine_v1beta.types.AdvancedCompleteQueryResponse.PersonSuggestion]): - Results of the matched people suggestions. - The result list is ordered and the first result - is the top suggestion. + Results of the matched people suggestions. The result + list is ordered and the first result is the top + suggestion. content_suggestions (MutableSequence[google.cloud.discoveryengine_v1beta.types.AdvancedCompleteQueryResponse.ContentSuggestion]): - Results of the matched content suggestions. - The result list is ordered and the first result - is the top suggestion. + Results of the matched content suggestions. The + result list is ordered and the first result is the top + suggestion. recent_search_suggestions (MutableSequence[google.cloud.discoveryengine_v1beta.types.AdvancedCompleteQueryResponse.RecentSearchSuggestion]): - Results of the matched "recent search" - suggestions. The result list is ordered and the - first result is the top suggestion. + Results of the matched "recent search" suggestions. + The result list is ordered and the first result is the + top suggestion. """ class QuerySuggestion(proto.Message): @@ -449,15 +436,15 @@ class QuerySuggestion(proto.Message): suggestion (str): The suggestion for the query. completable_field_paths (MutableSequence[str]): - The unique document field paths that serve as - the source of this suggestion if it was - generated from completable fields. + The unique document field paths that serve as the + source of this suggestion if it was generated from + completable fields. This field is only populated for the document-completable model. data_store (MutableSequence[str]): - The name of the dataStore that this - suggestion belongs to. + The name of the dataStore that this suggestion + belongs to. """ suggestion: str = proto.Field( @@ -482,11 +469,11 @@ class PersonSuggestion(proto.Message): person_type (google.cloud.discoveryengine_v1beta.types.AdvancedCompleteQueryResponse.PersonSuggestion.PersonType): The type of the person. document (google.cloud.discoveryengine_v1beta.types.Document): - The document data snippet in the suggestion. - Only a subset of fields is populated. + The document data snippet in the suggestion. Only a + subset of fields is populated. data_store (str): - The name of the dataStore that this - suggestion belongs to. + The name of the dataStore that this suggestion + belongs to. """ class PersonType(proto.Enum): @@ -535,11 +522,11 @@ class ContentSuggestion(proto.Message): content_type (google.cloud.discoveryengine_v1beta.types.AdvancedCompleteQueryResponse.ContentSuggestion.ContentType): The type of the content suggestion. document (google.cloud.discoveryengine_v1beta.types.Document): - The document data snippet in the suggestion. - Only a subset of fields will be populated. + The document data snippet in the suggestion. Only a + subset of fields will be populated. data_store (str): - The name of the dataStore that this - suggestion belongs to. + The name of the dataStore that this suggestion + belongs to. """ class ContentType(proto.Enum): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/control.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/control.py index 2414e45714a2..23a01bb8b05f 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/control.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/control.py @@ -32,8 +32,7 @@ class Condition(proto.Message): - r"""Defines circumstances to be checked before allowing a - behavior + r"""Defines circumstances to be checked before allowing a behavior Attributes: query_terms (MutableSequence[google.cloud.discoveryengine_v1beta.types.Condition.QueryTerm]): @@ -46,16 +45,15 @@ class Condition(proto.Message): Maximum of 10 query terms. active_time_range (MutableSequence[google.cloud.discoveryengine_v1beta.types.Condition.TimeRange]): - Range of time(s) specifying when condition is - active. + Range of time(s) specifying when condition is active. + Maximum of 10 time ranges. query_regex (str): - Optional. Query regex to match the whole search - query. Cannot be set when + Optional. Query regex to match the whole search query. + Cannot be set when `Condition.query_terms `__ - is set. This is currently supporting promotion - use case. + is set. This is currently supporting promotion use case. """ class QueryTerm(proto.Message): @@ -66,12 +64,12 @@ class QueryTerm(proto.Message): The specific query value to match against Must be lowercase, must be UTF-8. - Can have at most 3 space separated terms if - full_match is true. Cannot be an empty string. + Can have at most 3 space separated terms if full_match + is true. Cannot be an empty string. Maximum length of 5000 characters. full_match (bool): - Whether the search query needs to exactly - match the query term. + Whether the search query needs to exactly match the + query term. """ value: str = proto.Field( @@ -128,9 +126,8 @@ class TimeRange(proto.Message): class Control(proto.Message): r"""Defines a conditioned behavior to employ during serving. Must be attached to a - `ServingConfig - `__ to be - considered at serving time. Permitted actions dependent on + `ServingConfig `__ to + be considered at serving time. Permitted actions dependent on ``SolutionType``. This message has `oneof`_ fields (mutually exclusive fields). @@ -155,28 +152,27 @@ class Control(proto.Message): This field is a member of `oneof`_ ``action``. synonyms_action (google.cloud.discoveryengine_v1beta.types.Control.SynonymsAction): - Treats a group of terms as synonyms of one - another. + Treats a group of terms as synonyms of one another. This field is a member of `oneof`_ ``action``. name (str): Immutable. Fully qualified name ``projects/*/locations/global/dataStore/*/controls/*`` display_name (str): - Required. Human readable name. The identifier - used in UI views. - Must be UTF-8 encoded string. Length limit is - 128 characters. Otherwise an INVALID ARGUMENT - error is thrown. + Required. Human readable name. The identifier used in + UI views. + Must be UTF-8 encoded string. Length limit is 128 + characters. Otherwise an INVALID ARGUMENT error is + thrown. associated_serving_config_ids (MutableSequence[str]): Output only. List of all `ServingConfig `__ - IDs this control is attached to. May take up to - 10 minutes to update after changes. + IDs this control is attached to. May take up to 10 + minutes to update after changes. solution_type (google.cloud.discoveryengine_v1beta.types.SolutionType): - Required. Immutable. What solution the - control belongs to. + Required. Immutable. What solution the control + belongs to. Must be compatible with vertical of resource. Otherwise an INVALID ARGUMENT error is thrown. use_cases (MutableSequence[google.cloud.discoveryengine_v1beta.types.SearchUseCase]): @@ -190,12 +186,11 @@ class Control(proto.Message): `SolutionType.SOLUTION_TYPE_SEARCH `__. conditions (MutableSequence[google.cloud.discoveryengine_v1beta.types.Condition]): - Determines when the associated action will - trigger. + Determines when the associated action will trigger. + Omit to always apply the action. - Currently only a single condition may be - specified. Otherwise an INVALID ARGUMENT error - is thrown. + Currently only a single condition may be specified. + Otherwise an INVALID ARGUMENT error is thrown. """ class BoostAction(proto.Message): @@ -203,22 +198,21 @@ class BoostAction(proto.Message): Attributes: boost (float): - Required. Strength of the boost, which should be - in [-1, 1]. Negative boost means demotion. - Default is 0.0 (No-op). + Required. Strength of the boost, which should be in [-1, + 1]. Negative boost means demotion. Default is 0.0 + (No-op). filter (str): - Required. Specifies which products to apply - the boost to. - If no filter is provided all products will be - boosted (No-op). Syntax documentation: + Required. Specifies which products to apply the boost + to. + If no filter is provided all products will be boosted + (No-op). Syntax documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown. data_store (str): - Required. Specifies which data store's documents - can be boosted by this control. Full data store - name e.g. + Required. Specifies which data store's documents can be + boosted by this control. Full data store name e.g. projects/123/locations/global/collections/default_collection/dataStores/default_data_store """ @@ -241,18 +235,17 @@ class FilterAction(proto.Message): Attributes: filter (str): - Required. A filter to apply on the matching - condition results. + Required. A filter to apply on the matching condition + results. Required Syntax documentation: https://cloud.google.com/retail/docs/filter-and-order - Maximum length is 5000 characters. Otherwise an - INVALID ARGUMENT error is thrown. + Maximum length is 5000 characters. Otherwise an INVALID + ARGUMENT error is thrown. data_store (str): - Required. Specifies which data store's documents - can be filtered by this control. Full data store - name e.g. + Required. Specifies which data store's documents can be + filtered by this control. Full data store name e.g. projects/123/locations/global/collections/default_collection/dataStores/default_data_store """ @@ -270,12 +263,11 @@ class RedirectAction(proto.Message): Attributes: redirect_uri (str): - Required. The URI to which the shopper will - be redirected. + Required. The URI to which the shopper will be + redirected. Required. - URI must have length equal or less than 2000 - characters. Otherwise an INVALID ARGUMENT error - is thrown. + URI must have length equal or less than 2000 characters. + Otherwise an INVALID ARGUMENT error is thrown. """ redirect_uri: str = proto.Field( @@ -284,17 +276,17 @@ class RedirectAction(proto.Message): ) class SynonymsAction(proto.Message): - r"""Creates a set of terms that will act as synonyms of one - another. - Example: "happy" will also be considered as "glad", "glad" will - also be considered as "happy". + r"""Creates a set of terms that will act as synonyms of one another. + + Example: "happy" will also be considered as "glad", "glad" will also be + considered as "happy". Attributes: synonyms (MutableSequence[str]): Defines a set of synonyms. Can specify up to 100 synonyms. - Must specify at least 2 synonyms. Otherwise an - INVALID ARGUMENT error is thrown. + Must specify at least 2 synonyms. Otherwise an INVALID + ARGUMENT error is thrown. """ synonyms: MutableSequence[str] = proto.RepeatedField( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/control_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/control_service.py index 5395ef31b8f1..376825a03652 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/control_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/control_service.py @@ -40,17 +40,17 @@ class CreateControlRequest(proto.Message): Attributes: parent (str): - Required. Full resource name of parent data - store. Format: + Required. Full resource name of parent data store. + Format: ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`` or ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}``. control (google.cloud.discoveryengine_v1beta.types.Control): Required. The Control to create. control_id (str): - Required. The ID to use for the Control, which - will become the final component of the Control's - resource name. + Required. The ID to use for the Control, which will + become the final component of the Control's resource + name. This value must be within 1-63 characters. Valid characters are /`a-z <0-9>`__-_/. @@ -80,16 +80,15 @@ class UpdateControlRequest(proto.Message): update_mask (google.protobuf.field_mask_pb2.FieldMask): Optional. Indicates which fields in the provided `Control - `__ - to update. The following are NOT supported: + `__ to + update. The following are NOT supported: * `Control.name - `__ - * `Control.solution_type + `__ * + `Control.solution_type `__ - If not set or empty, all supported fields are - updated. + If not set or empty, all supported fields are updated. """ control: gcd_control.Control = proto.Field( @@ -109,8 +108,8 @@ class DeleteControlRequest(proto.Message): Attributes: name (str): - Required. The resource name of the Control to - delete. Format: + Required. The resource name of the Control to delete. + Format: ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`` """ @@ -125,8 +124,8 @@ class GetControlRequest(proto.Message): Attributes: name (str): - Required. The resource name of the Control to - get. Format: + Required. The resource name of the Control to get. + Format: ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`` """ @@ -142,22 +141,22 @@ class ListControlsRequest(proto.Message): Attributes: parent (str): Required. The data store resource name. Format: + ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`` or ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}``. page_size (int): - Optional. Maximum number of results to - return. If unspecified, defaults to 50. Max - allowed value is 1000. + Optional. Maximum number of results to return. If + unspecified, defaults to 50. Max allowed value is 1000. page_token (str): Optional. A page token, received from a previous - ``ListControls`` call. Provide this to retrieve - the subsequent page. + ``ListControls`` call. Provide this to retrieve the + subsequent page. filter (str): Optional. A filter to apply on the list results. Supported features: - * List all the products under the parent branch - if `filter + * List all the products under the parent branch if + `filter `__ is unset. Currently this field is unsupported. """ @@ -187,8 +186,8 @@ class ListControlsResponse(proto.Message): controls (MutableSequence[google.cloud.discoveryengine_v1beta.types.Control]): All the Controls for a given data store. next_page_token (str): - Pagination token, if not returned indicates - the last page. + Pagination token, if not returned indicates the last + page. """ @property diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/conversation.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/conversation.py index 386a512b18eb..34d7e75b23c1 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/conversation.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/conversation.py @@ -50,11 +50,9 @@ class Conversation(proto.Message): messages (MutableSequence[google.cloud.discoveryengine_v1beta.types.ConversationMessage]): Conversation messages. start_time (google.protobuf.timestamp_pb2.Timestamp): - Output only. The time the conversation - started. + Output only. The time the conversation started. end_time (google.protobuf.timestamp_pb2.Timestamp): - Output only. The time the conversation - finished. + Output only. The time the conversation finished. """ class State(proto.Enum): @@ -167,9 +165,8 @@ class ConversationContext(proto.Message): Attributes: context_documents (MutableSequence[str]): - The current list of documents the user is - seeing. It contains the document resource - references. + The current list of documents the user is seeing. + It contains the document resource references. active_document (str): The current active document the user opened. It contains the document resource reference. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/conversational_search_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/conversational_search_service.py index 0616e9ad1833..87a1214e7b8c 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/conversational_search_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/conversational_search_service.py @@ -57,49 +57,46 @@ class ConverseConversationRequest(proto.Message): Attributes: name (str): - Required. The resource name of the Conversation - to get. Format: + Required. The resource name of the Conversation to get. + Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}``. Use ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/-`` - to activate auto session mode, which - automatically creates a new conversation inside - a ConverseConversation session. + to activate auto session mode, which automatically + creates a new conversation inside a ConverseConversation + session. query (google.cloud.discoveryengine_v1beta.types.TextInput): Required. Current user input. serving_config (str): - The resource name of the Serving Config to use. - Format: + The resource name of the Serving Config to use. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/servingConfigs/{serving_config_id}`` - If this is not set, the default serving config - will be used. + If this is not set, the default serving config will be + used. conversation (google.cloud.discoveryengine_v1beta.types.Conversation): - The conversation to be used by auto session - only. The name field will be ignored as we - automatically assign new name for the - conversation in auto session. + The conversation to be used by auto session only. The + name field will be ignored as we automatically assign + new name for the conversation in auto session. safe_search (bool): Whether to turn on safe search. user_labels (MutableMapping[str, str]): - The user labels applied to a resource must meet - the following requirements: - * Each resource can have multiple labels, up to - a maximum of 64. + The user labels applied to a resource must meet the + following requirements: + * Each resource can have multiple labels, up to a + maximum of 64. * Each label must be a key-value pair. - * Keys have a minimum length of 1 character and - a maximum length of 63 characters and cannot - be empty. Values can be empty and have a maximum - length of 63 characters. + * Keys have a minimum length of 1 character and a + maximum length of 63 characters and cannot be empty. + Values can be empty and have a maximum length of 63 + characters. - * Keys and values can contain only lowercase - letters, numeric characters, underscores, and - dashes. All characters must use UTF-8 encoding, - and international characters are allowed. + * Keys and values can contain only lowercase letters, + numeric characters, underscores, and dashes. All + characters must use UTF-8 encoding, and international + characters are allowed. - * The key portion of a label must be unique. - However, you can use the same key with - multiple resources. + * The key portion of a label must be unique. However, + you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. @@ -109,37 +106,34 @@ class ConverseConversationRequest(proto.Message): `__ for more details. summary_spec (google.cloud.discoveryengine_v1beta.types.SearchRequest.ContentSearchSpec.SummarySpec): - A specification for configuring the summary - returned in the response. + A specification for configuring the summary returned + in the response. filter (str): - The filter syntax consists of an expression - language for constructing a predicate from one - or more fields of the documents being filtered. - Filter expression is case-sensitive. This will - be used to filter search results which may - affect the summary response. + The filter syntax consists of an expression language for + constructing a predicate from one or more fields of the + documents being filtered. Filter expression is + case-sensitive. This will be used to filter search + results which may affect the summary response. If this field is unrecognizable, an ``INVALID_ARGUMENT`` is returned. - Filtering in Vertex AI Search is done by mapping - the LHS filter key to a key property defined in - the Vertex AI Search backend -- this mapping is - defined by the customer in their schema. For - example a media customer might have a field - 'name' in their schema. In this case the filter - would look like this: filter --> name:'ANY("king - kong")' - - For more information about filtering including - syntax and filter operators, see + Filtering in Vertex AI Search is done by mapping the LHS + filter key to a key property defined in the Vertex AI + Search backend -- this mapping is defined by the + customer in their schema. For example a media customer + might have a field 'name' in their schema. In this case + the filter would look like this: filter --> + name:'ANY("king kong")' + + For more information about filtering including syntax + and filter operators, see `Filter `__ boost_spec (google.cloud.discoveryengine_v1beta.types.SearchRequest.BoostSpec): - Boost specification to boost certain documents - in search results which may affect the converse - response. For more information on boosting, see - `Boosting + Boost specification to boost certain documents in search + results which may affect the converse response. For more + information on boosting, see `Boosting `__ """ @@ -233,8 +227,8 @@ class CreateConversationRequest(proto.Message): Attributes: parent (str): - Required. Full resource name of parent data - store. Format: + Required. Full resource name of parent data store. + Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`` conversation (google.cloud.discoveryengine_v1beta.types.Conversation): Required. The conversation to create. @@ -260,14 +254,13 @@ class UpdateConversationRequest(proto.Message): update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided `Conversation - `__ - to update. The following are NOT supported: + `__ to + update. The following are NOT supported: * `Conversation.name `__ - If not set or empty, all supported fields are - updated. + If not set or empty, all supported fields are updated. """ conversation: gcd_conversation.Conversation = proto.Field( @@ -287,8 +280,8 @@ class DeleteConversationRequest(proto.Message): Attributes: name (str): - Required. The resource name of the Conversation - to delete. Format: + Required. The resource name of the Conversation to + delete. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`` """ @@ -303,8 +296,8 @@ class GetConversationRequest(proto.Message): Attributes: name (str): - Required. The resource name of the Conversation - to get. Format: + Required. The resource name of the Conversation to get. + Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`` """ @@ -320,26 +313,26 @@ class ListConversationsRequest(proto.Message): Attributes: parent (str): Required. The data store resource name. Format: + ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`` page_size (int): - Maximum number of results to return. If - unspecified, defaults to 50. Max allowed value - is 1000. + Maximum number of results to return. If unspecified, + defaults to 50. Max allowed value is 1000. page_token (str): A page token, received from a previous - ``ListConversations`` call. Provide this to - retrieve the subsequent page. + ``ListConversations`` call. Provide this to retrieve the + subsequent page. filter (str): - A filter to apply on the list results. The - supported features are: user_pseudo_id, state. + A filter to apply on the list results. The supported + features are: user_pseudo_id, state. Example: "user_pseudo_id = some_id". order_by (str): - A comma-separated list of fields to order by, - sorted in ascending order. Use "desc" after a - field name for descending. Supported fields: + A comma-separated list of fields to order by, sorted in + ascending order. Use "desc" after a field name for + descending. Supported fields: * ``update_time`` * ``create_time`` @@ -381,8 +374,8 @@ class ListConversationsResponse(proto.Message): conversations (MutableSequence[google.cloud.discoveryengine_v1beta.types.Conversation]): All the Conversations for a given data store. next_page_token (str): - Pagination token, if not returned indicates - the last page. + Pagination token, if not returned indicates the last + page. """ @property @@ -408,25 +401,24 @@ class AnswerQueryRequest(proto.Message): Attributes: serving_config (str): - Required. The resource name of the Search - serving config, such as + Required. The resource name of the Search serving + config, such as ``projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config``, or ``projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config``. - This field is used to identify the serving - configuration name, set of models used to make - the search. + This field is used to identify the serving configuration + name, set of models used to make the search. query (google.cloud.discoveryengine_v1beta.types.Query): Required. Current user query. session (str): The session resource name. Not required. - When session field is not set, the API is in - sessionless mode. + When session field is not set, the API is in sessionless + mode. - We support auto session mode: users can use the - wildcard symbol ``-`` as session ID. A new ID - will be automatically generated and assigned. + We support auto session mode: users can use the wildcard + symbol ``-`` as session ID. A new ID will be + automatically generated and assigned. safety_spec (google.cloud.discoveryengine_v1beta.types.AnswerQueryRequest.SafetySpec): Model specification. related_questions_spec (google.cloud.discoveryengine_v1beta.types.AnswerQueryRequest.RelatedQuestionsSpec): @@ -440,55 +432,53 @@ class AnswerQueryRequest(proto.Message): query_understanding_spec (google.cloud.discoveryengine_v1beta.types.AnswerQueryRequest.QueryUnderstandingSpec): Query understanding specification. asynchronous_mode (bool): - Deprecated: This field is deprecated. Streaming - Answer API will be supported. + Deprecated: This field is deprecated. Streaming Answer + API will be supported. Asynchronous mode control. If enabled, the response will be returned with - answer/session resource name without final - answer. The API users need to do the polling to - get the latest status of answer/session by - calling `ConversationalSearchService.GetAnswer + answer/session resource name without final answer. The + API users need to do the polling to get the latest + status of answer/session by calling + `ConversationalSearchService.GetAnswer `__ or `ConversationalSearchService.GetSession `__ method. user_pseudo_id (str): - A unique identifier for tracking visitors. For - example, this could be implemented with an HTTP - cookie, which should be able to uniquely - identify a visitor on a single device. This - unique identifier should not change if the - visitor logs in or out of the website. + A unique identifier for tracking visitors. For example, + this could be implemented with an HTTP cookie, which + should be able to uniquely identify a visitor on a + single device. This unique identifier should not change + if the visitor logs in or out of the website. This field should NOT have a fixed value such as ``unknown_visitor``. - The field must be a UTF-8 encoded string with a - length limit of 128 characters. Otherwise, an + The field must be a UTF-8 encoded string with a length + limit of 128 characters. Otherwise, an ``INVALID_ARGUMENT`` error is returned. user_labels (MutableMapping[str, str]): - The user labels applied to a resource must meet - the following requirements: - * Each resource can have multiple labels, up to - a maximum of 64. + The user labels applied to a resource must meet the + following requirements: + * Each resource can have multiple labels, up to a + maximum of 64. * Each label must be a key-value pair. - * Keys have a minimum length of 1 character and - a maximum length of 63 characters and cannot - be empty. Values can be empty and have a maximum - length of 63 characters. + * Keys have a minimum length of 1 character and a + maximum length of 63 characters and cannot be empty. + Values can be empty and have a maximum length of 63 + characters. - * Keys and values can contain only lowercase - letters, numeric characters, underscores, and - dashes. All characters must use UTF-8 encoding, - and international characters are allowed. + * Keys and values can contain only lowercase letters, + numeric characters, underscores, and dashes. All + characters must use UTF-8 encoding, and international + characters are allowed. - * The key portion of a label must be unique. - However, you can use the same key with - multiple resources. + * The key portion of a label must be unique. However, + you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. @@ -504,8 +494,8 @@ class SafetySpec(proto.Message): Attributes: enable (bool): - Enable the safety filtering on the answer - response. It is false by default. + Enable the safety filtering on the answer response. + It is false by default. """ enable: bool = proto.Field( @@ -532,16 +522,15 @@ class GroundingSpec(proto.Message): Attributes: include_grounding_supports (bool): Optional. Specifies whether to include - grounding_supports in the answer. The default - value is ``false``. + grounding_supports in the answer. The default value is + ``false``. - When this field is set to ``true``, returned - answer will have ``grounding_score`` and will - contain GroundingSupports for each claim. + When this field is set to ``true``, returned answer will + have ``grounding_score`` and will contain + GroundingSupports for each claim. filtering_level (google.cloud.discoveryengine_v1beta.types.AnswerQueryRequest.GroundingSpec.FilteringLevel): - Optional. Specifies whether to enable the - filtering based on grounding score and at what - level. + Optional. Specifies whether to enable the filtering + based on grounding score and at what level. """ class FilteringLevel(proto.Enum): @@ -582,65 +571,59 @@ class AnswerGenerationSpec(proto.Message): prompt_spec (google.cloud.discoveryengine_v1beta.types.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec): Answer generation prompt specification. include_citations (bool): - Specifies whether to include citation metadata - in the answer. The default value is ``false``. + Specifies whether to include citation metadata in the + answer. The default value is ``false``. answer_language_code (str): - Language code for Answer. Use language tags - defined by `BCP47 - `__. - Note: This is an experimental feature. + Language code for Answer. Use language tags defined by + `BCP47 + `__. Note: + This is an experimental feature. ignore_adversarial_query (bool): - Specifies whether to filter out adversarial - queries. The default value is ``false``. - - Google employs search-query classification to - detect adversarial queries. No answer is - returned if the search query is classified as an - adversarial query. For example, a user might ask - a question regarding negative comments about the - company or submit a query designed to generate - unsafe, policy-violating output. If this field - is set to ``true``, we skip generating answers - for adversarial queries and return fallback - messages instead. + Specifies whether to filter out adversarial queries. The + default value is ``false``. + + Google employs search-query classification to detect + adversarial queries. No answer is returned if the search + query is classified as an adversarial query. For + example, a user might ask a question regarding negative + comments about the company or submit a query designed to + generate unsafe, policy-violating output. If this field + is set to ``true``, we skip generating answers for + adversarial queries and return fallback messages + instead. ignore_non_answer_seeking_query (bool): - Specifies whether to filter out queries that are - not answer-seeking. The default value is - ``false``. - - Google employs search-query classification to - detect answer-seeking queries. No answer is - returned if the search query is classified as a - non-answer seeking query. If this field is set - to ``true``, we skip generating answers for - non-answer seeking queries and return fallback - messages instead. + Specifies whether to filter out queries that are not + answer-seeking. The default value is ``false``. + + Google employs search-query classification to detect + answer-seeking queries. No answer is returned if the + search query is classified as a non-answer seeking + query. If this field is set to ``true``, we skip + generating answers for non-answer seeking queries and + return fallback messages instead. ignore_low_relevant_content (bool): - Specifies whether to filter out queries that - have low relevance. - If this field is set to ``false``, all search - results are used regardless of relevance to - generate answers. If set to ``true`` or unset, - the behavior will be determined automatically by - the service. + Specifies whether to filter out queries that have low + relevance. + If this field is set to ``false``, all search results + are used regardless of relevance to generate answers. If + set to ``true`` or unset, the behavior will be + determined automatically by the service. This field is a member of `oneof`_ ``_ignore_low_relevant_content``. ignore_jail_breaking_query (bool): - Optional. Specifies whether to filter out - jail-breaking queries. The default value is - ``false``. + Optional. Specifies whether to filter out jail-breaking + queries. The default value is ``false``. - Google employs search-query classification to - detect jail-breaking queries. No summary is - returned if the search query is classified as a - jail-breaking query. A user might add - instructions to the query to change the tone, - style, language, content of the answer, or ask - the model to act as a different entity, e.g. - "Reply in the tone of a competing company's - CEO". If this field is set to ``true``, we skip - generating summaries for jail-breaking queries - and return fallback messages instead. + Google employs search-query classification to detect + jail-breaking queries. No summary is returned if the + search query is classified as a jail-breaking query. A + user might add instructions to the query to change the + tone, style, language, content of the answer, or ask the + model to act as a different entity, e.g. "Reply in the + tone of a competing company's CEO". If this field is set + to ``true``, we skip generating summaries for + jail-breaking queries and return fallback messages + instead. """ class ModelSpec(proto.Message): @@ -648,9 +631,8 @@ class ModelSpec(proto.Message): Attributes: model_version (str): - Model version. If not set, it will use the - default stable model. Allowed values are: - stable, preview. + Model version. If not set, it will use the default + stable model. Allowed values are: stable, preview. """ model_version: str = proto.Field( @@ -736,64 +718,59 @@ class SearchParams(proto.Message): Number of search results to return. The default value is 10. filter (str): - The filter syntax consists of an expression - language for constructing a predicate from one - or more fields of the documents being filtered. - Filter expression is case-sensitive. This will - be used to filter search results which may - affect the Answer response. + The filter syntax consists of an expression language for + constructing a predicate from one or more fields of the + documents being filtered. Filter expression is + case-sensitive. This will be used to filter search + results which may affect the Answer response. If this field is unrecognizable, an ``INVALID_ARGUMENT`` is returned. - Filtering in Vertex AI Search is done by mapping - the LHS filter key to a key property defined in - the Vertex AI Search backend -- this mapping is - defined by the customer in their schema. For - example a media customers might have a field - 'name' in their schema. In this case the filter - would look like this: filter --> name:'ANY("king - kong")' - - For more information about filtering including - syntax and filter operators, see + Filtering in Vertex AI Search is done by mapping the LHS + filter key to a key property defined in the Vertex AI + Search backend -- this mapping is defined by the + customer in their schema. For example a media customers + might have a field 'name' in their schema. In this case + the filter would look like this: filter --> + name:'ANY("king kong")' + + For more information about filtering including syntax + and filter operators, see `Filter `__ boost_spec (google.cloud.discoveryengine_v1beta.types.SearchRequest.BoostSpec): - Boost specification to boost certain documents - in search results which may affect the answer - query response. For more information on - boosting, see `Boosting + Boost specification to boost certain documents in search + results which may affect the answer query response. For + more information on boosting, see `Boosting `__ order_by (str): - The order in which documents are returned. - Documents can be ordered by a field in an + The order in which documents are returned. Documents can + be ordered by a field in an `Document `__ object. Leave it unset if ordered by relevance. - ``order_by`` expression is case-sensitive. For - more information on ordering, see `Ordering + ``order_by`` expression is case-sensitive. For more + information on ordering, see `Ordering `__ - If this field is unrecognizable, an - ``INVALID_ARGUMENT`` is returned. + If this field is unrecognizable, an ``INVALID_ARGUMENT`` + is returned. search_result_mode (google.cloud.discoveryengine_v1beta.types.SearchRequest.ContentSearchSpec.SearchResultMode): - Specifies the search result mode. If - unspecified, the search result mode defaults to - ``DOCUMENTS``. See `parse and chunk + Specifies the search result mode. If unspecified, the + search result mode defaults to ``DOCUMENTS``. + See `parse and chunk documents `__ data_store_specs (MutableSequence[google.cloud.discoveryengine_v1beta.types.SearchRequest.DataStoreSpec]): - Specs defining dataStores to filter on in a - search call and configurations for those - dataStores. This is only considered for engines - with multiple dataStores use case. For single - dataStore within an engine, they should use the - specs at the top level. + Specs defining dataStores to filter on in a search + call and configurations for those dataStores. This is + only considered for engines with multiple dataStores use + case. For single dataStore within an engine, they should + use the specs at the top level. natural_language_query_understanding_spec (google.cloud.discoveryengine_v1beta.types.SearchRequest.NaturalLanguageQueryUnderstandingSpec): - Optional. Specification to enable natural - language understanding capabilities for search - requests. + Optional. Specification to enable natural language + understanding capabilities for search requests. """ max_return_results: int = proto.Field( @@ -871,18 +848,17 @@ class UnstructuredDocumentInfo(proto.Message): title (str): Title. document_contexts (MutableSequence[google.cloud.discoveryengine_v1beta.types.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext]): - List of document contexts. The content will - be used for Answer Generation. This is supposed - to be the main content of the document that can - be long and comprehensive. + List of document contexts. The content will be used + for Answer Generation. This is supposed to be the main + content of the document that can be long and + comprehensive. extractive_segments (MutableSequence[google.cloud.discoveryengine_v1beta.types.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment]): List of extractive segments. extractive_answers (MutableSequence[google.cloud.discoveryengine_v1beta.types.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer]): - Deprecated: This field is deprecated and will - have no effect on the Answer generation. - Please use document_contexts and - extractive_segments fields. List of extractive - answers. + Deprecated: This field is deprecated and will have no + effect on the Answer generation. + Please use document_contexts and extractive_segments + fields. List of extractive answers. """ class DocumentContext(proto.Message): @@ -892,8 +868,7 @@ class DocumentContext(proto.Message): page_identifier (str): Page identifier. content (str): - Document content to be used for answer - generation. + Document content to be used for answer generation. """ page_identifier: str = proto.Field( @@ -909,8 +884,8 @@ class ExtractiveSegment(proto.Message): r"""Extractive segment. `Guide `__ - Answer generation will only use it if document_contexts is - empty. This is supposed to be shorter snippets. + Answer generation will only use it if document_contexts is empty. This + is supposed to be shorter snippets. Attributes: page_identifier (str): @@ -992,13 +967,12 @@ class ChunkInfo(proto.Message): content (str): Chunk textual content. document_metadata (google.cloud.discoveryengine_v1beta.types.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo.DocumentMetadata): - Metadata of the document from the current - chunk. + Metadata of the document from the current chunk. """ class DocumentMetadata(proto.Message): - r"""Document metadata contains the information of the document of - the current chunk. + r"""Document metadata contains the information of the document of the + current chunk. Attributes: uri (str): @@ -1220,15 +1194,15 @@ class AnswerQueryResponse(proto.Message): `__ is greater than 1, use `Answer.name - `__ - to fetch answer information using + `__ to + fetch answer information using `ConversationalSearchService.GetAnswer `__ API. session (google.cloud.discoveryengine_v1beta.types.Session): Session resource object. - It will be only available when session field is - set and valid in the `AnswerQueryRequest + It will be only available when session field is set and + valid in the `AnswerQueryRequest `__ request. answer_query_token (str): @@ -1256,8 +1230,8 @@ class GetAnswerRequest(proto.Message): Attributes: name (str): - Required. The resource name of the Answer to - get. Format: + Required. The resource name of the Answer to get. + Format: ``projects/{project}/locations/{location}/collections/{collection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`` """ @@ -1272,8 +1246,8 @@ class CreateSessionRequest(proto.Message): Attributes: parent (str): - Required. Full resource name of parent data - store. Format: + Required. Full resource name of parent data store. + Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`` session (google.cloud.discoveryengine_v1beta.types.Session): Required. The session to create. @@ -1299,14 +1273,13 @@ class UpdateSessionRequest(proto.Message): update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided `Session - `__ - to update. The following are NOT supported: + `__ to + update. The following are NOT supported: * `Session.name `__ - If not set or empty, all supported fields are - updated. + If not set or empty, all supported fields are updated. """ session: gcd_session.Session = proto.Field( @@ -1326,8 +1299,8 @@ class DeleteSessionRequest(proto.Message): Attributes: name (str): - Required. The resource name of the Session to - delete. Format: + Required. The resource name of the Session to delete. + Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`` """ @@ -1342,12 +1315,12 @@ class GetSessionRequest(proto.Message): Attributes: name (str): - Required. The resource name of the Session to - get. Format: + Required. The resource name of the Session to get. + Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`` include_answer_details (bool): - Optional. If set to true, the full session - including all answer details will be returned. + Optional. If set to true, the full session including + all answer details will be returned. """ name: str = proto.Field( @@ -1366,18 +1339,17 @@ class ListSessionsRequest(proto.Message): Attributes: parent (str): Required. The data store resource name. Format: + ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`` page_size (int): - Maximum number of results to return. If - unspecified, defaults to 50. Max allowed value - is 1000. + Maximum number of results to return. If unspecified, + defaults to 50. Max allowed value is 1000. page_token (str): - A page token, received from a previous - ``ListSessions`` call. Provide this to retrieve - the subsequent page. + A page token, received from a previous ``ListSessions`` + call. Provide this to retrieve the subsequent page. filter (str): - A comma-separated list of fields to filter by, - in EBNF grammar. The supported fields are: + A comma-separated list of fields to filter by, in EBNF + grammar. The supported fields are: * ``user_pseudo_id`` * ``state`` @@ -1399,9 +1371,9 @@ class ListSessionsRequest(proto.Message): "is_pinned=true AND (NOT labels:hidden)" "create_time > \"1970-01-01T12:00:00Z\"". order_by (str): - A comma-separated list of fields to order by, - sorted in ascending order. Use "desc" after a - field name for descending. Supported fields: + A comma-separated list of fields to order by, sorted in + ascending order. Use "desc" after a field name for + descending. Supported fields: * ``update_time`` * ``create_time`` @@ -1414,9 +1386,8 @@ class ListSessionsRequest(proto.Message): * "update_time desc" * "create_time" - * "is_pinned desc,update_time desc": list - sessions by is_pinned first, then by - update_time. + * "is_pinned desc,update_time desc": list sessions by + is_pinned first, then by update_time. """ parent: str = proto.Field( @@ -1448,8 +1419,8 @@ class ListSessionsResponse(proto.Message): sessions (MutableSequence[google.cloud.discoveryengine_v1beta.types.Session]): All the Sessions for a given data store. next_page_token (str): - Pagination token, if not returned indicates - the last page. + Pagination token, if not returned indicates the last + page. """ @property diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/custom_tuning_model.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/custom_tuning_model.py index 5cd4a04de4e6..25f40c3a51b1 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/custom_tuning_model.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/custom_tuning_model.py @@ -33,31 +33,30 @@ class CustomTuningModel(proto.Message): Attributes: name (str): - Required. The fully qualified resource name of - the model. + Required. The fully qualified resource name of the + model. Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/customTuningModels/{custom_tuning_model}``. - Model must be an alpha-numerical string with - limit of 40 characters. + Model must be an alpha-numerical string with limit of 40 + characters. display_name (str): The display name of the model. model_version (int): The version of the model. model_state (google.cloud.discoveryengine_v1beta.types.CustomTuningModel.ModelState): - The state that the model is in (e.g.``TRAINING`` - or ``TRAINING_FAILED``). + The state that the model is in (e.g.``TRAINING`` or + ``TRAINING_FAILED``). create_time (google.protobuf.timestamp_pb2.Timestamp): - Deprecated: Timestamp the Model was created - at. + Deprecated: Timestamp the Model was created at. training_start_time (google.protobuf.timestamp_pb2.Timestamp): Timestamp the model training was initiated. metrics (MutableMapping[str, float]): The metrics of the trained model. error_message (str): - Currently this is only populated if the model - state is ``INPUT_VALIDATION_FAILED``. + Currently this is only populated if the model state is + ``INPUT_VALIDATION_FAILED``. """ class ModelState(proto.Enum): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/data_store.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/data_store.py index 787bf278bcec..10af8aaadfc6 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/data_store.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/data_store.py @@ -38,62 +38,60 @@ class DataStore(proto.Message): - r"""DataStore captures global settings and configs at the - DataStore level. + r"""DataStore captures global settings and configs at the DataStore + level. Attributes: name (str): - Immutable. The full resource name of the data - store. Format: + Immutable. The full resource name of the data store. + Format: ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}``. - This field must be a UTF-8 encoded string with a - length limit of 1024 characters. + This field must be a UTF-8 encoded string with a length + limit of 1024 characters. display_name (str): Required. The data store display name. - This field must be a UTF-8 encoded string with a - length limit of 128 characters. Otherwise, an - INVALID_ARGUMENT error is returned. + This field must be a UTF-8 encoded string with a length + limit of 128 characters. Otherwise, an INVALID_ARGUMENT + error is returned. industry_vertical (google.cloud.discoveryengine_v1beta.types.IndustryVertical): - Immutable. The industry vertical that the - data store registers. + Immutable. The industry vertical that the data store + registers. solution_types (MutableSequence[google.cloud.discoveryengine_v1beta.types.SolutionType]): - The solutions that the data store enrolls. - Available solutions for each `industry_vertical + The solutions that the data store enrolls. Available + solutions for each `industry_vertical `__: - * ``MEDIA``: ``SOLUTION_TYPE_RECOMMENDATION`` - and ``SOLUTION_TYPE_SEARCH``. * ``SITE_SEARCH``: - ``SOLUTION_TYPE_SEARCH`` is automatically - enrolled. Other solutions cannot be enrolled. + * ``MEDIA``: ``SOLUTION_TYPE_RECOMMENDATION`` and + ``SOLUTION_TYPE_SEARCH``. * ``SITE_SEARCH``: + ``SOLUTION_TYPE_SEARCH`` is automatically enrolled. + Other solutions cannot be enrolled. default_schema_id (str): Output only. The id of the default - `Schema - `__ + `Schema `__ asscociated to this data store. content_config (google.cloud.discoveryengine_v1beta.types.DataStore.ContentConfig): - Immutable. The content config of the data store. - If this field is unset, the server behavior - defaults to `ContentConfig.NO_CONTENT + Immutable. The content config of the data store. If this + field is unset, the server behavior defaults to + `ContentConfig.NO_CONTENT `__. create_time (google.protobuf.timestamp_pb2.Timestamp): Output only. Timestamp the `DataStore - `__ - was created at. + `__ was + created at. language_info (google.cloud.discoveryengine_v1beta.types.LanguageInfo): Language info for DataStore. natural_language_query_understanding_config (google.cloud.discoveryengine_v1beta.types.NaturalLanguageQueryUnderstandingConfig): - Optional. Configuration for Natural Language - Query Understanding. + Optional. Configuration for Natural Language Query + Understanding. billing_estimation (google.cloud.discoveryengine_v1beta.types.DataStore.BillingEstimation): - Output only. Data size estimation for - billing. + Output only. Data size estimation for billing. workspace_config (google.cloud.discoveryengine_v1beta.types.WorkspaceConfig): - Config to store data store type configuration - for workspace data. This must be set when + Config to store data store type configuration for + workspace data. This must be set when `DataStore.content_config `__ is set as @@ -105,27 +103,26 @@ class DataStore(proto.Message): starting_schema (google.cloud.discoveryengine_v1beta.types.Schema): The start schema to use for this `DataStore - `__ - when provisioning it. If unset, a default - vertical specialized schema will be used. - - This field is only used by [CreateDataStore][] - API, and will be ignored if used in other APIs. - This field will be omitted from all API - responses including [CreateDataStore][] API. To - retrieve a schema of a `DataStore - `__, - use `SchemaService.GetSchema + `__ when + provisioning it. If unset, a default vertical + specialized schema will be used. + + This field is only used by [CreateDataStore][] API, and + will be ignored if used in other APIs. This field will + be omitted from all API responses including + [CreateDataStore][] API. To retrieve a schema of a + `DataStore + `__, use + `SchemaService.GetSchema `__ API instead. - The provided schema will be validated against - certain rules on schema. Learn more from `this + The provided schema will be validated against certain + rules on schema. Learn more from `this doc `__. serving_config_data_store (google.cloud.discoveryengine_v1beta.types.DataStore.ServingConfigDataStore): - Optional. Stores serving config at DataStore - level. + Optional. Stores serving config at DataStore level. """ class ContentConfig(proto.Enum): @@ -162,11 +159,9 @@ class BillingEstimation(proto.Message): Attributes: structured_data_size (int): - Data size for structured data in terms of - bytes. + Data size for structured data in terms of bytes. unstructured_data_size (int): - Data size for unstructured data in terms of - bytes. + Data size for unstructured data in terms of bytes. website_data_size (int): Data size for websites in terms of bytes. structured_data_update_time (google.protobuf.timestamp_pb2.Timestamp): @@ -206,13 +201,13 @@ class BillingEstimation(proto.Message): ) class ServingConfigDataStore(proto.Message): - r"""Stores information regarding the serving configurations at - DataStore level. + r"""Stores information regarding the serving configurations at DataStore + level. Attributes: disabled_for_serving (bool): - If set true, the DataStore will not be - available for serving search requests. + If set true, the DataStore will not be available for + serving search requests. """ disabled_for_serving: bool = proto.Field( @@ -301,15 +296,13 @@ class LanguageInfo(proto.Message): ``en_GB``, ``en-UK`` or ``en-gb`` will have normalized_language_code of ``en-GB``. language (str): - Output only. Language part of - normalized_language_code. E.g.: ``en-US`` -> - ``en``, ``zh-Hans-HK`` -> ``zh``, ``en`` -> - ``en``. + Output only. Language part of normalized_language_code. + E.g.: ``en-US`` -> ``en``, ``zh-Hans-HK`` -> ``zh``, + ``en`` -> ``en``. region (str): - Output only. Region part of - normalized_language_code, if present. E.g.: - ``en-US`` -> ``US``, ``zh-Hans-HK`` -> ``HK``, - ``en`` -> ``. + Output only. Region part of normalized_language_code, if + present. E.g.: ``en-US`` -> ``US``, ``zh-Hans-HK`` -> + ``HK``, ``en`` -> ``. """ language_code: str = proto.Field( @@ -335,18 +328,17 @@ class NaturalLanguageQueryUnderstandingConfig(proto.Message): Attributes: mode (google.cloud.discoveryengine_v1beta.types.NaturalLanguageQueryUnderstandingConfig.Mode): - Mode of Natural Language Query Understanding. If - this field is unset, the behavior defaults to + Mode of Natural Language Query Understanding. If this + field is unset, the behavior defaults to `NaturalLanguageQueryUnderstandingConfig.Mode.DISABLED `__. """ class Mode(proto.Enum): r"""Mode of Natural Language Query Understanding. When the - NaturalLanguageQueryUnderstandingConfig.Mode is ENABLED, the - natural language understanding capabilities will be enabled for - a search request if the - NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition + NaturalLanguageQueryUnderstandingConfig.Mode is ENABLED, the natural + language understanding capabilities will be enabled for a search request + if the NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition in the SearchRequest is ENABLED. Values: @@ -371,8 +363,7 @@ class Mode(proto.Enum): class WorkspaceConfig(proto.Message): - r"""Config to store data store type configuration for workspace - data + r"""Config to store data store type configuration for workspace data Attributes: type_ (google.cloud.discoveryengine_v1beta.types.WorkspaceConfig.Type): @@ -380,20 +371,19 @@ class WorkspaceConfig(proto.Message): dasher_customer_id (str): Obfuscated Dasher customer ID. super_admin_service_account (str): - Optional. The super admin service account for - the workspace that will be used for access token - generation. For now we only use it for Native - Google Drive connector data ingestion. + Optional. The super admin service account for the + workspace that will be used for access token generation. + For now we only use it for Native Google Drive connector + data ingestion. super_admin_email_address (str): - Optional. The super admin email address for - the workspace that will be used for access token - generation. For now we only use it for Native - Google Drive connector data ingestion. + Optional. The super admin email address for the + workspace that will be used for access token generation. + For now we only use it for Native Google Drive connector + data ingestion. """ class Type(proto.Enum): - r"""Specifies the type of Workspace App supported by this - DataStore + r"""Specifies the type of Workspace App supported by this DataStore Values: TYPE_UNSPECIFIED (0): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/data_store_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/data_store_service.py index 910ec03627f1..66080e8ad2ff 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/data_store_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/data_store_service.py @@ -50,8 +50,8 @@ class CreateDataStoreRequest(proto.Message): ``projects/{project}/locations/{location}/collections/{collection}``. data_store (google.cloud.discoveryengine_v1beta.types.DataStore): Required. The `DataStore - `__ - to create. + `__ to + create. data_store_id (str): Required. The ID to use for the `DataStore @@ -62,27 +62,23 @@ class CreateDataStoreRequest(proto.Message): resource name. This field must conform to `RFC-1034 - `__ - standard with a length limit of 63 characters. - Otherwise, an INVALID_ARGUMENT error is - returned. + `__ standard with a + length limit of 63 characters. Otherwise, an + INVALID_ARGUMENT error is returned. create_advanced_site_search (bool): - A boolean flag indicating whether user want to - directly create an advanced data store for site - search. If the data store is not configured as - site + A boolean flag indicating whether user want to directly + create an advanced data store for site search. + If the data store is not configured as site search (GENERIC vertical and PUBLIC_WEBSITE content_config), this flag will be ignored. skip_default_schema_creation (bool): - A boolean flag indicating whether to skip the - default schema creation for the data store. Only - enable this flag if you are certain that the - default schema is incompatible with your use - case. + A boolean flag indicating whether to skip the default + schema creation for the data store. Only enable this + flag if you are certain that the default schema is + incompatible with your use case. - If set to true, you must manually create a - schema for the data store before any documents - can be ingested. + If set to true, you must manually create a schema for + the data store before any documents can be ingested. This flag cannot be specified if ``data_store.starting_schema`` is specified. @@ -121,19 +117,19 @@ class GetDataStoreRequest(proto.Message): name (str): Required. Full resource name of `DataStore - `__, - such as + `__, such + as ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}``. - If the caller does not have permission to access - the `DataStore + If the caller does not have permission to access the + `DataStore `__, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested `DataStore - `__ - does not exist, a NOT_FOUND error is returned. + `__ does + not exist, a NOT_FOUND error is returned. """ name: str = proto.Field( @@ -153,8 +149,8 @@ class CreateDataStoreMetadata(proto.Message): create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -177,26 +173,25 @@ class ListDataStoresRequest(proto.Message): Attributes: parent (str): - Required. The parent branch resource name, such - as + Required. The parent branch resource name, such as ``projects/{project}/locations/{location}/collections/{collection_id}``. If the caller does not have permission to list `DataStore `__s - under this location, regardless of whether or - not this data store exists, a PERMISSION_DENIED - error is returned. + under this location, regardless of whether or not this + data store exists, a PERMISSION_DENIED error is + returned. page_size (int): Maximum number of `DataStore - `__s - to return. If unspecified, defaults to 10. The - maximum allowed value is 50. Values above 50 - will be coerced to 50. + `__s to + return. If unspecified, defaults to 10. The maximum + allowed value is 50. Values above 50 will be coerced to + 50. - If this field is negative, an INVALID_ARGUMENT - is returned. + If this field is negative, an INVALID_ARGUMENT is + returned. page_token (str): A page token `ListDataStoresResponse.next_page_token @@ -204,15 +199,13 @@ class ListDataStoresRequest(proto.Message): received from a previous `DataStoreService.ListDataStores `__ - call. Provide this to retrieve the subsequent - page. + call. Provide this to retrieve the subsequent page. - When paginating, all other parameters provided - to `DataStoreService.ListDataStores + When paginating, all other parameters provided to + `DataStoreService.ListDataStores `__ - must match the call that provided the page - token. Otherwise, an INVALID_ARGUMENT error is - returned. + must match the call that provided the page token. + Otherwise, an INVALID_ARGUMENT error is returned. filter (str): Filter by solution type . For example: ``filter = @@ -252,8 +245,8 @@ class ListDataStoresResponse(proto.Message): A token that can be sent as `ListDataStoresRequest.page_token `__ - to retrieve the next page. If this field is - omitted, there are no subsequent pages. + to retrieve the next page. If this field is omitted, + there are no subsequent pages. """ @property @@ -281,20 +274,19 @@ class DeleteDataStoreRequest(proto.Message): name (str): Required. Full resource name of `DataStore - `__, - such as + `__, such + as ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}``. - If the caller does not have permission to delete - the `DataStore + If the caller does not have permission to delete the + `DataStore `__, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the `DataStore - `__ - to delete does not exist, a NOT_FOUND error is - returned. + `__ to + delete does not exist, a NOT_FOUND error is returned. """ name: str = proto.Field( @@ -312,27 +304,26 @@ class UpdateDataStoreRequest(proto.Message): Attributes: data_store (google.cloud.discoveryengine_v1beta.types.DataStore): Required. The `DataStore - `__ - to update. + `__ to + update. - If the caller does not have permission to update - the `DataStore + If the caller does not have permission to update the + `DataStore `__, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the `DataStore - `__ - to update does not exist, a NOT_FOUND error is - returned. + `__ to + update does not exist, a NOT_FOUND error is returned. update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided `DataStore - `__ - to update. + `__ to + update. - If an unsupported or unknown field is provided, - an INVALID_ARGUMENT error is returned. + If an unsupported or unknown field is provided, an + INVALID_ARGUMENT error is returned. """ data_store: gcd_data_store.DataStore = proto.Field( @@ -358,8 +349,8 @@ class DeleteDataStoreMetadata(proto.Message): create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/document.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/document.py index 134322edc26e..7c74c5431d9b 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/document.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/document.py @@ -43,67 +43,66 @@ class Document(proto.Message): Attributes: struct_data (google.protobuf.struct_pb2.Struct): - The structured JSON data for the document. It - should conform to the registered `Schema - `__ - or an ``INVALID_ARGUMENT`` error is thrown. + The structured JSON data for the document. It should + conform to the registered `Schema + `__ or an + ``INVALID_ARGUMENT`` error is thrown. This field is a member of `oneof`_ ``data``. json_data (str): - The JSON string representation of the document. - It should conform to the registered `Schema - `__ - or an ``INVALID_ARGUMENT`` error is thrown. + The JSON string representation of the document. It + should conform to the registered `Schema + `__ or an + ``INVALID_ARGUMENT`` error is thrown. This field is a member of `oneof`_ ``data``. name (str): - Immutable. The full resource name of the - document. Format: + Immutable. The full resource name of the document. + Format: ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}``. - This field must be a UTF-8 encoded string with a - length limit of 1024 characters. + This field must be a UTF-8 encoded string with a length + limit of 1024 characters. id (str): Immutable. The identifier of the document. Id should conform to `RFC-1034 - `__ - standard with a length limit of 63 characters. + `__ standard with a + length limit of 63 characters. schema_id (str): - The identifier of the schema located in the - same data store. + The identifier of the schema located in the same data + store. content (google.cloud.discoveryengine_v1beta.types.Document.Content): - The unstructured data linked to this document. - Content must be set if this document is under a + The unstructured data linked to this document. Content + must be set if this document is under a ``CONTENT_REQUIRED`` data store. parent_document_id (str): The identifier of the parent document. Currently supports at most two level document hierarchy. Id should conform to `RFC-1034 - `__ - standard with a length limit of 63 characters. + `__ standard with a + length limit of 63 characters. derived_struct_data (google.protobuf.struct_pb2.Struct): Output only. This field is OUTPUT_ONLY. - It contains derived data that are not in the - original input document. + It contains derived data that are not in the original + input document. index_time (google.protobuf.timestamp_pb2.Timestamp): - Output only. The last time the document was - indexed. If this field is set, the document - could be returned in search results. + Output only. The last time the document was indexed. If + this field is set, the document could be returned in + search results. This field is OUTPUT_ONLY. If this field is not - populated, it means the document has never been - indexed. + populated, it means the document has never been indexed. index_status (google.cloud.discoveryengine_v1beta.types.Document.IndexStatus): Output only. The index status of the document. - * If document is indexed successfully, the - index_time field is populated. + * If document is indexed successfully, the index_time + field is populated. - * Otherwise, if document is not indexed due to - errors, the error_samples field is populated. + * Otherwise, if document is not indexed due to errors, + the error_samples field is populated. * Otherwise, index_status is unset. """ @@ -120,24 +119,22 @@ class Content(proto.Message): Attributes: raw_bytes (bytes): - The content represented as a stream of bytes. - The maximum length is 1,000,000 bytes (1 MB / - ~0.95 MiB). - - Note: As with all ``bytes`` fields, this field - is represented as pure binary in Protocol - Buffers and base64-encoded string in JSON. For - example, ``abc123!?$*&()'-=@~`` should be - represented as ``YWJjMTIzIT8kKiYoKSctPUB+`` in - JSON. See + The content represented as a stream of bytes. The + maximum length is 1,000,000 bytes (1 MB / ~0.95 MiB). + + Note: As with all ``bytes`` fields, this field is + represented as pure binary in Protocol Buffers and + base64-encoded string in JSON. For example, + ``abc123!?$*&()'-=@~`` should be represented as + ``YWJjMTIzIT8kKiYoKSctPUB+`` in JSON. See https://developers.google.com/protocol-buffers/docs/proto3#json. This field is a member of `oneof`_ ``content``. uri (str): - The URI of the content. Only Cloud Storage URIs - (e.g. ``gs://bucket-name/path/to/file``) are - supported. The maximum file size is 2.5 MB for - text-based formats, 200 MB for other formats. + The URI of the content. Only Cloud Storage URIs (e.g. + ``gs://bucket-name/path/to/file``) are supported. The + maximum file size is 2.5 MB for text-based formats, 200 + MB for other formats. This field is a member of `oneof`_ ``content``. mime_type (str): @@ -180,12 +177,12 @@ class IndexStatus(proto.Message): Attributes: index_time (google.protobuf.timestamp_pb2.Timestamp): The time when the document was indexed. - If this field is populated, it means the - document has been indexed. + If this field is populated, it means the document has + been indexed. error_samples (MutableSequence[google.rpc.status_pb2.Status]): - A sample of errors encountered while indexing - the document. If this field is populated, the - document is not indexed due to errors. + A sample of errors encountered while indexing the + document. If this field is populated, the document is + not indexed due to errors. """ index_time: timestamp_pb2.Timestamp = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/document_processing_config.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/document_processing_config.py index 1f865b1c094a..81805f1c9f67 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/document_processing_config.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/document_processing_config.py @@ -29,10 +29,9 @@ class DocumentProcessingConfig(proto.Message): r"""A singleton resource of - `DataStore `__. - If it's empty when `DataStore - `__ is created - and `DataStore + `DataStore `__. If it's + empty when `DataStore `__ + is created and `DataStore `__ is set to `DataStore.ContentConfig.CONTENT_REQUIRED `__, @@ -40,46 +39,39 @@ class DocumentProcessingConfig(proto.Message): Attributes: name (str): - The full resource name of the Document - Processing Config. Format: + The full resource name of the Document Processing + Config. Format: ``projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig``. chunking_config (google.cloud.discoveryengine_v1beta.types.DocumentProcessingConfig.ChunkingConfig): Whether chunking mode is enabled. default_parsing_config (google.cloud.discoveryengine_v1beta.types.DocumentProcessingConfig.ParsingConfig): Configurations for default Document parser. - If not specified, we will configure it as - default DigitalParsingConfig, and the default - parsing config will be applied to all file types - for Document parsing. + If not specified, we will configure it as default + DigitalParsingConfig, and the default parsing config + will be applied to all file types for Document parsing. parsing_config_overrides (MutableMapping[str, google.cloud.discoveryengine_v1beta.types.DocumentProcessingConfig.ParsingConfig]): - Map from file type to override the default - parsing configuration based on the file type. - Supported keys: + Map from file type to override the default parsing + configuration based on the file type. Supported keys: - * ``pdf``: Override parsing config for PDF - files, either digital parsing, ocr parsing or - layout parsing is supported. + * ``pdf``: Override parsing config for PDF files, either + digital parsing, ocr parsing or layout parsing is + supported. - * ``html``: Override parsing config for HTML - files, only digital parsing and layout parsing - are supported. + * ``html``: Override parsing config for HTML files, only + digital parsing and layout parsing are supported. - * ``docx``: Override parsing config for DOCX - files, only digital parsing and layout parsing - are supported. + * ``docx``: Override parsing config for DOCX files, only + digital parsing and layout parsing are supported. - * ``pptx``: Override parsing config for PPTX - files, only digital parsing and layout parsing - are supported. + * ``pptx``: Override parsing config for PPTX files, only + digital parsing and layout parsing are supported. - * ``xlsm``: Override parsing config for XLSM - files, only digital parsing and layout parsing - are supported. + * ``xlsm``: Override parsing config for XLSM files, only + digital parsing and layout parsing are supported. - * ``xlsx``: Override parsing config for XLSX - files, only digital parsing and layout parsing - are supported. + * ``xlsx``: Override parsing config for XLSX files, only + digital parsing and layout parsing are supported. """ class ChunkingConfig(proto.Message): @@ -104,9 +96,9 @@ class LayoutBasedChunkingConfig(proto.Message): Supported values: 100-500 (inclusive). Default value: 500. include_ancestor_headings (bool): - Whether to include appending different levels - of headings to chunks from the middle of the - document to prevent context loss. + Whether to include appending different levels of + headings to chunks from the middle of the document to + prevent context loss. Default value: False. """ @@ -128,8 +120,7 @@ class LayoutBasedChunkingConfig(proto.Message): ) class ParsingConfig(proto.Message): - r"""Related configurations applied to a specific type of document - parser. + r"""Related configurations applied to a specific type of document parser. This message has `oneof`_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. @@ -144,8 +135,8 @@ class ParsingConfig(proto.Message): This field is a member of `oneof`_ ``type_dedicated_config``. ocr_parsing_config (google.cloud.discoveryengine_v1beta.types.DocumentProcessingConfig.ParsingConfig.OcrParsingConfig): - Configurations applied to OCR parser. - Currently it only applies to PDFs. + Configurations applied to OCR parser. Currently it + only applies to PDFs. This field is a member of `oneof`_ ``type_dedicated_config``. layout_parsing_config (google.cloud.discoveryengine_v1beta.types.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig): @@ -162,13 +153,12 @@ class OcrParsingConfig(proto.Message): Attributes: enhanced_document_elements (MutableSequence[str]): - [DEPRECATED] This field is deprecated. To use - the additional enhanced document elements - processing, please switch to - ``layout_parsing_config``. + [DEPRECATED] This field is deprecated. To use the + additional enhanced document elements processing, please + switch to ``layout_parsing_config``. use_native_text (bool): - If true, will use native text instead of OCR - text on pages containing native text. + If true, will use native text instead of OCR text on + pages containing native text. """ enhanced_document_elements: MutableSequence[str] = proto.RepeatedField( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/document_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/document_service.py index 25644771f39b..c1b3f8b0a2e1 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/document_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/document_service.py @@ -48,20 +48,19 @@ class GetDocumentRequest(proto.Message): name (str): Required. Full resource name of `Document - `__, - such as + `__, such + as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}``. - If the caller does not have permission to access - the `Document + If the caller does not have permission to access the + `Document `__, regardless of whether or not it exists, a ``PERMISSION_DENIED`` error is returned. If the requested `Document - `__ - does not exist, a ``NOT_FOUND`` error is - returned. + `__ does + not exist, a ``NOT_FOUND`` error is returned. """ name: str = proto.Field( @@ -78,27 +77,25 @@ class ListDocumentsRequest(proto.Message): Attributes: parent (str): - Required. The parent branch resource name, such - as + Required. The parent branch resource name, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}``. Use ``default_branch`` as the branch ID, to list documents under the default branch. If the caller does not have permission to list `Document - `__s - under this branch, regardless of whether or not - this branch exists, a ``PERMISSION_DENIED`` - error is returned. + `__s under + this branch, regardless of whether or not this branch + exists, a ``PERMISSION_DENIED`` error is returned. page_size (int): Maximum number of `Document - `__s - to return. If unspecified, defaults to 100. The - maximum allowed value is + `__s to + return. If unspecified, defaults to 100. The maximum + allowed value is 1000. Values above 1000 are set to 1000. - If this field is negative, an - ``INVALID_ARGUMENT`` error is returned. + If this field is negative, an ``INVALID_ARGUMENT`` error + is returned. page_token (str): A page token `ListDocumentsResponse.next_page_token @@ -106,15 +103,13 @@ class ListDocumentsRequest(proto.Message): received from a previous `DocumentService.ListDocuments `__ - call. Provide this to retrieve the subsequent - page. + call. Provide this to retrieve the subsequent page. - When paginating, all other parameters provided - to `DocumentService.ListDocuments + When paginating, all other parameters provided to + `DocumentService.ListDocuments `__ - must match the call that provided the page - token. Otherwise, an ``INVALID_ARGUMENT`` error - is returned. + must match the call that provided the page token. + Otherwise, an ``INVALID_ARGUMENT`` error is returned. """ parent: str = proto.Field( @@ -145,8 +140,8 @@ class ListDocumentsResponse(proto.Message): A token that can be sent as `ListDocumentsRequest.page_token `__ - to retrieve the next page. If this field is - omitted, there are no subsequent pages. + to retrieve the next page. If this field is omitted, + there are no subsequent pages. """ @property @@ -176,35 +171,33 @@ class CreateDocumentRequest(proto.Message): ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}``. document (google.cloud.discoveryengine_v1beta.types.Document): Required. The `Document - `__ - to create. + `__ to + create. document_id (str): Required. The ID to use for the `Document - `__, - which becomes the final component of the + `__, which + becomes the final component of the `Document.name `__. - If the caller does not have permission to create - the `Document + If the caller does not have permission to create the + `Document `__, regardless of whether or not it exists, a ``PERMISSION_DENIED`` error is returned. This field must be unique among all `Document - `__s - with the same `parent + `__s with + the same `parent `__. - Otherwise, an ``ALREADY_EXISTS`` error is - returned. + Otherwise, an ``ALREADY_EXISTS`` error is returned. This field must conform to `RFC-1034 - `__ - standard with a length limit of 63 characters. - Otherwise, an ``INVALID_ARGUMENT`` error is - returned. + `__ standard with a + length limit of 63 characters. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. """ parent: str = proto.Field( @@ -232,29 +225,29 @@ class UpdateDocumentRequest(proto.Message): document (google.cloud.discoveryengine_v1beta.types.Document): Required. The document to update/create. - If the caller does not have permission to update - the `Document + If the caller does not have permission to update the + `Document `__, regardless of whether or not it exists, a ``PERMISSION_DENIED`` error is returned. If the `Document - `__ - to update does not exist and + `__ to + update does not exist and `allow_missing `__ is not set, a ``NOT_FOUND`` error is returned. allow_missing (bool): If set to ``true`` and the `Document - `__ - is not found, a new `Document - `__ - is be created. + `__ is not + found, a new `Document + `__ is be + created. update_mask (google.protobuf.field_mask_pb2.FieldMask): - Indicates which fields in the provided - imported 'document' to update. If not set, by - default updates all fields. + Indicates which fields in the provided imported + 'document' to update. If not set, by default updates all + fields. """ document: gcd_document.Document = proto.Field( @@ -283,20 +276,20 @@ class DeleteDocumentRequest(proto.Message): name (str): Required. Full resource name of `Document - `__, - such as + `__, such + as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}``. - If the caller does not have permission to delete - the `Document + If the caller does not have permission to delete the + `Document `__, regardless of whether or not it exists, a ``PERMISSION_DENIED`` error is returned. If the `Document - `__ - to delete does not exist, a ``NOT_FOUND`` error - is returned. + `__ to + delete does not exist, a ``NOT_FOUND`` error is + returned. """ name: str = proto.Field( @@ -313,8 +306,7 @@ class BatchGetDocumentsMetadataRequest(proto.Message): Attributes: parent (str): - Required. The parent branch resource name, such - as + Required. The parent branch resource name, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}``. matcher (google.cloud.discoveryengine_v1beta.types.BatchGetDocumentsMetadataRequest.Matcher): Required. Matcher for the @@ -324,8 +316,7 @@ class BatchGetDocumentsMetadataRequest(proto.Message): class UrisMatcher(proto.Message): r"""Matcher for the `Document - `__s by exact - uris. + `__s by exact uris. Attributes: uris (MutableSequence[str]): @@ -339,8 +330,8 @@ class UrisMatcher(proto.Message): class FhirMatcher(proto.Message): r"""Matcher for the `Document - `__s by FHIR - resource names. + `__s by FHIR resource + names. Attributes: fhir_resources (MutableSequence[str]): @@ -357,8 +348,8 @@ class FhirMatcher(proto.Message): class Matcher(proto.Message): r"""Matcher for the `Document - `__s. Currently - supports matching by exact URIs. + `__s. Currently supports + matching by exact URIs. This message has `oneof`_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. @@ -448,16 +439,16 @@ class DocumentMetadata(proto.Message): Attributes: matcher_value (google.cloud.discoveryengine_v1beta.types.BatchGetDocumentsMetadataResponse.DocumentMetadata.MatcherValue): - The value of the matcher that was used to match - the `Document + The value of the matcher that was used to match the + `Document `__. state (google.cloud.discoveryengine_v1beta.types.BatchGetDocumentsMetadataResponse.State): The state of the document. last_refreshed_time (google.protobuf.timestamp_pb2.Timestamp): The timestamp of the last time the `Document - `__ - was last indexed. + `__ was + last indexed. data_ingestion_source (str): The data ingestion source of the `Document @@ -466,8 +457,8 @@ class DocumentMetadata(proto.Message): Allowed values are: * ``batch``: Data ingested via Batch API, e.g., - ImportDocuments. * ``streaming`` Data ingested - via Streaming API, e.g., FHIR streaming. + ImportDocuments. * ``streaming`` Data ingested via + Streaming API, e.g., FHIR streaming. """ class MatcherValue(proto.Message): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/engine.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/engine.py index 896d7fe52521..82b26292b1fb 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/engine.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/engine.py @@ -31,8 +31,8 @@ class Engine(proto.Message): - r"""Metadata that describes the training and serving parameters of - an `Engine `__. + r"""Metadata that describes the training and serving parameters of an + `Engine `__. This message has `oneof`_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. @@ -43,8 +43,8 @@ class Engine(proto.Message): Attributes: chat_engine_config (google.cloud.discoveryengine_v1beta.types.Engine.ChatEngineConfig): - Configurations for the Chat Engine. Only - applicable if `solution_type + Configurations for the Chat Engine. Only applicable if + `solution_type `__ is `SOLUTION_TYPE_CHAT @@ -52,8 +52,8 @@ class Engine(proto.Message): This field is a member of `oneof`_ ``engine_config``. search_engine_config (google.cloud.discoveryengine_v1beta.types.Engine.SearchEngineConfig): - Configurations for the Search Engine. Only - applicable if `solution_type + Configurations for the Search Engine. Only applicable if + `solution_type `__ is `SOLUTION_TYPE_SEARCH @@ -61,8 +61,8 @@ class Engine(proto.Message): This field is a member of `oneof`_ ``engine_config``. chat_engine_metadata (google.cloud.discoveryengine_v1beta.types.Engine.ChatEngineMetadata): - Output only. Additional information of the Chat - Engine. Only applicable if + Output only. Additional information of the Chat Engine. + Only applicable if `solution_type `__ is @@ -71,28 +71,27 @@ class Engine(proto.Message): This field is a member of `oneof`_ ``engine_metadata``. name (str): - Immutable. The fully qualified resource name of - the engine. - This field must be a UTF-8 encoded string with a - length limit of 1024 characters. + Immutable. The fully qualified resource name of the + engine. + This field must be a UTF-8 encoded string with a length + limit of 1024 characters. Format: ``projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`` - engine should be 1-63 characters, and valid - characters are /`a-z0-9 `__*/. - Otherwise, an INVALID_ARGUMENT error is - returned. + engine should be 1-63 characters, and valid characters + are /`a-z0-9 `__*/. Otherwise, an + INVALID_ARGUMENT error is returned. display_name (str): - Required. The display name of the engine. - Should be human readable. UTF-8 encoded string - with limit of 1024 characters. + Required. The display name of the engine. Should be + human readable. UTF-8 encoded string with limit of 1024 + characters. create_time (google.protobuf.timestamp_pb2.Timestamp): - Output only. Timestamp the Recommendation - Engine was created at. + Output only. Timestamp the Recommendation Engine was + created at. update_time (google.protobuf.timestamp_pb2.Timestamp): - Output only. Timestamp the Recommendation - Engine was last updated. + Output only. Timestamp the Recommendation Engine was + last updated. data_store_ids (MutableSequence[str]): The data stores associated with this engine. @@ -102,8 +101,8 @@ class Engine(proto.Message): and `SOLUTION_TYPE_RECOMMENDATION `__ - type of engines, they can only associate with at - most one data store. + type of engines, they can only associate with at most + one data store. If `solution_type @@ -112,32 +111,32 @@ class Engine(proto.Message): `SOLUTION_TYPE_CHAT `__, multiple `DataStore - `__s - in the same `Collection - `__ - can be associated here. + `__s in + the same `Collection + `__ can + be associated here. Note that when used in `CreateEngineRequest `__, - one DataStore id must be provided as the system - will use it for necessary initializations. + one DataStore id must be provided as the system will use + it for necessary initializations. solution_type (google.cloud.discoveryengine_v1beta.types.SolutionType): Required. The solutions of the engine. industry_vertical (google.cloud.discoveryengine_v1beta.types.IndustryVertical): The industry vertical that the engine registers. - The restriction of the Engine industry vertical - is based on `DataStore - `__: - If unspecified, default to ``GENERIC``. Vertical - on Engine has to match vertical of the DataStore - linked to the engine. + The restriction of the Engine industry vertical is based + on `DataStore + `__: If + unspecified, default to ``GENERIC``. Vertical on Engine + has to match vertical of the DataStore linked to the + engine. common_config (google.cloud.discoveryengine_v1beta.types.Engine.CommonConfig): - Common config spec that specifies the - metadata of the engine. + Common config spec that specifies the metadata of the + engine. disable_analytics (bool): - Optional. Whether to disable analytics for - searches performed on this engine. + Optional. Whether to disable analytics for searches + performed on this engine. """ class SearchEngineConfig(proto.Message): @@ -148,8 +147,7 @@ class SearchEngineConfig(proto.Message): The search feature tier of this engine. Different tiers might have different - pricing. To learn more, check the pricing - documentation. + pricing. To learn more, check the pricing documentation. Defaults to `SearchTier.SEARCH_TIER_STANDARD @@ -175,32 +173,29 @@ class ChatEngineConfig(proto.Message): Attributes: agent_creation_config (google.cloud.discoveryengine_v1beta.types.Engine.ChatEngineConfig.AgentCreationConfig): - The configurationt generate the Dialogflow agent - that is associated to this Engine. + The configurationt generate the Dialogflow agent that is + associated to this Engine. - Note that these configurations are one-time - consumed by and passed to Dialogflow service. It - means they cannot be retrieved using - `EngineService.GetEngine + Note that these configurations are one-time consumed by + and passed to Dialogflow service. It means they cannot + be retrieved using `EngineService.GetEngine `__ or `EngineService.ListEngines `__ API after engine creation. dialogflow_agent_to_link (str): - The resource name of an exist Dialogflow agent - to link to this Chat Engine. Customers can - either provide ``agent_creation_config`` to - create agent or provide an agent name that links - the agent with the Chat engine. - - Format: ``projects//locations//agents/``. - - Note that the ``dialogflow_agent_to_link`` are - one-time consumed by and passed to Dialogflow - service. It means they cannot be retrieved using - `EngineService.GetEngine + The resource name of an exist Dialogflow agent to link + to this Chat Engine. Customers can either provide + ``agent_creation_config`` to create agent or provide an + agent name that links the agent with the Chat engine. + + Format: ``projects//locations//agents/``. + + Note that the ``dialogflow_agent_to_link`` are one-time + consumed by and passed to Dialogflow service. It means + they cannot be retrieved using `EngineService.GetEngine `__ or `EngineService.ListEngines @@ -208,46 +203,40 @@ class ChatEngineConfig(proto.Message): API after engine creation. Use `ChatEngineMetadata.dialogflow_agent `__ - for actual agent association after Engine is - created. + for actual agent association after Engine is created. """ class AgentCreationConfig(proto.Message): r"""Configurations for generating a Dialogflow agent. - Note that these configurations are one-time consumed by and - passed to Dialogflow service. It means they cannot be retrieved + Note that these configurations are one-time consumed by + and passed to Dialogflow service. It means they cannot be retrieved using `EngineService.GetEngine - `__ - or + `__ or `EngineService.ListEngines - `__ - API after engine creation. + `__ API + after engine creation. Attributes: business (str): - Name of the company, organization or other - entity that the agent represents. Used for - knowledge connector LLM prompt and for knowledge - search. + Name of the company, organization or other entity + that the agent represents. Used for knowledge connector + LLM prompt and for knowledge search. default_language_code (str): Required. The default language of the agent as a language tag. See `Language Support `__ - for a list of the currently supported language - codes. + for a list of the currently supported language codes. time_zone (str): - Required. The time zone of the agent from the - `time zone database - `__, e.g., + Required. The time zone of the agent from the `time zone + database `__, e.g., America/New_York, Europe/Paris. location (str): - Agent location for Agent creation, supported - values: global/us/eu. If not provided, us Engine - will create Agent using us-central-1 by default; - eu Engine will create Agent using eu-west-1 by - default. + Agent location for Agent creation, supported values: + global/us/eu. If not provided, us Engine will create + Agent using us-central-1 by default; eu Engine will + create Agent using eu-west-1 by default. """ business: str = proto.Field( @@ -284,9 +273,9 @@ class CommonConfig(proto.Message): Attributes: company_name (str): - The name of the company, business or entity - that is associated with the engine. Setting this - may help improve LLM related features. + The name of the company, business or entity that is + associated with the engine. Setting this may help + improve LLM related features. """ company_name: str = proto.Field( @@ -300,11 +289,11 @@ class ChatEngineMetadata(proto.Message): Attributes: dialogflow_agent (str): - The resource name of a Dialogflow agent, that - this Chat Engine refers to. + The resource name of a Dialogflow agent, that this Chat + Engine refers to. - Format: ``projects//locations//agents/``. + Format: ``projects//locations//agents/``. """ dialogflow_agent: str = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/engine_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/engine_service.py index 49fd104b4cde..bfd4291f012e 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/engine_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/engine_service.py @@ -55,22 +55,20 @@ class CreateEngineRequest(proto.Message): ``projects/{project}/locations/{location}/collections/{collection}``. engine (google.cloud.discoveryengine_v1beta.types.Engine): Required. The `Engine - `__ - to create. + `__ to + create. engine_id (str): Required. The ID to use for the - `Engine - `__, + `Engine `__, which will become the final component of the `Engine `__'s resource name. This field must conform to `RFC-1034 - `__ - standard with a length limit of 63 characters. - Otherwise, an INVALID_ARGUMENT error is - returned. + `__ standard with a + length limit of 63 characters. Otherwise, an + INVALID_ARGUMENT error is returned. """ parent: str = proto.Field( @@ -99,8 +97,8 @@ class CreateEngineMetadata(proto.Message): create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -124,21 +122,18 @@ class DeleteEngineRequest(proto.Message): Attributes: name (str): Required. Full resource name of - `Engine - `__, + `Engine `__, such as ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}``. - If the caller does not have permission to delete - the `Engine - `__, + If the caller does not have permission to delete the + `Engine `__, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the `Engine - `__ - to delete does not exist, a NOT_FOUND error is - returned. + `__ to + delete does not exist, a NOT_FOUND error is returned. """ name: str = proto.Field( @@ -158,8 +153,8 @@ class DeleteEngineMetadata(proto.Message): create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -177,14 +172,12 @@ class DeleteEngineMetadata(proto.Message): class GetEngineRequest(proto.Message): r"""Request message for `EngineService.GetEngine - `__ - method. + `__ method. Attributes: name (str): Required. Full resource name of - `Engine - `__, + `Engine `__, such as ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}``. """ @@ -211,6 +204,7 @@ class ListEnginesRequest(proto.Message): Optional. Not supported. filter (str): Optional. Filter by solution type. For example: + solution_type=SOLUTION_TYPE_SEARCH """ @@ -270,27 +264,24 @@ class UpdateEngineRequest(proto.Message): Attributes: engine (google.cloud.discoveryengine_v1beta.types.Engine): Required. The `Engine - `__ - to update. + `__ to + update. - If the caller does not have permission to update - the `Engine - `__, + If the caller does not have permission to update the + `Engine `__, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the `Engine - `__ - to update does not exist, a NOT_FOUND error is - returned. + `__ to + update does not exist, a NOT_FOUND error is returned. update_mask (google.protobuf.field_mask_pb2.FieldMask): Indicates which fields in the provided - `Engine - `__ + `Engine `__ to update. - If an unsupported or unknown field is provided, - an INVALID_ARGUMENT error is returned. + If an unsupported or unknown field is provided, an + INVALID_ARGUMENT error is returned. """ engine: gcd_engine.Engine = proto.Field( @@ -340,13 +331,13 @@ class ResumeEngineRequest(proto.Message): class TuneEngineRequest(proto.Message): - r"""Request to manually start a tuning process now (instead of - waiting for the periodically scheduled tuning to happen). + r"""Request to manually start a tuning process now (instead of waiting + for the periodically scheduled tuning to happen). Attributes: name (str): - Required. The resource name of the engine to - tune. Format: + Required. The resource name of the engine to tune. + Format: ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`` """ @@ -362,8 +353,8 @@ class TuneEngineMetadata(proto.Message): Attributes: engine (str): - Required. The resource name of the engine that - this tune applies to. Format: + Required. The resource name of the engine that this tune + applies to. Format: ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`` """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/evaluation.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/evaluation.py index c3bdcddcb456..b3301e36a528 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/evaluation.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/evaluation.py @@ -34,50 +34,48 @@ class Evaluation(proto.Message): r"""An evaluation is a single execution (or run) of an evaluation - process. It encapsulates the state of the evaluation and the - resulting data. + process. It encapsulates the state of the evaluation and the resulting + data. Attributes: name (str): Identifier. The full resource name of the `Evaluation - `__, - in the format of + `__, in + the format of ``projects/{project}/locations/{location}/evaluations/{evaluation}``. - This field must be a UTF-8 encoded string with a - length limit of 1024 characters. + This field must be a UTF-8 encoded string with a length + limit of 1024 characters. evaluation_spec (google.cloud.discoveryengine_v1beta.types.Evaluation.EvaluationSpec): - Required. The specification of the - evaluation. + Required. The specification of the evaluation. quality_metrics (google.cloud.discoveryengine_v1beta.types.QualityMetrics): - Output only. The metrics produced by the - evaluation, averaged across all `SampleQuery - `__s - in the `SampleQuerySet + Output only. The metrics produced by the evaluation, + averaged across all `SampleQuery + `__s in + the `SampleQuerySet `__. - Only populated when the evaluation's state is - SUCCEEDED. + Only populated when the evaluation's state is SUCCEEDED. state (google.cloud.discoveryengine_v1beta.types.Evaluation.State): Output only. The state of the evaluation. error (google.rpc.status_pb2.Status): Output only. The error that occurred during - evaluation. Only populated when the evaluation's - state is FAILED. + evaluation. Only populated when the evaluation's state + is FAILED. create_time (google.protobuf.timestamp_pb2.Timestamp): Output only. Timestamp the `Evaluation - `__ - was created at. + `__ was + created at. end_time (google.protobuf.timestamp_pb2.Timestamp): Output only. Timestamp the `Evaluation - `__ - was completed at. + `__ was + completed at. error_samples (MutableSequence[google.rpc.status_pb2.Status]): - Output only. A sample of errors encountered - while processing the request. + Output only. A sample of errors encountered while + processing the request. """ class State(proto.Enum): @@ -109,11 +107,11 @@ class EvaluationSpec(proto.Message): Attributes: search_request (google.cloud.discoveryengine_v1beta.types.SearchRequest): - Required. The search request that is used to - perform the evaluation. - Only the following fields within SearchRequest - are supported; if any other fields are provided, - an UNSUPPORTED error will be returned: + Required. The search request that is used to perform the + evaluation. + Only the following fields within SearchRequest are + supported; if any other fields are provided, an + UNSUPPORTED error will be returned: * `SearchRequest.serving_config `__ @@ -213,31 +211,31 @@ class QualityMetrics(proto.Message): Attributes: doc_recall (google.cloud.discoveryengine_v1beta.types.QualityMetrics.TopkMetrics): - Recall per document, at various top-k cutoff - levels. - Recall is the fraction of relevant documents - retrieved out of all relevant documents. + Recall per document, at various top-k cutoff levels. + + Recall is the fraction of relevant documents retrieved + out of all relevant documents. Example (top-5): * For a single `SampleQuery - `__, - If 3 out of 5 relevant documents are retrieved - in the top-5, recall@5 = 3/5 = 0.6 + `__, If + 3 out of 5 relevant documents are retrieved in the + top-5, recall@5 = 3/5 = 0.6 doc_precision (google.cloud.discoveryengine_v1beta.types.QualityMetrics.TopkMetrics): - Precision per document, at various top-k cutoff - levels. - Precision is the fraction of retrieved documents - that are relevant. + Precision per document, at various top-k cutoff levels. + + Precision is the fraction of retrieved documents that + are relevant. Example (top-5): * For a single `SampleQuery - `__, - If 4 out of 5 retrieved documents in the top-5 - are relevant, precision@5 = 4/5 = 0.8 + `__, If + 4 out of 5 retrieved documents in the top-5 are + relevant, precision@5 = 4/5 = 0.8 doc_ndcg (google.cloud.discoveryengine_v1beta.types.QualityMetrics.TopkMetrics): Normalized discounted cumulative gain (NDCG) per document, at various top-k cutoff levels. @@ -249,9 +247,9 @@ class QualityMetrics(proto.Message): Suppose `SampleQuery `__ - with three retrieved documents (D1, D2, D3) and - binary relevance judgements (1 for relevant, 0 - for not relevant): + with three retrieved documents (D1, D2, D3) and binary + relevance judgements (1 for relevant, 0 for not + relevant): Retrieved: [D3 (0), D1 (1), D2 (1)] Ideal: [D1 (1), D2 (1), D3 (0)] @@ -260,27 +258,27 @@ class QualityMetrics(proto.Message): `SampleQuery `__: - * DCG@3: 0/log2(1+1) + 1/log2(2+1) + 1/log2(3+1) - = 1.13 * Ideal DCG@3: 1/log2(1+1) + - 1/log2(2+1) + 0/log2(3+1) = 1.63 + * DCG@3: 0/log2(1+1) + 1/log2(2+1) + 1/log2(3+1) = 1.13 + * Ideal DCG@3: 1/log2(1+1) + 1/log2(2+1) + 0/log2(3+1) = + 1.63 * NDCG@3: 1.13/1.63 = 0.693 page_recall (google.cloud.discoveryengine_v1beta.types.QualityMetrics.TopkMetrics): Recall per page, at various top-k cutoff levels. - Recall is the fraction of relevant pages - retrieved out of all relevant pages. + Recall is the fraction of relevant pages retrieved out + of all relevant pages. Example (top-5): * For a single `SampleQuery - `__, - if 3 out of 5 relevant pages are retrieved in - the top-5, recall@5 = 3/5 = 0.6 + `__, if + 3 out of 5 relevant pages are retrieved in the top-5, + recall@5 = 3/5 = 0.6 page_ndcg (google.cloud.discoveryengine_v1beta.types.QualityMetrics.TopkMetrics): - Normalized discounted cumulative gain (NDCG) per - page, at various top-k cutoff levels. + Normalized discounted cumulative gain (NDCG) per page, + at various top-k cutoff levels. NDCG measures the ranking quality, giving higher relevance to top results. @@ -289,9 +287,9 @@ class QualityMetrics(proto.Message): Suppose `SampleQuery `__ - with three retrieved pages (P1, P2, P3) and - binary relevance judgements (1 for relevant, 0 - for not relevant): + with three retrieved pages (P1, P2, P3) and binary + relevance judgements (1 for relevant, 0 for not + relevant): Retrieved: [P3 (0), P1 (1), P2 (1)] Ideal: [P1 (1), P2 (1), P3 (0)] @@ -300,9 +298,9 @@ class QualityMetrics(proto.Message): `SampleQuery `__: - * DCG@3: 0/log2(1+1) + 1/log2(2+1) + 1/log2(3+1) - = 1.13 * Ideal DCG@3: 1/log2(1+1) + - 1/log2(2+1) + 0/log2(3+1) = 1.63 + * DCG@3: 0/log2(1+1) + 1/log2(2+1) + 1/log2(3+1) = 1.13 + * Ideal DCG@3: 1/log2(1+1) + 1/log2(2+1) + 0/log2(3+1) = + 1.63 * NDCG@3: 1.13/1.63 = 0.693 """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/evaluation_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/evaluation_service.py index f8ebd158ca8f..dff043285f06 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/evaluation_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/evaluation_service.py @@ -50,16 +50,16 @@ class GetEvaluationRequest(proto.Message): such as ``projects/{project}/locations/{location}/evaluations/{evaluation}``. - If the caller does not have permission to access - the `Evaluation + If the caller does not have permission to access the + `Evaluation `__, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested `Evaluation - `__ - does not exist, a NOT_FOUND error is returned. + `__ does + not exist, a NOT_FOUND error is returned. """ name: str = proto.Field( @@ -76,26 +76,25 @@ class ListEvaluationsRequest(proto.Message): Attributes: parent (str): - Required. The parent location resource name, - such as + Required. The parent location resource name, such as ``projects/{project}/locations/{location}``. If the caller does not have permission to list `Evaluation `__s - under this location, regardless of whether or - not this location exists, a - ``PERMISSION_DENIED`` error is returned. + under this location, regardless of whether or not this + location exists, a ``PERMISSION_DENIED`` error is + returned. page_size (int): Maximum number of `Evaluation - `__s - to return. If unspecified, defaults to 100. The - maximum allowed value is 1000. Values above 1000 - will be coerced to 1000. + `__s to + return. If unspecified, defaults to 100. The maximum + allowed value is 1000. Values above 1000 will be coerced + to 1000. - If this field is negative, an - ``INVALID_ARGUMENT`` error is returned. + If this field is negative, an ``INVALID_ARGUMENT`` error + is returned. page_token (str): A page token `ListEvaluationsResponse.next_page_token @@ -103,15 +102,13 @@ class ListEvaluationsRequest(proto.Message): received from a previous `EvaluationService.ListEvaluations `__ - call. Provide this to retrieve the subsequent - page. + call. Provide this to retrieve the subsequent page. - When paginating, all other parameters provided - to `EvaluationService.ListEvaluations + When paginating, all other parameters provided to + `EvaluationService.ListEvaluations `__ - must match the call that provided the page - token. Otherwise, an ``INVALID_ARGUMENT`` error - is returned. + must match the call that provided the page token. + Otherwise, an ``INVALID_ARGUMENT`` error is returned. """ parent: str = proto.Field( @@ -142,8 +139,8 @@ class ListEvaluationsResponse(proto.Message): A token that can be sent as `ListEvaluationsRequest.page_token `__ - to retrieve the next page. If this field is - omitted, there are no subsequent pages. + to retrieve the next page. If this field is omitted, + there are no subsequent pages. """ @property @@ -173,8 +170,8 @@ class CreateEvaluationRequest(proto.Message): ``projects/{project}/locations/{location}``. evaluation (google.cloud.discoveryengine_v1beta.types.Evaluation): Required. The `Evaluation - `__ - to create. + `__ to + create. """ parent: str = proto.Field( @@ -209,18 +206,16 @@ class ListEvaluationResultsRequest(proto.Message): ``projects/{project}/locations/{location}/evaluations/{evaluation}``. If the caller does not have permission to list - [EvaluationResult][] under this evaluation, - regardless of whether or not this evaluation set - exists, a ``PERMISSION_DENIED`` error is - returned. + [EvaluationResult][] under this evaluation, regardless + of whether or not this evaluation set exists, a + ``PERMISSION_DENIED`` error is returned. page_size (int): - Maximum number of [EvaluationResult][] to - return. If unspecified, defaults to 100. The - maximum allowed value is 1000. Values above 1000 - will be coerced to 1000. + Maximum number of [EvaluationResult][] to return. If + unspecified, defaults to 100. The maximum allowed value + is 1000. Values above 1000 will be coerced to 1000. - If this field is negative, an - ``INVALID_ARGUMENT`` error is returned. + If this field is negative, an ``INVALID_ARGUMENT`` error + is returned. page_token (str): A page token `ListEvaluationResultsResponse.next_page_token @@ -228,15 +223,13 @@ class ListEvaluationResultsRequest(proto.Message): received from a previous `EvaluationService.ListEvaluationResults `__ - call. Provide this to retrieve the subsequent - page. + call. Provide this to retrieve the subsequent page. - When paginating, all other parameters provided - to `EvaluationService.ListEvaluationResults + When paginating, all other parameters provided to + `EvaluationService.ListEvaluationResults `__ - must match the call that provided the page - token. Otherwise, an ``INVALID_ARGUMENT`` error - is returned. + must match the call that provided the page token. + Otherwise, an ``INVALID_ARGUMENT`` error is returned. """ evaluation: str = proto.Field( @@ -268,14 +261,13 @@ class ListEvaluationResultsResponse(proto.Message): A token that can be sent as `ListEvaluationResultsRequest.page_token `__ - to retrieve the next page. If this field is - omitted, there are no subsequent pages. + to retrieve the next page. If this field is omitted, + there are no subsequent pages. """ class EvaluationResult(proto.Message): r"""Represents the results of an evaluation for a single - `SampleQuery - `__. + `SampleQuery `__. Attributes: sample_query (google.cloud.discoveryengine_v1beta.types.SampleQuery): @@ -284,8 +276,8 @@ class EvaluationResult(proto.Message): `__ that was evaluated. quality_metrics (google.cloud.discoveryengine_v1beta.types.QualityMetrics): - Output only. The metrics produced by the - evaluation, for a given `SampleQuery + Output only. The metrics produced by the evaluation, for + a given `SampleQuery `__. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/grounded_generation_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/grounded_generation_service.py index 5f209fe1a0c0..0c04ab59a868 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/grounded_generation_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/grounded_generation_service.py @@ -35,18 +35,16 @@ class GroundedGenerationContent(proto.Message): - r"""Base structured datatype containing multi-part content of a - message. + r"""Base structured datatype containing multi-part content of a message. Attributes: role (str): - Producer of the content. Must be either ``user`` - or ``model``. - Intended to be used for multi-turn - conversations. Otherwise, it can be left unset. + Producer of the content. Must be either ``user`` or + ``model``. + Intended to be used for multi-turn conversations. + Otherwise, it can be left unset. parts (MutableSequence[google.cloud.discoveryengine_v1beta.types.GroundedGenerationContent.Part]): - Ordered ``Parts`` that constitute a single - message. + Ordered ``Parts`` that constitute a single message. """ class Part(proto.Message): @@ -79,52 +77,49 @@ class Part(proto.Message): class GenerateGroundedContentRequest(proto.Message): - r"""Top-level message sent by the client for the - ``GenerateGroundedContent`` method. + r"""Top-level message sent by the client for the ``GenerateGroundedContent`` + method. Attributes: location (str): Required. Location resource. - Format: - ``projects/{project}/locations/{location}``. + Format: ``projects/{project}/locations/{location}``. system_instruction (google.cloud.discoveryengine_v1beta.types.GroundedGenerationContent): - Content of the system instruction for the - current API. - These instructions will take priority over any - other prompt instructions if the selected model - is supporting them. + Content of the system instruction for the current + API. + These instructions will take priority over any other + prompt instructions if the selected model is supporting + them. contents (MutableSequence[google.cloud.discoveryengine_v1beta.types.GroundedGenerationContent]): - Content of the current conversation with the - model. - For single-turn queries, this is a single - instance. For multi-turn queries, this is a - repeated field that contains conversation - history + latest request. + Content of the current conversation with the model. + + For single-turn queries, this is a single instance. For + multi-turn queries, this is a repeated field that + contains conversation history + latest request. generation_spec (google.cloud.discoveryengine_v1beta.types.GenerateGroundedContentRequest.GenerationSpec): Content generation specification. grounding_spec (google.cloud.discoveryengine_v1beta.types.GenerateGroundedContentRequest.GroundingSpec): Grounding specification. user_labels (MutableMapping[str, str]): - The user labels applied to a resource must meet - the following requirements: - * Each resource can have multiple labels, up to - a maximum of 64. + The user labels applied to a resource must meet the + following requirements: + * Each resource can have multiple labels, up to a + maximum of 64. * Each label must be a key-value pair. - * Keys have a minimum length of 1 character and - a maximum length of 63 characters and cannot - be empty. Values can be empty and have a maximum - length of 63 characters. + * Keys have a minimum length of 1 character and a + maximum length of 63 characters and cannot be empty. + Values can be empty and have a maximum length of 63 + characters. - * Keys and values can contain only lowercase - letters, numeric characters, underscores, and - dashes. All characters must use UTF-8 encoding, - and international characters are allowed. + * Keys and values can contain only lowercase letters, + numeric characters, underscores, and dashes. All + characters must use UTF-8 encoding, and international + characters are allowed. - * The key portion of a label must be unique. - However, you can use the same key with - multiple resources. + * The key portion of a label must be unique. However, + you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. @@ -145,37 +140,37 @@ class GenerationSpec(proto.Message): Specifies which Vertex model id to use for generation. language_code (str): - Language code for content. Use language tags - defined by `BCP47 + Language code for content. Use language tags defined by + `BCP47 `__. temperature (float): - If specified, custom value for the - temperature will be used. + If specified, custom value for the temperature will + be used. This field is a member of `oneof`_ ``_temperature``. top_p (float): - If specified, custom value for nucleus - sampling will be used. + If specified, custom value for nucleus sampling will + be used. This field is a member of `oneof`_ ``_top_p``. top_k (int): - If specified, custom value for top-k sampling - will be used. + If specified, custom value for top-k sampling will be + used. This field is a member of `oneof`_ ``_top_k``. frequency_penalty (float): - If specified, custom value for frequency - penalty will be used. + If specified, custom value for frequency penalty will + be used. This field is a member of `oneof`_ ``_frequency_penalty``. presence_penalty (float): - If specified, custom value for presence - penalty will be used. + If specified, custom value for presence penalty will + be used. This field is a member of `oneof`_ ``_presence_penalty``. max_output_tokens (int): - If specified, custom value for max output - tokens will be used. + If specified, custom value for max output tokens will + be used. This field is a member of `oneof`_ ``_max_output_tokens``. """ @@ -235,12 +230,12 @@ class DynamicRetrievalPredictor(proto.Message): Attributes: version (google.cloud.discoveryengine_v1beta.types.GenerateGroundedContentRequest.DynamicRetrievalConfiguration.DynamicRetrievalPredictor.Version): - The version of the predictor to be used in - dynamic retrieval. + The version of the predictor to be used in dynamic + retrieval. threshold (float): - The value of the threshold. If the predictor - will predict a value smaller than this, it would - suppress grounding in the source. + The value of the threshold. If the predictor will + predict a value smaller than this, it would suppress + grounding in the source. This field is a member of `oneof`_ ``_threshold``. """ @@ -288,18 +283,15 @@ class GroundingSource(proto.Message): Attributes: inline_source (google.cloud.discoveryengine_v1beta.types.GenerateGroundedContentRequest.GroundingSource.InlineSource): - If set, grounding is performed with inline - content. + If set, grounding is performed with inline content. This field is a member of `oneof`_ ``source``. search_source (google.cloud.discoveryengine_v1beta.types.GenerateGroundedContentRequest.GroundingSource.SearchSource): - If set, grounding is performed with Vertex AI - Search. + If set, grounding is performed with Vertex AI Search. This field is a member of `oneof`_ ``source``. google_search_source (google.cloud.discoveryengine_v1beta.types.GenerateGroundedContentRequest.GroundingSource.GoogleSearchSource): - If set, grounding is performed with Google - Search. + If set, grounding is performed with Google Search. This field is a member of `oneof`_ ``source``. """ @@ -313,10 +305,9 @@ class InlineSource(proto.Message): attributes (MutableMapping[str, str]): Attributes associated with the content. - Common attributes include ``source`` (indicating - where the content was sourced from) and - ``author`` (indicating the author of the - content). + Common attributes include ``source`` (indicating where + the content was sourced from) and ``author`` (indicating + the author of the content). """ grounding_facts: MutableSequence[ @@ -345,8 +336,8 @@ class SearchSource(proto.Message): max_result_count (int): Number of search results to return. - The default value is 10. The maximumm allowed - value is 10. + The default value is 10. The maximumm allowed value is + 10. filter (str): Filter expression to be applied to the search. @@ -354,8 +345,8 @@ class SearchSource(proto.Message): `SearchRequest.filter `__. safe_search (bool): - If set, safe search is enabled in Vertex AI - Search requests. + If set, safe search is enabled in Vertex AI Search + requests. """ serving_config: str = proto.Field( @@ -479,8 +470,8 @@ class Candidate(proto.Message): content (google.cloud.discoveryengine_v1beta.types.GroundedGenerationContent): Content of the candidate. grounding_score (float): - The overall grounding score for the candidate, - in the range of [0, 1]. + The overall grounding score for the candidate, in the + range of [0, 1]. This field is a member of `oneof`_ ``_grounding_score``. grounding_metadata (google.cloud.discoveryengine_v1beta.types.GenerateGroundedContentResponse.Candidate.GroundingMetadata): @@ -492,26 +483,24 @@ class GroundingMetadata(proto.Message): Attributes: retrieval_metadata (MutableSequence[google.cloud.discoveryengine_v1beta.types.GenerateGroundedContentResponse.Candidate.GroundingMetadata.RetrievalMetadata]): - Retrieval metadata to provide an - understanding in the retrieval steps performed - by the model. There can be multiple such - messages which can correspond to different parts - of the retrieval. This is a mechanism used to + Retrieval metadata to provide an understanding in the + retrieval steps performed by the model. There can be + multiple such messages which can correspond to different + parts of the retrieval. This is a mechanism used to ensure transparency to our users. support_chunks (MutableSequence[google.cloud.discoveryengine_v1beta.types.FactChunk]): - List of chunks to be attributed across all - claims in the candidate. These are derived from - the grounding sources supplied in the request. + List of chunks to be attributed across all claims in + the candidate. These are derived from the grounding + sources supplied in the request. web_search_queries (MutableSequence[str]): - Web search queries for the following-up web - search. + Web search queries for the following-up web search. search_entry_point (google.cloud.discoveryengine_v1beta.types.GenerateGroundedContentResponse.Candidate.GroundingMetadata.SearchEntryPoint): Google search entry for the following-up web searches. grounding_support (MutableSequence[google.cloud.discoveryengine_v1beta.types.GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport]): - GroundingSupport across all claims in the - answer candidate. An support to a fact indicates - that the claim is supported by the fact. + GroundingSupport across all claims in the answer + candidate. An support to a fact indicates that the claim + is supported by the fact. """ class RetrievalMetadata(proto.Message): @@ -578,23 +567,21 @@ class DynamicRetrievalPredictorMetadata(proto.Message): Attributes: version (google.cloud.discoveryengine_v1beta.types.GenerateGroundedContentResponse.Candidate.GroundingMetadata.DynamicRetrievalPredictorMetadata.Version): - The version of the predictor which was used - in dynamic retrieval. + The version of the predictor which was used in + dynamic retrieval. prediction (float): - The value of the predictor. This should be - between [0, 1] where a value of 0 means that the - query would not benefit from grounding, while a - value of 1.0 means that the query would benefit - the most. In between values allow to - differentiate between different usefulness + The value of the predictor. This should be between [0, + 1] where a value of 0 means that the query would not + benefit from grounding, while a value of 1.0 means that + the query would benefit the most. In between values + allow to differentiate between different usefulness scores for grounding. This field is a member of `oneof`_ ``_prediction``. """ class Version(proto.Enum): - r"""The version of the predictor which was used in dynamic - retrieval. + r"""The version of the predictor which was used in dynamic retrieval. Values: VERSION_UNSPECIFIED (0): @@ -622,11 +609,11 @@ class SearchEntryPoint(proto.Message): Attributes: rendered_content (str): - Web content snippet that can be embedded in a - web page or an app webview. + Web content snippet that can be embedded in a web + page or an app webview. sdk_blob (bytes): - Base64 encoded JSON representing array of - tuple. + Base64 encoded JSON representing array of tuple. """ rendered_content: str = proto.Field( @@ -645,20 +632,19 @@ class GroundingSupport(proto.Message): Attributes: claim_text (str): - Text for the claim in the candidate. Always - provided when a support is found. + Text for the claim in the candidate. Always provided + when a support is found. support_chunk_indices (MutableSequence[int]): - A list of indices (into 'support_chunks') - specifying the citations associated with the - claim. For instance [1,3,4] means that - support_chunks[1], support_chunks[3], - support_chunks[4] are the chunks attributed to - the claim. + A list of indices (into 'support_chunks') specifying the + citations associated with the claim. For instance + [1,3,4] means that support_chunks[1], support_chunks[3], + support_chunks[4] are the chunks attributed to the + claim. support_score (float): - A score in the range of [0, 1] describing how - grounded is a specific claim in the support - chunks indicated. Higher value means that the - claim is better supported by the chunks. + A score in the range of [0, 1] describing how grounded + is a specific claim in the support chunks indicated. + Higher value means that the claim is better supported by + the chunks. This field is a member of `oneof`_ ``_support_score``. """ @@ -740,12 +726,11 @@ class CheckGroundingSpec(proto.Message): Attributes: citation_threshold (float): - The threshold (in [0,1]) used for determining - whether a fact must be cited for a claim in the - answer candidate. Choosing a higher threshold - will lead to fewer but very strong citations, - while choosing a lower threshold may lead to - more but somewhat weaker citations. If unset, + The threshold (in [0,1]) used for determining whether a + fact must be cited for a claim in the answer candidate. + Choosing a higher threshold will lead to fewer but very + strong citations, while choosing a lower threshold may + lead to more but somewhat weaker citations. If unset, the threshold will default to 0.6. This field is a member of `oneof`_ ``_citation_threshold``. @@ -766,37 +751,36 @@ class CheckGroundingRequest(proto.Message): Attributes: grounding_config (str): - Required. The resource name of the grounding - config, such as + Required. The resource name of the grounding config, + such as ``projects/*/locations/global/groundingConfigs/default_grounding_config``. answer_candidate (str): - Answer candidate to check. It can have a - maximum length of 4096 tokens. + Answer candidate to check. It can have a maximum + length of 4096 tokens. facts (MutableSequence[google.cloud.discoveryengine_v1beta.types.GroundingFact]): List of facts for the grounding check. We support up to 200 facts. grounding_spec (google.cloud.discoveryengine_v1beta.types.CheckGroundingSpec): Configuration of the grounding check. user_labels (MutableMapping[str, str]): - The user labels applied to a resource must meet - the following requirements: - * Each resource can have multiple labels, up to - a maximum of 64. + The user labels applied to a resource must meet the + following requirements: + * Each resource can have multiple labels, up to a + maximum of 64. * Each label must be a key-value pair. - * Keys have a minimum length of 1 character and - a maximum length of 63 characters and cannot - be empty. Values can be empty and have a maximum - length of 63 characters. + * Keys have a minimum length of 1 character and a + maximum length of 63 characters and cannot be empty. + Values can be empty and have a maximum length of 63 + characters. - * Keys and values can contain only lowercase - letters, numeric characters, underscores, and - dashes. All characters must use UTF-8 encoding, - and international characters are allowed. + * Keys and values can contain only lowercase letters, + numeric characters, underscores, and dashes. All + characters must use UTF-8 encoding, and international + characters are allowed. - * The key portion of a label must be unique. - However, you can use the same key with - multiple resources. + * The key portion of a label must be unique. However, + you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. @@ -843,24 +827,23 @@ class CheckGroundingResponse(proto.Message): Attributes: support_score (float): - The support score for the input answer - candidate. Higher the score, higher is the - fraction of claims that are supported by the - provided facts. This is always set when a - response is returned. + The support score for the input answer candidate. + Higher the score, higher is the fraction of claims that + are supported by the provided facts. This is always set + when a response is returned. This field is a member of `oneof`_ ``_support_score``. cited_chunks (MutableSequence[google.cloud.discoveryengine_v1beta.types.FactChunk]): - List of facts cited across all claims in the - answer candidate. These are derived from the - facts supplied in the request. + List of facts cited across all claims in the answer + candidate. These are derived from the facts supplied in + the request. cited_facts (MutableSequence[google.cloud.discoveryengine_v1beta.types.CheckGroundingResponse.CheckGroundingFactChunk]): - List of facts cited across all claims in the - answer candidate. These are derived from the - facts supplied in the request. + List of facts cited across all claims in the answer + candidate. These are derived from the facts supplied in + the request. claims (MutableSequence[google.cloud.discoveryengine_v1beta.types.CheckGroundingResponse.Claim]): - Claim texts and citation info across all - claims in the answer candidate. + Claim texts and citation info across all claims in + the answer candidate. """ class CheckGroundingFactChunk(proto.Message): @@ -868,8 +851,8 @@ class CheckGroundingFactChunk(proto.Message): Attributes: chunk_text (str): - Text content of the fact chunk. Can be at - most 10K characters long. + Text content of the fact chunk. Can be at most 10K + characters long. """ chunk_text: str = proto.Field( @@ -884,34 +867,32 @@ class Claim(proto.Message): Attributes: start_pos (int): - Position indicating the start of the claim in - the answer candidate, measured in bytes. + Position indicating the start of the claim in the + answer candidate, measured in bytes. This field is a member of `oneof`_ ``_start_pos``. end_pos (int): - Position indicating the end of the claim in - the answer candidate, exclusive. + Position indicating the end of the claim in the + answer candidate, exclusive. This field is a member of `oneof`_ ``_end_pos``. claim_text (str): - Text for the claim in the answer candidate. - Always provided regardless of whether citations - or anti-citations are found. + Text for the claim in the answer candidate. Always + provided regardless of whether citations or + anti-citations are found. citation_indices (MutableSequence[int]): - A list of indices (into 'cited_chunks') - specifying the citations associated with the - claim. For instance [1,3,4] means that - cited_chunks[1], cited_chunks[3], - cited_chunks[4] are the facts cited supporting - for the claim. A citation to a fact indicates - that the claim is supported by the fact. + A list of indices (into 'cited_chunks') specifying the + citations associated with the claim. For instance + [1,3,4] means that cited_chunks[1], cited_chunks[3], + cited_chunks[4] are the facts cited supporting for the + claim. A citation to a fact indicates that the claim is + supported by the fact. grounding_check_required (bool): - Indicates that this claim required grounding - check. When the system decided this claim - doesn't require attribution/grounding check, - this field will be set to false. In that case, - no grounding check was done for the claim and - therefore + Indicates that this claim required grounding check. When + the system decided this claim doesn't require + attribution/grounding check, this field will be set to + false. In that case, no grounding check was done for the + claim and therefore `citation_indices `__, `anti_citation_indices diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/grounding.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/grounding.py index 76515a064d96..cf07349158e3 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/grounding.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/grounding.py @@ -34,8 +34,7 @@ class GroundingConfig(proto.Message): Attributes: name (str): - Required. Name of the GroundingConfig, of the - form + Required. Name of the GroundingConfig, of the form ``projects/{project}/locations/{location}/groundingConfigs/{grounding_config}``. """ @@ -54,9 +53,9 @@ class GroundingFact(proto.Message): characters long. attributes (MutableMapping[str, str]): Attributes associated with the fact. - Common attributes include ``source`` (indicating - where the fact was sourced from), ``author`` - (indicating the author of the fact), and so on. + Common attributes include ``source`` (indicating where + the fact was sourced from), ``author`` (indicating the + author of the fact), and so on. """ fact_text: str = proto.Field( @@ -75,17 +74,16 @@ class FactChunk(proto.Message): Attributes: chunk_text (str): - Text content of the fact chunk. Can be at - most 10K characters long. + Text content of the fact chunk. Can be at most 10K + characters long. source (str): - Source from which this fact chunk was - retrieved. If it was retrieved from the - GroundingFacts provided in the request then this - field will contain the index of the specific - fact from which this chunk was retrieved. + Source from which this fact chunk was retrieved. If + it was retrieved from the GroundingFacts provided in the + request then this field will contain the index of the + specific fact from which this chunk was retrieved. index (int): - The index of this chunk. Currently, only used - for the streaming mode. + The index of this chunk. Currently, only used for the + streaming mode. source_metadata (MutableMapping[str, str]): More fine-grained information for the source reference. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/import_config.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/import_config.py index 662d0ae0e6aa..028d7ef86695 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/import_config.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/import_config.py @@ -67,56 +67,54 @@ class GcsSource(proto.Message): Attributes: input_uris (MutableSequence[str]): - Required. Cloud Storage URIs to input files. - Each URI can be up to 2000 characters long. URIs - can match the full object path (for example, - ``gs://bucket/directory/object.json``) or a - pattern matching one or more files, such as + Required. Cloud Storage URIs to input files. Each URI + can be up to 2000 characters long. URIs can match the + full object path (for example, + ``gs://bucket/directory/object.json``) or a pattern + matching one or more files, such as ``gs://bucket/directory/*.json``. - A request can contain at most 100 files (or - 100,000 files if ``data_schema`` is - ``content``). Each file can be up to 2 GB (or - 100 MB if ``data_schema`` is ``content``). + A request can contain at most 100 files (or 100,000 + files if ``data_schema`` is ``content``). Each file can + be up to 2 GB (or 100 MB if ``data_schema`` is + ``content``). data_schema (str): - The schema to use when parsing the data from the - source. + The schema to use when parsing the data from the source. + Supported values for document imports: * ``document`` (default): One JSON `Document - `__ - per line. Each document must + `__ per + line. Each document must have a valid `Document.id `__. - * ``content``: Unstructured data (e.g. PDF, - HTML). Each file matched by ``input_uris`` - becomes a document, with the ID set to the first - 128 bits of SHA256(URI) encoded as a hex - string. - - * ``custom``: One custom data JSON per row in - arbitrary format that conforms to the defined - `Schema - `__ - of the data store. This can only be used by - the GENERIC Data Store vertical. - - * ``csv``: A CSV file with header conforming to - the defined `Schema - `__ - of the data store. Each entry after the header - is imported as a Document. This can only be - used by the GENERIC Data Store vertical. + * ``content``: Unstructured data (e.g. PDF, HTML). Each + file matched by ``input_uris`` becomes a document, + with the ID set to the first 128 bits of SHA256(URI) + encoded as a hex string. + + * ``custom``: One custom data JSON per row in arbitrary + format that conforms to the defined `Schema + `__ of the + data store. This can only be used by the GENERIC Data + Store vertical. + + * ``csv``: A CSV file with header conforming to the + defined `Schema + `__ of the + data store. Each entry after the header is imported as a + Document. This can only be used by the GENERIC Data + Store vertical. Supported values for user event imports: * ``user_event`` (default): One JSON `UserEvent - `__ - per line. + `__ per + line. """ input_uris: MutableSequence[str] = proto.RepeatedField( @@ -136,59 +134,55 @@ class BigQuerySource(proto.Message): Attributes: partition_date (google.type.date_pb2.Date): - BigQuery time partitioned table's _PARTITIONDATE - in YYYY-MM-DD format. + BigQuery time partitioned table's _PARTITIONDATE in + YYYY-MM-DD format. This field is a member of `oneof`_ ``partition``. project_id (str): - The project ID or the project number that - contains the BigQuery source. Has a length limit - of 128 characters. If not specified, inherits - the project ID from the parent request. + The project ID or the project number that contains + the BigQuery source. Has a length limit of 128 + characters. If not specified, inherits the project ID + from the parent request. dataset_id (str): - Required. The BigQuery data set to copy the - data from with a length limit of 1,024 - characters. + Required. The BigQuery data set to copy the data from + with a length limit of 1,024 characters. table_id (str): - Required. The BigQuery table to copy the data - from with a length limit of 1,024 characters. + Required. The BigQuery table to copy the data from + with a length limit of 1,024 characters. gcs_staging_dir (str): - Intermediate Cloud Storage directory used for - the import with a length limit of 2,000 - characters. Can be specified if one wants to - have the BigQuery export to a specific Cloud - Storage directory. + Intermediate Cloud Storage directory used for the + import with a length limit of 2,000 characters. Can be + specified if one wants to have the BigQuery export to a + specific Cloud Storage directory. data_schema (str): - The schema to use when parsing the data from the - source. + The schema to use when parsing the data from the source. + Supported values for user event imports: * ``user_event`` (default): One `UserEvent - `__ - per row. + `__ per + row. Supported values for document imports: * ``document`` (default): One `Document - `__ - format per row. Each document must have a - valid + `__ format + per row. Each document must have a valid `Document.id - `__ - and one of `Document.json_data + `__ and + one of `Document.json_data `__ or `Document.struct_data `__. - * ``custom``: One custom data per row in - arbitrary format that conforms to the defined - `Schema - `__ - of the data store. This can only be used by - the GENERIC Data Store vertical. + * ``custom``: One custom data per row in arbitrary + format that conforms to the defined `Schema + `__ of the + data store. This can only be used by the GENERIC Data + Store vertical. """ partition_date: date_pb2.Date = proto.Field( @@ -224,23 +218,22 @@ class SpannerSource(proto.Message): Attributes: project_id (str): - The project ID that contains the Spanner - source. Has a length limit of 128 characters. If - not specified, inherits the project ID from the - parent request. + The project ID that contains the Spanner source. Has + a length limit of 128 characters. If not specified, + inherits the project ID from the parent request. instance_id (str): - Required. The instance ID of the source - Spanner table. + Required. The instance ID of the source Spanner + table. database_id (str): - Required. The database ID of the source - Spanner table. + Required. The database ID of the source Spanner + table. table_id (str): - Required. The table name of the Spanner - database that needs to be imported. + Required. The table name of the Spanner database that + needs to be imported. enable_data_boost (bool): - Whether to apply data boost on Spanner export. - Enabling this option will incur additional cost. - More info can be found `here + Whether to apply data boost on Spanner export. Enabling + this option will incur additional cost. More info can be + found `here `__. """ @@ -267,19 +260,19 @@ class SpannerSource(proto.Message): class BigtableOptions(proto.Message): - r"""The Bigtable Options object that contains information to - support the import. + r"""The Bigtable Options object that contains information to support + the import. Attributes: key_field_name (str): - The field name used for saving row key value in - the document. The name has to match the pattern - ```a-zA-Z0-9 `__*``. + The field name used for saving row key value in the + document. The name has to match the pattern ```a-zA-Z0-9 + `__*``. families (MutableMapping[str, google.cloud.discoveryengine_v1beta.types.BigtableOptions.BigtableColumnFamily]): - The mapping from family names to an object - that contains column families level information - for the given column family. If a family is not - present in this map it will be ignored. + The mapping from family names to an object that + contains column families level information for the given + column family. If a family is not present in this map it + will be ignored. """ class Type(proto.Enum): @@ -337,32 +330,30 @@ class BigtableColumnFamily(proto.Message): Attributes: field_name (str): - The field name to use for this column family in - the document. The name has to match the pattern - ```a-zA-Z0-9 `__*``. If not set, it - is parsed from the family name with best effort. - However, due to different naming patterns, field - name collisions could happen, where parsing - behavior is undefined. + The field name to use for this column family in the + document. The name has to match the pattern ```a-zA-Z0-9 + `__*``. If not set, it is parsed from the + family name with best effort. However, due to different + naming patterns, field name collisions could happen, + where parsing behavior is undefined. encoding (google.cloud.discoveryengine_v1beta.types.BigtableOptions.Encoding): - The encoding mode of the values when the type is - not STRING. Acceptable encoding values are: - - * ``TEXT``: indicates values are alphanumeric - text strings. * ``BINARY``: indicates values are - encoded using ``HBase Bytes.toBytes`` family of - functions. This can be overridden for a specific - column by listing that column in ``columns`` and - specifying an encoding for it. + The encoding mode of the values when the type is not + STRING. Acceptable encoding values are: + + * ``TEXT``: indicates values are alphanumeric text + strings. * ``BINARY``: indicates values are encoded + using ``HBase Bytes.toBytes`` family of functions. This + can be overridden for a specific column by listing that + column in ``columns`` and specifying an encoding for it. type_ (google.cloud.discoveryengine_v1beta.types.BigtableOptions.Type): The type of values in this column family. - The values are expected to be encoded using - ``HBase Bytes.toBytes`` function when the - encoding value is set to ``BINARY``. + The values are expected to be encoded using ``HBase + Bytes.toBytes`` function when the encoding value is set + to ``BINARY``. columns (MutableSequence[google.cloud.discoveryengine_v1beta.types.BigtableOptions.BigtableColumn]): - The list of objects that contains column - level information for each column. If a column - is not present in this list it will be ignored. + The list of objects that contains column level + information for each column. If a column is not present + in this list it will be ignored. """ field_name: str = proto.Field( @@ -392,32 +383,30 @@ class BigtableColumn(proto.Message): Attributes: qualifier (bytes): - Required. Qualifier of the column. If it - cannot be decoded with utf-8, use a base-64 - encoded string instead. + Required. Qualifier of the column. If it cannot be + decoded with utf-8, use a base-64 encoded string + instead. field_name (str): - The field name to use for this column in the - document. The name has to match the pattern - ```a-zA-Z0-9 `__*``. If not set, it - is parsed from the qualifier bytes with best - effort. However, due to different naming - patterns, field name collisions could happen, - where parsing behavior is undefined. + The field name to use for this column in the document. + The name has to match the pattern ```a-zA-Z0-9 + `__*``. If not set, it is parsed from the + qualifier bytes with best effort. However, due to + different naming patterns, field name collisions could + happen, where parsing behavior is undefined. encoding (google.cloud.discoveryengine_v1beta.types.BigtableOptions.Encoding): - The encoding mode of the values when the type is - not ``STRING``. Acceptable encoding values are: - - * ``TEXT``: indicates values are alphanumeric - text strings. * ``BINARY``: indicates values are - encoded using ``HBase Bytes.toBytes`` family of - functions. This can be overridden for a specific - column by listing that column in ``columns`` and - specifying an encoding for it. + The encoding mode of the values when the type is not + ``STRING``. Acceptable encoding values are: + + * ``TEXT``: indicates values are alphanumeric text + strings. * ``BINARY``: indicates values are encoded + using ``HBase Bytes.toBytes`` family of functions. This + can be overridden for a specific column by listing that + column in ``columns`` and specifying an encoding for it. type_ (google.cloud.discoveryengine_v1beta.types.BigtableOptions.Type): The type of values in this column family. - The values are expected to be encoded using - ``HBase Bytes.toBytes`` function when the - encoding value is set to ``BINARY``. + The values are expected to be encoded using ``HBase + Bytes.toBytes`` function when the encoding value is set + to ``BINARY``. """ qualifier: bytes = proto.Field( @@ -456,21 +445,19 @@ class BigtableSource(proto.Message): Attributes: project_id (str): - The project ID that contains the Bigtable - source. Has a length limit of 128 characters. If - not specified, inherits the project ID from the - parent request. + The project ID that contains the Bigtable source. Has + a length limit of 128 characters. If not specified, + inherits the project ID from the parent request. instance_id (str): - Required. The instance ID of the Cloud - Bigtable that needs to be imported. + Required. The instance ID of the Cloud Bigtable that + needs to be imported. table_id (str): - Required. The table ID of the Cloud Bigtable - that needs to be imported. + Required. The table ID of the Cloud Bigtable that + needs to be imported. bigtable_options (google.cloud.discoveryengine_v1beta.types.BigtableOptions): - Required. Bigtable options that contains - information needed when parsing data into typed - structures. For example, column type - annotations. + Required. Bigtable options that contains information + needed when parsing data into typed structures. For + example, column type annotations. """ project_id: str = proto.Field( @@ -497,22 +484,20 @@ class FhirStoreSource(proto.Message): Attributes: fhir_store (str): - Required. The full resource name of the FHIR - store to import data from, in the format of + Required. The full resource name of the FHIR store to + import data from, in the format of ``projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}``. gcs_staging_dir (str): - Intermediate Cloud Storage directory used for - the import with a length limit of 2,000 - characters. Can be specified if one wants to - have the FhirStore export to a specific Cloud - Storage directory. + Intermediate Cloud Storage directory used for the + import with a length limit of 2,000 characters. Can be + specified if one wants to have the FhirStore export to a + specific Cloud Storage directory. resource_types (MutableSequence[str]): - The FHIR resource types to import. The resource - types should be a subset of all `supported FHIR - resource types + The FHIR resource types to import. The resource types + should be a subset of all `supported FHIR resource + types `__. - Default to all supported FHIR resource types if - empty. + Default to all supported FHIR resource types if empty. """ fhir_store: str = proto.Field( @@ -534,33 +519,31 @@ class CloudSqlSource(proto.Message): Attributes: project_id (str): - The project ID that contains the Cloud SQL - source. Has a length limit of 128 characters. If - not specified, inherits the project ID from the - parent request. + The project ID that contains the Cloud SQL source. + Has a length limit of 128 characters. If not specified, + inherits the project ID from the parent request. instance_id (str): - Required. The Cloud SQL instance to copy the - data from with a length limit of 256 characters. + Required. The Cloud SQL instance to copy the data + from with a length limit of 256 characters. database_id (str): - Required. The Cloud SQL database to copy the - data from with a length limit of 256 characters. + Required. The Cloud SQL database to copy the data + from with a length limit of 256 characters. table_id (str): - Required. The Cloud SQL table to copy the - data from with a length limit of 256 characters. + Required. The Cloud SQL table to copy the data from + with a length limit of 256 characters. gcs_staging_dir (str): - Intermediate Cloud Storage directory used for - the import with a length limit of 2,000 - characters. Can be specified if one wants to - have the Cloud SQL export to a specific Cloud - Storage directory. - - Ensure that the Cloud SQL service account has - the necessary Cloud Storage Admin permissions to - access the specified Cloud Storage directory. + Intermediate Cloud Storage directory used for the + import with a length limit of 2,000 characters. Can be + specified if one wants to have the Cloud SQL export to a + specific Cloud Storage directory. + + Ensure that the Cloud SQL service account has the + necessary Cloud Storage Admin permissions to access the + specified Cloud Storage directory. offload (bool): - Option for serverless export. Enabling this - option will incur additional cost. More info can - be found `here + Option for serverless export. Enabling this option will + incur additional cost. More info can be found + `here `__. """ @@ -595,32 +578,30 @@ class AlloyDbSource(proto.Message): Attributes: project_id (str): - The project ID that contains the AlloyDB - source. Has a length limit of 128 characters. If - not specified, inherits the project ID from the - parent request. + The project ID that contains the AlloyDB source. + Has a length limit of 128 characters. If not specified, + inherits the project ID from the parent request. location_id (str): - Required. The AlloyDB location to copy the - data from with a length limit of 256 characters. + Required. The AlloyDB location to copy the data from + with a length limit of 256 characters. cluster_id (str): - Required. The AlloyDB cluster to copy the - data from with a length limit of 256 characters. + Required. The AlloyDB cluster to copy the data from + with a length limit of 256 characters. database_id (str): - Required. The AlloyDB database to copy the - data from with a length limit of 256 characters. + Required. The AlloyDB database to copy the data from + with a length limit of 256 characters. table_id (str): - Required. The AlloyDB table to copy the data - from with a length limit of 256 characters. + Required. The AlloyDB table to copy the data from + with a length limit of 256 characters. gcs_staging_dir (str): - Intermediate Cloud Storage directory used for - the import with a length limit of 2,000 - characters. Can be specified if one wants to - have the AlloyDB export to a specific Cloud - Storage directory. + Intermediate Cloud Storage directory used for the + import with a length limit of 2,000 characters. Can be + specified if one wants to have the AlloyDB export to a + specific Cloud Storage directory. Ensure that the AlloyDB service account has the - necessary Cloud Storage Admin permissions to - access the specified Cloud Storage directory. + necessary Cloud Storage Admin permissions to access the + specified Cloud Storage directory. """ project_id: str = proto.Field( @@ -654,27 +635,25 @@ class FirestoreSource(proto.Message): Attributes: project_id (str): - The project ID that the Cloud SQL source is - in with a length limit of 128 characters. If not - specified, inherits the project ID from the - parent request. + The project ID that the Cloud SQL source is in with a + length limit of 128 characters. If not specified, + inherits the project ID from the parent request. database_id (str): - Required. The Firestore database to copy the - data from with a length limit of 256 characters. + Required. The Firestore database to copy the data + from with a length limit of 256 characters. collection_id (str): - Required. The Firestore collection (or - entity) to copy the data from with a length - limit of 1,500 characters. + Required. The Firestore collection (or entity) to + copy the data from with a length limit of 1,500 + characters. gcs_staging_dir (str): - Intermediate Cloud Storage directory used for - the import with a length limit of 2,000 - characters. Can be specified if one wants to - have the Firestore export to a specific Cloud - Storage directory. - - Ensure that the Firestore service account has - the necessary Cloud Storage Admin permissions to - access the specified Cloud Storage directory. + Intermediate Cloud Storage directory used for the + import with a length limit of 2,000 characters. Can be + specified if one wants to have the Firestore export to a + specific Cloud Storage directory. + + Ensure that the Firestore service account has the + necessary Cloud Storage Admin permissions to access the + specified Cloud Storage directory. """ project_id: str = proto.Field( @@ -702,11 +681,10 @@ class ImportErrorConfig(proto.Message): Attributes: gcs_prefix (str): - Cloud Storage prefix for import errors. This - must be an empty, existing Cloud Storage - directory. Import errors are written to sharded - files in this directory, one per line, as a - JSON-encoded ``google.rpc.Status`` message. + Cloud Storage prefix for import errors. This must be an + empty, existing Cloud Storage directory. Import errors + are written to sharded files in this directory, one per + line, as a JSON-encoded ``google.rpc.Status`` message. This field is a member of `oneof`_ ``destination``. """ @@ -743,18 +721,15 @@ class ImportUserEventsRequest(proto.Message): This field is a member of `oneof`_ ``source``. parent (str): - Required. Parent DataStore resource name, of the - form + Required. Parent DataStore resource name, of the form ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`` error_config (google.cloud.discoveryengine_v1beta.types.ImportErrorConfig): - The desired location of errors incurred - during the Import. Cannot be set for inline user - event imports. + The desired location of errors incurred during the + Import. Cannot be set for inline user event imports. """ class InlineSource(proto.Message): - r"""The inline source for the input config for ImportUserEvents - method. + r"""The inline source for the input config for ImportUserEvents method. Attributes: user_events (MutableSequence[google.cloud.discoveryengine_v1beta.types.UserEvent]): @@ -800,23 +775,22 @@ class InlineSource(proto.Message): class ImportUserEventsResponse(proto.Message): r"""Response of the ImportUserEventsRequest. If the long running operation was successful, then this message is returned by the - google.longrunning.Operations.response field if the operation - was successful. + google.longrunning.Operations.response field if the operation was + successful. Attributes: error_samples (MutableSequence[google.rpc.status_pb2.Status]): - A sample of errors encountered while - processing the request. + A sample of errors encountered while processing the + request. error_config (google.cloud.discoveryengine_v1beta.types.ImportErrorConfig): - Echoes the destination for the complete - errors if this field was set in the request. + Echoes the destination for the complete errors if + this field was set in the request. joined_events_count (int): - Count of user events imported with complete - existing Documents. + Count of user events imported with complete existing + Documents. unjoined_events_count (int): - Count of user events imported, but with - Document information not found in the existing - Branch. + Count of user events imported, but with Document + information not found in the existing Branch. """ error_samples: MutableSequence[status_pb2.Status] = proto.RepeatedField( @@ -840,22 +814,20 @@ class ImportUserEventsResponse(proto.Message): class ImportUserEventsMetadata(proto.Message): - r"""Metadata related to the progress of the Import operation. - This is returned by the google.longrunning.Operation.metadata - field. + r"""Metadata related to the progress of the Import operation. This is + returned by the google.longrunning.Operation.metadata field. Attributes: create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. success_count (int): - Count of entries that were processed - successfully. + Count of entries that were processed successfully. failure_count (int): - Count of entries that encountered errors - while processing. + Count of entries that encountered errors while + processing. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -879,22 +851,20 @@ class ImportUserEventsMetadata(proto.Message): class ImportDocumentsMetadata(proto.Message): - r"""Metadata related to the progress of the ImportDocuments - operation. This is returned by the - google.longrunning.Operation.metadata field. + r"""Metadata related to the progress of the ImportDocuments operation. + This is returned by the google.longrunning.Operation.metadata field. Attributes: create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. success_count (int): - Count of entries that were processed - successfully. + Count of entries that were processed successfully. failure_count (int): - Count of entries that encountered errors - while processing. + Count of entries that encountered errors while + processing. total_count (int): Total count of entries that were processed. """ @@ -972,42 +942,38 @@ class ImportDocumentsRequest(proto.Message): This field is a member of `oneof`_ ``source``. parent (str): - Required. The parent branch resource name, such - as + Required. The parent branch resource name, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}``. Requires create/update permission. error_config (google.cloud.discoveryengine_v1beta.types.ImportErrorConfig): - The desired location of errors incurred - during the Import. + The desired location of errors incurred during the + Import. reconciliation_mode (google.cloud.discoveryengine_v1beta.types.ImportDocumentsRequest.ReconciliationMode): - The mode of reconciliation between existing - documents and the documents to be imported. - Defaults to `ReconciliationMode.INCREMENTAL + The mode of reconciliation between existing documents + and the documents to be imported. Defaults to + `ReconciliationMode.INCREMENTAL `__. update_mask (google.protobuf.field_mask_pb2.FieldMask): - Indicates which fields in the provided - imported documents to update. If not set, the - default is to update all fields. + Indicates which fields in the provided imported + documents to update. If not set, the default is to + update all fields. auto_generate_ids (bool): - Whether to automatically generate IDs for the - documents if absent. + Whether to automatically generate IDs for the documents + if absent. If set to ``true``, `Document.id `__s - are automatically generated based on the hash of - the payload, where IDs may not be consistent - during multiple imports. In which case - `ReconciliationMode.FULL + are automatically generated based on the hash of the + payload, where IDs may not be consistent during multiple + imports. In which case `ReconciliationMode.FULL `__ - is highly recommended to avoid duplicate - contents. If unset or set to ``false``, - `Document.id + is highly recommended to avoid duplicate contents. If + unset or set to ``false``, `Document.id `__s have to be specified using `id_field `__, - otherwise, documents without IDs fail to be - imported. + otherwise, documents without IDs fail to be imported. Supported data sources: @@ -1035,28 +1001,26 @@ class ImportDocumentsRequest(proto.Message): * `BigtableSource `__. id_field (str): - The field indicates the ID field or column to be - used as unique IDs of the documents. + The field indicates the ID field or column to be used as + unique IDs of the documents. For `GcsSource - `__ - it is the key of the JSON field. For instance, - ``my_id`` for JSON ``{"my_id": + `__ it is + the key of the JSON field. For instance, ``my_id`` for + JSON ``{"my_id": - "some_uuid"}``. For others, it may be the column - name of the table where the unique ids are - stored. + "some_uuid"}``. For others, it may be the column name of + the table where the unique ids are stored. - The values of the JSON field or the table column - are used as the `Document.id + The values of the JSON field or the table column are + used as the `Document.id `__s. - The JSON field or the table column must be of - string type, and the values must be set as valid - strings conform to - `RFC-1034 - `__ with - 1-63 characters. Otherwise, documents without - valid IDs fail to be imported. + The JSON field or the table column must be of string + type, and the values must be set as valid strings + conform to + `RFC-1034 `__ with + 1-63 characters. Otherwise, documents without valid IDs + fail to be imported. Only set this field when `auto_generate_ids @@ -1064,8 +1028,8 @@ class ImportDocumentsRequest(proto.Message): is unset or set as ``false``. Otherwise, an INVALID_ARGUMENT error is thrown. - If it is unset, a default value ``_id`` is used - when importing from the allowed data sources. + If it is unset, a default value ``_id`` is used when + importing from the allowed data sources. Supported data sources: @@ -1095,8 +1059,8 @@ class ImportDocumentsRequest(proto.Message): """ class ReconciliationMode(proto.Enum): - r"""Indicates how imported documents are reconciled with the - existing documents created or imported before. + r"""Indicates how imported documents are reconciled with the existing + documents created or imported before. Values: RECONCILIATION_MODE_UNSPECIFIED (0): @@ -1115,13 +1079,12 @@ class ReconciliationMode(proto.Enum): FULL = 2 class InlineSource(proto.Message): - r"""The inline source for the input config for ImportDocuments - method. + r"""The inline source for the input config for ImportDocuments method. Attributes: documents (MutableSequence[google.cloud.discoveryengine_v1beta.types.Document]): - Required. A list of documents to update/create. - Each document must have a valid `Document.id + Required. A list of documents to update/create. Each + document must have a valid `Document.id `__. Recommended max of 100 items. """ @@ -1218,18 +1181,18 @@ class InlineSource(proto.Message): class ImportDocumentsResponse(proto.Message): r"""Response of the `ImportDocumentsRequest - `__. - If the long running operation is done, then this message is - returned by the google.longrunning.Operations.response field if - the operation was successful. + `__. If the + long running operation is done, then this message is returned by the + google.longrunning.Operations.response field if the operation was + successful. Attributes: error_samples (MutableSequence[google.rpc.status_pb2.Status]): - A sample of errors encountered while - processing the request. + A sample of errors encountered while processing the + request. error_config (google.cloud.discoveryengine_v1beta.types.ImportErrorConfig): - Echoes the destination for the complete - errors in the request if set. + Echoes the destination for the complete errors in the + request if set. """ error_samples: MutableSequence[status_pb2.Status] = proto.RepeatedField( @@ -1266,19 +1229,17 @@ class ImportSuggestionDenyListEntriesRequest(proto.Message): gcs_source (google.cloud.discoveryengine_v1beta.types.GcsSource): Cloud Storage location for the input content. - Only 1 file can be specified that contains all - entries to import. Supported values - ``gcs_source.schema`` for autocomplete - suggestion deny list entry imports: + Only 1 file can be specified that contains all entries + to import. Supported values ``gcs_source.schema`` for + autocomplete suggestion deny list entry imports: * ``suggestion_deny_list`` (default): One JSON [SuggestionDenyListEntry] per line. This field is a member of `oneof`_ ``source``. parent (str): - Required. The parent data store resource name - for which to import denylist entries. Follows - pattern + Required. The parent data store resource name for which + to import denylist entries. Follows pattern projects/*/locations/*/collections/*/dataStores/*. """ @@ -1287,8 +1248,8 @@ class InlineSource(proto.Message): Attributes: entries (MutableSequence[google.cloud.discoveryengine_v1beta.types.SuggestionDenyListEntry]): - Required. A list of all denylist entries to - import. Max of 1000 items. + Required. A list of all denylist entries to import. + Max of 1000 items. """ entries: MutableSequence[ @@ -1325,11 +1286,10 @@ class ImportSuggestionDenyListEntriesResponse(proto.Message): Attributes: error_samples (MutableSequence[google.rpc.status_pb2.Status]): - A sample of errors encountered while - processing the request. + A sample of errors encountered while processing the + request. imported_entries_count (int): - Count of deny list entries successfully - imported. + Count of deny list entries successfully imported. failed_entries_count (int): Count of deny list entries that failed to be imported. @@ -1352,15 +1312,15 @@ class ImportSuggestionDenyListEntriesResponse(proto.Message): class ImportSuggestionDenyListEntriesMetadata(proto.Message): r"""Metadata related to the progress of the - ImportSuggestionDenyListEntries operation. This is returned by - the google.longrunning.Operation.metadata field. + ImportSuggestionDenyListEntries operation. This is returned by the + google.longrunning.Operation.metadata field. Attributes: create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -1402,15 +1362,14 @@ class ImportCompletionSuggestionsRequest(proto.Message): This field is a member of `oneof`_ ``source``. parent (str): - Required. The parent data store resource name - for which to import customer autocomplete - suggestions. + Required. The parent data store resource name for which + to import customer autocomplete suggestions. Follows pattern ``projects/*/locations/*/collections/*/dataStores/*`` error_config (google.cloud.discoveryengine_v1beta.types.ImportErrorConfig): - The desired location of errors incurred - during the Import. + The desired location of errors incurred during the + Import. """ class InlineSource(proto.Message): @@ -1418,8 +1377,8 @@ class InlineSource(proto.Message): Attributes: suggestions (MutableSequence[google.cloud.discoveryengine_v1beta.types.CompletionSuggestion]): - Required. A list of all denylist entries to - import. Max of 1000 items. + Required. A list of all denylist entries to import. + Max of 1000 items. """ suggestions: MutableSequence[ @@ -1463,17 +1422,17 @@ class ImportCompletionSuggestionsResponse(proto.Message): r"""Response of the `CompletionService.ImportCompletionSuggestions `__ - method. If the long running operation is done, this message is - returned by the google.longrunning.Operations.response field if - the operation is successful. + method. If the long running operation is done, this message is returned + by the google.longrunning.Operations.response field if the operation is + successful. Attributes: error_samples (MutableSequence[google.rpc.status_pb2.Status]): - A sample of errors encountered while - processing the request. + A sample of errors encountered while processing the + request. error_config (google.cloud.discoveryengine_v1beta.types.ImportErrorConfig): - The desired location of errors incurred - during the Import. + The desired location of errors incurred during the + Import. """ error_samples: MutableSequence[status_pb2.Status] = proto.RepeatedField( @@ -1489,16 +1448,16 @@ class ImportCompletionSuggestionsResponse(proto.Message): class ImportCompletionSuggestionsMetadata(proto.Message): - r"""Metadata related to the progress of the - ImportCompletionSuggestions operation. This will be returned by - the google.longrunning.Operation.metadata field. + r"""Metadata related to the progress of the ImportCompletionSuggestions + operation. This will be returned by the + google.longrunning.Operation.metadata field. Attributes: create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. success_count (int): Count of `CompletionSuggestion @@ -1558,32 +1517,31 @@ class ImportSampleQueriesRequest(proto.Message): This field is a member of `oneof`_ ``source``. parent (str): - Required. The parent sample query set resource - name, such as + Required. The parent sample query set resource name, + such as ``projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}``. If the caller does not have permission to list `SampleQuery `__s - under this sample query set, regardless of - whether or not this sample query set exists, a + under this sample query set, regardless of whether or + not this sample query set exists, a ``PERMISSION_DENIED`` error is returned. error_config (google.cloud.discoveryengine_v1beta.types.ImportErrorConfig): - The desired location of errors incurred - during the Import. + The desired location of errors incurred during the + Import. """ class InlineSource(proto.Message): r"""The inline source for - `SampleQuery - `__s. + `SampleQuery `__s. Attributes: sample_queries (MutableSequence[google.cloud.discoveryengine_v1beta.types.SampleQuery]): Required. A list of `SampleQuery - `__s - to import. Max of 1000 items. + `__s to + import. Max of 1000 items. """ sample_queries: MutableSequence[sample_query.SampleQuery] = proto.RepeatedField( @@ -1625,17 +1583,17 @@ class ImportSampleQueriesResponse(proto.Message): r"""Response of the `SampleQueryService.ImportSampleQueries `__ - method. If the long running operation is done, this message is - returned by the google.longrunning.Operations.response field if - the operation is successful. + method. If the long running operation is done, this message is returned + by the google.longrunning.Operations.response field if the operation is + successful. Attributes: error_samples (MutableSequence[google.rpc.status_pb2.Status]): - A sample of errors encountered while - processing the request. + A sample of errors encountered while processing the + request. error_config (google.cloud.discoveryengine_v1beta.types.ImportErrorConfig): - The desired location of errors incurred - during the Import. + The desired location of errors incurred during the + Import. """ error_samples: MutableSequence[status_pb2.Status] = proto.RepeatedField( @@ -1659,9 +1617,8 @@ class ImportSampleQueriesMetadata(proto.Message): create_time (google.protobuf.timestamp_pb2.Timestamp): ImportSampleQueries operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - ImportSampleQueries operation last update - time. If the operation is done, this is also the - finish time. + ImportSampleQueries operation last update time. If + the operation is done, this is also the finish time. success_count (int): Count of `SampleQuery `__s diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/project.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/project.py index cdbe8f7d8d61..a254c2b5d44d 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/project.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/project.py @@ -34,22 +34,21 @@ class Project(proto.Message): Attributes: name (str): - Output only. Full resource name of the project, - for example ``projects/{project}``. - Note that when making requests, project number - and project id are both acceptable, but the - server will always respond in project number. + Output only. Full resource name of the project, for + example ``projects/{project}``. + Note that when making requests, project number and + project id are both acceptable, but the server will + always respond in project number. create_time (google.protobuf.timestamp_pb2.Timestamp): - Output only. The timestamp when this project - is created. + Output only. The timestamp when this project is + created. provision_completion_time (google.protobuf.timestamp_pb2.Timestamp): - Output only. The timestamp when this project - is successfully provisioned. Empty value means - this project is still provisioning and is not - ready for use. + Output only. The timestamp when this project is + successfully provisioned. Empty value means this project + is still provisioning and is not ready for use. service_terms_map (MutableMapping[str, google.cloud.discoveryengine_v1beta.types.Project.ServiceTerms]): - Output only. A map of terms of services. The key - is the ``id`` of `ServiceTerms + Output only. A map of terms of services. The key is the + ``id`` of `ServiceTerms `__. """ @@ -62,8 +61,7 @@ class ServiceTerms(proto.Message): Available terms: * ``GA_DATA_USE_TERMS``: `Terms for data - use - `__. + use `__. When using this as ``id``, the acceptable `version `__ @@ -75,14 +73,14 @@ class ServiceTerms(proto.Message): `__ above. state (google.cloud.discoveryengine_v1beta.types.Project.ServiceTerms.State): - Whether the project has accepted/rejected the - service terms or it is still pending. + Whether the project has accepted/rejected the service + terms or it is still pending. accept_time (google.protobuf.timestamp_pb2.Timestamp): - The last time when the project agreed to the - terms of service. + The last time when the project agreed to the terms of + service. decline_time (google.protobuf.timestamp_pb2.Timestamp): - The last time when the project declined or - revoked the agreement to terms of service. + The last time when the project declined or revoked + the agreement to terms of service. """ class State(proto.Enum): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/project_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/project_service.py index 9cff599f2e85..9231eb99e327 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/project_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/project_service.py @@ -38,22 +38,20 @@ class ProvisionProjectRequest(proto.Message): name (str): Required. Full resource name of a `Project - `__, - such as ``projects/{project_id_or_number}``. + `__, such + as ``projects/{project_id_or_number}``. accept_data_use_terms (bool): - Required. Set to ``true`` to specify that caller - has read and would like to give consent to the - `Terms for data use + Required. Set to ``true`` to specify that caller has + read and would like to give consent to the `Terms for + data use `__. data_use_terms_version (str): Required. The version of the `Terms for data - use - `__ - that caller has read and would like to give - consent to. + use `__ + that caller has read and would like to give consent to. - Acceptable version is ``2022-11-23``, and this - may change over time. + Acceptable version is ``2022-11-23``, and this may + change over time. """ name: str = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/purge_config.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/purge_config.py index a8db81523a32..f1adde3ef217 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/purge_config.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/purge_config.py @@ -48,14 +48,13 @@ class PurgeUserEventsRequest(proto.Message): Attributes: parent (str): - Required. The resource name of the catalog under - which the events are created. The format is + Required. The resource name of the catalog under which + the events are created. The format is ``projects/{project}/locations/global/collections/{collection}/dataStores/{dataStore}``. filter (str): - Required. The filter string to specify the - events to be deleted with a length limit of - 5,000 characters. The eligible fields for - filtering are: + Required. The filter string to specify the events to be + deleted with a length limit of 5,000 characters. The + eligible fields for filtering are: * ``eventType``: Double quoted `UserEvent.event_type @@ -63,13 +62,11 @@ class PurgeUserEventsRequest(proto.Message): string. * ``eventTime``: in ISO 8601 "zulu" format. - * ``userPseudoId``: Double quoted string. - Specifying this will delete all events - associated with a visitor. + * ``userPseudoId``: Double quoted string. Specifying + this will delete all events associated with a visitor. - * ``userId``: Double quoted string. Specifying - this will delete all events associated with a - user. + * ``userId``: Double quoted string. Specifying this will + delete all events associated with a user. Examples: @@ -90,18 +87,17 @@ class PurgeUserEventsRequest(proto.Message): ``*`` - The filtering fields are assumed to have an - implicit AND. + The filtering fields are assumed to have an implicit + AND. force (bool): - The ``force`` field is currently not supported. - Purge user event requests will permanently - delete all purgeable events. Once the - development is complete: - - If ``force`` is set to false, the method will - return the expected purge count without deleting - any user events. This field will default to - false if not included in the request. + The ``force`` field is currently not supported. Purge + user event requests will permanently delete all + purgeable events. Once the development is complete: + + If ``force`` is set to false, the method will return the + expected purge count without deleting any user events. + This field will default to false if not included in the + request. """ parent: str = proto.Field( @@ -119,14 +115,14 @@ class PurgeUserEventsRequest(proto.Message): class PurgeUserEventsResponse(proto.Message): - r"""Response of the PurgeUserEventsRequest. If the long running - operation is successfully done, then this message is returned by - the google.longrunning.Operations.response field. + r"""Response of the PurgeUserEventsRequest. If the long running operation + is successfully done, then this message is returned by the + google.longrunning.Operations.response field. Attributes: purge_count (int): - The total count of events purged as a result - of the operation. + The total count of events purged as a result of the + operation. """ purge_count: int = proto.Field( @@ -136,22 +132,21 @@ class PurgeUserEventsResponse(proto.Message): class PurgeUserEventsMetadata(proto.Message): - r"""Metadata related to the progress of the PurgeUserEvents - operation. This will be returned by the - google.longrunning.Operation.metadata field. + r"""Metadata related to the progress of the PurgeUserEvents operation. + This will be returned by the google.longrunning.Operation.metadata + field. Attributes: create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. success_count (int): - Count of entries that were deleted - successfully. + Count of entries that were deleted successfully. failure_count (int): - Count of entries that encountered errors - while processing. + Count of entries that encountered errors while + processing. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -181,11 +176,10 @@ class PurgeErrorConfig(proto.Message): Attributes: gcs_prefix (str): - Cloud Storage prefix for purge errors. This must - be an empty, existing Cloud Storage directory. - Purge errors are written to sharded files in - this directory, one per line, as a JSON-encoded - ``google.rpc.Status`` message. + Cloud Storage prefix for purge errors. This must be an + empty, existing Cloud Storage directory. Purge errors + are written to sharded files in this directory, one per + line, as a JSON-encoded ``google.rpc.Status`` message. This field is a member of `oneof`_ ``destination``. """ @@ -217,29 +211,28 @@ class PurgeDocumentsRequest(proto.Message): * ``document_id``: One valid `Document.id - `__ - per line. + `__ per + line. This field is a member of `oneof`_ ``source``. inline_source (google.cloud.discoveryengine_v1beta.types.PurgeDocumentsRequest.InlineSource): - Inline source for the input content for - purge. + Inline source for the input content for purge. This field is a member of `oneof`_ ``source``. parent (str): Required. The parent resource name, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}``. filter (str): - Required. Filter matching documents to purge. - Only currently supported value is + Required. Filter matching documents to purge. Only + currently supported value is ``*`` (all items). error_config (google.cloud.discoveryengine_v1beta.types.PurgeErrorConfig): - The desired location of errors incurred - during the purge. + The desired location of errors incurred during the + purge. force (bool): - Actually performs the purge. If ``force`` is set - to false, return the expected purge count - without deleting any documents. + Actually performs the purge. If ``force`` is set to + false, return the expected purge count without deleting + any documents. """ class InlineSource(proto.Message): @@ -250,8 +243,8 @@ class InlineSource(proto.Message): Attributes: documents (MutableSequence[str]): - Required. A list of full resource name of - documents to purge. In the format + Required. A list of full resource name of documents to + purge. In the format ``projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*``. Recommended max of 100 items. """ @@ -296,19 +289,18 @@ class PurgeDocumentsResponse(proto.Message): r"""Response message for `DocumentService.PurgeDocuments `__ - method. If the long running operation is successfully done, then - this message is returned by the - google.longrunning.Operations.response field. + method. If the long running operation is successfully done, then this + message is returned by the google.longrunning.Operations.response field. Attributes: purge_count (int): - The total count of documents purged as a - result of the operation. + The total count of documents purged as a result of + the operation. purge_sample (MutableSequence[str]): - A sample of document names that will be deleted. - Only populated if ``force`` is set to false. A - max of 100 names will be returned and the names - are chosen at random. + A sample of document names that will be deleted. Only + populated if ``force`` is set to false. A max of 100 + names will be returned and the names are chosen at + random. """ purge_count: int = proto.Field( @@ -322,25 +314,24 @@ class PurgeDocumentsResponse(proto.Message): class PurgeDocumentsMetadata(proto.Message): - r"""Metadata related to the progress of the PurgeDocuments - operation. This will be returned by the - google.longrunning.Operation.metadata field. + r"""Metadata related to the progress of the PurgeDocuments operation. + This will be returned by the google.longrunning.Operation.metadata + field. Attributes: create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. success_count (int): - Count of entries that were deleted - successfully. + Count of entries that were deleted successfully. failure_count (int): - Count of entries that encountered errors - while processing. + Count of entries that encountered errors while + processing. ignored_count (int): - Count of entries that were ignored as entries - were not found. + Count of entries that were ignored as entries were + not found. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -375,9 +366,8 @@ class PurgeSuggestionDenyListEntriesRequest(proto.Message): Attributes: parent (str): - Required. The parent data store resource name - for which to import denylist entries. Follows - pattern + Required. The parent data store resource name for which + to import denylist entries. Follows pattern projects/*/locations/*/collections/*/dataStores/*. """ @@ -395,11 +385,10 @@ class PurgeSuggestionDenyListEntriesResponse(proto.Message): Attributes: purge_count (int): - Number of suggestion deny list entries - purged. + Number of suggestion deny list entries purged. error_samples (MutableSequence[google.rpc.status_pb2.Status]): - A sample of errors encountered while - processing the request. + A sample of errors encountered while processing the + request. """ purge_count: int = proto.Field( @@ -415,15 +404,15 @@ class PurgeSuggestionDenyListEntriesResponse(proto.Message): class PurgeSuggestionDenyListEntriesMetadata(proto.Message): r"""Metadata related to the progress of the - PurgeSuggestionDenyListEntries operation. This is returned by - the google.longrunning.Operation.metadata field. + PurgeSuggestionDenyListEntries operation. This is returned by the + google.longrunning.Operation.metadata field. Attributes: create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -446,9 +435,8 @@ class PurgeCompletionSuggestionsRequest(proto.Message): Attributes: parent (str): - Required. The parent data store resource name - for which to purge completion suggestions. - Follows pattern + Required. The parent data store resource name for which + to purge completion suggestions. Follows pattern projects/*/locations/*/collections/*/dataStores/*. """ @@ -466,11 +454,11 @@ class PurgeCompletionSuggestionsResponse(proto.Message): Attributes: purge_succeeded (bool): - Whether the completion suggestions were - successfully purged. + Whether the completion suggestions were successfully + purged. error_samples (MutableSequence[google.rpc.status_pb2.Status]): - A sample of errors encountered while - processing the request. + A sample of errors encountered while processing the + request. """ purge_succeeded: bool = proto.Field( @@ -485,16 +473,16 @@ class PurgeCompletionSuggestionsResponse(proto.Message): class PurgeCompletionSuggestionsMetadata(proto.Message): - r"""Metadata related to the progress of the - PurgeCompletionSuggestions operation. This is returned by the - google.longrunning.Operation.metadata field. + r"""Metadata related to the progress of the PurgeCompletionSuggestions + operation. This is returned by the google.longrunning.Operation.metadata + field. Attributes: create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/rank_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/rank_service.py index de153a694fab..427b11f4ddfc 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/rank_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/rank_service.py @@ -32,8 +32,7 @@ class RankingRecord(proto.Message): r"""Record message for `RankService.Rank - `__ - method. + `__ method. Attributes: id (str): @@ -45,8 +44,8 @@ class RankingRecord(proto.Message): `__ or `content `__ - should be set otherwise an INVALID_ARGUMENT - error is thrown. + should be set otherwise an INVALID_ARGUMENT error is + thrown. content (str): The content of the record. Empty by default. At least one of @@ -54,11 +53,11 @@ class RankingRecord(proto.Message): `__ or `content `__ - should be set otherwise an INVALID_ARGUMENT - error is thrown. + should be set otherwise an INVALID_ARGUMENT error is + thrown. score (float): - The score of this record based on the given - query and selected model. + The score of this record based on the given query and + selected model. """ id: str = proto.Field( @@ -82,55 +81,52 @@ class RankingRecord(proto.Message): class RankRequest(proto.Message): r"""Request message for `RankService.Rank - `__ - method. + `__ method. Attributes: ranking_config (str): - Required. The resource name of the rank service - config, such as + Required. The resource name of the rank service config, + such as ``projects/{project_num}/locations/{location}/rankingConfigs/default_ranking_config``. model (str): - The identifier of the model to use. It is one - of: - * ``semantic-ranker-512@latest``: Semantic - ranking model with maxiumn input token size 512. + The identifier of the model to use. It is one of: - It is set to ``semantic-ranker-512@latest`` by - default if unspecified. + * ``semantic-ranker-512@latest``: Semantic ranking model + with maxiumn input token size 512. + + It is set to ``semantic-ranker-512@latest`` by default + if unspecified. top_n (int): - The number of results to return. If this is - unset or no bigger than zero, returns all - results. + The number of results to return. If this is unset or + no bigger than zero, returns all results. query (str): The query to use. records (MutableSequence[google.cloud.discoveryengine_v1beta.types.RankingRecord]): - Required. A list of records to rank. At most - 200 records to rank. + Required. A list of records to rank. At most 200 + records to rank. ignore_record_details_in_response (bool): - If true, the response will contain only - record ID and score. By default, it is false, - the response will contain record details. + If true, the response will contain only record ID and + score. By default, it is false, the response will + contain record details. user_labels (MutableMapping[str, str]): - The user labels applied to a resource must meet - the following requirements: - * Each resource can have multiple labels, up to - a maximum of 64. + The user labels applied to a resource must meet the + following requirements: + * Each resource can have multiple labels, up to a + maximum of 64. * Each label must be a key-value pair. - * Keys have a minimum length of 1 character and - a maximum length of 63 characters and cannot - be empty. Values can be empty and have a maximum - length of 63 characters. + * Keys have a minimum length of 1 character and a + maximum length of 63 characters and cannot be empty. + Values can be empty and have a maximum length of 63 + characters. - * Keys and values can contain only lowercase - letters, numeric characters, underscores, and - dashes. All characters must use UTF-8 encoding, - and international characters are allowed. + * Keys and values can contain only lowercase letters, + numeric characters, underscores, and dashes. All + characters must use UTF-8 encoding, and international + characters are allowed. - * The key portion of a label must be unique. - However, you can use the same key with - multiple resources. + * The key portion of a label must be unique. However, + you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. @@ -176,8 +172,7 @@ class RankRequest(proto.Message): class RankResponse(proto.Message): r"""Response message for `RankService.Rank - `__ - method. + `__ method. Attributes: records (MutableSequence[google.cloud.discoveryengine_v1beta.types.RankingRecord]): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/recommendation_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/recommendation_service.py index d90ed6720bd3..8f263db1182b 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/recommendation_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/recommendation_service.py @@ -45,10 +45,10 @@ class RecommendRequest(proto.Message): or ``projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*`` - One default serving config is created along with - your recommendation engine creation. The engine - ID is used as the ID of the default serving - config. For example, for Engine + One default serving config is created along with your + recommendation engine creation. The engine ID is used as + the ID of the default serving config. For example, for + Engine ``projects/*/locations/global/collections/*/engines/my-engine``, you can use ``projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine`` @@ -57,12 +57,11 @@ class RecommendRequest(proto.Message): `__ requests. user_event (google.cloud.discoveryengine_v1beta.types.UserEvent): - Required. Context about the user, what they are - looking at and what action they took to trigger - the Recommend request. Note that this user event - detail won't be ingested to userEvent logs. - Thus, a separate userEvent write request is - required for event logging. + Required. Context about the user, what they are looking + at and what action they took to trigger the Recommend + request. Note that this user event detail won't be + ingested to userEvent logs. Thus, a separate userEvent + write request is required for event logging. Don't set `UserEvent.user_pseudo_id @@ -70,11 +69,10 @@ class RecommendRequest(proto.Message): or `UserEvent.user_info.user_id `__ - to the same fixed ID for different users. If you - are trying to receive non-personalized - recommendations (not recommended; this can - negatively impact model performance), instead - set + to the same fixed ID for different users. If you are + trying to receive non-personalized recommendations (not + recommended; this can negatively impact model + performance), instead set `UserEvent.user_pseudo_id `__ to a random unique ID and leave @@ -83,82 +81,77 @@ class RecommendRequest(proto.Message): unset. page_size (int): Maximum number of results to return. Set this - property to the number of recommendation results - needed. If zero, the service chooses a - reasonable default. The maximum allowed value is - 100. Values above 100 are set to 100. + property to the number of recommendation results needed. + If zero, the service chooses a reasonable default. The + maximum allowed value is 100. Values above 100 are set + to 100. filter (str): - Filter for restricting recommendation results - with a length limit of 5,000 characters. - Currently, only filter expressions on the - ``filter_tags`` attribute is supported. + Filter for restricting recommendation results with a + length limit of 5,000 characters. Currently, only filter + expressions on the ``filter_tags`` attribute is + supported. Examples: - * ``(filter_tags: ANY("Red", "Blue") OR - filter_tags: ANY("Hot", "Cold"))`` * - ``(filter_tags: ANY("Red", "Blue")) AND NOT - (filter_tags: ANY("Green"))`` + * ``(filter_tags: ANY("Red", "Blue") OR filter_tags: + ANY("Hot", "Cold"))`` * ``(filter_tags: ANY("Red", + "Blue")) AND NOT (filter_tags: ANY("Green"))`` - If ``attributeFilteringSyntax`` is set to true - under the ``params`` field, then attribute-based - expressions are expected instead of the above - described tag-based syntax. Examples: + If ``attributeFilteringSyntax`` is set to true under the + ``params`` field, then attribute-based expressions are + expected instead of the above described tag-based + syntax. Examples: - * (launguage: ANY("en", "es")) AND NOT - (categories: ANY("Movie")) * (available: true) - AND + * (launguage: ANY("en", "es")) AND NOT (categories: + ANY("Movie")) * (available: true) AND (launguage: ANY("en", "es")) OR (categories: ANY("Movie")) - If your filter blocks all results, the API - returns generic (unfiltered) popular Documents. - If you only want results strictly matching the - filters, set ``strictFiltering`` to ``true`` in + If your filter blocks all results, the API returns + generic (unfiltered) popular Documents. If you only want + results strictly matching the filters, set + ``strictFiltering`` to ``true`` in `RecommendRequest.params `__ to receive empty results instead. Note that the API never returns `Document - `__s - with ``storageStatus`` as ``EXPIRED`` or - ``DELETED`` regardless of filter choices. + `__s with + ``storageStatus`` as ``EXPIRED`` or ``DELETED`` + regardless of filter choices. validate_only (bool): - Use validate only mode for this recommendation - query. If set to ``true``, a fake model is used - that returns arbitrary Document IDs. Note that - the validate only mode should only be used for - testing the API, or if the model is not ready. + Use validate only mode for this recommendation query. If + set to ``true``, a fake model is used that returns + arbitrary Document IDs. Note that the validate only mode + should only be used for testing the API, or if the model + is not ready. params (MutableMapping[str, google.protobuf.struct_pb2.Value]): Additional domain specific parameters for the recommendations. Allowed values: - * ``returnDocument``: Boolean. If set to - ``true``, the associated Document object is - returned in - `RecommendResponse.RecommendationResult.document + * ``returnDocument``: Boolean. If set to ``true``, the + associated Document object is returned in + `RecommendResponse.RecommendationResult.document `__. * ``returnScore``: Boolean. If set to true, the - recommendation score corresponding to each - returned Document is set in + recommendation score corresponding to each returned + Document is set in `RecommendResponse.RecommendationResult.metadata `__. - The given score indicates the probability of a - Document conversion given the user's context - and history. + The given score indicates the probability of a Document + conversion given the user's context and history. - * ``strictFiltering``: Boolean. True by default. - If set to ``false``, the service - returns generic (unfiltered) popular - Documents instead of empty if your filter - blocks all recommendation results. + * ``strictFiltering``: Boolean. True by default. If set + to ``false``, the service + returns generic (unfiltered) popular Documents + instead of empty if your filter blocks all + recommendation results. - * ``diversityLevel``: String. Default empty. If - set to be non-empty, then it needs to be one - of: + * ``diversityLevel``: String. Default empty. If set to + be non-empty, then it needs to be one of: * ``no-diversity`` * ``low-diversity`` @@ -168,33 +161,31 @@ class RecommendRequest(proto.Message): * ``auto-diversity`` This gives request-level control and adjusts - recommendation results based on Document - category. + recommendation results based on Document category. - * ``attributeFilteringSyntax``: Boolean. False - by default. If set to true, the ``filter`` - field is interpreted according to the new, - attribute-based syntax. + * ``attributeFilteringSyntax``: Boolean. False by + default. If set to true, the ``filter`` field is + interpreted according to the new, attribute-based + syntax. user_labels (MutableMapping[str, str]): - The user labels applied to a resource must meet - the following requirements: - * Each resource can have multiple labels, up to - a maximum of 64. + The user labels applied to a resource must meet the + following requirements: + * Each resource can have multiple labels, up to a + maximum of 64. * Each label must be a key-value pair. - * Keys have a minimum length of 1 character and - a maximum length of 63 characters and cannot - be empty. Values can be empty and have a maximum - length of 63 characters. + * Keys have a minimum length of 1 character and a + maximum length of 63 characters and cannot be empty. + Values can be empty and have a maximum length of 63 + characters. - * Keys and values can contain only lowercase - letters, numeric characters, underscores, and - dashes. All characters must use UTF-8 encoding, - and international characters are allowed. + * Keys and values can contain only lowercase letters, + numeric characters, underscores, and dashes. All + characters must use UTF-8 encoding, and international + characters are allowed. - * The key portion of a label must be unique. - However, you can use the same key with - multiple resources. + * The key portion of a label must be unique. However, + you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. @@ -244,20 +235,20 @@ class RecommendResponse(proto.Message): Attributes: results (MutableSequence[google.cloud.discoveryengine_v1beta.types.RecommendResponse.RecommendationResult]): - A list of recommended Documents. The order - represents the ranking (from the most relevant - Document to the least). + A list of recommended Documents. The order represents + the ranking (from the most relevant Document to the + least). attribution_token (str): - A unique attribution token. This should be - included in the `UserEvent - `__ - logs resulting from this recommendation, which - enables accurate attribution of recommendation - model performance. + A unique attribution token. This should be included in + the `UserEvent + `__ logs + resulting from this recommendation, which enables + accurate attribution of recommendation model + performance. missing_ids (MutableSequence[str]): - IDs of documents in the request that were - missing from the default Branch associated with - the requested ServingConfig. + IDs of documents in the request that were missing + from the default Branch associated with the requested + ServingConfig. validate_only (bool): True if `RecommendRequest.validate_only @@ -266,8 +257,8 @@ class RecommendResponse(proto.Message): """ class RecommendationResult(proto.Message): - r"""RecommendationResult represents a generic recommendation - result with associated metadata. + r"""RecommendationResult represents a generic recommendation result with + associated metadata. Attributes: id (str): @@ -281,9 +272,8 @@ class RecommendationResult(proto.Message): Possible values: - * ``score``: Recommendation score in double - value. Is set if ``returnScore`` is set to - true in + * ``score``: Recommendation score in double value. Is + set if ``returnScore`` is set to true in `RecommendRequest.params `__. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/sample_query.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/sample_query.py index 8d69c24cf01a..385543c193c3 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/sample_query.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/sample_query.py @@ -39,22 +39,21 @@ class SampleQuery(proto.Message): This field is a member of `oneof`_ ``content``. name (str): - Identifier. The full resource name of the sample - query, in the format of + Identifier. The full resource name of the sample query, + in the format of ``projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}/sampleQueries/{sample_query}``. - This field must be a UTF-8 encoded string with a - length limit of 1024 characters. + This field must be a UTF-8 encoded string with a length + limit of 1024 characters. create_time (google.protobuf.timestamp_pb2.Timestamp): Output only. Timestamp the `SampleQuery - `__ - was created at. + `__ was + created at. """ class QueryEntry(proto.Message): - r"""Query Entry captures metadata to be used for search - evaluation. + r"""Query Entry captures metadata to be used for search evaluation. Attributes: query (str): @@ -72,11 +71,10 @@ class Target(proto.Message): uri (str): Expected uri of the target. - This field must be a UTF-8 encoded string with a - length limit of 2048 characters. + This field must be a UTF-8 encoded string with a length + limit of 2048 characters. - Example of valid uris: - ``https://example.com/abc``, + Example of valid uris: ``https://example.com/abc``, ``gcs://example/example.pdf``. page_numbers (MutableSequence[int]): Expected page numbers of the target. diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/sample_query_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/sample_query_service.py index 51b2d161e4a5..823fc48722b8 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/sample_query_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/sample_query_service.py @@ -49,8 +49,8 @@ class GetSampleQueryRequest(proto.Message): such as ``projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}/sampleQueries/{sample_query}``. - If the caller does not have permission to access - the `SampleQuery + If the caller does not have permission to access the + `SampleQuery `__, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. @@ -75,26 +75,26 @@ class ListSampleQueriesRequest(proto.Message): Attributes: parent (str): - Required. The parent sample query set resource - name, such as + Required. The parent sample query set resource name, + such as ``projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}``. If the caller does not have permission to list `SampleQuery `__s - under this sample query set, regardless of - whether or not this sample query set exists, a + under this sample query set, regardless of whether or + not this sample query set exists, a ``PERMISSION_DENIED`` error is returned. page_size (int): Maximum number of `SampleQuery - `__s - to return. If unspecified, defaults to 100. The - maximum allowed value is 1000. Values above 1000 - will be coerced to 1000. + `__s to + return. If unspecified, defaults to 100. The maximum + allowed value is 1000. Values above 1000 will be coerced + to 1000. - If this field is negative, an - ``INVALID_ARGUMENT`` error is returned. + If this field is negative, an ``INVALID_ARGUMENT`` error + is returned. page_token (str): A page token `ListSampleQueriesResponse.next_page_token @@ -102,15 +102,13 @@ class ListSampleQueriesRequest(proto.Message): received from a previous `SampleQueryService.ListSampleQueries `__ - call. Provide this to retrieve the subsequent - page. + call. Provide this to retrieve the subsequent page. - When paginating, all other parameters provided - to `SampleQueryService.ListSampleQueries + When paginating, all other parameters provided to + `SampleQueryService.ListSampleQueries `__ - must match the call that provided the page - token. Otherwise, an ``INVALID_ARGUMENT`` error - is returned. + must match the call that provided the page token. + Otherwise, an ``INVALID_ARGUMENT`` error is returned. """ parent: str = proto.Field( @@ -141,8 +139,8 @@ class ListSampleQueriesResponse(proto.Message): A token that can be sent as `ListSampleQueriesRequest.page_token `__ - to retrieve the next page. If this field is - omitted, there are no subsequent pages. + to retrieve the next page. If this field is omitted, + there are no subsequent pages. """ @property @@ -173,8 +171,8 @@ class CreateSampleQueryRequest(proto.Message): sample_query (google.cloud.discoveryengine_v1beta.types.SampleQuery): Required. The `SampleQuery - `__ - to create. + `__ to + create. sample_query_id (str): Required. The ID to use for the `SampleQuery @@ -183,8 +181,8 @@ class CreateSampleQueryRequest(proto.Message): `SampleQuery.name `__. - If the caller does not have permission to create - the `SampleQuery + If the caller does not have permission to create the + `SampleQuery `__, regardless of whether or not it exists, a ``PERMISSION_DENIED`` error is returned. @@ -195,14 +193,12 @@ class CreateSampleQueryRequest(proto.Message): with the same `parent `__. - Otherwise, an ``ALREADY_EXISTS`` error is - returned. + Otherwise, an ``ALREADY_EXISTS`` error is returned. This field must conform to `RFC-1034 - `__ - standard with a length limit of 63 characters. - Otherwise, an ``INVALID_ARGUMENT`` error is - returned. + `__ standard with a + length limit of 63 characters. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. """ parent: str = proto.Field( @@ -230,20 +226,19 @@ class UpdateSampleQueryRequest(proto.Message): sample_query (google.cloud.discoveryengine_v1beta.types.SampleQuery): Required. The simple query to update. - If the caller does not have permission to update - the `SampleQuery + If the caller does not have permission to update the + `SampleQuery `__, regardless of whether or not it exists, a ``PERMISSION_DENIED`` error is returned. If the `SampleQuery - `__ - to update does not exist a ``NOT_FOUND`` error - is returned. + `__ to + update does not exist a ``NOT_FOUND`` error is returned. update_mask (google.protobuf.field_mask_pb2.FieldMask): - Indicates which fields in the provided - imported 'simple query' to update. If not set, - will by default update all fields. + Indicates which fields in the provided imported + 'simple query' to update. If not set, will by default + update all fields. """ sample_query: gcd_sample_query.SampleQuery = proto.Field( @@ -272,16 +267,16 @@ class DeleteSampleQueryRequest(proto.Message): such as ``projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}/sampleQueries/{sample_query}``. - If the caller does not have permission to delete - the `SampleQuery + If the caller does not have permission to delete the + `SampleQuery `__, regardless of whether or not it exists, a ``PERMISSION_DENIED`` error is returned. If the `SampleQuery - `__ - to delete does not exist, a ``NOT_FOUND`` error - is returned. + `__ to + delete does not exist, a ``NOT_FOUND`` error is + returned. """ name: str = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/sample_query_set.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/sample_query_set.py index 0051d4e33441..6091192ad0dd 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/sample_query_set.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/sample_query_set.py @@ -29,8 +29,8 @@ class SampleQuerySet(proto.Message): - r"""A SampleQuerySet is the parent resource of SampleQuery, and - contains the configurations shared by all SampleQuery under it. + r"""A SampleQuerySet is the parent resource of SampleQuery, and contains + the configurations shared by all SampleQuery under it. Attributes: name (str): @@ -40,13 +40,13 @@ class SampleQuerySet(proto.Message): in the format of ``projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}``. - This field must be a UTF-8 encoded string with a - length limit of 1024 characters. + This field must be a UTF-8 encoded string with a length + limit of 1024 characters. display_name (str): Required. The sample query set display name. - This field must be a UTF-8 encoded string with a - length limit of 128 characters. + This field must be a UTF-8 encoded string with a length + limit of 128 characters. create_time (google.protobuf.timestamp_pb2.Timestamp): Output only. Timestamp the `SampleQuerySet diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/sample_query_set_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/sample_query_set_service.py index ce705be33c6e..1bcbe1b13e02 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/sample_query_set_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/sample_query_set_service.py @@ -51,8 +51,8 @@ class GetSampleQuerySetRequest(proto.Message): such as ``projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}``. - If the caller does not have permission to access - the `SampleQuerySet + If the caller does not have permission to access the + `SampleQuerySet `__, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. @@ -77,26 +77,25 @@ class ListSampleQuerySetsRequest(proto.Message): Attributes: parent (str): - Required. The parent location resource name, - such as + Required. The parent location resource name, such as ``projects/{project}/locations/{location}``. If the caller does not have permission to list `SampleQuerySet `__s - under this location, regardless of whether or - not this location exists, a - ``PERMISSION_DENIED`` error is returned. + under this location, regardless of whether or not this + location exists, a ``PERMISSION_DENIED`` error is + returned. page_size (int): Maximum number of `SampleQuerySet `__s - to return. If unspecified, defaults to 100. The - maximum allowed value is 1000. Values above 1000 - will be coerced to 1000. + to return. If unspecified, defaults to 100. The maximum + allowed value is 1000. Values above 1000 will be coerced + to 1000. - If this field is negative, an - ``INVALID_ARGUMENT`` error is returned. + If this field is negative, an ``INVALID_ARGUMENT`` error + is returned. page_token (str): A page token `ListSampleQuerySetsResponse.next_page_token @@ -104,15 +103,13 @@ class ListSampleQuerySetsRequest(proto.Message): received from a previous `SampleQuerySetService.ListSampleQuerySets `__ - call. Provide this to retrieve the subsequent - page. + call. Provide this to retrieve the subsequent page. - When paginating, all other parameters provided - to `SampleQuerySetService.ListSampleQuerySets + When paginating, all other parameters provided to + `SampleQuerySetService.ListSampleQuerySets `__ - must match the call that provided the page - token. Otherwise, an ``INVALID_ARGUMENT`` error - is returned. + must match the call that provided the page token. + Otherwise, an ``INVALID_ARGUMENT`` error is returned. """ parent: str = proto.Field( @@ -143,8 +140,8 @@ class ListSampleQuerySetsResponse(proto.Message): A token that can be sent as `ListSampleQuerySetsRequest.page_token `__ - to retrieve the next page. If this field is - omitted, there are no subsequent pages. + to retrieve the next page. If this field is omitted, + there are no subsequent pages. """ @property @@ -187,8 +184,8 @@ class CreateSampleQuerySetRequest(proto.Message): `SampleQuerySet.name `__. - If the caller does not have permission to create - the `SampleQuerySet + If the caller does not have permission to create the + `SampleQuerySet `__, regardless of whether or not it exists, a ``PERMISSION_DENIED`` error is returned. @@ -199,14 +196,12 @@ class CreateSampleQuerySetRequest(proto.Message): with the same `parent `__. - Otherwise, an ``ALREADY_EXISTS`` error is - returned. + Otherwise, an ``ALREADY_EXISTS`` error is returned. This field must conform to `RFC-1034 - `__ - standard with a length limit of 63 characters. - Otherwise, an ``INVALID_ARGUMENT`` error is - returned. + `__ standard with a + length limit of 63 characters. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. """ parent: str = proto.Field( @@ -234,20 +229,20 @@ class UpdateSampleQuerySetRequest(proto.Message): sample_query_set (google.cloud.discoveryengine_v1beta.types.SampleQuerySet): Required. The sample query set to update. - If the caller does not have permission to update - the `SampleQuerySet + If the caller does not have permission to update the + `SampleQuerySet `__, regardless of whether or not it exists, a ``PERMISSION_DENIED`` error is returned. If the `SampleQuerySet `__ - to update does not exist a ``NOT_FOUND`` error - is returned. + to update does not exist a ``NOT_FOUND`` error is + returned. update_mask (google.protobuf.field_mask_pb2.FieldMask): - Indicates which fields in the provided - imported 'sample query set' to update. If not - set, will by default update all fields. + Indicates which fields in the provided imported + 'sample query set' to update. If not set, will by + default update all fields. """ sample_query_set: gcd_sample_query_set.SampleQuerySet = proto.Field( @@ -276,16 +271,16 @@ class DeleteSampleQuerySetRequest(proto.Message): such as ``projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}``. - If the caller does not have permission to delete - the `SampleQuerySet + If the caller does not have permission to delete the + `SampleQuerySet `__, regardless of whether or not it exists, a ``PERMISSION_DENIED`` error is returned. If the `SampleQuerySet `__ - to delete does not exist, a ``NOT_FOUND`` error - is returned. + to delete does not exist, a ``NOT_FOUND`` error is + returned. """ name: str = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/schema.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/schema.py index 6a89ca01f3a1..26a07ce369a8 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/schema.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/schema.py @@ -48,12 +48,12 @@ class Schema(proto.Message): This field is a member of `oneof`_ ``schema``. name (str): - Immutable. The full resource name of the schema, - in the format of + Immutable. The full resource name of the schema, in the + format of ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}``. - This field must be a UTF-8 encoded string with a - length limit of 1024 characters. + This field must be a UTF-8 encoded string with a length + limit of 1024 characters. """ struct_schema: struct_pb2.Struct = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/schema_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/schema_service.py index 59dd7ec353f3..81317925bed3 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/schema_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/schema_service.py @@ -41,13 +41,12 @@ class GetSchemaRequest(proto.Message): r"""Request message for `SchemaService.GetSchema - `__ - method. + `__ method. Attributes: name (str): - Required. The full resource name of the schema, - in the format of + Required. The full resource name of the schema, in the + format of ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}``. """ @@ -65,34 +64,30 @@ class ListSchemasRequest(proto.Message): Attributes: parent (str): - Required. The parent data store resource name, - in the format of + Required. The parent data store resource name, in the + format of ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}``. page_size (int): The maximum number of `Schema - `__s - to return. The service may return fewer than - this value. + `__s to + return. The service may return fewer than this value. If unspecified, at most 100 - `Schema - `__s + `Schema `__s are returned. - The maximum value is 1000; values above 1000 are - set to 1000. + The maximum value is 1000; values above 1000 are set to + 1000. page_token (str): A page token, received from a previous `SchemaService.ListSchemas `__ - call. Provide this to retrieve the subsequent - page. + call. Provide this to retrieve the subsequent page. - When paginating, all other parameters provided - to `SchemaService.ListSchemas + When paginating, all other parameters provided to + `SchemaService.ListSchemas `__ - must match the call that provided the page - token. + must match the call that provided the page token. """ parent: str = proto.Field( @@ -123,8 +118,8 @@ class ListSchemasResponse(proto.Message): A token that can be sent as `ListSchemasRequest.page_token `__ - to retrieve the next page. If this field is - omitted, there are no subsequent pages. + to retrieve the next page. If this field is omitted, + there are no subsequent pages. """ @property @@ -150,24 +145,22 @@ class CreateSchemaRequest(proto.Message): Attributes: parent (str): - Required. The parent data store resource name, - in the format of + Required. The parent data store resource name, in the + format of ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}``. schema (google.cloud.discoveryengine_v1beta.types.Schema): Required. The `Schema - `__ - to create. + `__ to + create. schema_id (str): Required. The ID to use for the - `Schema - `__, + `Schema `__, which becomes the final component of the `Schema.name `__. This field should conform to - `RFC-1034 - `__ + `RFC-1034 `__ standard with a length limit of 63 characters. """ @@ -195,16 +188,14 @@ class UpdateSchemaRequest(proto.Message): Attributes: schema (google.cloud.discoveryengine_v1beta.types.Schema): Required. The `Schema - `__ - to update. + `__ to + update. allow_missing (bool): If set to true, and the - `Schema - `__ + `Schema `__ is not found, a new `Schema - `__ - is created. In this situation, ``update_mask`` - is ignored. + `__ is + created. In this situation, ``update_mask`` is ignored. """ schema: gcd_schema.Schema = proto.Field( @@ -226,8 +217,8 @@ class DeleteSchemaRequest(proto.Message): Attributes: name (str): - Required. The full resource name of the schema, - in the format of + Required. The full resource name of the schema, in the + format of ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}``. """ @@ -244,8 +235,8 @@ class CreateSchemaMetadata(proto.Message): create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -267,8 +258,8 @@ class UpdateSchemaMetadata(proto.Message): create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -290,8 +281,8 @@ class DeleteSchemaMetadata(proto.Message): create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/search_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/search_service.py index 28da78a5b630..02c59618bb4a 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/search_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/search_service.py @@ -36,140 +36,131 @@ class SearchRequest(proto.Message): r"""Request message for `SearchService.Search - `__ - method. + `__ method. Attributes: serving_config (str): - Required. The resource name of the Search - serving config, such as + Required. The resource name of the Search serving + config, such as ``projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config``, or ``projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config``. - This field is used to identify the serving - configuration name, set of models used to make - the search. + This field is used to identify the serving configuration + name, set of models used to make the search. branch (str): The branch resource name, such as ``projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0``. - Use ``default_branch`` as the branch ID or leave - this field empty, to search documents under the - default branch. + Use ``default_branch`` as the branch ID or leave this + field empty, to search documents under the default + branch. query (str): Raw search query. image_query (google.cloud.discoveryengine_v1beta.types.SearchRequest.ImageQuery): Raw image query. page_size (int): Maximum number of `Document - `__s - to return. The maximum allowed value depends on - the data type. Values above the maximum value - are coerced to the maximum value. + `__s to + return. The maximum allowed value depends on the data + type. Values above the maximum value are coerced to the + maximum value. - * Websites with basic indexing: Default ``10``, - Maximum ``25``. * Websites with advanced - indexing: Default ``25``, Maximum ``50``. + * Websites with basic indexing: Default ``10``, Maximum + ``25``. * Websites with advanced indexing: Default + ``25``, Maximum ``50``. * Other: Default ``50``, Maximum ``100``. - If this field is negative, an - ``INVALID_ARGUMENT`` is returned. + If this field is negative, an ``INVALID_ARGUMENT`` is + returned. page_token (str): A page token received from a previous `SearchService.Search `__ - call. Provide this to retrieve the subsequent - page. + call. Provide this to retrieve the subsequent page. - When paginating, all other parameters provided - to `SearchService.Search + When paginating, all other parameters provided to + `SearchService.Search `__ - must match the call that provided the page - token. Otherwise, an ``INVALID_ARGUMENT`` - error is returned. + must match the call that provided the page token. + Otherwise, an ``INVALID_ARGUMENT`` error is returned. offset (int): - A 0-indexed integer that specifies the current - offset (that is, starting result location, - amongst the `Document + A 0-indexed integer that specifies the current offset + (that is, starting result location, amongst the + `Document `__s - deemed by the API as relevant) in search - results. This field is only considered if - `page_token + deemed by the API as relevant) in search results. This + field is only considered if `page_token `__ is unset. - If this field is negative, an - ``INVALID_ARGUMENT`` is returned. + If this field is negative, an ``INVALID_ARGUMENT`` is + returned. one_box_page_size (int): - The maximum number of results to return for - OneBox. This applies to each OneBox type - individually. Default number is 10. + The maximum number of results to return for OneBox. + This applies to each OneBox type individually. + Default number is 10. data_store_specs (MutableSequence[google.cloud.discoveryengine_v1beta.types.SearchRequest.DataStoreSpec]): - Specs defining dataStores to filter on in a - search call and configurations for those - dataStores. This is only considered for engines - with multiple dataStores use case. For single - dataStore within an engine, they should use the - specs at the top level. + Specs defining dataStores to filter on in a search + call and configurations for those dataStores. This is + only considered for engines with multiple dataStores use + case. For single dataStore within an engine, they should + use the specs at the top level. filter (str): - The filter syntax consists of an expression - language for constructing a predicate from one - or more fields of the documents being filtered. - Filter expression is case-sensitive. + The filter syntax consists of an expression language for + constructing a predicate from one or more fields of the + documents being filtered. Filter expression is + case-sensitive. If this field is unrecognizable, an ``INVALID_ARGUMENT`` is returned. - Filtering in Vertex AI Search is done by mapping - the LHS filter key to a key property defined in - the Vertex AI Search backend -- this mapping is - defined by the customer in their schema. For - example a media customer might have a field - 'name' in their schema. In this case the filter - would look like this: filter --> name:'ANY("king - kong")' - - For more information about filtering including - syntax and filter operators, see + Filtering in Vertex AI Search is done by mapping the LHS + filter key to a key property defined in the Vertex AI + Search backend -- this mapping is defined by the + customer in their schema. For example a media customer + might have a field 'name' in their schema. In this case + the filter would look like this: filter --> + name:'ANY("king kong")' + + For more information about filtering including syntax + and filter operators, see `Filter `__ canonical_filter (str): - The default filter that is applied when a user - performs a search without checking any filters - on the search page. - - The filter applied to every search request when - quality improvement such as query expansion is - needed. In the case a query does not have a - sufficient amount of results this filter will be - used to determine whether or not to enable the - query expansion flow. The original filter will - still be used for the query expanded search. - This field is strongly recommended to achieve - high search quality. + The default filter that is applied when a user performs + a search without checking any filters on the search + page. + + The filter applied to every search request when quality + improvement such as query expansion is needed. In the + case a query does not have a sufficient amount of + results this filter will be used to determine whether or + not to enable the query expansion flow. The original + filter will still be used for the query expanded search. + This field is strongly recommended to achieve high + search quality. For more information about filter syntax, see `SearchRequest.filter `__. order_by (str): - The order in which documents are returned. - Documents can be ordered by a field in an - `Document + The order in which documents are returned. Documents can + be ordered by a field in an `Document `__ object. Leave it unset if ordered by relevance. ``order_by`` expression is case-sensitive. - For more information on ordering the website - search results, see `Order web search + For more information on ordering the website search + results, see `Order web search results `__. - For more information on ordering the healthcare - search results, see `Order healthcare search + For more information on ordering the healthcare search + results, see `Order healthcare search results `__. - If this field is unrecognizable, an - ``INVALID_ARGUMENT`` is returned. + If this field is unrecognizable, an ``INVALID_ARGUMENT`` + is returned. user_info (google.cloud.discoveryengine_v1beta.types.UserInfo): Information about the end user. Highly recommended for analytics. @@ -177,26 +168,25 @@ class SearchRequest(proto.Message): `__ is used to deduce ``device_type`` for analytics. language_code (str): - The BCP-47 language code, such as "en-US" or - "sr-Latn". For more information, see `Standard + The BCP-47 language code, such as "en-US" or "sr-Latn". + For more information, see `Standard fields `__. - This field helps to better interpret the query. - If a value isn't specified, the query language - code is automatically detected, which may not be - accurate. + This field helps to better interpret the query. If a + value isn't specified, the query language code is + automatically detected, which may not be accurate. region_code (str): - The Unicode country/region code (CLDR) of a - location, such as "US" and "419". For more - information, see `Standard fields + The Unicode country/region code (CLDR) of a location, + such as "US" and "419". For more information, see + `Standard fields `__. - If set, then results will be boosted based on - the region_code provided. + If set, then results will be boosted based on the + region_code provided. facet_specs (MutableSequence[google.cloud.discoveryengine_v1beta.types.SearchRequest.FacetSpec]): - Facet specifications for faceted search. If - empty, no facets are returned. - A maximum of 100 values are allowed. Otherwise, - an ``INVALID_ARGUMENT`` error is returned. + Facet specifications for faceted search. If empty, no + facets are returned. + A maximum of 100 values are allowed. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. boost_spec (google.cloud.discoveryengine_v1beta.types.SearchRequest.BoostSpec): Boost specification to boost certain documents. For more information on boosting, see @@ -205,38 +195,34 @@ class SearchRequest(proto.Message): params (MutableMapping[str, google.protobuf.struct_pb2.Value]): Additional search parameters. - For public website search only, supported values - are: + For public website search only, supported values are: - * ``user_country_code``: string. Default empty. - If set to non-empty, results are restricted - or boosted based on the location provided. - For example, ``user_country_code: "au"`` + * ``user_country_code``: string. Default empty. If set + to non-empty, results are restricted or boosted based + on the location provided. For example, + ``user_country_code: "au"`` For available codes see `Country Codes `__ - * ``search_type``: double. Default empty. - Enables non-webpage searching depending on - the value. The only valid non-default value is - 1, which enables image searching. + * ``search_type``: double. Default empty. Enables + non-webpage searching depending on the value. The + only valid non-default value is 1, which enables + image searching. For example, ``search_type: 1`` query_expansion_spec (google.cloud.discoveryengine_v1beta.types.SearchRequest.QueryExpansionSpec): - The query expansion specification that - specifies the conditions under which query - expansion occurs. + The query expansion specification that specifies the + conditions under which query expansion occurs. spell_correction_spec (google.cloud.discoveryengine_v1beta.types.SearchRequest.SpellCorrectionSpec): - The spell correction specification that - specifies the mode under which spell correction - takes effect. + The spell correction specification that specifies the + mode under which spell correction takes effect. user_pseudo_id (str): - A unique identifier for tracking visitors. For - example, this could be implemented with an HTTP - cookie, which should be able to uniquely - identify a visitor on a single device. This - unique identifier should not change if the - visitor logs in or out of the website. + A unique identifier for tracking visitors. For example, + this could be implemented with an HTTP cookie, which + should be able to uniquely identify a visitor on a + single device. This unique identifier should not change + if the visitor logs in or out of the website. This field should NOT have a fixed value such as ``unknown_visitor``. @@ -248,16 +234,16 @@ class SearchRequest(proto.Message): `CompleteQueryRequest.user_pseudo_id `__ - The field must be a UTF-8 encoded string with a - length limit of 128 characters. Otherwise, an + The field must be a UTF-8 encoded string with a length + limit of 128 characters. Otherwise, an ``INVALID_ARGUMENT`` error is returned. content_search_spec (google.cloud.discoveryengine_v1beta.types.SearchRequest.ContentSearchSpec): - A specification for configuring the behavior - of content search. + A specification for configuring the behavior of + content search. embedding_spec (google.cloud.discoveryengine_v1beta.types.SearchRequest.EmbeddingSpec): - Uses the provided embedding to do additional - semantic document retrieval. The retrieval is - based on the dot product of + Uses the provided embedding to do additional semantic + document retrieval. The retrieval is based on the dot + product of `SearchRequest.EmbeddingSpec.EmbeddingVector.vector `__ and the document embedding that is provided in @@ -330,25 +316,24 @@ class SearchRequest(proto.Message): Whether to turn on safe search. This is only supported for website search. user_labels (MutableMapping[str, str]): - The user labels applied to a resource must meet - the following requirements: - * Each resource can have multiple labels, up to - a maximum of 64. + The user labels applied to a resource must meet the + following requirements: + * Each resource can have multiple labels, up to a + maximum of 64. * Each label must be a key-value pair. - * Keys have a minimum length of 1 character and - a maximum length of 63 characters and cannot - be empty. Values can be empty and have a maximum - length of 63 characters. + * Keys have a minimum length of 1 character and a + maximum length of 63 characters and cannot be empty. + Values can be empty and have a maximum length of 63 + characters. - * Keys and values can contain only lowercase - letters, numeric characters, underscores, and - dashes. All characters must use UTF-8 encoding, - and international characters are allowed. + * Keys and values can contain only lowercase letters, + numeric characters, underscores, and dashes. All + characters must use UTF-8 encoding, and international + characters are allowed. - * The key portion of a label must be unique. - However, you can use the same key with - multiple resources. + * The key portion of a label must be unique. However, + you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. @@ -358,55 +343,53 @@ class SearchRequest(proto.Message): `__ for more details. natural_language_query_understanding_spec (google.cloud.discoveryengine_v1beta.types.SearchRequest.NaturalLanguageQueryUnderstandingSpec): - If ``naturalLanguageQueryUnderstandingSpec`` is - not specified, no additional natural language - query understanding will be done. + If ``naturalLanguageQueryUnderstandingSpec`` is not + specified, no additional natural language query + understanding will be done. search_as_you_type_spec (google.cloud.discoveryengine_v1beta.types.SearchRequest.SearchAsYouTypeSpec): - Search as you type configuration. Only supported - for the `IndustryVertical.MEDIA + Search as you type configuration. Only supported for the + `IndustryVertical.MEDIA `__ vertical. session (str): The session resource name. Optional. - Session allows users to do multi-turn /search - API calls or coordination between /search API - calls and /answer API calls. + Session allows users to do multi-turn /search API calls + or coordination between /search API calls and /answer + API calls. Example #1 (multi-turn /search API calls): - - Call /search API with the session ID generated - in the first call. Here, the previous search - query gets considered in query standing. I.e., - if the first query is "How did Alphabet do in - 2022?" and the current query is "How about - 2023?", the current query will be interpreted - as "How did Alphabet do in 2023?". - - Example #2 (coordination between /search API - calls and /answer API calls): - - - Call /answer API with the session ID generated - in the first call. Here, the answer generation - happens in the context of the search results - from the first search call. - - Multi-turn Search feature is currently at - private GA stage. Please use v1alpha or v1beta - version instead before we launch this feature to - public GA. Or ask for allowlisting through - Google Support team. + Call /search API with the session ID generated in the + first call. Here, the previous search query gets + considered in query standing. I.e., if the first query + is "How did Alphabet do in 2022?" and the current + query is "How about 2023?", the current query will be + interpreted as "How did Alphabet do in 2023?". + + Example #2 (coordination between /search API calls and + /answer API calls): + + Call /answer API with the session ID generated in the + first call. Here, the answer generation happens in the + context of the search results from the first search + call. + + Multi-turn Search feature is currently at private GA + stage. Please use v1alpha or v1beta version instead + before we launch this feature to public GA. Or ask for + allowlisting through Google Support team. session_spec (google.cloud.discoveryengine_v1beta.types.SearchRequest.SessionSpec): Session specification. Can be used only when ``session`` is set. relevance_threshold (google.cloud.discoveryengine_v1beta.types.SearchRequest.RelevanceThreshold): - The relevance threshold of the search - results. - Default to Google defined threshold, leveraging - a balance of precision and recall to deliver - both highly accurate results and comprehensive - coverage of relevant information. + The relevance threshold of the search results. + + Default to Google defined threshold, leveraging a + balance of precision and recall to deliver both highly + accurate results and comprehensive coverage of relevant + information. personalization_spec (google.cloud.discoveryengine_v1beta.types.SearchRequest.PersonalizationSpec): The specification for personalization. @@ -425,9 +408,9 @@ class SearchRequest(proto.Message): """ class RelevanceThreshold(proto.Enum): - r"""The relevance threshold of the search results. The higher - relevance threshold is, the higher relevant results are shown - and the less number of results are returned. + r"""The relevance threshold of the search results. The higher relevance + threshold is, the higher relevant results are shown and the less number + of results are returned. Values: RELEVANCE_THRESHOLD_UNSPECIFIED (0): @@ -472,8 +455,8 @@ class ImageQuery(proto.Message): Attributes: image_bytes (str): - Base64 encoded image bytes. Supported image - formats: JPEG, PNG, and BMP. + Base64 encoded image bytes. Supported image formats: + JPEG, PNG, and BMP. This field is a member of `oneof`_ ``image``. """ @@ -486,21 +469,20 @@ class ImageQuery(proto.Message): class DataStoreSpec(proto.Message): r"""A struct to define data stores to filter on in a search call and - configurations for those data stores. Otherwise, an - ``INVALID_ARGUMENT`` error is returned. + configurations for those data stores. Otherwise, an ``INVALID_ARGUMENT`` + error is returned. Attributes: data_store (str): Required. Full resource name of `DataStore - `__, - such as + `__, such + as ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}``. filter (str): - Optional. Filter specification to filter - documents in the data store specified by - data_store field. For more information on - filtering, see `Filtering + Optional. Filter specification to filter documents in + the data store specified by data_store field. For more + information on filtering, see `Filtering `__ """ @@ -520,75 +502,70 @@ class FacetSpec(proto.Message): facet_key (google.cloud.discoveryengine_v1beta.types.SearchRequest.FacetSpec.FacetKey): Required. The facet key specification. limit (int): - Maximum facet values that are returned for this - facet. If unspecified, defaults to 20. The - maximum allowed value is 300. Values above 300 - are coerced to 300. + Maximum facet values that are returned for this facet. + If unspecified, defaults to 20. The maximum allowed + value is 300. Values above 300 are coerced to 300. For aggregation in healthcare search, when the - [FacetKey.key] is "healthcare_aggregation_key", - the limit will be overridden to 10,000 - internally, regardless of the value set here. + [FacetKey.key] is "healthcare_aggregation_key", the + limit will be overridden to 10,000 internally, + regardless of the value set here. - If this field is negative, an - ``INVALID_ARGUMENT`` is returned. + If this field is negative, an ``INVALID_ARGUMENT`` is + returned. excluded_filter_keys (MutableSequence[str]): List of keys to exclude when faceting. By default, `FacetKey.key `__ - is not excluded from the filter unless it is - listed in this field. - - Listing a facet key in this field allows its - values to appear as facet results, even when - they are filtered out of search results. Using - this field does not affect what search results - are returned. - - For example, suppose there are 100 documents - with the color facet "Red" and 200 documents - with the color facet "Blue". A query containing - the filter "color:ANY("Red")" and having "color" - as `FacetKey.key + is not excluded from the filter unless it is listed in + this field. + + Listing a facet key in this field allows its values to + appear as facet results, even when they are filtered out + of search results. Using this field does not affect what + search results are returned. + + For example, suppose there are 100 documents with the + color facet "Red" and 200 documents with the color facet + "Blue". A query containing the filter "color:ANY("Red")" + and having "color" as + `FacetKey.key `__ - would by default return only "Red" documents in - the search results, and also return "Red" with - count 100 as the only color facet. Although - there are also blue documents available, "Blue" - would not be shown as an available facet value. - - If "color" is listed in "excludedFilterKeys", - then the query returns the facet values "Red" - with count 100 and "Blue" with count 200, - because the "color" key is now excluded from the - filter. Because this field doesn't affect search - results, the search results are still correctly - filtered to return only "Red" documents. - - A maximum of 100 values are allowed. Otherwise, - an ``INVALID_ARGUMENT`` error is returned. + would by default return only "Red" documents in the + search results, and also return "Red" with count 100 as + the only color facet. Although there are also blue + documents available, "Blue" would not be shown as an + available facet value. + + If "color" is listed in "excludedFilterKeys", then the + query returns the facet values "Red" with count 100 and + "Blue" with count 200, because the "color" key is now + excluded from the filter. Because this field doesn't + affect search results, the search results are still + correctly filtered to return only "Red" documents. + + A maximum of 100 values are allowed. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. enable_dynamic_position (bool): - Enables dynamic position for this facet. If set - to true, the position of this facet among all - facets in the response is determined - automatically. If dynamic facets are enabled, it - is ordered together. If set to false, the - position of this facet in the response is the - same as in the request, and it is ranked before - the facets with dynamic position enable and all + Enables dynamic position for this facet. If set to true, + the position of this facet among all facets in the + response is determined automatically. If dynamic facets + are enabled, it is ordered together. If set to false, + the position of this facet in the + response is the same as in the request, and it is ranked + before the facets with dynamic position enable and all dynamic facets. - For example, you may always want to have rating - facet returned in the response, but it's not - necessarily to always display the rating facet - at the top. In that case, you can set - enable_dynamic_position to true so that the - position of rating facet in response is + For example, you may always want to have rating facet + returned in the response, but it's not necessarily to + always display the rating facet at the top. In that + case, you can set enable_dynamic_position to true so + that the position of rating facet in response is determined automatically. - Another example, assuming you have the following - facets in the request: + Another example, assuming you have the following facets + in the request: * "rating", enable_dynamic_position = true @@ -596,14 +573,13 @@ class FacetSpec(proto.Message): * "brands", enable_dynamic_position = false - And also you have a dynamic facets enabled, - which generates a facet ``gender``. Then the - final order of the facets in the response can be - ("price", "brands", "rating", "gender") or - ("price", "brands", "gender", "rating") depends - on how API orders "gender" and "rating" facets. - However, notice that "price" and "brands" are - always ranked at first and second position + And also you have a dynamic facets enabled, which + generates a facet ``gender``. Then the final order of + the facets in the response can be ("price", "brands", + "rating", "gender") or ("price", "brands", "gender", + "rating") depends on how API orders "gender" and + "rating" facets. However, notice that "price" and + "brands" are always ranked at first and second position because their enable_dynamic_position is false. """ @@ -612,45 +588,42 @@ class FacetKey(proto.Message): Attributes: key (str): - Required. Supported textual and numerical facet - keys in `Document + Required. Supported textual and numerical facet keys in + `Document `__ - object, over which the facet values are - computed. Facet key is case-sensitive. + object, over which the facet values are computed. Facet + key is case-sensitive. intervals (MutableSequence[google.cloud.discoveryengine_v1beta.types.Interval]): - Set only if values should be bucketed into - intervals. Must be set for facets with numerical - values. Must not be set for facet with text - values. Maximum number of intervals is 30. + Set only if values should be bucketed into intervals. + Must be set for facets with numerical values. Must not + be set for facet with text values. Maximum number of + intervals is 30. restricted_values (MutableSequence[str]): - Only get facet for the given restricted values. - Only supported on textual fields. For example, - suppose "category" has three values "Action > - 2022", "Action > 2021" and "Sci-Fi > 2022". If - set "restricted_values" to "Action > 2022", the - "category" facet only contains "Action > 2022". - Only supported on textual fields. Maximum is 10. + Only get facet for the given restricted values. Only + supported on textual fields. For example, suppose + "category" has three values "Action > 2022", "Action > + 2021" and "Sci-Fi > 2022". If set "restricted_values" to + "Action > 2022", the "category" facet only contains + "Action > 2022". Only supported on textual fields. + Maximum is 10. prefixes (MutableSequence[str]): - Only get facet values that start with the - given string prefix. For example, suppose - "category" has three values "Action > 2022", - "Action > 2021" and "Sci-Fi > 2022". If set - "prefixes" to "Action", the "category" facet - only contains "Action > 2022" and "Action > - 2021". Only supported on textual fields. Maximum - is 10. + Only get facet values that start with the given + string prefix. For example, suppose "category" has three + values "Action > 2022", "Action > 2021" and "Sci-Fi > + 2022". If set "prefixes" to "Action", the "category" + facet only contains "Action > 2022" and "Action > 2021". + Only supported on textual fields. Maximum is 10. contains (MutableSequence[str]): - Only get facet values that contain the given - strings. For example, suppose "category" has - three values "Action > 2022", "Action > 2021" - and "Sci-Fi > 2022". If set "contains" to - "2022", the "category" facet only contains - "Action > 2022" and "Sci-Fi > 2022". Only - supported on textual fields. Maximum is 10. + Only get facet values that contain the given strings. + For example, suppose "category" has three values "Action + > 2022", "Action > 2021" and "Sci-Fi > 2022". If set + "contains" to "2022", the "category" facet only contains + "Action > 2022" and "Sci-Fi > 2022". Only supported on + textual fields. Maximum is 10. case_insensitive (bool): - True to make facet keys case insensitive when - getting faceting values with prefixes or - contains; false otherwise. + True to make facet keys case insensitive when getting + faceting values with prefixes or contains; false + otherwise. order_by (str): The order in which documents are returned. @@ -667,11 +640,10 @@ class FacetKey(proto.Message): descending. Only applies to textual facets. - If not set, textual values are sorted in - `natural order + If not set, textual values are sorted in `natural + order `__; - numerical intervals are sorted in the order - given by + numerical intervals are sorted in the order given by `FacetSpec.FacetKey.intervals `__. """ @@ -729,12 +701,11 @@ class BoostSpec(proto.Message): Attributes: condition_boost_specs (MutableSequence[google.cloud.discoveryengine_v1beta.types.SearchRequest.BoostSpec.ConditionBoostSpec]): - Condition boost specifications. If a document - matches multiple conditions in the - specifictions, boost scores from these - specifications are all applied and combined in a - non-linear way. Maximum number of specifications - is 20. + Condition boost specifications. If a document matches + multiple conditions in the specifictions, boost scores + from these specifications are all applied and combined + in a non-linear way. Maximum number of specifications is + 20. """ class ConditionBoostSpec(proto.Message): @@ -742,9 +713,9 @@ class ConditionBoostSpec(proto.Message): Attributes: condition (str): - An expression which specifies a boost condition. - The syntax and supported fields are the same as - a filter expression. See `SearchRequest.filter + An expression which specifies a boost condition. The + syntax and supported fields are the same as a filter + expression. See `SearchRequest.filter `__ for detail syntax and limitations. @@ -753,71 +724,66 @@ class ConditionBoostSpec(proto.Message): * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": - ``(document_id: ANY("doc_1", "doc_2")) AND - (color: ANY("Red", "Blue"))`` + ``(document_id: ANY("doc_1", "doc_2")) AND (color: + ANY("Red", "Blue"))`` boost (float): - Strength of the condition boost, which should be - in [-1, 1]. Negative boost means demotion. - Default is 0.0. - - Setting to 1.0 gives the document a big - promotion. However, it does not necessarily mean - that the boosted document will be the top result - at all times, nor that other documents will be - excluded. Results could still be shown even when - none of them matches the condition. And results - that are significantly more relevant to the - search query can still trump your heavily - favored but irrelevant documents. - - Setting to -1.0 gives the document a big - demotion. However, results that are deeply - relevant might still be shown. The document will - have an upstream battle to get a fairly high - ranking, but it is not blocked out completely. - - Setting to 0.0 means no boost applied. The - boosting condition is ignored. Only one of the - (condition, boost) combination or the - boost_control_spec below are set. If both are - set then the global boost is ignored and the + Strength of the condition boost, which should be in [-1, + 1]. Negative boost means demotion. Default is 0.0. + + Setting to 1.0 gives the document a big promotion. + However, it does not necessarily mean that the boosted + document will be the top result at all times, nor that + other documents will be excluded. Results could still be + shown even when none of them matches the condition. And + results that are significantly more relevant to the + search query can still trump your heavily favored but + irrelevant documents. + + Setting to -1.0 gives the document a big demotion. + However, results that are deeply relevant might still be + shown. The document will have an upstream battle to get + a fairly high ranking, but it is not blocked out + completely. + + Setting to 0.0 means no boost applied. The boosting + condition is ignored. Only one of the (condition, boost) + combination or the boost_control_spec below are set. If + both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied. boost_control_spec (google.cloud.discoveryengine_v1beta.types.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec): - Complex specification for custom ranking - based on customer defined attribute value. + Complex specification for custom ranking based on + customer defined attribute value. """ class BoostControlSpec(proto.Message): r"""Specification for custom ranking based on customer specified - attribute value. It provides more controls for customized - ranking than the simple (condition, boost) combination above. + attribute value. It provides more controls for customized ranking than + the simple (condition, boost) combination above. Attributes: field_name (str): - The name of the field whose value will be - used to determine the boost amount. + The name of the field whose value will be used to + determine the boost amount. attribute_type (google.cloud.discoveryengine_v1beta.types.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.AttributeType): - The attribute type to be used to determine the - boost amount. The attribute value can be derived - from the field value of the specified - field_name. In the case of numerical it is - straightforward i.e. attribute_value = - numerical_field_value. In the case of freshness - however, attribute_value = (time.now() - - datetime_field_value). + The attribute type to be used to determine the boost + amount. The attribute value can be derived from the + field value of the specified field_name. In the case of + numerical it is straightforward i.e. attribute_value = + numerical_field_value. In the case of freshness however, + attribute_value = (time.now() - datetime_field_value). interpolation_type (google.cloud.discoveryengine_v1beta.types.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.InterpolationType): - The interpolation type to be applied to - connect the control points listed below. + The interpolation type to be applied to connect the + control points listed below. control_points (MutableSequence[google.cloud.discoveryengine_v1beta.types.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint]): The control points used to define the curve. The monotonic function (defined through the - interpolation_type above) passes through the - control points listed here. + interpolation_type above) passes through the control + points listed here. """ class AttributeType(proto.Enum): - r"""The attribute(or function) for which the custom ranking is to - be applied. + r"""The attribute(or function) for which the custom ranking is to be + applied. Values: ATTRIBUTE_TYPE_UNSPECIFIED (0): @@ -859,9 +825,9 @@ class InterpolationType(proto.Enum): LINEAR = 1 class ControlPoint(proto.Message): - r"""The control points used to define the curve. The curve - defined through these control points can only be monotonically - increasing or decreasing(constant values are acceptable). + r"""The control points used to define the curve. The curve defined + through these control points can only be monotonically increasing or + decreasing(constant values are acceptable). Attributes: attribute_value (str): @@ -871,13 +837,13 @@ class ControlPoint(proto.Message): 2. The duration spec for freshness: The value must be formatted as an XSD - ``dayTimeDuration`` value (a restricted subset - of an ISO 8601 duration value). The pattern for - this is: ```nD `__`nM `__]``. + ``dayTimeDuration`` value (a restricted subset of an ISO + 8601 duration value). The pattern for this is: ```nD + `__`nM `__]``. boost_amount (float): - The value between -1 to 1 by which to boost the - score if the attribute_value evaluates to the - value specified above. + The value between -1 to 1 by which to boost the score if + the attribute_value evaluates to the value specified + above. """ attribute_value: str = proto.Field( @@ -934,24 +900,22 @@ class ControlPoint(proto.Message): ) class QueryExpansionSpec(proto.Message): - r"""Specification to determine under which conditions query - expansion should occur. + r"""Specification to determine under which conditions query expansion + should occur. Attributes: condition (google.cloud.discoveryengine_v1beta.types.SearchRequest.QueryExpansionSpec.Condition): - The condition under which query expansion should - occur. Default to `Condition.DISABLED + The condition under which query expansion should occur. + Default to `Condition.DISABLED `__. pin_unexpanded_results (bool): - Whether to pin unexpanded results. If this - field is set to true, unexpanded products are - always at the top of the search results, - followed by the expanded results. + Whether to pin unexpanded results. If this field is + set to true, unexpanded products are always at the top + of the search results, followed by the expanded results. """ class Condition(proto.Enum): - r"""Enum describing under which condition query expansion should - occur. + r"""Enum describing under which condition query expansion should occur. Values: CONDITION_UNSPECIFIED (0): @@ -995,8 +959,7 @@ class SpellCorrectionSpec(proto.Message): """ class Mode(proto.Enum): - r"""Enum describing under which mode spell correction should - occur. + r"""Enum describing under which mode spell correction should occur. Values: MODE_UNSPECIFIED (0): @@ -1027,27 +990,24 @@ class Mode(proto.Enum): ) class ContentSearchSpec(proto.Message): - r"""A specification for configuring the behavior of content - search. + r"""A specification for configuring the behavior of content search. Attributes: snippet_spec (google.cloud.discoveryengine_v1beta.types.SearchRequest.ContentSearchSpec.SnippetSpec): - If ``snippetSpec`` is not specified, snippets - are not included in the search response. + If ``snippetSpec`` is not specified, snippets are not + included in the search response. summary_spec (google.cloud.discoveryengine_v1beta.types.SearchRequest.ContentSearchSpec.SummarySpec): - If ``summarySpec`` is not specified, summaries - are not included in the search response. + If ``summarySpec`` is not specified, summaries are not + included in the search response. extractive_content_spec (google.cloud.discoveryengine_v1beta.types.SearchRequest.ContentSearchSpec.ExtractiveContentSpec): - If there is no extractive_content_spec provided, - there will be no extractive answer in the search - response. + If there is no extractive_content_spec provided, there + will be no extractive answer in the search response. search_result_mode (google.cloud.discoveryengine_v1beta.types.SearchRequest.ContentSearchSpec.SearchResultMode): - Specifies the search result mode. If - unspecified, the search result mode defaults to - ``DOCUMENTS``. + Specifies the search result mode. If unspecified, the + search result mode defaults to ``DOCUMENTS``. chunk_spec (google.cloud.discoveryengine_v1beta.types.SearchRequest.ContentSearchSpec.ChunkSpec): - Specifies the chunk spec to be returned from the - search response. Only available if the + Specifies the chunk spec to be returned from the search + response. Only available if the `SearchRequest.ContentSearchSpec.search_result_mode `__ is set to @@ -1075,24 +1035,22 @@ class SearchResultMode(proto.Enum): CHUNKS = 2 class SnippetSpec(proto.Message): - r"""A specification for configuring snippets in a search - response. + r"""A specification for configuring snippets in a search response. Attributes: max_snippet_count (int): - [DEPRECATED] This field is deprecated. To - control snippet return, use ``return_snippet`` - field. For backwards compatibility, we will - return snippet if max_snippet_count > 0. + [DEPRECATED] This field is deprecated. To control + snippet return, use ``return_snippet`` field. For + backwards compatibility, we will return snippet if + max_snippet_count > 0. reference_only (bool): - [DEPRECATED] This field is deprecated and will - have no affect on the snippet. + [DEPRECATED] This field is deprecated and will have no + affect on the snippet. return_snippet (bool): - If ``true``, then return snippet. If no snippet - can be generated, we return "No snippet is - available for this page." A ``snippet_status`` - with ``SUCCESS`` or ``NO_SNIPPET_AVAILABLE`` - will also be returned. + If ``true``, then return snippet. If no snippet can be + generated, we return "No snippet is available for this + page." A ``snippet_status`` with ``SUCCESS`` or + ``NO_SNIPPET_AVAILABLE`` will also be returned. """ max_snippet_count: int = proto.Field( @@ -1109,123 +1067,112 @@ class SnippetSpec(proto.Message): ) class SummarySpec(proto.Message): - r"""A specification for configuring a summary returned in a - search response. + r"""A specification for configuring a summary returned in a search + response. Attributes: summary_result_count (int): - The number of top results to generate the - summary from. If the number of results returned - is less than ``summaryResultCount``, the summary - is generated from all of the results. - - At most 10 results for documents mode, or 50 for - chunks mode, can be used to generate a summary. - The chunks mode is used when + The number of top results to generate the summary from. + If the number of results returned is less than + ``summaryResultCount``, the summary is generated from + all of the results. + + At most 10 results for documents mode, or 50 for chunks + mode, can be used to generate a summary. The chunks mode + is used when `SearchRequest.ContentSearchSpec.search_result_mode `__ is set to `CHUNKS `__. include_citations (bool): - Specifies whether to include citations in the - summary. The default value is ``false``. + Specifies whether to include citations in the summary. + The default value is ``false``. - When this field is set to ``true``, summaries - include in-line citation numbers. + When this field is set to ``true``, summaries include + in-line citation numbers. Example summary including citations: - BigQuery is Google Cloud's fully managed and - completely serverless enterprise data warehouse - [1]. BigQuery supports all data types, works - across clouds, and has built-in machine learning - and business intelligence, all within a unified - platform [2, 3]. - - The citation numbers refer to the returned - search results and are 1-indexed. For example, - [1] means that the sentence is attributed to the - first search result. [2, 3] means that the - sentence is attributed to both the second and - third search results. + BigQuery is Google Cloud's fully managed and completely + serverless enterprise data warehouse [1]. BigQuery + supports all data types, works across clouds, and has + built-in machine learning and business intelligence, all + within a unified platform [2, 3]. + + The citation numbers refer to the returned search + results and are 1-indexed. For example, [1] means that + the sentence is attributed to the first search result. + [2, 3] means that the sentence is attributed to both the + second and third search results. ignore_adversarial_query (bool): - Specifies whether to filter out adversarial - queries. The default value is ``false``. + Specifies whether to filter out adversarial queries. The + default value is ``false``. - Google employs search-query classification to - detect adversarial queries. No summary is - returned if the search query is classified as an - adversarial query. For example, a user might ask - a question regarding negative comments about the - company or submit a query designed to generate - unsafe, policy-violating output. If this field - is set to ``true``, we skip generating summaries - for adversarial queries and return fallback - messages instead. + Google employs search-query classification to detect + adversarial queries. No summary is returned if the + search query is classified as an adversarial query. For + example, a user might ask a question regarding negative + comments about the company or submit a query designed to + generate unsafe, policy-violating output. If this field + is set to ``true``, we skip generating summaries for + adversarial queries and return fallback messages + instead. ignore_non_summary_seeking_query (bool): - Specifies whether to filter out queries that are - not summary-seeking. The default value is - ``false``. - - Google employs search-query classification to - detect summary-seeking queries. No summary is - returned if the search query is classified as a - non-summary seeking query. For example, ``why is - the sky blue`` and ``Who is the best soccer - player in the world?`` are summary-seeking - queries, but ``SFO airport`` and ``world cup - 2026`` are not. They are most likely - navigational queries. If this field is set to - ``true``, we skip generating summaries for - non-summary seeking queries and return fallback - messages instead. + Specifies whether to filter out queries that are not + summary-seeking. The default value is ``false``. + + Google employs search-query classification to detect + summary-seeking queries. No summary is returned if the + search query is classified as a non-summary seeking + query. For example, ``why is the sky blue`` and ``Who is + the best soccer player in the world?`` are + summary-seeking queries, but ``SFO airport`` and ``world + cup 2026`` are not. They are most likely navigational + queries. If this field is set to ``true``, we skip + generating summaries for non-summary seeking queries and + return fallback messages instead. ignore_low_relevant_content (bool): - Specifies whether to filter out queries that - have low relevance. The default value is - ``false``. - - If this field is set to ``false``, all search - results are used regardless of relevance to - generate answers. If set to ``true``, only - queries with high relevance search results will - generate answers. + Specifies whether to filter out queries that have low + relevance. The default value is ``false``. + + If this field is set to ``false``, all search results + are used regardless of relevance to generate answers. If + set to ``true``, only queries with high relevance search + results will generate answers. ignore_jail_breaking_query (bool): - Optional. Specifies whether to filter out - jail-breaking queries. The default value is - ``false``. - - Google employs search-query classification to - detect jail-breaking queries. No summary is - returned if the search query is classified as a - jail-breaking query. A user might add - instructions to the query to change the tone, - style, language, content of the answer, or ask - the model to act as a different entity, e.g. - "Reply in the tone of a competing company's - CEO". If this field is set to ``true``, we skip - generating summaries for jail-breaking queries - and return fallback messages instead. + Optional. Specifies whether to filter out jail-breaking + queries. The default value is ``false``. + + Google employs search-query classification to detect + jail-breaking queries. No summary is returned if the + search query is classified as a jail-breaking query. A + user might add instructions to the query to change the + tone, style, language, content of the answer, or ask the + model to act as a different entity, e.g. "Reply in the + tone of a competing company's CEO". If this field is set + to ``true``, we skip generating summaries for + jail-breaking queries and return fallback messages + instead. model_prompt_spec (google.cloud.discoveryengine_v1beta.types.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec): - If specified, the spec will be used to modify - the prompt provided to the LLM. + If specified, the spec will be used to modify the + prompt provided to the LLM. language_code (str): - Language code for Summary. Use language tags - defined by `BCP47 - `__. - Note: This is an experimental feature. + Language code for Summary. Use language tags defined by + `BCP47 + `__. Note: + This is an experimental feature. model_spec (google.cloud.discoveryengine_v1beta.types.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec): - If specified, the spec will be used to modify - the model specification provided to the LLM. + If specified, the spec will be used to modify the + model specification provided to the LLM. use_semantic_chunks (bool): - If true, answer will be generated from most - relevant chunks from top search results. This - feature will improve summary quality. Note that - with this feature enabled, not all top search - results will be referenced and included in the - reference list, so the citation source index - only points to the search results listed in the - reference list. + If true, answer will be generated from most relevant + chunks from top search results. This feature will + improve summary quality. Note that with this feature + enabled, not all top search results will be referenced + and included in the reference list, so the citation + source index only points to the search results listed in + the reference list. """ class ModelPromptSpec(proto.Message): @@ -1233,9 +1180,8 @@ class ModelPromptSpec(proto.Message): Attributes: preamble (str): - Text at the beginning of the prompt that - instructs the assistant. Examples are available - in the user guide. + Text at the beginning of the prompt that instructs + the assistant. Examples are available in the user guide. """ preamble: str = proto.Field( @@ -1252,16 +1198,15 @@ class ModelSpec(proto.Message): Supported values are: - * ``stable``: string. Default value when no - value is specified. Uses a generally - available, fine-tuned model. For more - information, see `Answer generation model - versions and + * ``stable``: string. Default value when no value is + specified. Uses a generally available, fine-tuned + model. For more information, see `Answer generation + model versions and lifecycle `__. - * ``preview``: string. (Public preview) Uses a - preview model. For more information, see + * ``preview``: string. (Public preview) Uses a preview + model. For more information, see `Answer generation model versions and lifecycle `__. @@ -1318,34 +1263,32 @@ class ModelSpec(proto.Message): ) class ExtractiveContentSpec(proto.Message): - r"""A specification for configuring the extractive content in a - search response. + r"""A specification for configuring the extractive content in a search + response. Attributes: max_extractive_answer_count (int): - The maximum number of extractive answers - returned in each search result. + The maximum number of extractive answers returned in + each search result. - An extractive answer is a verbatim answer - extracted from the original document, which - provides a precise and contextually relevant - answer to the search query. + An extractive answer is a verbatim answer extracted from + the original document, which provides a precise and + contextually relevant answer to the search query. - If the number of matching answers is less than - the ``max_extractive_answer_count``, return all - of the answers. Otherwise, return the + If the number of matching answers is less than the + ``max_extractive_answer_count``, return all of the + answers. Otherwise, return the ``max_extractive_answer_count``. At most five answers are returned for each `SearchResult `__. max_extractive_segment_count (int): - The max number of extractive segments returned - in each search result. Only applied if the + The max number of extractive segments returned in each + search result. Only applied if the `DataStore - `__ - is set to - `DataStore.ContentConfig.CONTENT_REQUIRED + `__ is + set to `DataStore.ContentConfig.CONTENT_REQUIRED `__ or `DataStore.solution_types @@ -1354,32 +1297,30 @@ class ExtractiveContentSpec(proto.Message): `SOLUTION_TYPE_CHAT `__. - An extractive segment is a text segment - extracted from the original document that is - relevant to the search query, and, in general, - more verbose than an extractive answer. The - segment could then be used as input for LLMs to - generate summaries and answers. + An extractive segment is a text segment extracted from + the original document that is relevant to the search + query, and, in general, more verbose than an extractive + answer. The segment could then be used as input for LLMs + to generate summaries and answers. If the number of matching segments is less than - ``max_extractive_segment_count``, return all of - the segments. Otherwise, return the + ``max_extractive_segment_count``, return all of the + segments. Otherwise, return the ``max_extractive_segment_count``. return_extractive_segment_score (bool): - Specifies whether to return the confidence score - from the extractive segments in each search - result. This feature is available only for new - or allowlisted data stores. To allowlist your - data store, contact your Customer Engineer. The - default value is ``false``. + Specifies whether to return the confidence score from + the extractive segments in each search result. This + feature is available only for new or allowlisted data + stores. To allowlist your data store, contact your + Customer Engineer. The default value is ``false``. num_previous_segments (int): - Specifies whether to also include the adjacent - from each selected segments. - Return at most ``num_previous_segments`` - segments before each selected segments. + Specifies whether to also include the adjacent from each + selected segments. + Return at most ``num_previous_segments`` segments before + each selected segments. num_next_segments (int): - Return at most ``num_next_segments`` segments - after each selected segments. + Return at most ``num_next_segments`` segments after each + selected segments. """ max_extractive_answer_count: int = proto.Field( @@ -1404,8 +1345,8 @@ class ExtractiveContentSpec(proto.Message): ) class ChunkSpec(proto.Message): - r"""Specifies the chunk spec to be returned from the search - response. Only available if the + r"""Specifies the chunk spec to be returned from the search response. + Only available if the `SearchRequest.ContentSearchSpec.search_result_mode `__ is set to @@ -1414,15 +1355,13 @@ class ChunkSpec(proto.Message): Attributes: num_previous_chunks (int): - The number of previous chunks to be returned - of the current chunk. The maximum allowed value - is 3. If not specified, no previous chunks will - be returned. + The number of previous chunks to be returned of the + current chunk. The maximum allowed value is 3. + If not specified, no previous chunks will be returned. num_next_chunks (int): - The number of next chunks to be returned of - the current chunk. The maximum allowed value is - 3. If not specified, no next chunks will be - returned. + The number of next chunks to be returned of the + current chunk. The maximum allowed value is 3. + If not specified, no next chunks will be returned. """ num_previous_chunks: int = proto.Field( @@ -1463,13 +1402,12 @@ class ChunkSpec(proto.Message): ) class EmbeddingSpec(proto.Message): - r"""The specification that uses customized query embedding vector - to do semantic document retrieval. + r"""The specification that uses customized query embedding vector to do + semantic document retrieval. Attributes: embedding_vectors (MutableSequence[google.cloud.discoveryengine_v1beta.types.SearchRequest.EmbeddingSpec.EmbeddingVector]): - The embedding vector used for retrieval. - Limit to 1. + The embedding vector used for retrieval. Limit to 1. """ class EmbeddingVector(proto.Message): @@ -1500,29 +1438,26 @@ class EmbeddingVector(proto.Message): ) class NaturalLanguageQueryUnderstandingSpec(proto.Message): - r"""Specification to enable natural language understanding - capabilities for search requests. + r"""Specification to enable natural language understanding capabilities + for search requests. Attributes: filter_extraction_condition (google.cloud.discoveryengine_v1beta.types.SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition): - The condition under which filter extraction - should occur. Default to [Condition.DISABLED][]. + The condition under which filter extraction should + occur. Default to [Condition.DISABLED][]. geo_search_query_detection_field_names (MutableSequence[str]): - Field names used for location-based filtering, - where geolocation filters are detected in - natural language search queries. Only valid when - the FilterExtractionCondition is set to - ``ENABLED``. - - If this field is set, it overrides the field - names set in - `ServingConfig.geo_search_query_detection_field_names + Field names used for location-based filtering, where + geolocation filters are detected in natural language + search queries. Only valid when the + FilterExtractionCondition is set to ``ENABLED``. + + If this field is set, it overrides the field names set + in `ServingConfig.geo_search_query_detection_field_names `__. """ class FilterExtractionCondition(proto.Enum): - r"""Enum describing under which condition filter extraction - should occur. + r"""Enum describing under which condition filter extraction should occur. Values: CONDITION_UNSPECIFIED (0): @@ -1554,15 +1489,15 @@ class SearchAsYouTypeSpec(proto.Message): Attributes: condition (google.cloud.discoveryengine_v1beta.types.SearchRequest.SearchAsYouTypeSpec.Condition): - The condition under which search as you type - should occur. Default to + The condition under which search as you type should + occur. Default to `Condition.DISABLED `__. """ class Condition(proto.Enum): - r"""Enum describing under which condition search as you type - should occur. + r"""Enum describing under which condition search as you type should + occur. Values: CONDITION_UNSPECIFIED (0): @@ -1587,18 +1522,17 @@ class Condition(proto.Enum): class SessionSpec(proto.Message): r"""Session specification. - Multi-turn Search feature is currently at private GA stage. - Please use v1alpha or v1beta version instead before we launch - this feature to public GA. Or ask for allowlisting through - Google Support team. + Multi-turn Search feature is currently at private GA stage. Please use + v1alpha or v1beta version instead before we launch this feature to + public GA. Or ask for allowlisting through Google Support team. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields Attributes: query_id (str): - If set, the search result gets stored to the - "turn" specified by this query ID. + If set, the search result gets stored to the "turn" + specified by this query ID. Example: Let's say the session looks like this: @@ -1609,36 +1543,33 @@ class SessionSpec(proto.Message): ".../questions/yyy" } answer: "Foo is ..." } turns { - query { text: "How about bar then?" - query_id: ".../questions/zzz" } } + query { text: "How about bar then?" query_id: + ".../questions/zzz" } } } - The user can call /search API with a request - like this: + The user can call /search API with a request like this: session: ".../sessions/xxx" - session_spec { query_id: ".../questions/zzz" - } - - Then, the API stores the search result, - associated with the last turn. The stored search - result can be used by a subsequent /answer API - call (with the session ID and the query ID - specified). Also, it is possible to call /search - and /answer in parallel with the same session ID + session_spec { query_id: ".../questions/zzz" } + + Then, the API stores the search result, associated with + the last turn. The stored search result can be used by a + subsequent /answer API call (with the session ID and the + query ID specified). Also, it is possible to call + /search and /answer in parallel with the same session ID & query ID. search_result_persistence_count (int): The number of top search results to persist. The - persisted search results can be used for the - subsequent /answer api call. + persisted search results can be used for the subsequent + /answer api call. - This field is simliar to the - ``summary_result_count`` field in + This field is simliar to the ``summary_result_count`` + field in `SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count `__. - At most 10 results for documents mode, or 50 for - chunks mode. + At most 10 results for documents mode, or 50 for chunks + mode. This field is a member of `oneof`_ ``_search_result_persistence_count``. """ @@ -1845,20 +1776,19 @@ class Mode(proto.Enum): class SearchResponse(proto.Message): r"""Response message for `SearchService.Search - `__ - method. + `__ method. Attributes: results (MutableSequence[google.cloud.discoveryengine_v1beta.types.SearchResponse.SearchResult]): - A list of matched documents. The order - represents the ranking. + A list of matched documents. The order represents the + ranking. facets (MutableSequence[google.cloud.discoveryengine_v1beta.types.SearchResponse.Facet]): Results of facets requested by user. guided_search_result (google.cloud.discoveryengine_v1beta.types.SearchResponse.GuidedSearchResult): Guided search result. total_size (int): - The estimated total count of matched items - irrespective of pagination. The count of + The estimated total count of matched items irrespective + of pagination. The count of `results `__ returned by pagination may be less than the @@ -1866,17 +1796,17 @@ class SearchResponse(proto.Message): `__ that matches. attribution_token (str): - A unique search token. This should be included - in the `UserEvent - `__ - logs resulting from this search, which enables - accurate attribution of search model - performance. This also helps to identify a - request during the customer support scenarios. + A unique search token. This should be included in the + `UserEvent + `__ logs + resulting from this search, which enables accurate + attribution of search model performance. This also helps + to identify a request during the customer support + scenarios. redirect_uri (str): - The URI of a customer-defined redirect page. If - redirect action is triggered, no search is - performed, and only `redirect_uri + The URI of a customer-defined redirect page. If redirect + action is triggered, no search is performed, and only + `redirect_uri `__ and `attribution_token @@ -1886,13 +1816,13 @@ class SearchResponse(proto.Message): A token that can be sent as `SearchRequest.page_token `__ - to retrieve the next page. If this field is - omitted, there are no subsequent pages. + to retrieve the next page. If this field is omitted, + there are no subsequent pages. corrected_query (str): - Contains the spell corrected query, if found. If - the spell correction type is AUTOMATIC, then the - search results are based on corrected_query. - Otherwise the original query is used for search. + Contains the spell corrected query, if found. If the + spell correction type is AUTOMATIC, then the search + results are based on corrected_query. Otherwise the + original query is used for search. summary (google.cloud.discoveryengine_v1beta.types.SearchResponse.Summary): A summary as part of the search results. This field is only returned if @@ -1900,27 +1830,24 @@ class SearchResponse(proto.Message): `__ is set. applied_controls (MutableSequence[str]): - Controls applied as part of the Control - service. + Controls applied as part of the Control service. geo_search_debug_info (MutableSequence[google.cloud.discoveryengine_v1beta.types.SearchResponse.GeoSearchDebugInfo]): query_expansion_info (google.cloud.discoveryengine_v1beta.types.SearchResponse.QueryExpansionInfo): - Query expansion information for the returned - results. + Query expansion information for the returned results. natural_language_query_understanding_info (google.cloud.discoveryengine_v1beta.types.SearchResponse.NaturalLanguageQueryUnderstandingInfo): - Natural language query understanding - information for the returned results. + Natural language query understanding information for + the returned results. session_info (google.cloud.discoveryengine_v1beta.types.SearchResponse.SessionInfo): Session information. Only set if `SearchRequest.session `__ - is provided. See its description for more - details. + is provided. See its description for more details. one_box_results (MutableSequence[google.cloud.discoveryengine_v1beta.types.SearchResponse.OneBoxResult]): - A list of One Box results. There can be - multiple One Box results of different types. + A list of One Box results. There can be multiple One + Box results of different types. """ class SearchResult(proto.Message): @@ -1929,13 +1856,12 @@ class SearchResult(proto.Message): Attributes: id (str): `Document.id - `__ - of the searched `Document + `__ of + the searched `Document `__. document (google.cloud.discoveryengine_v1beta.types.Document): - The document data snippet in the search - response. Only fields that are marked as - ``retrievable`` are populated. + The document data snippet in the search response. Only + fields that are marked as ``retrievable`` are populated. chunk (google.cloud.discoveryengine_v1beta.types.Chunk): The chunk data in the search response if the `SearchRequest.ContentSearchSpec.search_result_mode @@ -1946,8 +1872,7 @@ class SearchResult(proto.Message): model_scores (MutableMapping[str, google.cloud.discoveryengine_v1beta.types.DoubleList]): Google provided available scores. rank_signals (google.cloud.discoveryengine_v1beta.types.SearchResponse.SearchResult.RankSignals): - A set of ranking signals associated with the - result. + A set of ranking signals associated with the result. """ class RankSignals(proto.Message): @@ -1969,8 +1894,7 @@ class RankSignals(proto.Message): This field is a member of `oneof`_ ``_semantic_similarity_score``. pctr_rank (float): - Predicted conversion rate adjustment as a - rank. + Predicted conversion rate adjustment as a rank. This field is a member of `oneof`_ ``_pctr_rank``. topicality_rank (float): @@ -1998,8 +1922,8 @@ class CustomSignal(proto.Message): name (str): Name of the signal. value (float): - Float value representing the ranking signal - (e.g. 1.25 for BM25). + Float value representing the ranking signal (e.g. + 1.25 for BM25). """ name: str = proto.Field( @@ -2089,8 +2013,8 @@ class Facet(proto.Message): Attributes: key (str): - The key for this facet. For example, - ``"colors"`` or ``"price"``. It matches + The key for this facet. For example, ``"colors"`` or + ``"price"``. It matches `SearchRequest.FacetSpec.FacetKey.key `__. values (MutableSequence[google.cloud.discoveryengine_v1beta.types.SearchResponse.Facet.FacetValue]): @@ -2111,13 +2035,13 @@ class FacetValue(proto.Message): Attributes: value (str): - Text value of a facet, such as "Black" for - facet "colors". + Text value of a facet, such as "Black" for facet + "colors". This field is a member of `oneof`_ ``facet_value``. interval (google.cloud.discoveryengine_v1beta.types.Interval): - Interval value for a facet, such as `10, 20) for - facet "price". It matches + Interval value for a facet, such as `10, 20) for facet + "price". It matches [SearchRequest.FacetSpec.FacetKey.intervals `__. @@ -2159,9 +2083,9 @@ class FacetValue(proto.Message): ) class GuidedSearchResult(proto.Message): - r"""Guided search result. The guided search helps user to refine - the search results and narrow down to the real needs from a - broaded search results. + r"""Guided search result. The guided search helps user to refine the + search results and narrow down to the real needs from a broaded search + results. Attributes: refinement_attributes (MutableSequence[google.cloud.discoveryengine_v1beta.types.SearchResponse.GuidedSearchResult.RefinementAttribute]): @@ -2175,11 +2099,11 @@ class RefinementAttribute(proto.Message): Attributes: attribute_key (str): - Attribute key used to refine the results. For - example, ``"movie_type"``. + Attribute key used to refine the results. For example, + ``"movie_type"``. attribute_value (str): - Attribute value used to refine the results. For - example, ``"drama"``. + Attribute value used to refine the results. For example, + ``"drama"``. """ attribute_key: str = proto.Field( @@ -2204,19 +2128,18 @@ class RefinementAttribute(proto.Message): ) class Summary(proto.Message): - r"""Summary of the top N search results specified by the summary - spec. + r"""Summary of the top N search results specified by the summary spec. Attributes: summary_text (str): The summary content. summary_skipped_reasons (MutableSequence[google.cloud.discoveryengine_v1beta.types.SearchResponse.Summary.SummarySkippedReason]): - Additional summary-skipped reasons. This - provides the reason for ignored cases. If - nothing is skipped, this field is not set. + Additional summary-skipped reasons. This provides the + reason for ignored cases. If nothing is skipped, this + field is not set. safety_attributes (google.cloud.discoveryengine_v1beta.types.SearchResponse.Summary.SafetyAttributes): - A collection of Safety Attribute categories - and their associated confidence scores. + A collection of Safety Attribute categories and their + associated confidence scores. summary_with_metadata (google.cloud.discoveryengine_v1beta.types.SearchResponse.Summary.SummaryWithMetadata): Summary with metadata information. """ @@ -2300,18 +2223,17 @@ class SummarySkippedReason(proto.Enum): NON_SUMMARY_SEEKING_QUERY_IGNORED_V2 = 9 class SafetyAttributes(proto.Message): - r"""Safety Attribute categories and their associated confidence - scores. + r"""Safety Attribute categories and their associated confidence scores. Attributes: categories (MutableSequence[str]): - The display names of Safety Attribute - categories associated with the generated - content. Order matches the Scores. + The display names of Safety Attribute categories + associated with the generated content. Order matches the + Scores. scores (MutableSequence[float]): - The confidence scores of the each category, - higher value means higher confidence. Order - matches the Categories. + The confidence scores of the each category, higher + value means higher confidence. Order matches the + Categories. """ categories: MutableSequence[str] = proto.RepeatedField( @@ -2344,8 +2266,8 @@ class Citation(proto.Message): Attributes: start_index (int): - Index indicates the start of the segment, - measured in bytes/unicode. + Index indicates the start of the segment, measured in + bytes/unicode. end_index (int): End of the attributed segment, exclusive. sources (MutableSequence[google.cloud.discoveryengine_v1beta.types.SearchResponse.Summary.CitationSource]): @@ -2374,9 +2296,9 @@ class CitationSource(proto.Message): Attributes: reference_index (int): Document reference index from - SummaryWithMetadata.references. It is 0-indexed - and the value will be zero if the - reference_index is not set explicitly. + SummaryWithMetadata.references. It is 0-indexed and the + value will be zero if the reference_index is not set + explicitly. """ reference_index: int = proto.Field( @@ -2394,14 +2316,14 @@ class Reference(proto.Message): Required. `Document.name `__ - of the document. Full resource name of the - referenced document, in the format + of the document. Full resource name of the referenced + document, in the format ``projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*``. uri (str): Cloud Storage or HTTP uri for the document. chunk_contents (MutableSequence[google.cloud.discoveryengine_v1beta.types.SearchResponse.Summary.Reference.ChunkContent]): - List of cited chunk contents derived from - document content. + List of cited chunk contents derived from document + content. """ class ChunkContent(proto.Message): @@ -2497,13 +2419,13 @@ class SummaryWithMetadata(proto.Message): ) class GeoSearchDebugInfo(proto.Message): - r"""Debug information specifically related to forward geocoding - issues arising from Geolocation Search. + r"""Debug information specifically related to forward geocoding issues + arising from Geolocation Search. Attributes: original_address_query (str): - The address from which forward geocoding - ingestion produced issues. + The address from which forward geocoding ingestion + produced issues. error_message (str): The error produced. """ @@ -2518,16 +2440,15 @@ class GeoSearchDebugInfo(proto.Message): ) class QueryExpansionInfo(proto.Message): - r"""Information describing query expansion including whether - expansion has occurred. + r"""Information describing query expansion including whether expansion + has occurred. Attributes: expanded_query (bool): - Bool describing whether query expansion has - occurred. + Bool describing whether query expansion has occurred. pinned_result_count (int): - Number of pinned results. This field will only - be set when expansion happens and + Number of pinned results. This field will only be set + when expansion happens and `SearchRequest.QueryExpansionSpec.pin_unexpanded_results `__ is set to true. @@ -2543,34 +2464,31 @@ class QueryExpansionInfo(proto.Message): ) class NaturalLanguageQueryUnderstandingInfo(proto.Message): - r"""Information describing what natural language understanding - was done on the input query. + r"""Information describing what natural language understanding was + done on the input query. Attributes: extracted_filters (str): - The filters that were extracted from the - input query. + The filters that were extracted from the input query. rewritten_query (str): - Rewritten input query minus the extracted - filters. + Rewritten input query minus the extracted filters. structured_extracted_filter (google.cloud.discoveryengine_v1beta.types.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter): - The filters that were extracted from the - input query represented in a structured form. + The filters that were extracted from the input query + represented in a structured form. """ class StructuredExtractedFilter(proto.Message): - r"""The filters that were extracted from the input query - represented in a structured form. + r"""The filters that were extracted from the input query represented in a + structured form. Attributes: expression (google.cloud.discoveryengine_v1beta.types.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression): - The expression denoting the filter that was - extracted from the input query in a structured - form. It can be a simple expression denoting a - single string, numerical or geolocation - constraint or a compound expression which is a - combination of multiple expressions connected - using logical (OR and AND) operators. + The expression denoting the filter that was extracted + from the input query in a structured form. It can be a + simple expression denoting a single string, numerical or + geolocation constraint or a compound expression which is + a combination of multiple expressions connected using + logical (OR and AND) operators. """ class StringConstraint(proto.Message): @@ -2578,15 +2496,14 @@ class StringConstraint(proto.Message): Attributes: field_name (str): - Name of the string field as defined in the - schema. + Name of the string field as defined in the schema. values (MutableSequence[str]): - Values of the string field. The record will - only be returned if the field value matches one - of the values specified here. + Values of the string field. The record will only be + returned if the field value matches one of the values + specified here. query_segment (str): - Identifies the keywords within the search - query that match a filter. + Identifies the keywords within the search query that + match a filter. """ field_name: str = proto.Field( @@ -2603,23 +2520,19 @@ class StringConstraint(proto.Message): ) class NumberConstraint(proto.Message): - r"""Constraint expression of a number field. Example: price < - 100. + r"""Constraint expression of a number field. Example: price < 100. Attributes: field_name (str): - Name of the numerical field as defined in the - schema. + Name of the numerical field as defined in the schema. comparison (google.cloud.discoveryengine_v1beta.types.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.NumberConstraint.Comparison): - The comparison operation performed between - the field value and the value specified in the - constraint. + The comparison operation performed between the field + value and the value specified in the constraint. value (float): - The value specified in the numerical - constraint. + The value specified in the numerical constraint. query_segment (str): - Identifies the keywords within the search - query that match a filter. + Identifies the keywords within the search query that + match a filter. """ class Comparison(proto.Enum): @@ -2671,23 +2584,23 @@ class GeolocationConstraint(proto.Message): Attributes: field_name (str): - The name of the geolocation field as defined - in the schema. + The name of the geolocation field as defined in the + schema. address (str): - The reference address that was inferred from - the input query. The proximity of the reference - address to the geolocation field will be used to - filter the results. + The reference address that was inferred from the + input query. The proximity of the reference address to + the geolocation field will be used to filter the + results. latitude (float): - The latitude of the geolocation inferred from - the input query. + The latitude of the geolocation inferred from the + input query. longitude (float): - The longitude of the geolocation inferred - from the input query. + The longitude of the geolocation inferred from the + input query. radius_in_meters (float): - The radius in meters around the address. The - record is returned if the location of the - geolocation field is within the radius. + The radius in meters around the address. The record + is returned if the location of the geolocation field is + within the radius. """ field_name: str = proto.Field( @@ -2744,8 +2657,8 @@ class OrExpression(proto.Message): ) class Expression(proto.Message): - r"""The expression denoting the filter that was extracted from - the input query. + r"""The expression denoting the filter that was extracted from the input + query. This message has `oneof`_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. @@ -2768,13 +2681,13 @@ class Expression(proto.Message): This field is a member of `oneof`_ ``expr``. and_expr (google.cloud.discoveryengine_v1beta.types.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.AndExpression): - Logical "And" compound operator connecting - multiple expressions. + Logical "And" compound operator connecting multiple + expressions. This field is a member of `oneof`_ ``expr``. or_expr (google.cloud.discoveryengine_v1beta.types.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.OrExpression): - Logical "Or" compound operator connecting - multiple expressions. + Logical "Or" compound operator connecting multiple + expressions. This field is a member of `oneof`_ ``expr``. """ @@ -2839,17 +2752,16 @@ class SessionInfo(proto.Message): If the auto-session mode is used (when `SearchRequest.session `__ - ends with "-"), this field holds the newly - generated session name. + ends with "-"), this field holds the newly generated + session name. query_id (str): - Query ID that corresponds to this search API - call. One session can have multiple turns, each - with a unique query ID. - - By specifying the session name and this query ID - in the Answer API call, the answer generation - happens in the context of the search results - from this search call. + Query ID that corresponds to this search API call. + One session can have multiple turns, each with a unique + query ID. + + By specifying the session name and this query ID in the + Answer API call, the answer generation happens in the + context of the search results from this search call. """ name: str = proto.Field( @@ -2862,8 +2774,8 @@ class SessionInfo(proto.Message): ) class OneBoxResult(proto.Message): - r"""OneBoxResult is a holder for all results of specific type - that we want to display in UI differently. + r"""OneBoxResult is a holder for all results of specific type that we + want to display in UI differently. Attributes: one_box_type (google.cloud.discoveryengine_v1beta.types.SearchResponse.OneBoxResult.OneBoxType): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/search_tuning_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/search_tuning_service.py index afe0e18329c2..1968e820d500 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/search_tuning_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/search_tuning_service.py @@ -43,11 +43,11 @@ class ListCustomModelsRequest(proto.Message): Attributes: data_store (str): - Required. The resource name of the parent Data - Store, such as + Required. The resource name of the parent Data Store, + such as ``projects/*/locations/global/collections/default_collection/dataStores/default_data_store``. - This field is used to identify the data store - where to fetch the models from. + This field is used to identify the data store where to + fetch the models from. """ data_store: str = proto.Field( @@ -91,19 +91,18 @@ class TrainCustomModelRequest(proto.Message): This field is a member of `oneof`_ ``training_input``. data_store (str): - Required. The resource name of the Data Store, - such as + Required. The resource name of the Data Store, such as ``projects/*/locations/global/collections/default_collection/dataStores/default_data_store``. - This field is used to identify the data store - where to train the models. + This field is used to identify the data store where to + train the models. model_type (str): Model to be trained. Supported values are: - * **search-tuning**: Fine tuning the search - system based on data provided. + * **search-tuning**: Fine tuning the search system based + on data provided. error_config (google.cloud.discoveryengine_v1beta.types.ImportErrorConfig): - The desired location of errors incurred - during the data ingestion and training. + The desired location of errors incurred during the + data ingestion and training. model_id (str): If not provided, a UUID will be generated. """ @@ -113,45 +112,42 @@ class GcsTrainingInput(proto.Message): Attributes: corpus_data_path (str): - The Cloud Storage corpus data which could be - associated in train data. The data path format - is ``gs:///``. - A newline delimited jsonl/ndjson file. + The Cloud Storage corpus data which could be associated + in train data. The data path format is + ``gs:///``. A newline + delimited jsonl/ndjson file. - For search-tuning model, each line should have - the _id, title and text. Example: + For search-tuning model, each line should have the _id, + title and text. Example: ``{"_id": "doc1", title: "relevant doc", "text": "relevant text"}`` query_data_path (str): - The gcs query data which could be associated in - train data. The data path format is - ``gs:///``. A - newline delimited jsonl/ndjson file. - - For search-tuning model, each line should have - the _id and text. Example: {"_id": "query1", - "text": "example query"} + The gcs query data which could be associated in train + data. The data path format is + ``gs:///``. A newline + delimited jsonl/ndjson file. + + For search-tuning model, each line should have the _id + and text. Example: {"_id": "query1", "text": "example + query"} train_data_path (str): - Cloud Storage training data path whose format - should be - ``gs:///``. The - file should be in tsv format. Each line should - have the doc_id and query_id and score (number). - - For search-tuning model, it should have the - query-id corpus-id score as tsv file header. The - score should be a number in ``[0, inf+)``. The - larger the number is, the more relevant the pair - is. Example: + Cloud Storage training data path whose format should be + ``gs:///``. The file + should be in tsv format. Each line should have the + doc_id and query_id and score (number). + + For search-tuning model, it should have the query-id + corpus-id score as tsv file header. The score should be + a number in ``[0, inf+)``. The larger the number is, the + more relevant the pair is. Example: * ``query-id\tcorpus-id\tscore`` * ``query1\tdoc1\t1`` test_data_path (str): - Cloud Storage test data. Same format as - train_data_path. If not provided, a random 80/20 - train/test split will be performed on - train_data_path. + Cloud Storage test data. Same format as train_data_path. + If not provided, a random 80/20 train/test split will be + performed on train_data_path. """ corpus_data_path: str = proto.Field( @@ -199,39 +195,35 @@ class GcsTrainingInput(proto.Message): class TrainCustomModelResponse(proto.Message): r"""Response of the `TrainCustomModelRequest - `__. - This message is returned by the - google.longrunning.Operations.response field. + `__. This + message is returned by the google.longrunning.Operations.response field. Attributes: error_samples (MutableSequence[google.rpc.status_pb2.Status]): - A sample of errors encountered while - processing the data. + A sample of errors encountered while processing the + data. error_config (google.cloud.discoveryengine_v1beta.types.ImportErrorConfig): - Echoes the destination for the complete - errors in the request if set. + Echoes the destination for the complete errors in the + request if set. model_status (str): The trained model status. Possible values are: - * **bad-data**: The training data quality is - bad. + * **bad-data**: The training data quality is bad. - * **no-improvement**: Tuning didn't improve - performance. Won't deploy. * **in-progress**: - Model training job creation is in progress. + * **no-improvement**: Tuning didn't improve performance. + Won't deploy. * **in-progress**: Model training job + creation is in progress. * **training**: Model is actively training. - * **evaluating**: The model is evaluating - trained metrics. + * **evaluating**: The model is evaluating trained + metrics. - * **indexing**: The model trained metrics are - indexing. * **ready**: The model is ready for - serving. + * **indexing**: The model trained metrics are indexing. + * **ready**: The model is ready for serving. metrics (MutableMapping[str, float]): The metrics of the trained model. model_name (str): - Fully qualified name of the - CustomTuningModel. + Fully qualified name of the CustomTuningModel. """ error_samples: MutableSequence[status_pb2.Status] = proto.RepeatedField( @@ -260,16 +252,15 @@ class TrainCustomModelResponse(proto.Message): class TrainCustomModelMetadata(proto.Message): - r"""Metadata related to the progress of the TrainCustomModel - operation. This is returned by the - google.longrunning.Operation.metadata field. + r"""Metadata related to the progress of the TrainCustomModel operation. + This is returned by the google.longrunning.Operation.metadata field. Attributes: create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/serving_config.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/serving_config.py index 9a39033006e7..f5bcff77b7ac 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/serving_config.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/serving_config.py @@ -31,9 +31,9 @@ class ServingConfig(proto.Message): - r"""Configures metadata that is used to generate serving time - results (e.g. search results or recommendation predictions). The - ServingConfig is passed in the search and predict request and + r"""Configures metadata that is used to generate serving time results + (e.g. search results or recommendation predictions). + The ServingConfig is passed in the search and predict request and generates results. This message has `oneof`_ fields (mutually exclusive fields). @@ -49,40 +49,37 @@ class ServingConfig(proto.Message): This field is a member of `oneof`_ ``vertical_config``. generic_config (google.cloud.discoveryengine_v1beta.types.ServingConfig.GenericConfig): - The GenericConfig of the serving - configuration. + The GenericConfig of the serving configuration. This field is a member of `oneof`_ ``vertical_config``. name (str): Immutable. Fully qualified name ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}`` display_name (str): - Required. The human readable serving config - display name. Used in Discovery UI. + Required. The human readable serving config display + name. Used in Discovery UI. - This field must be a UTF-8 encoded string with a - length limit of 128 characters. Otherwise, an - INVALID_ARGUMENT error is returned. + This field must be a UTF-8 encoded string with a length + limit of 128 characters. Otherwise, an INVALID_ARGUMENT + error is returned. solution_type (google.cloud.discoveryengine_v1beta.types.SolutionType): - Required. Immutable. Specifies the solution - type that a serving config can be associated - with. + Required. Immutable. Specifies the solution type that + a serving config can be associated with. model_id (str): The id of the model to use at serving time. - Currently only RecommendationModels are - supported. Can be changed but only to a - compatible model (e.g. others-you-may-like CTR - to others-you-may-like CVR). + Currently only RecommendationModels are supported. + Can be changed but only to a compatible model (e.g. + others-you-may-like CTR to others-you-may-like CVR). Required when `SolutionType - `__ - is `SOLUTION_TYPE_RECOMMENDATION + `__ is + `SOLUTION_TYPE_RECOMMENDATION `__. diversity_level (str): - How much diversity to use in recommendation - model results e.g. ``medium-diversity`` or - ``high-diversity``. Currently supported values: + How much diversity to use in recommendation model + results e.g. ``medium-diversity`` or ``high-diversity``. + Currently supported values: * ``no-diversity`` * ``low-diversity`` @@ -98,39 +95,37 @@ class ServingConfig(proto.Message): Can only be set if `SolutionType - `__ - is `SOLUTION_TYPE_RECOMMENDATION + `__ is + `SOLUTION_TYPE_RECOMMENDATION `__. embedding_config (google.cloud.discoveryengine_v1beta.types.EmbeddingConfig): - Bring your own embedding config. The config is - used for search semantic retrieval. The - retrieval is based on the dot product of + Bring your own embedding config. The config is used for + search semantic retrieval. The retrieval is based on the + dot product of `SearchRequest.EmbeddingSpec.EmbeddingVector.vector `__ - and the document embeddings that are provided by - this EmbeddingConfig. If + and the document embeddings that are provided by this + EmbeddingConfig. If `SearchRequest.EmbeddingSpec.EmbeddingVector.vector `__ is provided, it overrides this `ServingConfig.embedding_config `__. ranking_expression (str): - The ranking expression controls the customized - ranking on retrieval documents. To leverage - this, document embedding is required. The - ranking expression setting in ServingConfig - applies to all search requests served by the - serving config. However, if + The ranking expression controls the customized ranking + on retrieval documents. To leverage this, document + embedding is required. The ranking expression setting in + ServingConfig applies to all search requests served by + the serving config. However, if `SearchRequest.ranking_expression `__ - is specified, it overrides the ServingConfig - ranking expression. + is specified, it overrides the ServingConfig ranking + expression. - The ranking expression is a single function or - multiple functions that are joined by "+". + The ranking expression is a single function or multiple + functions that are joined by "+". - * ranking_expression = function, { " + ", - function }; + * ranking_expression = function, { " + ", function }; Supported functions: @@ -139,24 +134,20 @@ class ServingConfig(proto.Message): Function variables: - * ``relevance_score``: pre-defined keywords, - used for measure relevance between query and - document. + * ``relevance_score``: pre-defined keywords, used for + measure relevance between query and document. - * ``embedding_field_path``: the document - embedding field used with query embedding - vector. + * ``embedding_field_path``: the document embedding field + used with query embedding vector. * ``dotProduct``: embedding function between - embedding_field_path and query embedding - vector. + embedding_field_path and query embedding vector. Example ranking expression: - If document has an embedding field - doc_embedding, the ranking expression could - be ``0.5 * relevance_score + 0.3 * - dotProduct(doc_embedding)``. + If document has an embedding field doc_embedding, the + ranking expression could be ``0.5 * relevance_score + + 0.3 * dotProduct(doc_embedding)``. create_time (google.protobuf.timestamp_pb2.Timestamp): Output only. ServingConfig created timestamp. update_time (google.protobuf.timestamp_pb2.Timestamp): @@ -164,78 +155,72 @@ class ServingConfig(proto.Message): filter_control_ids (MutableSequence[str]): Filter controls to use in serving path. All triggered filter controls will be applied. - Filter controls must be in the same data store - as the serving config. Maximum of 20 filter - controls. + Filter controls must be in the same data store as the + serving config. Maximum of 20 filter controls. boost_control_ids (MutableSequence[str]): Boost controls to use in serving path. All triggered boost controls will be applied. - Boost controls must be in the same data store as - the serving config. Maximum of 20 boost - controls. + Boost controls must be in the same data store as the + serving config. Maximum of 20 boost controls. redirect_control_ids (MutableSequence[str]): - IDs of the redirect controls. Only the first - triggered redirect action is applied, even if - multiple apply. Maximum number of specifications - is 100. + IDs of the redirect controls. Only the first triggered + redirect action is applied, even if multiple apply. + Maximum number of specifications is 100. Can only be set if `SolutionType - `__ - is `SOLUTION_TYPE_SEARCH + `__ is + `SOLUTION_TYPE_SEARCH `__. synonyms_control_ids (MutableSequence[str]): - Condition synonyms specifications. If multiple - synonyms conditions match, all matching synonyms - controls in the list will execute. Maximum - number of specifications is 100. + Condition synonyms specifications. If multiple synonyms + conditions match, all matching synonyms controls in the + list will execute. Maximum number of specifications is + 100. Can only be set if `SolutionType - `__ - is `SOLUTION_TYPE_SEARCH + `__ is + `SOLUTION_TYPE_SEARCH `__. oneway_synonyms_control_ids (MutableSequence[str]): - Condition oneway synonyms specifications. If - multiple oneway synonyms conditions match, all - matching oneway synonyms controls in the list - will execute. Maximum number of specifications - is 100. + Condition oneway synonyms specifications. If multiple + oneway synonyms conditions match, all matching oneway + synonyms controls in the list will execute. Maximum + number of specifications is 100. Can only be set if `SolutionType - `__ - is `SOLUTION_TYPE_SEARCH + `__ is + `SOLUTION_TYPE_SEARCH `__. dissociate_control_ids (MutableSequence[str]): - Condition do not associate specifications. If - multiple do not associate conditions match, all - matching do not associate controls in the list - will execute. + Condition do not associate specifications. If multiple + do not associate conditions match, all matching do not + associate controls in the list will execute. Order does not matter. Maximum number of specifications is 100. Can only be set if `SolutionType - `__ - is `SOLUTION_TYPE_SEARCH + `__ is + `SOLUTION_TYPE_SEARCH `__. replacement_control_ids (MutableSequence[str]): Condition replacement specifications. Applied according to the order in the list. - A previously replaced term can not be - re-replaced. Maximum number of specifications is - 100. + A previously replaced term can not be re-replaced. + Maximum number of specifications is 100. Can only be set if `SolutionType - `__ - is `SOLUTION_TYPE_SEARCH + `__ is + `SOLUTION_TYPE_SEARCH `__. ignore_control_ids (MutableSequence[str]): - Condition ignore specifications. If multiple - ignore conditions match, all matching ignore - controls in the list will execute. + Condition ignore specifications. If multiple ignore + conditions match, all matching ignore controls in the + list will execute. Order does not matter. Maximum number of specifications is 100. personalization_spec (google.cloud.discoveryengine_v1beta.types.SearchRequest.PersonalizationSpec): @@ -256,23 +241,21 @@ class ServingConfig(proto.Message): """ class MediaConfig(proto.Message): - r"""Specifies the configurations needed for Media Discovery. - Currently we support: - - * ``demote_content_watched``: Threshold for watched content - demotion. Customers can specify if using watched content - demotion or use viewed detail page. Using the content watched - demotion, customers need to specify the watched minutes or - percentage exceeds the threshold, the content will be demoted in - the recommendation result. - - * ``promote_fresh_content``: cutoff days for fresh content - promotion. Customers can specify if using content freshness - promotion. If the content was published within the cutoff days, - the content will be promoted in the recommendation result. + r"""Specifies the configurations needed for Media Discovery. Currently we + support: + + * ``demote_content_watched``: Threshold for watched content demotion. + Customers can specify if using watched content demotion or use viewed + detail page. Using the content watched demotion, customers need to + specify the watched minutes or percentage exceeds the threshold, the + content will be demoted in the recommendation result. + + * ``promote_fresh_content``: cutoff days for fresh content promotion. + Customers can specify if using content freshness promotion. If the + content was published within the cutoff days, the content will be + promoted in the recommendation result. Can only be set if - `SolutionType - `__ is + `SolutionType `__ is `SOLUTION_TYPE_RECOMMENDATION `__. @@ -285,41 +268,38 @@ class MediaConfig(proto.Message): Attributes: content_watched_percentage_threshold (float): - Specifies the content watched percentage - threshold for demotion. Threshold value must be - between [0, 1.0] inclusive. + Specifies the content watched percentage threshold for + demotion. Threshold value must be between [0, 1.0] + inclusive. This field is a member of `oneof`_ ``demote_content_watched``. content_watched_seconds_threshold (float): - Specifies the content watched minutes - threshold for demotion. + Specifies the content watched minutes threshold for + demotion. This field is a member of `oneof`_ ``demote_content_watched``. demotion_event_type (str): Specifies the event type used for demoting - recommendation result. Currently supported - values: + recommendation result. Currently supported values: * ``view-item``: Item viewed. - * ``media-play``: Start/resume watching a video, - playing a song, etc. + * ``media-play``: Start/resume watching a video, playing + a song, etc. - * ``media-complete``: Finished or stopped midway - through a video, song, etc. + * ``media-complete``: Finished or stopped midway through + a video, song, etc. - If unset, watch history demotion will not be - applied. Content freshness demotion will still - be applied. + If unset, watch history demotion will not be applied. + Content freshness demotion will still be applied. demote_content_watched_past_days (int): - Optional. Specifies the number of days to - look back for demoting watched content. If set - to zero or unset, defaults to the maximum of 365 - days. + Optional. Specifies the number of days to look back + for demoting watched content. If set to zero or unset, + defaults to the maximum of 365 days. content_freshness_cutoff_days (int): Specifies the content freshness used for - recommendation result. Contents will be demoted - if contents were published for more than content - freshness cutoff days. + recommendation result. Contents will be demoted if + contents were published for more than content freshness + cutoff days. """ content_watched_percentage_threshold: float = proto.Field( @@ -346,17 +326,15 @@ class MediaConfig(proto.Message): ) class GenericConfig(proto.Message): - r"""Specifies the configurations needed for Generic - Discovery.Currently we support: + r"""Specifies the configurations needed for Generic Discovery.Currently we + support: - * ``content_search_spec``: configuration for generic content - search. + * ``content_search_spec``: configuration for generic content search. Attributes: content_search_spec (google.cloud.discoveryengine_v1beta.types.SearchRequest.ContentSearchSpec): - Specifies the expected behavior of content - search. Only valid for content-search enabled - data store. + Specifies the expected behavior of content search. + Only valid for content-search enabled data store. """ content_search_spec: search_service.SearchRequest.ContentSearchSpec = ( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/serving_config_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/serving_config_service.py index 8cfe78819db4..4a81ddd373ab 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/serving_config_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/serving_config_service.py @@ -70,8 +70,8 @@ class GetServingConfigRequest(proto.Message): Attributes: name (str): - Required. The resource name of the ServingConfig - to get. Format: + Required. The resource name of the ServingConfig to get. + Format: ``projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config_id}`` """ @@ -86,18 +86,17 @@ class ListServingConfigsRequest(proto.Message): Attributes: parent (str): - Required. Full resource name of the parent - resource. Format: + Required. Full resource name of the parent resource. + Format: ``projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`` page_size (int): - Optional. Maximum number of results to - return. If unspecified, defaults to 100. If a - value greater than 100 is provided, at most 100 - results are returned. + Optional. Maximum number of results to return. If + unspecified, defaults to 100. If a value greater than + 100 is provided, at most 100 results are returned. page_token (str): Optional. A page token, received from a previous - ``ListServingConfigs`` call. Provide this to - retrieve the subsequent page. + ``ListServingConfigs`` call. Provide this to retrieve + the subsequent page. """ parent: str = proto.Field( @@ -121,8 +120,8 @@ class ListServingConfigsResponse(proto.Message): serving_configs (MutableSequence[google.cloud.discoveryengine_v1beta.types.ServingConfig]): All the ServingConfigs for a given dataStore. next_page_token (str): - Pagination token, if not returned indicates - the last page. + Pagination token, if not returned indicates the last + page. """ @property diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/session.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/session.py index 3aea0d341f23..c59f5743c556 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/session.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/session.py @@ -41,9 +41,9 @@ class Session(proto.Message): display_name (str): Optional. The display name of the session. - This field is used to identify the session in - the UI. By default, the display name is the - first turn query text in the session. + This field is used to identify the session in the UI. By + default, the display name is the first turn query text + in the session. state (google.cloud.discoveryengine_v1beta.types.Session.State): The state of the session. user_pseudo_id (str): @@ -55,9 +55,9 @@ class Session(proto.Message): end_time (google.protobuf.timestamp_pb2.Timestamp): Output only. The time the session finished. is_pinned (bool): - Optional. Whether the session is pinned, - pinned session will be displayed on the top of - the session list. + Optional. Whether the session is pinned, pinned + session will be displayed on the top of the session + list. """ class State(proto.Enum): @@ -78,14 +78,13 @@ class Turn(proto.Message): Attributes: query (google.cloud.discoveryengine_v1beta.types.Query): - Optional. The user query. May not be set if - this turn is merely regenerating an answer to a - different turn + Optional. The user query. May not be set if this turn + is merely regenerating an answer to a different turn answer (str): - Optional. The resource name of the answer to - the user query. - Only set if the answer generation (/answer API - call) happened in this turn. + Optional. The resource name of the answer to the user + query. + Only set if the answer generation (/answer API call) + happened in this turn. detailed_answer (google.cloud.discoveryengine_v1beta.types.Answer): Output only. In `ConversationalSearchService.GetSession @@ -93,14 +92,14 @@ class Turn(proto.Message): API, if `GetSessionRequest.include_answer_details `__ - is set to true, this field will be populated - when getting answer query session. + is set to true, this field will be populated when + getting answer query session. query_config (MutableMapping[str, str]): - Optional. Represents metadata related to the - query config, for example LLM model and version - used, model parameters (temperature, grounding - parameters, etc.). The prefix "google." is - reserved for Google-developed functionality. + Optional. Represents metadata related to the query + config, for example LLM model and version used, model + parameters (temperature, grounding parameters, etc.). + The prefix "google." is reserved for Google-developed + functionality. """ query: "Query" = proto.Field( diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/site_search_engine.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/site_search_engine.py index 75a2cb9a727b..4f9b5ce74588 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/site_search_engine.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/site_search_engine.py @@ -32,14 +32,13 @@ class SiteSearchEngine(proto.Message): - r"""SiteSearchEngine captures DataStore level site search - persisting configurations. It is a singleton value per data - store. + r"""SiteSearchEngine captures DataStore level site search persisting + configurations. It is a singleton value per data store. Attributes: name (str): - The fully qualified resource name of the site - search engine. Format: + The fully qualified resource name of the site search + engine. Format: ``projects/*/locations/*/dataStores/*/siteSearchEngine`` """ @@ -54,42 +53,37 @@ class TargetSite(proto.Message): Attributes: name (str): - Output only. The fully qualified resource name - of the target site. + Output only. The fully qualified resource name of the + target site. ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}`` The ``target_site_id`` is system-generated. provided_uri_pattern (str): - Required. Input only. The user provided URI - pattern from which the ``generated_uri_pattern`` - is generated. + Required. Input only. The user provided URI pattern from + which the ``generated_uri_pattern`` is generated. type_ (google.cloud.discoveryengine_v1beta.types.TargetSite.Type): - The type of the target site, e.g., whether - the site is to be included or excluded. + The type of the target site, e.g., whether the site + is to be included or excluded. exact_match (bool): - Input only. If set to false, a uri_pattern is - generated to include all pages whose address - contains the provided_uri_pattern. If set to - true, an uri_pattern is generated to try to be - an exact match of the provided_uri_pattern or - just the specific page if the + Input only. If set to false, a uri_pattern is generated + to include all pages whose address contains the + provided_uri_pattern. If set to true, an uri_pattern is + generated to try to be an exact match of the + provided_uri_pattern or just the specific page if the provided_uri_pattern is a specific one. - provided_uri_pattern is always normalized to - generate the URI pattern to be used by the - search engine. + provided_uri_pattern is always normalized to generate + the URI pattern to be used by the search engine. generated_uri_pattern (str): - Output only. This is system-generated based on - the provided_uri_pattern. - root_domain_uri (str): - Output only. Root domain of the + Output only. This is system-generated based on the provided_uri_pattern. + root_domain_uri (str): + Output only. Root domain of the provided_uri_pattern. site_verification_info (google.cloud.discoveryengine_v1beta.types.SiteVerificationInfo): - Output only. Site ownership and validity - verification status. + Output only. Site ownership and validity verification + status. indexing_status (google.cloud.discoveryengine_v1beta.types.TargetSite.IndexingStatus): Output only. Indexing status. update_time (google.protobuf.timestamp_pb2.Timestamp): - Output only. The target site's last updated - time. + Output only. The target site's last updated time. failure_reason (google.cloud.discoveryengine_v1beta.types.TargetSite.FailureReason): Output only. Failure reason. """ @@ -157,9 +151,8 @@ class QuotaFailure(proto.Message): Attributes: total_required_quota (int): - This number is an estimation on how much - total quota this project needs to successfully - complete indexing. + This number is an estimation on how much total quota + this project needs to successfully complete indexing. """ total_required_quota: int = proto.Field( @@ -222,13 +215,12 @@ class QuotaFailure(proto.Message): class SiteVerificationInfo(proto.Message): - r"""Verification information for target sites in advanced site - search. + r"""Verification information for target sites in advanced site search. Attributes: site_verification_state (google.cloud.discoveryengine_v1beta.types.SiteVerificationInfo.SiteVerificationState): - Site verification state indicating the - ownership and validity. + Site verification state indicating the ownership and + validity. verify_time (google.protobuf.timestamp_pb2.Timestamp): Latest site verification time. """ @@ -277,8 +269,8 @@ class Sitemap(proto.Message): This field is a member of `oneof`_ ``feed``. name (str): - Output only. The fully qualified resource name - of the sitemap. + Output only. The fully qualified resource name of the + sitemap. ``projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/sitemaps/*`` The ``sitemap_id`` suffix is system-generated. create_time (google.protobuf.timestamp_pb2.Timestamp): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/site_search_engine_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/site_search_engine_service.py index 1927067662df..426884f03d0e 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/site_search_engine_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/site_search_engine_service.py @@ -78,10 +78,9 @@ class GetSiteSearchEngineRequest(proto.Message): such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine``. - If the caller does not have permission to access - the [SiteSearchEngine], regardless of whether or - not it exists, a PERMISSION_DENIED error is - returned. + If the caller does not have permission to access the + [SiteSearchEngine], regardless of whether or not it + exists, a PERMISSION_DENIED error is returned. """ name: str = proto.Field( @@ -105,8 +104,8 @@ class CreateTargetSiteRequest(proto.Message): ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine``. target_site (google.cloud.discoveryengine_v1beta.types.TargetSite): Required. The `TargetSite - `__ - to create. + `__ to + create. """ parent: str = proto.Field( @@ -131,8 +130,8 @@ class CreateTargetSiteMetadata(proto.Message): create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -155,16 +154,15 @@ class BatchCreateTargetSitesRequest(proto.Message): Attributes: parent (str): - Required. The parent resource shared by all - TargetSites being created. + Required. The parent resource shared by all TargetSites + being created. ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine``. - The parent field in the CreateBookRequest - messages must either be empty or match this - field. + The parent field in the CreateBookRequest messages must + either be empty or match this field. requests (MutableSequence[google.cloud.discoveryengine_v1beta.types.CreateTargetSiteRequest]): Required. The request message specifying the - resources to create. A maximum of 20 TargetSites - can be created in a batch. + resources to create. A maximum of 20 TargetSites can be + created in a batch. """ parent: str = proto.Field( @@ -192,16 +190,16 @@ class GetTargetSiteRequest(proto.Message): such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}``. - If the caller does not have permission to access - the `TargetSite + If the caller does not have permission to access the + `TargetSite `__, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested `TargetSite - `__ - does not exist, a NOT_FOUND error is returned. + `__ does + not exist, a NOT_FOUND error is returned. """ name: str = proto.Field( @@ -219,16 +217,15 @@ class UpdateTargetSiteRequest(proto.Message): Attributes: target_site (google.cloud.discoveryengine_v1beta.types.TargetSite): Required. The target site to update. - If the caller does not have permission to update - the `TargetSite + If the caller does not have permission to update the + `TargetSite `__, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the `TargetSite - `__ - to update does not exist, a NOT_FOUND error is - returned. + `__ to + update does not exist, a NOT_FOUND error is returned. """ target_site: gcd_site_search_engine.TargetSite = proto.Field( @@ -249,8 +246,8 @@ class UpdateTargetSiteMetadata(proto.Message): create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -279,16 +276,16 @@ class DeleteTargetSiteRequest(proto.Message): such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}``. - If the caller does not have permission to access - the `TargetSite + If the caller does not have permission to access the + `TargetSite `__, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested `TargetSite - `__ - does not exist, a NOT_FOUND error is returned. + `__ does + not exist, a NOT_FOUND error is returned. """ name: str = proto.Field( @@ -308,8 +305,8 @@ class DeleteTargetSiteMetadata(proto.Message): create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -332,33 +329,32 @@ class ListTargetSitesRequest(proto.Message): Attributes: parent (str): - Required. The parent site search engine resource - name, such as + Required. The parent site search engine resource name, + such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine``. If the caller does not have permission to list `TargetSite `__s - under this site search engine, regardless of - whether or not this branch exists, a - PERMISSION_DENIED error is returned. + under this site search engine, regardless of whether or + not this branch exists, a PERMISSION_DENIED error is + returned. page_size (int): - Requested page size. Server may return fewer - items than requested. If unspecified, server - will pick an appropriate default. The maximum - value is 1000; values above 1000 will be coerced - to 1000. - - If this field is negative, an INVALID_ARGUMENT - error is returned. + Requested page size. Server may return fewer items than + requested. If unspecified, server will pick an + appropriate default. The maximum value is 1000; values + above 1000 will be coerced to 1000. + + If this field is negative, an INVALID_ARGUMENT error is + returned. page_token (str): A page token, received from a previous - ``ListTargetSites`` call. Provide this to - retrieve the subsequent page. + ``ListTargetSites`` call. Provide this to retrieve the + subsequent page. - When paginating, all other parameters provided - to ``ListTargetSites`` must match the call that - provided the page token. + When paginating, all other parameters provided to + ``ListTargetSites`` must match the call that provided + the page token. """ parent: str = proto.Field( @@ -385,13 +381,12 @@ class ListTargetSitesResponse(proto.Message): target_sites (MutableSequence[google.cloud.discoveryengine_v1beta.types.TargetSite]): List of TargetSites. next_page_token (str): - A token that can be sent as ``page_token`` to - retrieve the next page. If this field is - omitted, there are no subsequent pages. + A token that can be sent as ``page_token`` to retrieve + the next page. If this field is omitted, there are no + subsequent pages. total_size (int): - The total number of items matching the - request. This will always be populated in the - response. + The total number of items matching the request. + This will always be populated in the response. """ @property @@ -426,8 +421,8 @@ class BatchCreateTargetSiteMetadata(proto.Message): create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -477,8 +472,8 @@ class CreateSitemapRequest(proto.Message): ``projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine``. sitemap (google.cloud.discoveryengine_v1beta.types.Sitemap): Required. The `Sitemap - `__ - to create. + `__ to + create. """ parent: str = proto.Field( @@ -502,19 +497,19 @@ class DeleteSitemapRequest(proto.Message): name (str): Required. Full resource name of `Sitemap - `__, - such as + `__, such + as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/sitemaps/{sitemap}``. - If the caller does not have permission to access - the `Sitemap + If the caller does not have permission to access the + `Sitemap `__, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested `Sitemap - `__ - does not exist, a NOT_FOUND error is returned. + `__ does + not exist, a NOT_FOUND error is returned. """ name: str = proto.Field( @@ -539,10 +534,10 @@ class FetchSitemapsRequest(proto.Message): matcher (google.cloud.discoveryengine_v1beta.types.FetchSitemapsRequest.Matcher): Optional. If specified, fetches the matching `Sitemap - `__s. - If not specified, fetches all `Sitemap - `__s - in the `DataStore + `__s. If + not specified, fetches all `Sitemap + `__s in the + `DataStore `__. """ @@ -553,8 +548,7 @@ class UrisMatcher(proto.Message): Attributes: uris (MutableSequence[str]): The `Sitemap - `__ - uris. + `__ uris. """ uris: MutableSequence[str] = proto.RepeatedField( @@ -564,8 +558,8 @@ class UrisMatcher(proto.Message): class Matcher(proto.Message): r"""Matcher for the `Sitemap - `__s. Currently - only supports uris matcher. + `__s. Currently only + supports uris matcher. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -606,8 +600,8 @@ class CreateSitemapMetadata(proto.Message): create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -633,8 +627,8 @@ class DeleteSitemapMetadata(proto.Message): create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -663,9 +657,8 @@ class FetchSitemapsResponse(proto.Message): """ class SitemapMetadata(proto.Message): - r"""Contains a `Sitemap - `__ and its - metadata. + r"""Contains a `Sitemap `__ and + its metadata. Attributes: sitemap (google.cloud.discoveryengine_v1beta.types.Sitemap): @@ -727,8 +720,8 @@ class EnableAdvancedSiteSearchMetadata(proto.Message): create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -784,8 +777,8 @@ class DisableAdvancedSiteSearchMetadata(proto.Message): create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -814,15 +807,14 @@ class RecrawlUrisRequest(proto.Message): such as ``projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine``. uris (MutableSequence[str]): - Required. List of URIs to crawl. At most 10K - URIs are supported, otherwise an - INVALID_ARGUMENT error is thrown. Each URI - should match at least one `TargetSite - `__ - in ``site_search_engine``. + Required. List of URIs to crawl. At most 10K URIs are + supported, otherwise an INVALID_ARGUMENT error is + thrown. Each URI should match at least one `TargetSite + `__ in + ``site_search_engine``. site_credential (str): - Optional. Full resource name of the - [SiteCredential][], such as + Optional. Full resource name of the [SiteCredential][], + such as ``projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/siteCredentials/*``. Only set to crawl private URIs. """ @@ -849,11 +841,9 @@ class RecrawlUrisResponse(proto.Message): Attributes: failure_samples (MutableSequence[google.cloud.discoveryengine_v1beta.types.RecrawlUrisResponse.FailureInfo]): - Details for a sample of up to 10 - ``failed_uris``. + Details for a sample of up to 10 ``failed_uris``. failed_uris (MutableSequence[str]): - URIs that were not crawled before the LRO - terminated. + URIs that were not crawled before the LRO terminated. """ class FailureInfo(proto.Message): @@ -864,14 +854,13 @@ class FailureInfo(proto.Message): uri (str): URI that failed to be crawled. failure_reasons (MutableSequence[google.cloud.discoveryengine_v1beta.types.RecrawlUrisResponse.FailureInfo.FailureReason]): - List of failure reasons by corpus type (e.g. - desktop, mobile). + List of failure reasons by corpus type (e.g. desktop, + mobile). """ class FailureReason(proto.Message): - r"""Details about why crawling failed for a particular - CorpusType, e.g., DESKTOP and MOBILE crawling may fail for - different reasons. + r"""Details about why crawling failed for a particular CorpusType, e.g., + DESKTOP and MOBILE crawling may fail for different reasons. Attributes: corpus_type (google.cloud.discoveryengine_v1beta.types.RecrawlUrisResponse.FailureInfo.FailureReason.CorpusType): @@ -943,35 +932,32 @@ class RecrawlUrisMetadata(proto.Message): create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. invalid_uris (MutableSequence[str]): - Unique URIs in the request that have invalid - format. Sample limited to 1000. + Unique URIs in the request that have invalid format. + Sample limited to 1000. invalid_uris_count (int): - Total number of unique URIs in the request - that have invalid format. + Total number of unique URIs in the request that have + invalid format. uris_not_matching_target_sites (MutableSequence[str]): - Unique URIs in the request that don't match - any TargetSite in the DataStore, only match - TargetSites that haven't been fully indexed, or - match a TargetSite with type EXCLUDE. Sample - limited to 1000. + Unique URIs in the request that don't match any + TargetSite in the DataStore, only match TargetSites that + haven't been fully indexed, or match a TargetSite with + type EXCLUDE. Sample limited to 1000. uris_not_matching_target_sites_count (int): Total number of URIs that don't match any TargetSites. valid_uris_count (int): - Total number of unique URIs in the request that - are not in invalid_uris. + Total number of unique URIs in the request that are not + in invalid_uris. success_count (int): - Total number of URIs that have been crawled - so far. + Total number of URIs that have been crawled so far. pending_count (int): - Total number of URIs that have yet to be - crawled. + Total number of URIs that have yet to be crawled. quota_exceeded_count (int): - Total number of URIs that were rejected due - to insufficient indexing resources. + Total number of URIs that were rejected due to + insufficient indexing resources. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -1026,8 +1012,8 @@ class BatchVerifyTargetSitesRequest(proto.Message): Attributes: parent (str): - Required. The parent resource shared by all - TargetSites being verified. + Required. The parent resource shared by all TargetSites + being verified. ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine``. """ @@ -1057,8 +1043,8 @@ class BatchVerifyTargetSitesMetadata(proto.Message): create_time (google.protobuf.timestamp_pb2.Timestamp): Operation create time. update_time (google.protobuf.timestamp_pb2.Timestamp): - Operation last update time. If the operation - is done, this is also the finish time. + Operation last update time. If the operation is done, + this is also the finish time. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -1081,27 +1067,25 @@ class FetchDomainVerificationStatusRequest(proto.Message): Attributes: site_search_engine (str): - Required. The site search engine resource under - which we fetch all the domain verification - status. + Required. The site search engine resource under which we + fetch all the domain verification status. ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine``. page_size (int): - Requested page size. Server may return fewer - items than requested. If unspecified, server - will pick an appropriate default. The maximum - value is 1000; values above 1000 will be coerced - to 1000. - - If this field is negative, an INVALID_ARGUMENT - error is returned. + Requested page size. Server may return fewer items than + requested. If unspecified, server will pick an + appropriate default. The maximum value is 1000; values + above 1000 will be coerced to 1000. + + If this field is negative, an INVALID_ARGUMENT error is + returned. page_token (str): A page token, received from a previous - ``FetchDomainVerificationStatus`` call. Provide - this to retrieve the subsequent page. + ``FetchDomainVerificationStatus`` call. Provide this to + retrieve the subsequent page. - When paginating, all other parameters provided - to ``FetchDomainVerificationStatus`` must match - the call that provided the page token. + When paginating, all other parameters provided to + ``FetchDomainVerificationStatus`` must match the call + that provided the page token. """ site_search_engine: str = proto.Field( @@ -1126,16 +1110,15 @@ class FetchDomainVerificationStatusResponse(proto.Message): Attributes: target_sites (MutableSequence[google.cloud.discoveryengine_v1beta.types.TargetSite]): - List of TargetSites containing the site - verification status. + List of TargetSites containing the site verification + status. next_page_token (str): - A token that can be sent as ``page_token`` to - retrieve the next page. If this field is - omitted, there are no subsequent pages. + A token that can be sent as ``page_token`` to retrieve + the next page. If this field is omitted, there are no + subsequent pages. total_size (int): - The total number of items matching the - request. This will always be populated in the - response. + The total number of items matching the request. + This will always be populated in the response. """ @property diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/user_event.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/user_event.py index 90c354565a9b..5341199d5275 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/user_event.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/user_event.py @@ -39,9 +39,8 @@ class UserEvent(proto.Message): - r"""UserEvent captures all metadata information Discovery Engine - API needs to know about how end users interact with your - website. + r"""UserEvent captures all metadata information Discovery Engine API + needs to know about how end users interact with your website. Attributes: event_type (str): @@ -50,125 +49,117 @@ class UserEvent(proto.Message): Generic values: * ``search``: Search for Documents. - * ``view-item``: Detailed page view of a - Document. + * ``view-item``: Detailed page view of a Document. - * ``view-item-list``: View of a panel or ordered - list of Documents. * ``view-home-page``: View of - the home page. + * ``view-item-list``: View of a panel or ordered list of + Documents. * ``view-home-page``: View of the home page. - * ``view-category-page``: View of a category - page, e.g. Home > Men > Jeans * - ``add-feedback``: Add a user feedback. + * ``view-category-page``: View of a category page, e.g. + Home > Men > Jeans * ``add-feedback``: Add a user + feedback. Retail-related values: - * ``add-to-cart``: Add an item(s) to cart, e.g. - in Retail online shopping * ``purchase``: - Purchase an item(s) + * ``add-to-cart``: Add an item(s) to cart, e.g. in + Retail online shopping * ``purchase``: Purchase an + item(s) Media-related values: - * ``media-play``: Start/resume watching a video, - playing a song, etc. * ``media-complete``: - Finished or stopped midway through a video, - song, etc. + * ``media-play``: Start/resume watching a video, playing + a song, etc. * ``media-complete``: Finished or stopped + midway through a video, song, etc. user_pseudo_id (str): - Required. A unique identifier for tracking - visitors. - For example, this could be implemented with an - HTTP cookie, which should be able to uniquely - identify a visitor on a single device. This - unique identifier should not change if the - visitor log in/out of the website. - - Do not set the field to the same fixed ID for - different users. This mixes the event history of - those users together, which results in degraded - model quality. - - The field must be a UTF-8 encoded string with a - length limit of 128 characters. Otherwise, an + Required. A unique identifier for tracking visitors. + + For example, this could be implemented with an HTTP + cookie, which should be able to uniquely identify a + visitor on a single device. This unique identifier + should not change if the visitor log in/out of the + website. + + Do not set the field to the same fixed ID for different + users. This mixes the event history of those users + together, which results in degraded model quality. + + The field must be a UTF-8 encoded string with a length + limit of 128 characters. Otherwise, an ``INVALID_ARGUMENT`` error is returned. - The field should not contain PII or user-data. - We recommend to use Google Analytics `Client + The field should not contain PII or user-data. We + recommend to use Google Analytics `Client ID `__ for this field. engine (str): The `Engine - `__ - resource name, in the form of + `__ resource + name, in the form of ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}``. Optional. Only required for - `Engine - `__ - produced user events. For example, user events - from blended search. + `Engine `__ + produced user events. For example, user events from + blended search. data_store (str): The `DataStore `__ resource full name, of the form ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}``. - Optional. Only required for user events whose - data store can't by determined by + Optional. Only required for user events whose data store + can't by determined by `UserEvent.engine `__ or `UserEvent.documents `__. If data store is set in the parent of - write/import/collect user event requests, this - field can be omitted. + write/import/collect user event requests, this field can + be omitted. event_time (google.protobuf.timestamp_pb2.Timestamp): Only required for `UserEventService.ImportUserEvents `__ - method. Timestamp of when the user event - happened. + method. Timestamp of when the user event happened. user_info (google.cloud.discoveryengine_v1beta.types.UserInfo): Information about the end user. direct_user_request (bool): - Should set to true if the request is made - directly from the end user, in which case the + Should set to true if the request is made directly from + the end user, in which case the `UserEvent.user_info.user_agent `__ can be populated from the HTTP request. - This flag should be set only if the API request - is made directly from the end user such as a - mobile app (and not if a gateway or a server is - processing and pushing the user events). + This flag should be set only if the API request is made + directly from the end user such as a mobile app (and not + if a gateway or a server is processing and pushing the + user events). - This should not be set when using the JavaScript - tag in `UserEventService.CollectUserEvent + This should not be set when using the JavaScript tag in + `UserEventService.CollectUserEvent `__. session_id (str): - A unique identifier for tracking a visitor - session with a length limit of 128 bytes. A - session is an aggregation of an end user - behavior in a time span. + A unique identifier for tracking a visitor session with + a length limit of 128 bytes. A session is an aggregation + of an end user behavior in a time span. A general guideline to populate the session_id: - 1. If user has no activity for 30 min, a new - session_id should be assigned. - 2. The session_id should be unique across users, - suggest use uuid or add - `UserEvent.user_pseudo_id + 1. If user has no activity for 30 min, a new session_id + should be assigned. + 2. The session_id should be unique across users, suggest + use uuid or add `UserEvent.user_pseudo_id `__ as prefix. page_info (google.cloud.discoveryengine_v1beta.types.PageInfo): - Page metadata such as categories and other - critical information for certain event types - such as ``view-category-page``. + Page metadata such as categories and other critical + information for certain event types such as + ``view-category-page``. attribution_token (str): - Token to attribute an API response to user - action(s) to trigger the event. - Highly recommended for user events that are the - result of `RecommendationService.Recommend + Token to attribute an API response to user action(s) to + trigger the event. + Highly recommended for user events that are the result + of `RecommendationService.Recommend `__. This field enables accurate attribution of recommendation model performance. @@ -183,56 +174,52 @@ class UserEvent(proto.Message): * `SearchResponse.attribution_token `__ - for events that are the result of - `SearchService.Search + for events that are the result of `SearchService.Search `__. - This token enables us to accurately attribute - page view or conversion completion back to the - event and the particular predict response - containing this clicked/purchased product. If - user clicks on product K in the recommendation - results, pass + This token enables us to accurately attribute page view + or conversion completion back to the event and the + particular predict response containing this + clicked/purchased product. If user clicks on product K + in the recommendation results, pass `RecommendResponse.attribution_token `__ - as a URL parameter to product K's page. When - recording events on product K's page, log the + as a URL parameter to product K's page. When recording + events on product K's page, log the `RecommendResponse.attribution_token `__ to this field. filter (str): - The filter syntax consists of an expression - language for constructing a predicate from one - or more fields of the documents being filtered. + The filter syntax consists of an expression language for + constructing a predicate from one or more fields of the + documents being filtered. - One example is for ``search`` events, the - associated `SearchRequest + One example is for ``search`` events, the associated + `SearchRequest `__ may contain a filter expression in `SearchRequest.filter `__ - conforming to - https://google.aip.dev/160#filtering. + conforming to https://google.aip.dev/160#filtering. - Similarly, for ``view-item-list`` events that - are generated from a `RecommendRequest + Similarly, for ``view-item-list`` events that are + generated from a `RecommendRequest `__, this field may be populated directly from `RecommendRequest.filter `__ - conforming to - https://google.aip.dev/160#filtering. + conforming to https://google.aip.dev/160#filtering. - The value must be a UTF-8 encoded string with a - length limit of 1,000 characters. Otherwise, an + The value must be a UTF-8 encoded string with a length + limit of 1,000 characters. Otherwise, an ``INVALID_ARGUMENT`` error is returned. documents (MutableSequence[google.cloud.discoveryengine_v1beta.types.DocumentInfo]): List of `Document `__s associated with this user event. - This field is optional except for the following - event types: + This field is optional except for the following event + types: * ``view-item`` * ``add-to-cart`` @@ -243,18 +230,16 @@ class UserEvent(proto.Message): * ``media-complete`` In a ``search`` event, this field represents the - documents returned to the end user on the - current page (the end user may have not finished - browsing the whole page yet). When a new page is - returned to the end user, after - pagination/filtering/ordering even for the same + documents returned to the end user on the current page + (the end user may have not finished browsing the whole + page yet). When a new page is returned to the end user, + after pagination/filtering/ordering even for the same query, a new ``search`` event with different `UserEvent.documents `__ is desired. panel (google.cloud.discoveryengine_v1beta.types.PanelInfo): - Panel metadata associated with this user - event. + Panel metadata associated with this user event. search_info (google.cloud.discoveryengine_v1beta.types.SearchInfo): `SearchService.Search `__ @@ -266,63 +251,59 @@ class UserEvent(proto.Message): `__ details related to the event. - This field should be set for ``search`` event - when autocomplete function is enabled and the - user clicks a suggestion for search. + This field should be set for ``search`` event when + autocomplete function is enabled and the user clicks a + suggestion for search. transaction_info (google.cloud.discoveryengine_v1beta.types.TransactionInfo): - The transaction metadata (if any) associated - with this user event. + The transaction metadata (if any) associated with + this user event. tag_ids (MutableSequence[str]): - A list of identifiers for the independent - experiment groups this user event belongs to. - This is used to distinguish between user events - associated with different experiment setups. + A list of identifiers for the independent experiment + groups this user event belongs to. This is used to + distinguish between user events associated with + different experiment setups. promotion_ids (MutableSequence[str]): - The promotion IDs if this is an event - associated with promotions. Currently, this - field is restricted to at most one ID. + The promotion IDs if this is an event associated with + promotions. Currently, this field is restricted to at + most one ID. attributes (MutableMapping[str, google.cloud.discoveryengine_v1beta.types.CustomAttribute]): Extra user event features to include in the - recommendation model. These attributes must NOT - contain data that needs to be parsed or - processed further, e.g. JSON or other encodings. - - If you provide custom attributes for ingested - user events, also include them in the user - events that you associate with prediction - requests. Custom attribute formatting must be - consistent between imported events and events - provided with prediction requests. This lets the - Discovery Engine API use those custom attributes - when training models and serving predictions, - which helps improve recommendation quality. - - This field needs to pass all below criteria, - otherwise an ``INVALID_ARGUMENT`` error is - returned: - - * The key must be a UTF-8 encoded string with a - length limit of 5,000 characters. - - * For text attributes, at most 400 values are - allowed. Empty values are not allowed. Each - value must be a UTF-8 encoded string with a - length limit of 256 characters. - - * For number attributes, at most 400 values are - allowed. - - For product recommendations, an example of extra - user information is ``traffic_channel``, which - is how a user arrives at the site. Users can - arrive - at the site by coming to the site directly, - coming through Google search, or in other ways. + recommendation model. These attributes must NOT contain + data that needs to be parsed or processed further, e.g. + JSON or other encodings. + + If you provide custom attributes for ingested user + events, also include them in the user events that you + associate with prediction requests. Custom attribute + formatting must be consistent between imported events + and events provided with prediction requests. This lets + the Discovery Engine API use those custom attributes + when training models and serving predictions, which + helps improve recommendation quality. + + This field needs to pass all below criteria, otherwise + an ``INVALID_ARGUMENT`` error is returned: + + * The key must be a UTF-8 encoded string with a length + limit of 5,000 characters. + + * For text attributes, at most 400 values are allowed. + Empty values are not allowed. Each value must be a + UTF-8 encoded string with a length limit of 256 + characters. + + * For number attributes, at most 400 values are allowed. + + For product recommendations, an example of extra user + information is ``traffic_channel``, which is how a user + arrives at the site. Users can arrive + at the site by coming to the site directly, coming + through Google search, or in other ways. media_info (google.cloud.discoveryengine_v1beta.types.MediaInfo): Media-specific info. panels (MutableSequence[google.cloud.discoveryengine_v1beta.types.PanelInfo]): - Optional. List of panels associated with this - event. Used for page-level impression data. + Optional. List of panels associated with this event. + Used for page-level impression data. """ event_type: str = proto.Field( @@ -431,50 +412,45 @@ class PageInfo(proto.Message): A unique ID of a web page view. This should be kept the same for all user events - triggered from the same pageview. For example, - an item detail page view could trigger multiple - events as the user is browsing the page. The - ``pageview_id`` property should be kept the same - for all these events so that they can be grouped - together properly. + triggered from the same pageview. For example, an item + detail page view could trigger multiple events as the + user is browsing the page. The ``pageview_id`` property + should be kept the same for all these events so that + they can be grouped together properly. When using the client side event reporting with - JavaScript pixel and Google Tag Manager, this - value is filled in automatically. + JavaScript pixel and Google Tag Manager, this value is + filled in automatically. page_category (str): - The most specific category associated with a - category page. - To represent full path of category, use '>' sign - to separate different hierarchies. If '>' is - part of the category name, replace it with other - character(s). - - Category pages include special pages such as - sales or promotions. For instance, a special - sale page may have the category hierarchy: - - ``"pageCategory" : "Sales > 2017 Black Friday - Deals"``. - - Required for ``view-category-page`` events. - Other event types should not set this field. - Otherwise, an ``INVALID_ARGUMENT`` error is - returned. + The most specific category associated with a category + page. + To represent full path of category, use '>' sign to + separate different hierarchies. If '>' is part of the + category name, replace it with other character(s). + + Category pages include special pages such as sales or + promotions. For instance, a special sale page may have + the category hierarchy: + + ``"pageCategory" : "Sales > 2017 Black Friday Deals"``. + + Required for ``view-category-page`` events. Other event + types should not set this field. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. uri (str): - Complete URL (window.location.href) of the - user's current page. + Complete URL (window.location.href) of the user's + current page. When using the client side event reporting with - JavaScript pixel and Google Tag Manager, this - value is filled in automatically. Maximum length - 5,000 characters. + JavaScript pixel and Google Tag Manager, this value is + filled in automatically. Maximum length 5,000 + characters. referrer_uri (str): The referrer URL of the current page. When using the client side event reporting with - JavaScript pixel and Google Tag Manager, this - value is filled in automatically. However, some - browser privacy restrictions may cause this - field to be empty. + JavaScript pixel and Google Tag Manager, this value is + filled in automatically. However, some browser privacy + restrictions may cause this field to be empty. """ pageview_id: str = proto.Field( @@ -509,8 +485,8 @@ class SearchInfo(proto.Message): `__ for definition. - The value must be a UTF-8 encoded string with a - length limit of 5,000 characters. Otherwise, an + The value must be a UTF-8 encoded string with a length + limit of 5,000 characters. Otherwise, an ``INVALID_ARGUMENT`` error is returned. At least one of @@ -519,44 +495,41 @@ class SearchInfo(proto.Message): or `PageInfo.page_category `__ - is required for ``search`` events. Other event - types should not set this field. Otherwise, an + is required for ``search`` events. Other event types + should not set this field. Otherwise, an ``INVALID_ARGUMENT`` error is returned. order_by (str): - The order in which products are returned, if - applicable. + The order in which products are returned, if applicable. + See `SearchRequest.order_by `__ for definition and syntax. - The value must be a UTF-8 encoded string with a - length limit of 1,000 characters. Otherwise, an + The value must be a UTF-8 encoded string with a length + limit of 1,000 characters. Otherwise, an ``INVALID_ARGUMENT`` error is returned. - This can only be set for ``search`` events. - Other event types should not set this field. - Otherwise, an ``INVALID_ARGUMENT`` error is - returned. + This can only be set for ``search`` events. Other event + types should not set this field. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. offset (int): An integer that specifies the current offset for - pagination (the 0-indexed starting location, - amongst the products deemed by the API as - relevant). + pagination (the 0-indexed starting location, amongst the + products deemed by the API as relevant). See `SearchRequest.offset `__ for definition. - If this field is negative, an - ``INVALID_ARGUMENT`` is returned. - - This can only be set for ``search`` events. - Other event types should not set this field. - Otherwise, an ``INVALID_ARGUMENT`` error is + If this field is negative, an ``INVALID_ARGUMENT`` is returned. + This can only be set for ``search`` events. Other event + types should not set this field. Otherwise, an + ``INVALID_ARGUMENT`` error is returned. + This field is a member of `oneof`_ ``_offset``. """ @@ -576,8 +549,8 @@ class SearchInfo(proto.Message): class CompletionInfo(proto.Message): - r"""Detailed completion information including completion - attribution token and clicked completion info. + r"""Detailed completion information including completion attribution + token and clicked completion info. Attributes: selected_suggestion (str): @@ -608,28 +581,26 @@ class TransactionInfo(proto.Message): Attributes: value (float): - Required. Total non-zero value associated - with the transaction. This value may include - shipping, tax, or other adjustments to the total - value that you want to include. + Required. Total non-zero value associated with the + transaction. This value may include shipping, tax, or + other adjustments to the total value that you want to + include. This field is a member of `oneof`_ ``_value``. currency (str): - Required. Currency code. Use three-character - ISO-4217 code. + Required. Currency code. Use three-character ISO-4217 + code. transaction_id (str): The transaction ID with a length limit of 128 characters. tax (float): - All the taxes associated with the - transaction. + All the taxes associated with the transaction. This field is a member of `oneof`_ ``_tax``. cost (float): - All the costs associated with the products. - These can be manufacturing costs, shipping - expenses not borne by the end user, or any other - costs, such that: + All the costs associated with the products. These can be + manufacturing costs, shipping expenses not borne by the + end user, or any other costs, such that: * Profit = `value @@ -641,8 +612,8 @@ class TransactionInfo(proto.Message): This field is a member of `oneof`_ ``_cost``. discount_value (float): - The total discount(s) value applied to this - transaction. This figure should be excluded from + The total discount(s) value applied to this transaction. + This figure should be excluded from `TransactionInfo.value `__ @@ -656,8 +627,8 @@ class TransactionInfo(proto.Message): `TransactionInfo.discount_value `__ - This means that profit is calculated the same - way, regardless of the discount value, and that + This means that profit is calculated the same way, + regardless of the discount value, and that `TransactionInfo.discount_value `__ can be larger than @@ -732,31 +703,28 @@ class DocumentInfo(proto.Message): This field is a member of `oneof`_ ``document_descriptor``. uri (str): The `Document - `__ - URI - only allowed for website data stores. + `__ URI - + only allowed for website data stores. This field is a member of `oneof`_ ``document_descriptor``. quantity (int): - Quantity of the Document associated with the - user event. Defaults to 1. - For example, this field is 2 if two quantities - of the same Document are involved in a - ``add-to-cart`` event. + Quantity of the Document associated with the user event. + Defaults to 1. + For example, this field is 2 if two quantities of the + same Document are involved in a ``add-to-cart`` event. - Required for events of the following event - types: + Required for events of the following event types: * ``add-to-cart`` * ``purchase`` This field is a member of `oneof`_ ``_quantity``. promotion_ids (MutableSequence[str]): - The promotion IDs associated with this - Document. Currently, this field is restricted to - at most one ID. + The promotion IDs associated with this Document. + Currently, this field is restricted to at most one ID. joined (bool): - Output only. Whether the referenced Document - can be found in the data store. + Output only. Whether the referenced Document can be + found in the data store. """ id: str = proto.Field( @@ -800,24 +768,24 @@ class PanelInfo(proto.Message): display_name (str): The display name of the panel. panel_position (int): - The ordered position of the panel, if shown to - the user with other panels. If set, then + The ordered position of the panel, if shown to the user + with other panels. If set, then `total_panels `__ must also be set. This field is a member of `oneof`_ ``_panel_position``. total_panels (int): - The total number of panels, including this one, - shown to the user. Must be set if + The total number of panels, including this one, shown to + the user. Must be set if `panel_position `__ is set. This field is a member of `oneof`_ ``_total_panels``. documents (MutableSequence[google.cloud.discoveryengine_v1beta.types.DocumentInfo]): - Optional. The document IDs associated with - this panel. + Optional. The document IDs associated with this + panel. """ panel_id: str = proto.Field( @@ -852,24 +820,23 @@ class MediaInfo(proto.Message): Attributes: media_progress_duration (google.protobuf.duration_pb2.Duration): - The media progress time in seconds, if - applicable. For example, if the end user has - finished 90 seconds of a playback video, then + The media progress time in seconds, if applicable. + For example, if the end user has finished 90 seconds of + a playback video, then `MediaInfo.media_progress_duration.seconds - `__ should be - set to 90. + `__ should be set to + 90. media_progress_percentage (float): Media progress should be computed using only the `media_progress_duration `__ relative to the media total length. - This value must be between ``[0, 1.0]`` - inclusive. + This value must be between ``[0, 1.0]`` inclusive. - If this is not a playback or the progress cannot - be computed (e.g. ongoing livestream), this - field should be unset. + If this is not a playback or the progress cannot be + computed (e.g. ongoing livestream), this field should be + unset. This field is a member of `oneof`_ ``_media_progress_percentage``. """ diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/user_event_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/user_event_service.py index 166d76d7e7e9..1a4d0182e4d5 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/user_event_service.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/user_event_service.py @@ -47,10 +47,10 @@ class WriteUserEventRequest(proto.Message): If the write user event action is applied in [Location][] level, for example, the event with `Document - `__ - across multiple `DataStore - `__, - the format is: + `__ across + multiple `DataStore + `__, the + format is: ``projects/{project}/locations/{location}``. user_event (google.cloud.discoveryengine_v1beta.types.UserEvent): @@ -59,8 +59,8 @@ class WriteUserEventRequest(proto.Message): This field is a member of `oneof`_ ``_user_event``. write_async (bool): If set to true, the user event is written - asynchronously after validation, and the API - responds without waiting for the write. + asynchronously after validation, and the API responds + without waiting for the write. """ parent: str = proto.Field( @@ -86,25 +86,23 @@ class CollectUserEventRequest(proto.Message): Attributes: parent (str): - Required. The parent DataStore resource name, - such as + Required. The parent DataStore resource name, such as ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}``. user_event (str): - Required. URL encoded UserEvent proto with a - length limit of 2,000,000 characters. + Required. URL encoded UserEvent proto with a length + limit of 2,000,000 characters. uri (str): - The URL including cgi-parameters but - excluding the hash fragment with a length limit - of 5,000 characters. This is often more useful - than the referer URL, because many browsers only - send the domain for third-party requests. + The URL including cgi-parameters but excluding the + hash fragment with a length limit of 5,000 characters. + This is often more useful than the referer URL, because + many browsers only send the domain for third-party + requests. This field is a member of `oneof`_ ``_uri``. ets (int): - The event timestamp in milliseconds. This - prevents browser caching of otherwise identical - get requests. The name is abbreviated to reduce - the payload bytes. + The event timestamp in milliseconds. This prevents + browser caching of otherwise identical get requests. The + name is abbreviated to reduce the payload bytes. This field is a member of `oneof`_ ``_ets``. """