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..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,22 +226,24 @@ 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 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]): @@ -310,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): @@ -329,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``. """ @@ -389,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): @@ -414,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( @@ -581,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,13 +600,13 @@ class SearchResult(proto.Message): 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): @@ -616,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( @@ -640,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 3709ae87a66c..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,11 +31,13 @@ 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 @@ -95,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``. """ @@ -153,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): @@ -162,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): @@ -174,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. """ @@ -194,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. """ @@ -210,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( @@ -231,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): @@ -246,8 +246,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 @@ -310,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 @@ -340,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]): @@ -396,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): @@ -411,8 +411,8 @@ class DocumentMetadata(proto.Message): 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. + 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..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 @@ -32,7 +32,9 @@ 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 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..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( @@ -59,38 +57,41 @@ 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]. - Format: + `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. + 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. @@ -101,20 +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][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): - 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): @@ -123,30 +122,33 @@ 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 + `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. + fields of the documents being filtered. Filter + expression is case-sensitive. - If this field is unrecognizable, an ``INVALID_ARGUMENT`` is - returned. + 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 `__ + 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[ @@ -201,13 +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. + model. If not set, the default Assistant model will be + used. """ model_id: str = proto.Field( @@ -247,7 +250,8 @@ class GenerationSpec(proto.Message): class StreamAssistResponse(proto.Message): r"""Response for the - [AssistantService.StreamAssist][google.cloud.discoveryengine.v1.AssistantService.StreamAssist] + `AssistantService.StreamAssist + `__ method. Attributes: @@ -255,28 +259,31 @@ class StreamAssistResponse(proto.Message): 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] + `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. + 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. + 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): - 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): @@ -287,6 +294,7 @@ class SessionInfo(proto.Message): 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..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 @@ -37,7 +37,9 @@ 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 @@ -45,42 +47,44 @@ class Chunk(proto.Message): 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 - [SearchResponse][google.cloud.discoveryengine.v1.SearchResponse]. + 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. + 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. + 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): @@ -98,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): @@ -107,9 +111,10 @@ 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 + Data representation. + The structured JSON data for the document. It should + conform to the registered `Schema + `__ or an ``INVALID_ARGUMENT`` error is thrown. """ @@ -148,23 +153,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]. + `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]. + `SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks + `__. This field is only populated on - [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] + `SearchService.Search + `__ API. """ @@ -184,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( @@ -202,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 378cd38ad0b7..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( @@ -66,14 +65,16 @@ class GetCmekConfigRequest(proto.Message): Attributes: 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. + `CmekConfig + `__, + regardless of whether or not it exists, a + PERMISSION_DENIED error is returned. """ name: str = proto.Field( @@ -87,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}``. """ @@ -99,35 +100,35 @@ 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): 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 ``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): - 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): @@ -223,7 +224,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. @@ -231,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( @@ -249,7 +251,8 @@ class UpdateCmekConfigMetadata(proto.Message): class ListCmekConfigsRequest(proto.Message): r"""Request message for - [CmekConfigService.ListCmekConfigs][google.cloud.discoveryengine.v1.CmekConfigService.ListCmekConfigs] + `CmekConfigService.ListCmekConfigs + `__ method. Attributes: @@ -258,9 +261,10 @@ class ListCmekConfigsRequest(proto.Message): ``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 +275,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,13 +295,15 @@ 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 + `CmekConfig + `__ to delete, such as ``projects/{project}/locations/{location}/cmekConfigs/{cmek_config}``. """ @@ -308,7 +316,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. @@ -316,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 ee09c5fad591..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 @@ -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 @@ -106,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): @@ -190,33 +192,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]. + r"""A custom attribute that is not explicitly modeled in a resource, 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,35 +241,36 @@ 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. + 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] + `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. - Europe/Budapest. + Optional. IANA time zone, e.g. Europe/Budapest. """ user_id: str = proto.Field( @@ -305,23 +313,26 @@ 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): - 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``. """ @@ -350,16 +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. + 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( @@ -373,21 +384,21 @@ 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][google.cloud.discoveryengine.v1.Document] the - user wants to promote. For site search, leave unset and only + 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. @@ -395,10 +406,9 @@ class SearchLinkPromotion(proto.Message): 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 f7f45960f38e..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): @@ -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 @@ -81,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): @@ -95,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 d4c75d5e46c4..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 @@ -30,65 +30,70 @@ 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 - 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( @@ -115,20 +120,21 @@ class CompleteQueryRequest(proto.Message): class CompleteQueryResponse(proto.Message): r"""Response message for - [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1.CompletionService.CompleteQuery] + `CompletionService.CompleteQuery + `__ method. 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. + 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): @@ -138,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 8d8b1e4a4bf0..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,25 +32,27 @@ 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]): - 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. 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 - [Condition.query_terms][google.cloud.discoveryengine.v1.Condition.query_terms] + `Condition.query_terms + `__ is set. Only supported for Basic Site Search promotion serving controls. """ @@ -62,12 +64,13 @@ 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. + Whether the search query needs to exactly match the + query term. """ value: str = proto.Field( @@ -122,9 +125,9 @@ 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``. @@ -150,48 +153,50 @@ 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][google.cloud.discoveryengine.v1.ServingConfig] - IDs this control is attached to. May take up to 10 minutes + `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. + 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. + 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): @@ -206,24 +211,24 @@ 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. @@ -236,51 +241,54 @@ class BoostAction(proto.Message): 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 however, - attribute_value = (time.now() - datetime_field_value). + 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): 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 @@ -302,22 +310,24 @@ 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): 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 + Optional. The value between -1 to 1 by which to boost + the score if the attribute_value evaluates to the value specified above. """ @@ -384,14 +394,14 @@ 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. @@ -412,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( @@ -426,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( @@ -447,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 b32fe3220982..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,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,11 +79,13 @@ 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. """ @@ -119,7 +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}`` """ @@ -135,24 +140,24 @@ 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. 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( @@ -180,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 d12fbaea8277..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 @@ -51,7 +51,8 @@ class ConverseConversationRequest(proto.Message): r"""Request message for - [ConversationalSearchService.ConverseConversation][google.cloud.discoveryengine.v1.ConversationalSearchService.ConverseConversation] + `ConversationalSearchService.ConverseConversation + `__ method. Attributes: @@ -61,71 +62,79 @@ class ConverseConversationRequest(proto.Message): ``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: ``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. - - 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. + * 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. + 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. + 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. + 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 `__ + 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 `__ + information on boosting, see `Boosting + `__ """ name: str = proto.Field( @@ -175,7 +184,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 +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. @@ -236,10 +247,12 @@ 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] - 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. """ @@ -261,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}`` """ @@ -294,29 +307,36 @@ 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. + 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. - 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: - - ``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( @@ -348,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 @@ -369,13 +389,14 @@ 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``. @@ -390,8 +411,8 @@ class AnswerQueryRequest(proto.Message): mode. We support auto session mode: users can use the wildcard - symbol ``-`` as session ID. A new ID will be automatically - generated and assigned. + 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 +426,82 @@ 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 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. + * 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. + 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,16 +580,16 @@ 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. + 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): @@ -604,38 +634,39 @@ class AnswerGenerationSpec(proto.Message): 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. + `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. + 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. + 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. + 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): @@ -643,14 +674,15 @@ class AnswerGenerationSpec(proto.Message): 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. + 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): @@ -658,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( @@ -749,49 +780,52 @@ class SearchParams(proto.Message): 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. + 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. + 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 `__ + 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 `__ + 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. + 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 `__ + 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 - 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 - 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( @@ -864,16 +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): @@ -883,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( @@ -898,9 +932,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 +955,8 @@ class ExtractiveSegment(proto.Message): class ExtractiveAnswer(proto.Message): r"""Extractive answer. - `Guide `__ + `Guide + `__ Attributes: page_identifier (str): @@ -981,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): @@ -1064,8 +1099,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): @@ -1122,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): @@ -1131,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): @@ -1217,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): @@ -1327,22 +1360,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] - to fetch answer information using - [ConversationalSearchService.GetAnswer][google.cloud.discoveryengine.v1.ConversationalSearchService.GetAnswer] + `Answer.name + `__ 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][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 +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}`` """ @@ -1384,7 +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. @@ -1409,10 +1450,11 @@ 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. """ @@ -1450,11 +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( @@ -1473,11 +1516,11 @@ 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. @@ -1485,34 +1528,43 @@ class ListSessionsRequest(proto.Message): 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"". + * ``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: - - ``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( @@ -1544,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 d4eacc8b57c8..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,9 +33,10 @@ 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 @@ -45,11 +46,10 @@ class CustomTuningModel(proto.Message): 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 + 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]): 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..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,13 +37,14 @@ 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 @@ -55,102 +56,117 @@ class DataStore(proto.Message): 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][google.cloud.discoveryengine.v1.DataStore.industry_vertical]: + 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.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]. + `ContentConfig.NO_CONTENT + `__. create_time (google.protobuf.timestamp_pb2.Timestamp): Output only. Timestamp the - [DataStore][google.cloud.discoveryengine.v1.DataStore] was + `DataStore + `__ 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. + 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][google.cloud.discoveryengine.v1.DataStore] has - ACL information. If set to ``true``, the source data must + `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] + `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. 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: + 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 +178,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 @@ -185,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): @@ -316,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``. """ @@ -340,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): @@ -349,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 6415db9c91d7..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 @@ -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). @@ -52,48 +53,50 @@ 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): 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 + Required. The `DataStore + `__ to create. 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 + 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. + 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 +137,26 @@ 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 requested - [DataStore][google.cloud.discoveryengine.v1.DataStore] does - not exist, a NOT_FOUND error is returned. + `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. """ name: str = proto.Field( @@ -162,7 +167,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. @@ -170,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( @@ -188,7 +194,8 @@ class CreateDataStoreMetadata(proto.Message): class ListDataStoresRequest(proto.Message): r"""Request message for - [DataStoreService.ListDataStores][google.cloud.discoveryengine.v1.DataStoreService.ListDataStores] + `DataStoreService.ListDataStores + `__ method. Attributes: @@ -197,30 +204,37 @@ class ListDataStoresRequest(proto.Message): ``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 + `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] + `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 + `__ + 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 +257,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 +290,26 @@ 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 - [DataStore][google.cloud.discoveryengine.v1.DataStore] to - delete does not exist, a NOT_FOUND error is returned. + `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. """ name: str = proto.Field( @@ -302,26 +320,29 @@ 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 + 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 - [DataStore][google.cloud.discoveryengine.v1.DataStore] to - update does not exist, a NOT_FOUND error is returned. + `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 + `DataStore + `__ to update. If an unsupported or unknown field is provided, an @@ -342,7 +363,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. @@ -350,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 aa775043afc9..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,21 +45,23 @@ 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 + 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 + 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 @@ -67,44 +69,47 @@ class Document(proto.Message): 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. + 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,8 +124,8 @@ 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). + 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 @@ -133,35 +138,45 @@ class Content(proto.Message): 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. + 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. @@ -193,21 +208,64 @@ 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. - 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]): @@ -240,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 319afeb26b8d..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,43 +29,48 @@ 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. 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: - - ``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. + * ``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): @@ -90,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. """ @@ -114,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. @@ -130,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): @@ -148,12 +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( @@ -170,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`` + * ``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 6a4718de16f0..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 @@ -40,24 +40,24 @@ class GetDocumentRequest(proto.Message): r"""Request message for - [DocumentService.GetDocument][google.cloud.discoveryengine.v1.DocumentService.GetDocument] - method. + `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], + `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 +68,45 @@ 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 ``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. - 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. - - If this field is negative, an ``INVALID_ARGUMENT`` error is + `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. + + 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] + `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 + `__ + must match the call that provided the page token. + Otherwise, an ``INVALID_ARGUMENT`` error is returned. """ parent: str = proto.Field( @@ -119,17 +125,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 +158,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,29 +167,29 @@ 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 - create. + 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]. + `Document `__, + which becomes the final component of the + `Document.name + `__. If the caller does not have permission to create the - [Document][google.cloud.discoveryengine.v1.Document], + `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]. + `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 + This field must conform to `RFC-1034 + `__ standard with a + length limit of 128 characters. Otherwise, an ``INVALID_ARGUMENT`` error is returned. """ @@ -200,7 +210,8 @@ class CreateDocumentRequest(proto.Message): class UpdateDocumentRequest(proto.Message): r"""Request message for - [DocumentService.UpdateDocument][google.cloud.discoveryengine.v1.DocumentService.UpdateDocument] + `DocumentService.UpdateDocument + `__ method. Attributes: @@ -208,24 +219,26 @@ class UpdateDocumentRequest(proto.Message): Required. The document to update/create. If the caller does not have permission to update the - [Document][google.cloud.discoveryengine.v1.Document], + `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 + `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( @@ -246,23 +259,25 @@ 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], + `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,7 +288,8 @@ class DeleteDocumentRequest(proto.Message): class BatchGetDocumentsMetadataRequest(proto.Message): r"""Request message for - [DocumentService.BatchGetDocumentsMetadata][google.cloud.discoveryengine.v1.DocumentService.BatchGetDocumentsMetadata] + `DocumentService.BatchGetDocumentsMetadata + `__ method. Attributes: @@ -282,12 +298,13 @@ class BatchGetDocumentsMetadataRequest(proto.Message): ``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 +317,14 @@ 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,9 +334,9 @@ class FhirMatcher(proto.Message): ) class Matcher(proto.Message): - r"""Matcher for the - [Document][google.cloud.discoveryengine.v1.Document]s. Currently - supports matching by exact URIs. + r"""Matcher for the `Document + `__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. @@ -364,31 +382,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 +420,33 @@ 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]. + `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 +458,12 @@ 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..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 @@ -32,7 +32,7 @@ class Engine(proto.Message): r"""Metadata that describes the training and serving parameters of an - [Engine][google.cloud.discoveryengine.v1.Engine]. + `Engine `__. This message has `oneof`_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. @@ -44,96 +44,106 @@ 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]. + `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]. + `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. - + 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 - 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. 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. + 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): @@ -143,11 +153,12 @@ 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,12 +180,13 @@ 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``, ``others-you-may-like``, ``more-like-this``, @@ -183,14 +195,16 @@ class MediaRecommendationEngineConfig(proto.Message): 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`` @@ -198,22 +212,22 @@ class MediaRecommendationEngineConfig(proto.Message): 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) - (e.g., 0.5). + 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. """ @@ -241,8 +255,8 @@ class OptimizationObjectiveConfig(proto.Message): 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( @@ -289,20 +303,21 @@ 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``, ``generic``. + 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( @@ -311,15 +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( @@ -361,78 +377,84 @@ class ChatEngineConfig(proto.Message): 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] + 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 + 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/``. + 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] + 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] + `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] - API after engine creation. + 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: 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 `__ + 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., 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( @@ -473,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( @@ -492,8 +514,8 @@ class ChatEngineMetadata(proto.Message): 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..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 @@ -40,26 +40,26 @@ class CreateEngineRequest(proto.Message): r"""Request for - [EngineService.CreateEngine][google.cloud.discoveryengine.v1.EngineService.CreateEngine] - method. + `EngineService.CreateEngine + `__ method. Attributes: parent (str): 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 + `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 + This field must conform to `RFC-1034 + `__ standard with a + length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned. """ @@ -80,7 +80,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. @@ -88,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( @@ -106,22 +107,24 @@ class CreateEngineMetadata(proto.Message): class DeleteEngineRequest(proto.Message): r"""Request message for - [EngineService.DeleteEngine][google.cloud.discoveryengine.v1.EngineService.DeleteEngine] - method. + `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. + `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 +135,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. @@ -140,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( @@ -158,13 +162,14 @@ class DeleteEngineMetadata(proto.Message): class GetEngineRequest(proto.Message): r"""Request message for - [EngineService.GetEngine][google.cloud.discoveryengine.v1.EngineService.GetEngine] - method. + `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,8 +181,8 @@ class GetEngineRequest(proto.Message): class ListEnginesRequest(proto.Message): r"""Request message for - [EngineService.ListEngines][google.cloud.discoveryengine.v1.EngineService.ListEngines] - method. + `EngineService.ListEngines + `__ method. Attributes: parent (str): @@ -189,6 +194,7 @@ class ListEnginesRequest(proto.Message): Optional. Not supported. filter (str): Optional. Filter by solution type. For example: + solution_type=SOLUTION_TYPE_SEARCH """ @@ -212,13 +218,13 @@ class ListEnginesRequest(proto.Message): class ListEnginesResponse(proto.Message): r"""Response message for - [EngineService.ListEngines][google.cloud.discoveryengine.v1.EngineService.ListEngines] - method. + `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,24 +246,25 @@ def raw_page(self): class UpdateEngineRequest(proto.Message): r"""Request message for - [EngineService.UpdateEngine][google.cloud.discoveryengine.v1.EngineService.UpdateEngine] - method. + `EngineService.UpdateEngine + `__ method. Attributes: engine (google.cloud.discoveryengine_v1.types.Engine): - Required. The - [Engine][google.cloud.discoveryengine.v1.Engine] to update. - + Required. The `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. + `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. + 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.v1.Engine] to update. + `Engine `__ to + update. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned. 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..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,16 +35,14 @@ 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. + 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. """ @@ -79,8 +77,8 @@ 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): @@ -88,18 +86,17 @@ class GenerateGroundedContentRequest(proto.Message): 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): @@ -107,24 +104,29 @@ class GenerateGroundedContentRequest(proto.Message): 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. - - 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. + * Keys must start with a lowercase letter or + international character. See `Google Cloud - Document `__ + Document + `__ for more details. """ @@ -139,40 +141,40 @@ class GenerationSpec(proto.Message): generation. language_code (str): Language code for content. Use language tags defined by - `BCP47 `__. + `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``. """ @@ -237,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``. """ @@ -290,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``. """ @@ -320,9 +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[ @@ -346,20 +345,22 @@ 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. - 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. 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. + If set, safe search is enabled in Vertex AI Search + requests. """ serving_config: str = proto.Field( @@ -395,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( @@ -495,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): @@ -508,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. """ @@ -596,22 +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 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``. """ 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): @@ -639,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( @@ -662,17 +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. + 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``. """ @@ -700,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): @@ -834,17 +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 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): - 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``. """ @@ -863,16 +859,18 @@ 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 - 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. @@ -881,24 +879,29 @@ class CheckGroundingRequest(proto.Message): 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. - - 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. + * Keys must start with a lowercase letter or + international character. See `Google Cloud - Document `__ + Document + `__ for more details. """ @@ -929,7 +932,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. @@ -937,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): @@ -962,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( @@ -978,56 +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. + 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 + 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] + `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..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 @@ -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( @@ -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 9d8d066786de..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,26 +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. 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. + 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. @@ -72,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. @@ -84,23 +84,27 @@ 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): - 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 1cce182f70d0..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 @@ -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. @@ -57,29 +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 ``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( @@ -111,12 +110,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: + ``projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`` """ @@ -128,12 +129,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,20 +148,22 @@ 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 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}`` """ @@ -167,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[ @@ -193,12 +198,13 @@ 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]): - 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( @@ -210,46 +216,58 @@ 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 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: + 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``. """ @@ -259,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[ @@ -294,26 +311,27 @@ 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: + ``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. + ``ListIdentityMappings`` must match the call that + provided the page token. """ identity_mapping_store: str = proto.Field( @@ -332,15 +350,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,21 +381,23 @@ 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 - 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 @@ -399,15 +420,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,20 +451,22 @@ 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): - 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( @@ -461,7 +485,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. @@ -469,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 8aa69e0939e7..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,44 +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. 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,52 +123,53 @@ class BigQuerySource(proto.Message): Attributes: partition_date (google.type.date_pb2.Date): - BigQuery time partitioned table's \_PARTITIONDATE in + 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. 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( @@ -197,23 +205,23 @@ 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 + `__. """ project_id: str = proto.Field( @@ -239,25 +247,27 @@ 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][a-zA-Z0-9-_]*``. + 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): - 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: @@ -308,28 +318,29 @@ 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. + 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 - 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( @@ -359,29 +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][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. + * ``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( @@ -420,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( @@ -461,31 +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. 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. + 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. + ``resource_types``. It should be used after initial + import. """ fhir_store: str = proto.Field( @@ -511,33 +522,32 @@ 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 `__. + `here + `__. """ project_id: str = proto.Field( @@ -571,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( @@ -630,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( @@ -679,9 +685,9 @@ 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. + 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``. """ @@ -721,14 +727,12 @@ class ImportUserEventsRequest(proto.Message): 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]): @@ -774,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( @@ -814,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( @@ -853,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. """ @@ -950,99 +949,126 @@ class ImportDocumentsRequest(proto.Message): ``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][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. + 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 + `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 - have to be specified using - [id_field][google.cloud.discoveryengine.v1.ImportDocumentsRequest.id_field], + 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 + `__, 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, + 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. + `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. 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 + 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): @@ -1061,14 +1087,13 @@ 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][google.cloud.discoveryengine.v1.Document.id]. + document must have a valid `Document.id + `__. Recommended max of 100 items. """ @@ -1167,18 +1192,19 @@ 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]): - 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( @@ -1195,7 +1221,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 +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 + 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/*. """ @@ -1233,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[ @@ -1265,16 +1292,16 @@ class InlineSource(proto.Message): class ImportSuggestionDenyListEntriesResponse(proto.Message): r"""Response message for - [CompletionService.ImportSuggestionDenyListEntries][google.cloud.discoveryengine.v1.CompletionService.ImportSuggestionDenyListEntries] + `CompletionService.ImportSuggestionDenyListEntries + `__ method. 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. @@ -1297,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( @@ -1322,7 +1349,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,14 +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): @@ -1361,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[ @@ -1404,18 +1432,19 @@ class InlineSource(proto.Message): class ImportCompletionSuggestionsResponse(proto.Message): r"""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. + `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. 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( @@ -1431,23 +1460,25 @@ 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][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..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,22 @@ 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][google.cloud.discoveryengine.v1.Project.ServiceTerms]. + ``id`` of `ServiceTerms + `__. """ class ServiceTerms(proto.Message): @@ -57,28 +57,30 @@ 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 - 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 77670cbe94f3..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 @@ -30,25 +30,27 @@ 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..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,45 +48,65 @@ 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.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 - 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( @@ -104,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( @@ -121,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( @@ -167,9 +186,9 @@ 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. + 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 +202,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,37 +215,39 @@ 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): - 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 ``*`` (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. + 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: @@ -274,19 +296,20 @@ class InlineSource(proto.Message): class PurgeDocumentsResponse(proto.Message): r"""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. + `DocumentService.PurgeDocuments + `__ + 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. + 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( @@ -300,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( @@ -347,13 +369,14 @@ 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,16 +388,16 @@ class PurgeSuggestionDenyListEntriesRequest(proto.Message): class PurgeSuggestionDenyListEntriesResponse(proto.Message): r"""Response message for - [CompletionService.PurgeSuggestionDenyListEntries][google.cloud.discoveryengine.v1.CompletionService.PurgeSuggestionDenyListEntries] + `CompletionService.PurgeSuggestionDenyListEntries + `__ method. 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( @@ -390,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( @@ -415,13 +438,14 @@ 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,16 +457,17 @@ class PurgeCompletionSuggestionsRequest(proto.Message): class PurgeCompletionSuggestionsResponse(proto.Message): r"""Response message for - [CompletionService.PurgeCompletionSuggestions][google.cloud.discoveryengine.v1.CompletionService.PurgeCompletionSuggestions] + `CompletionService.PurgeCompletionSuggestions + `__ method. 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( @@ -457,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 523aabfa5335..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,30 +31,35 @@ class RankingRecord(proto.Message): r"""Record message for - [RankService.Rank][google.cloud.discoveryengine.v1.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.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 - 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( @@ -77,56 +82,60 @@ class RankingRecord(proto.Message): class RankRequest(proto.Message): r"""Request message for - [RankService.Rank][google.cloud.discoveryengine.v1.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: - - ``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 - 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. - - 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. + * 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,7 +173,7 @@ class RankRequest(proto.Message): class RankResponse(proto.Message): r"""Response message for - [RankService.Rank][google.cloud.discoveryengine.v1.RankService.Rank] + `RankService.Rank `__ method. Attributes: 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..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 @@ -38,135 +38,160 @@ 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 + 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 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][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 + `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][google.cloud.discoveryengine.v1.UserEvent.user_pseudo_id] + 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 - 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: - - - (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] + 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. - - 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. + * Keys must start with a lowercase letter or + international character. See `Requirements for - labels `__ + labels + `__ for more details. """ @@ -209,42 +234,47 @@ 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][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. + 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. """ 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): 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/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_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/schema_service.py index a54f02bcbd97..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 @@ -40,8 +40,8 @@ class GetSchemaRequest(proto.Message): r"""Request message for - [SchemaService.GetSchema][google.cloud.discoveryengine.v1.SchemaService.GetSchema] - method. + `SchemaService.GetSchema + `__ method. Attributes: name (str): @@ -58,32 +58,34 @@ class GetSchemaRequest(proto.Message): class ListSchemasRequest(proto.Message): r"""Request message for - [SchemaService.ListSchemas][google.cloud.discoveryengine.v1.SchemaService.ListSchemas] - method. + `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 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. page_token (str): A page token, received from a previous - [SchemaService.ListSchemas][google.cloud.discoveryengine.v1.SchemaService.ListSchemas] + `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] + `SchemaService.ListSchemas + `__ must match the call that provided the page token. """ @@ -103,17 +105,19 @@ class ListSchemasRequest(proto.Message): class ListSchemasResponse(proto.Message): r"""Response message for - [SchemaService.ListSchemas][google.cloud.discoveryengine.v1.SchemaService.ListSchemas] - method. + `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 +137,27 @@ def raw_page(self): class CreateSchemaRequest(proto.Message): r"""Request message for - [SchemaService.CreateSchema][google.cloud.discoveryengine.v1.SchemaService.CreateSchema] - method. + `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,18 +177,18 @@ class CreateSchemaRequest(proto.Message): class UpdateSchemaRequest(proto.Message): r"""Request message for - [SchemaService.UpdateSchema][google.cloud.discoveryengine.v1.SchemaService.UpdateSchema] - method. + `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. + If set to true, and the `Schema + `__ is not + found, a new `Schema + `__ is created. In this situation, ``update_mask`` is ignored. """ @@ -200,8 +205,8 @@ class UpdateSchemaRequest(proto.Message): class DeleteSchemaRequest(proto.Message): r"""Request message for - [SchemaService.DeleteSchema][google.cloud.discoveryengine.v1.SchemaService.DeleteSchema] - method. + `SchemaService.DeleteSchema + `__ method. Attributes: name (str): @@ -223,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( @@ -246,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( @@ -269,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 0bbbbac3121a..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 @@ -35,13 +35,13 @@ class SearchRequest(proto.Message): r"""Request message for - [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] - method. + `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``. @@ -51,60 +51,64 @@ class SearchRequest(proto.Message): 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 + 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] + `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 + `__ + 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 + 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][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 @@ -112,225 +116,226 @@ class SearchRequest(proto.Message): documents being filtered. Filter expression is case-sensitive. - If this field is unrecognizable, an ``INVALID_ARGUMENT`` is - returned. + 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 `__ + 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 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. + 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. + 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 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. + 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. - + 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: - - ``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 - 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``. 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. + 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. + + * 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. - - 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 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] + `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. 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,80 +344,43 @@ 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. """ 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): @@ -457,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``. """ @@ -471,29 +439,32 @@ 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][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 +492,85 @@ 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 + 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. + `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. + 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. + 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. + 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 + * "rating", enable_dynamic_position = true - - "price", enable_dynamic_position = false + * "price", enable_dynamic_position = false - - "brands", 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. + 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): @@ -603,59 +579,62 @@ 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. + `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. + 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. Allowed values are: - - "count desc", which means order by - [SearchResponse.Facet.values.count][google.cloud.discoveryengine.v1.SearchResponse.Facet.FacetValue.count] - descending. + * "count desc", which means order by + `SearchResponse.Facet.values.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. + * "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 `__; + order + `__; numerical intervals are sorted in the order given by - [FacetSpec.FacetKey.intervals][google.cloud.discoveryengine.v1.SearchRequest.FacetSpec.FacetKey.intervals]. + `FacetSpec.FacetKey.intervals + `__. """ key: str = proto.Field( @@ -711,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): @@ -724,90 +702,97 @@ 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 - ranking, but it is not blocked out completely. + 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. + 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 = + 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. + 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): 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 @@ -829,22 +814,25 @@ 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): 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( @@ -901,34 +889,34 @@ 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][google.cloud.discoveryengine.v1.SearchRequest.QueryExpansionSpec.Condition.DISABLED]. + 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): - 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,25 +941,28 @@ 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): - r"""Enum describing under which mode spell correction should - occur. + r"""Enum describing under which mode spell correction should occur. 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 @@ -988,8 +979,7 @@ 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): @@ -999,22 +989,24 @@ class ContentSearchSpec(proto.Message): 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] + `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 +1014,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 @@ -1031,15 +1025,14 @@ 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. @@ -1064,25 +1057,27 @@ 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. + 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] + 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. @@ -1090,82 +1085,84 @@ class SummarySpec(proto.Message): 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. + 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. + 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. + 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. + 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. + 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. + `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): @@ -1173,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( @@ -1192,15 +1188,18 @@ 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( @@ -1254,55 +1253,61 @@ 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 ``max_extractive_answer_count``. + ``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] + `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_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. + 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. @@ -1332,21 +1337,21 @@ 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] + `SearchRequest.ContentSearchSpec.search_result_mode + `__ is set to - [CHUNKS][google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS] + `CHUNKS + `__ 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( @@ -1391,19 +1396,21 @@ 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): - 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): 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): @@ -1430,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): @@ -1460,10 +1467,9 @@ 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 @@ -1473,32 +1479,39 @@ class SessionSpec(proto.Message): 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 + 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. + 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. @@ -1521,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( @@ -1676,58 +1689,65 @@ class RelevanceScoreSpec(proto.Message): class SearchResponse(proto.Message): r"""Response message for - [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] - method. + `SearchService.Search + `__ 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][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 + `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. + 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] + `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 - results. + Query expansion information for the returned results. session_info (google.cloud.discoveryengine_v1.types.SearchResponse.SessionInfo): Session information. Only set if - [SearchRequest.session][google.cloud.discoveryengine.v1.SearchRequest.session] + `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,23 +1758,24 @@ 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. 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. + 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): @@ -1776,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): @@ -1805,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( @@ -1898,7 +1918,8 @@ class Facet(proto.Message): 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]. + `SearchRequest.FacetSpec.FacetKey.key + `__. values (MutableSequence[google.cloud.discoveryengine_v1.types.SearchResponse.Facet.FacetValue]): The facet values for this field. dynamic_facet (bool): @@ -1917,14 +1938,15 @@ 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 + 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]. + [SearchRequest.FacetSpec.FacetKey.intervals + `__. This field is a member of `oneof`_ ``facet_value``. count (int): @@ -1964,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. """ @@ -1992,14 +2013,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 +2051,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 +2064,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): @@ -2063,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( @@ -2107,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]): @@ -2155,15 +2177,16 @@ 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.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. 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): @@ -2259,17 +2282,17 @@ 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 - [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,19 +2310,20 @@ 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 - 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 c054af1613aa..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 @@ -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. @@ -90,16 +93,16 @@ class TrainCustomModelRequest(proto.Message): data_store (str): 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. """ @@ -109,38 +112,41 @@ 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 + 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, + 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 + 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). + ``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: + 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`` + * ``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 + 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. """ @@ -188,34 +194,36 @@ class GcsTrainingInput(proto.Message): class TrainCustomModelResponse(proto.Message): r"""Response of the - [TrainCustomModelRequest][google.cloud.discoveryengine.v1.TrainCustomModelRequest]. - This message is returned by the - google.longrunning.Operations.response field. + `TrainCustomModelRequest + `__. 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. - - **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): - Fully qualified name of the - CustomTuningModel. + Fully qualified name of the CustomTuningModel. """ error_samples: MutableSequence[status_pb2.Status] = proto.RepeatedField( @@ -244,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 a8e4f0566f16..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,86 +49,89 @@ 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. 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). - - Required when - [SolutionType][google.cloud.discoveryengine.v1.SolutionType] - is - [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. + 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 + `__. 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.v1.SolutionType] - is - [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. + `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 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 }; + * 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): @@ -136,66 +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. + 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. + 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 - 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]): @@ -205,22 +214,23 @@ 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. @@ -237,32 +247,32 @@ class MediaConfig(proto.Message): 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: + 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. 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( @@ -289,16 +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 a98b56d80234..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 @@ -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] - 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. """ 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..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,34 +82,37 @@ 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][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 - 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 d9e98efc17a5..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,38 +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. 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 + 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 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. 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. """ @@ -95,9 +93,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): @@ -160,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( @@ -225,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. """ 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..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 @@ -66,19 +66,21 @@ 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. + [SiteSearchEngine], regardless of whether or not it + exists, a PERMISSION_DENIED error is returned. """ name: str = proto.Field( @@ -89,18 +91,19 @@ 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], - such as + `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 + Required. The `TargetSite + `__ to create. """ @@ -117,7 +120,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. @@ -125,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( @@ -143,7 +147,8 @@ class CreateTargetSiteMetadata(proto.Message): class BatchCreateTargetSitesRequest(proto.Message): r"""Request message for - [SiteSearchEngineService.BatchCreateTargetSites][google.cloud.discoveryengine.v1.SiteSearchEngineService.BatchCreateTargetSites] + `SiteSearchEngineService.BatchCreateTargetSites + `__ method. Attributes: @@ -155,8 +160,8 @@ class BatchCreateTargetSitesRequest(proto.Message): 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( @@ -172,24 +177,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], - such as + `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. + `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. """ name: str = proto.Field( @@ -200,19 +207,21 @@ 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 + 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. """ @@ -225,7 +234,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. @@ -233,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( @@ -251,24 +261,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], - such as + `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. + `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. """ name: str = proto.Field( @@ -279,7 +291,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. @@ -287,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( @@ -305,34 +318,38 @@ 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. 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. + 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. + ``ListTargetSites`` must match the call that provided + the page token. """ parent: str = proto.Field( @@ -351,20 +368,20 @@ 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 - response. + The total number of items matching the request. + This will always be populated in the response. """ @property @@ -390,7 +407,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. @@ -398,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( @@ -416,7 +434,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,19 +454,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 - create. + Required. The `Sitemap + `__ to create. """ parent: str = proto.Field( @@ -463,22 +483,24 @@ 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. + `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 + If the requested `Sitemap + `__ does not exist, a NOT_FOUND error is returned. """ @@ -490,30 +512,34 @@ 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 + 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,7 +548,7 @@ class UrisMatcher(proto.Message): ) class Matcher(proto.Message): - r"""Matcher for the [Sitemap][google.cloud.discoveryengine.v1.Sitemap]s. + r"""Matcher for the `Sitemap `__s. Currently only supports uris matcher. @@ -555,7 +581,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. @@ -563,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( @@ -581,7 +608,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. @@ -589,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( @@ -607,22 +635,24 @@ 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 - fetched. + 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 +670,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 +691,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 +700,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. @@ -675,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( @@ -693,13 +727,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 +748,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 +757,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. @@ -728,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( @@ -746,20 +784,22 @@ 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 + 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,15 +821,15 @@ 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``. 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): @@ -800,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): @@ -870,7 +909,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. @@ -878,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( @@ -969,7 +1005,8 @@ class RecrawlUrisMetadata(proto.Message): class BatchVerifyTargetSitesRequest(proto.Message): r"""Request message for - [SiteSearchEngineService.BatchVerifyTargetSites][google.cloud.discoveryengine.v1.SiteSearchEngineService.BatchVerifyTargetSites] + `SiteSearchEngineService.BatchVerifyTargetSites + `__ method. Attributes: @@ -987,7 +1024,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 +1033,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. @@ -1003,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( @@ -1021,7 +1060,8 @@ class BatchVerifyTargetSitesMetadata(proto.Message): class FetchDomainVerificationStatusRequest(proto.Message): r"""Request message for - [SiteSearchEngineService.FetchDomainVerificationStatus][google.cloud.discoveryengine.v1.SiteSearchEngineService.FetchDomainVerificationStatus] + `SiteSearchEngineService.FetchDomainVerificationStatus + `__ method. Attributes: @@ -1031,9 +1071,9 @@ class FetchDomainVerificationStatusRequest(proto.Message): ``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. 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. @@ -1043,8 +1083,8 @@ class FetchDomainVerificationStatusRequest(proto.Message): retrieve the subsequent page. When paginating, all other parameters provided to - ``FetchDomainVerificationStatus`` must match the call that - provided the page token. + ``FetchDomainVerificationStatus`` must match the call + that provided the page token. """ site_search_engine: str = proto.Field( @@ -1063,21 +1103,21 @@ class FetchDomainVerificationStatusRequest(proto.Message): class FetchDomainVerificationStatusResponse(proto.Message): r"""Response message for - [SiteSearchEngineService.FetchDomainVerificationStatus][google.cloud.discoveryengine.v1.SiteSearchEngineService.FetchDomainVerificationStatus] + `SiteSearchEngineService.FetchDomainVerificationStatus + `__ method. 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 4bed1bf502f0..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): @@ -49,117 +48,128 @@ 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] + `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. + 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] + `UserEvent.event_type + `__ is not ``conversion``. This mixes the custom conversion - event with predefined events like ``search``, ``view-item`` - etc. + 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. + 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. + 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. - 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] - resource full name, of the form + 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. + `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] + `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). + 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]. + `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. + 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 @@ -167,30 +177,36 @@ class UserEvent(proto.Message): 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. + 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] + * `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][google.cloud.discoveryengine.v1.RecommendResponse.attribution_token] + `RecommendResponse.attribution_token + `__ to this field. filter (str): The filter syntax consists of an expression language for @@ -198,103 +214,115 @@ class UserEvent(proto.Message): documents being filtered. One example is for ``search`` events, the associated - [SearchRequest][google.cloud.discoveryengine.v1.SearchRequest] - may contain a filter expression in - [SearchRequest.filter][google.cloud.discoveryengine.v1.SearchRequest.filter] + `SearchRequest + `__ may + contain a filter expression in + `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], + 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] + `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. + 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. 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. + 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. + 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( @@ -406,46 +434,46 @@ 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 - together properly. + 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). + 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: + 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( @@ -476,41 +504,45 @@ 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. 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. + 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 @@ -539,16 +571,18 @@ 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): 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. """ @@ -569,61 +603,65 @@ 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: + 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] + * 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] + `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] + `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,50 +708,53 @@ class DocumentInfo(proto.Message): Attributes: id (str): - The [Document][google.cloud.discoveryengine.v1.Document] - resource ID. + The `Document + `__ resource + ID. This field is a member of `oneof`_ ``document_descriptor``. name (str): - The [Document][google.cloud.discoveryengine.v1.Document] - resource full name, of the form: + 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. + 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: - - ``add-to-cart`` - - ``purchase`` + * ``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 - [UserEvent.event_type][google.cloud.discoveryengine.v1.UserEvent.event_type] + `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. + were spent viewing a Document for the ``watch`` + conversion type. This field is a member of `oneof`_ ``_conversion_value``. """ @@ -764,22 +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 - [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``. 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( @@ -814,20 +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 - [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. - 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..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 @@ -37,26 +37,30 @@ 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] - level, the format is: + 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. 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( @@ -82,34 +86,37 @@ 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] - level, the format is: + 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. + 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 203b5ed77612..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): @@ -73,15 +70,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..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 @@ -38,16 +38,19 @@ 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. @@ -57,26 +60,28 @@ class ListUserLicensesRequest(proto.Message): subsequent page. When paginating, all other parameters provided to - ``ListUserLicenses`` must match the call that provided the - page token. + ``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 +104,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 +135,8 @@ def raw_page(self): class BatchUpdateUserLicensesRequest(proto.Message): r"""Request message for - [UserLicenseService.BatchUpdateUserLicenses][google.cloud.discoveryengine.v1.UserLicenseService.BatchUpdateUserLicenses] + `UserLicenseService.BatchUpdateUserLicenses + `__ method. @@ -136,29 +144,31 @@ 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 - [UserLicense.user_principal][google.cloud.discoveryengine.v1.UserLicense.user_principal]. + `UserLicense.user_principal + `__. update_mask (google.protobuf.field_mask_pb2.FieldMask): Optional. The list of fields to update. """ @@ -192,7 +202,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. @@ -200,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( @@ -231,15 +241,16 @@ class BatchUpdateUserLicensesMetadata(proto.Message): class BatchUpdateUserLicensesResponse(proto.Message): r"""Response message for - [UserLicenseService.BatchUpdateUserLicenses][google.cloud.discoveryengine.v1.UserLicenseService.BatchUpdateUserLicenses] + `UserLicenseService.BatchUpdateUserLicenses + `__ method. Attributes: 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/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..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 @@ -34,8 +34,9 @@ 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 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..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 @@ -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. + `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..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): @@ -481,13 +481,13 @@ class SearchResult(proto.Message): 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 b51af63286be..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 @@ -37,7 +37,9 @@ 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 @@ -45,21 +47,20 @@ class Chunk(proto.Message): 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][]. + 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. + 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): @@ -67,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): @@ -76,9 +77,10 @@ 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 + Data representation. + The structured JSON data for the document. It should + conform to the registered `Schema + `__ or an ``INVALID_ARGUMENT`` error is thrown. """ @@ -117,23 +119,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.v1alpha.SearchService.Search] - API. + `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]. + `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]. + `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..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 @@ -33,22 +33,23 @@ class GetChunkRequest(proto.Message): r"""Request message for - [ChunkService.GetChunk][google.cloud.discoveryengine.v1alpha.ChunkService.GetChunk] - method. + `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], + `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 + If the requested `Chunk + `__ does not exist, a ``NOT_FOUND`` error is returned. """ @@ -60,7 +61,8 @@ class GetChunkRequest(proto.Message): class ListChunksRequest(proto.Message): r"""Request message for - [ChunkService.ListChunks][google.cloud.discoveryengine.v1alpha.ChunkService.ListChunks] + `ChunkService.ListChunks + `__ method. Attributes: @@ -69,28 +71,33 @@ class ListChunksRequest(proto.Message): ``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. - 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 + `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. + + 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] + `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 + `__ + must match the call that provided the page token. + Otherwise, an ``INVALID_ARGUMENT`` error is returned. """ parent: str = proto.Field( @@ -109,17 +116,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..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 @@ -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 @@ -109,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): @@ -213,33 +215,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.v1alpha.UserEvent]. + r"""A custom attribute that is not explicitly modeled in a resource, 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 +264,33 @@ 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. + 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] + `UserEventService.CollectUserEvent + `__ or if - [UserEvent.direct_user_request][google.cloud.discoveryengine.v1alpha.UserEvent.direct_user_request] + `UserEvent.direct_user_request + `__ is set. """ @@ -296,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( @@ -330,15 +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( @@ -360,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( @@ -400,8 +408,8 @@ class ExternalIdpConfig(proto.Message): Attributes: workforce_pool_name (str): - Workforce pool name. Example: - "locations/global/workforcePools/pool_id". + Workforce pool name. + Example: "locations/global/workforcePools/pool_id". """ workforce_pool_name: str = proto.Field( @@ -433,18 +441,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..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): @@ -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 @@ -81,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): @@ -95,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 25ce134fadff..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 @@ -30,65 +30,70 @@ 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 - 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( @@ -115,20 +120,21 @@ class CompleteQueryRequest(proto.Message): class CompleteQueryResponse(proto.Message): r"""Response message for - [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1alpha.CompletionService.CompleteQuery] + `CompletionService.CompleteQuery + `__ method. 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. + 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): @@ -138,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 00d7e933146b..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. """ @@ -54,12 +53,13 @@ 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. + Whether the search query needs to exactly match the + query term. """ value: str = proto.Field( @@ -110,9 +110,9 @@ 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] + 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``. @@ -138,43 +138,45 @@ 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][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. + 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. + 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): @@ -182,13 +184,14 @@ 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. @@ -218,14 +221,14 @@ 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. @@ -246,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( @@ -260,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 bf70951accd8..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,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,11 +79,14 @@ 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 + `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. """ @@ -119,7 +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}`` """ @@ -135,24 +141,24 @@ 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. 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( @@ -180,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 363e242f7a1c..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): @@ -107,7 +105,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): @@ -166,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 03248e2fd0d7..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 @@ -52,7 +52,8 @@ class ConverseConversationRequest(proto.Message): r"""Request message for - [ConversationalSearchService.ConverseConversation][google.cloud.discoveryengine.v1alpha.ConversationalSearchService.ConverseConversation] + `ConversationalSearchService.ConverseConversation + `__ method. Attributes: @@ -62,71 +63,79 @@ class ConverseConversationRequest(proto.Message): ``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: ``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. - - 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. + * 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. + 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. + 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. + 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 `__ + 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 `__ + information on boosting, see `Boosting + `__ """ name: str = proto.Field( @@ -176,7 +185,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 +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. @@ -243,10 +254,12 @@ 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. """ @@ -268,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}`` """ @@ -301,29 +314,36 @@ 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. + 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. - 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: - - ``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( @@ -355,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 @@ -376,13 +396,14 @@ 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``. @@ -397,8 +418,8 @@ class AnswerQueryRequest(proto.Message): mode. We support auto session mode: users can use the wildcard - symbol ``-`` as session ID. A new ID will be automatically - generated and assigned. + 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 +434,54 @@ 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 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. + * 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. """ @@ -462,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( @@ -499,38 +527,39 @@ class AnswerGenerationSpec(proto.Message): 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. + `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. + 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. + 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. + 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``. """ @@ -540,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( @@ -627,51 +655,55 @@ class SearchParams(proto.Message): 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. + 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. + 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 `__ + 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 `__ + 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]): - 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( @@ -777,7 +809,8 @@ class DocumentContext(proto.Message): class ExtractiveSegment(proto.Message): r"""Extractive segment. - `Guide `__ + `Guide + `__ Attributes: page_identifier (str): @@ -797,7 +830,8 @@ class ExtractiveSegment(proto.Message): class ExtractiveAnswer(proto.Message): r"""Extractive answer. - `Guide `__ + `Guide + `__ Attributes: page_identifier (str): @@ -1036,22 +1070,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] - to fetch answer information using - [ConversationalSearchService.GetAnswer][google.cloud.discoveryengine.v1alpha.ConversationalSearchService.GetAnswer] + `Answer.name + `__ 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][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 +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}`` """ @@ -1093,7 +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. @@ -1118,10 +1160,12 @@ 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 + `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. """ @@ -1159,11 +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( @@ -1182,11 +1227,11 @@ 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. @@ -1194,34 +1239,43 @@ class ListSessionsRequest(proto.Message): 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"". + * ``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: - - ``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( @@ -1253,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 dd6c72e94ddf..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,9 +33,10 @@ 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. @@ -44,7 +45,7 @@ class CustomTuningModel(proto.Message): 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 + 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. 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..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,12 +37,14 @@ 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 @@ -54,79 +56,93 @@ class DataStore(proto.Message): 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][google.cloud.discoveryengine.v1alpha.DataStore.industry_vertical]: + 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]. + `ContentConfig.NO_CONTENT + `__. create_time (google.protobuf.timestamp_pb2.Timestamp): Output only. Timestamp the - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] - was created at. + `DataStore + `__ 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][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] - can't be accessed by calling - [DocumentService.GetDocument][google.cloud.discoveryengine.v1alpha.DocumentService.GetDocument] + `DataStore + `__, + `Document + `__ can't + be accessed by calling + `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. 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 + `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 +153,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 +244,18 @@ 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``. + 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`` -> \`\`. + ``HK``, ``en`` -> ``. """ language_code: str = proto.Field( @@ -257,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): @@ -268,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 2547cd08e41d..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 @@ -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,36 @@ 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] - to create. + 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 + 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. + 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,24 +114,28 @@ 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. + `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. """ name: str = proto.Field( @@ -138,7 +146,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. @@ -146,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( @@ -164,7 +173,8 @@ class CreateDataStoreMetadata(proto.Message): class ListDataStoresRequest(proto.Message): r"""Request message for - [DataStoreService.ListDataStores][google.cloud.discoveryengine.v1alpha.DataStoreService.ListDataStores] + `DataStoreService.ListDataStores + `__ method. Attributes: @@ -173,30 +183,39 @@ class ListDataStoresRequest(proto.Message): ``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] + `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 + `__ + 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 +238,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 +272,27 @@ 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 - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] - to delete does not exist, a NOT_FOUND error is returned. + `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. """ name: str = proto.Field( @@ -278,27 +303,30 @@ 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] - to update. + 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 - [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] - to update does not exist, a NOT_FOUND error is returned. + `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.v1alpha.DataStore] - to update. + `DataStore + `__ to + update. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned. @@ -318,7 +346,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. @@ -326,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( @@ -344,7 +373,8 @@ class DeleteDataStoreMetadata(proto.Message): class GetDocumentProcessingConfigRequest(proto.Message): r"""Request for - [DataStoreService.GetDocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DataStoreService.GetDocumentProcessingConfig] + `DataStoreService.GetDocumentProcessingConfig + `__ method. Attributes: @@ -362,28 +392,34 @@ 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], + `DocumentProcessingConfig + `__, then a PERMISSION_DENIED error is returned. If the - [DocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DocumentProcessingConfig] + `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] + `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..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,21 +46,23 @@ 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 + 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 + 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 @@ -68,43 +70,46 @@ class Document(proto.Message): 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 + 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. 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,8 +124,8 @@ 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). + 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 @@ -133,21 +138,24 @@ class Content(proto.Message): 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. + 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. @@ -179,21 +187,64 @@ 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. - 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]): @@ -226,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( @@ -308,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 54ec21fe6151..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,41 +29,46 @@ 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. 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: - - ``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. + * ``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): @@ -88,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. """ @@ -112,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. @@ -128,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): @@ -146,12 +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 37f30745eb28..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 @@ -41,24 +41,27 @@ 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], - 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.v1alpha.Document], + `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 +72,47 @@ 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 ``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. - - If this field is negative, an ``INVALID_ARGUMENT`` error is - returned. + `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. 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] + `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 + `__ + must match the call that provided the page token. + Otherwise, an ``INVALID_ARGUMENT`` error is returned. """ parent: str = proto.Field( @@ -120,18 +131,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 +164,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,29 +173,33 @@ 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 + 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], + `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]. + `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 + This field must conform to `RFC-1034 + `__ standard with a + length limit of 63 characters. Otherwise, an ``INVALID_ARGUMENT`` error is returned. """ @@ -202,7 +220,8 @@ class CreateDocumentRequest(proto.Message): class UpdateDocumentRequest(proto.Message): r"""Request message for - [DocumentService.UpdateDocument][google.cloud.discoveryengine.v1alpha.DocumentService.UpdateDocument] + `DocumentService.UpdateDocument + `__ method. Attributes: @@ -210,25 +229,28 @@ class UpdateDocumentRequest(proto.Message): Required. The document to update/create. If the caller does not have permission to update the - [Document][google.cloud.discoveryengine.v1alpha.Document], + `Document + `__, regardless of whether or not it exists, a ``PERMISSION_DENIED`` error is returned. - If the - [Document][google.cloud.discoveryengine.v1alpha.Document] to + If the `Document + `__ to update does not exist and - [allow_missing][google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest.allow_missing] + `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 - 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( @@ -249,24 +271,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], - 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.v1alpha.Document], + `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,29 +303,32 @@ 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], - 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.v1alpha.Document], + `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): - What format output should be. If - unspecified, defaults to JSON. + What format output should be. If unspecified, + defaults to JSON. """ class ProcessedDocumentType(proto.Enum): @@ -323,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): @@ -354,7 +383,8 @@ class ProcessedDocumentFormat(proto.Enum): class BatchGetDocumentsMetadataRequest(proto.Message): r"""Request message for - [DocumentService.BatchGetDocumentsMetadata][google.cloud.discoveryengine.v1alpha.DocumentService.BatchGetDocumentsMetadata] + `DocumentService.BatchGetDocumentsMetadata + `__ method. Attributes: @@ -363,13 +393,13 @@ class BatchGetDocumentsMetadataRequest(proto.Message): ``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 - uris. + r"""Matcher for the `Document + `__s by exact uris. Attributes: uris (MutableSequence[str]): @@ -382,9 +412,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 +446,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 +486,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]. + `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] - was last indexed. + `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 +512,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..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 @@ -32,7 +32,7 @@ class Engine(proto.Message): r"""Metadata that describes the training and serving parameters of an - [Engine][google.cloud.discoveryengine.v1alpha.Engine]. + `Engine `__. This message has `oneof`_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. @@ -48,100 +48,119 @@ class Engine(proto.Message): 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] + `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] + `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] + `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. - + 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 - 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. 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] - can be associated here. + `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. + Common config spec that specifies the metadata of the + engine. """ class SearchEngineConfig(proto.Message): @@ -151,11 +170,12 @@ 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,12 +200,12 @@ 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``, ``others-you-may-like``, ``more-like-this``, @@ -194,14 +214,16 @@ class MediaRecommendationEngineConfig(proto.Message): 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`` @@ -209,22 +231,22 @@ class MediaRecommendationEngineConfig(proto.Message): 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) - (e.g., 0.5). + 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): @@ -250,8 +272,8 @@ class OptimizationObjectiveConfig(proto.Message): 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( @@ -292,64 +314,67 @@ class ChatEngineConfig(proto.Message): 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] + 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 + 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/``. + 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] + 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] + `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] - or - [EngineService.ListEngines][google.cloud.discoveryengine.v1alpha.EngineService.ListEngines] - API after engine creation. + 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: 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 `__ + 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., 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( @@ -386,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( @@ -401,32 +426,33 @@ 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 - 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): @@ -496,8 +522,8 @@ class ChatEngineMetadata(proto.Message): 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..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 @@ -45,7 +45,8 @@ class CreateEngineRequest(proto.Message): r"""Request for - [EngineService.CreateEngine][google.cloud.discoveryengine.v1alpha.EngineService.CreateEngine] + `EngineService.CreateEngine + `__ method. Attributes: @@ -53,19 +54,21 @@ 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 + Required. The `Engine + `__ to create. engine_id (str): Required. The ID to use for the - [Engine][google.cloud.discoveryengine.v1alpha.Engine], which + `Engine + `__, which will become the final component of the - [Engine][google.cloud.discoveryengine.v1alpha.Engine]'s + `Engine + `__'s resource name. - This field must conform to - `RFC-1034 `__ standard - with a length limit of 63 characters. Otherwise, an + This field must conform to `RFC-1034 + `__ standard with a + length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned. """ @@ -86,7 +89,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. @@ -94,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( @@ -112,23 +116,27 @@ 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 + `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 [Engine][google.cloud.discoveryengine.v1alpha.Engine] - to delete does not exist, a NOT_FOUND error is returned. + `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. """ name: str = proto.Field( @@ -139,7 +147,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. @@ -147,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( @@ -165,13 +174,15 @@ 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 + `Engine + `__, such as ``projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}``. """ @@ -184,7 +195,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: @@ -197,6 +209,7 @@ class ListEnginesRequest(proto.Message): Optional. Not supported. filter (str): Optional. Filter by solution type. For example: + solution_type=SOLUTION_TYPE_SEARCH """ @@ -220,13 +233,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,26 +262,29 @@ 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 + 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 [Engine][google.cloud.discoveryengine.v1alpha.Engine] - to update does not exist, a NOT_FOUND error is returned. + `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. @@ -290,7 +307,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 +324,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}`` """ @@ -316,12 +337,14 @@ 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}`` """ @@ -338,6 +361,7 @@ class TuneEngineMetadata(proto.Message): engine (str): 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..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 @@ -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). @@ -64,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): @@ -74,15 +75,16 @@ 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. + 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( @@ -107,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. @@ -162,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): @@ -183,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 adfc5ebade66..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,46 +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][google.cloud.discoveryengine.v1alpha.Evaluation], - in the format of + `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. 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][google.cloud.discoveryengine.v1alpha.SampleQuery]s - in the - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet]. + 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): 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][google.cloud.discoveryengine.v1alpha.Evaluation] - was created at. + `Evaluation + `__ was + created at. end_time (google.protobuf.timestamp_pb2.Timestamp): Output only. Timestamp the - [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation] - was completed at. + `Evaluation + `__ 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): @@ -107,18 +109,27 @@ class EvaluationSpec(proto.Message): 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: + 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.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] + * `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 +142,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}``. """ @@ -201,79 +213,96 @@ class QualityMetrics(proto.Message): 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 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 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): - Example (top-3): Suppose - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery] + Suppose `SampleQuery + `__ with three retrieved documents (D1, D2, D3) and binary - relevance judgements (1 for relevant, 0 for not relevant): + relevance judgements (1 for relevant, 0 for not + relevant): - Retrieved: [D3 (0), D1 (1), D2 (1)] Ideal: [D1 (1), D2 (1), - D3 (0)] + Retrieved: [D3 (0), D1 (1), D2 (1)] + Ideal: [D1 (1), D2 (1), D3 (0)] - 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 + 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..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 @@ -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. + `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,7 +70,8 @@ class GetEvaluationRequest(proto.Message): class ListEvaluationsRequest(proto.Message): r"""Request message for - [EvaluationService.ListEvaluations][google.cloud.discoveryengine.v1alpha.EvaluationService.ListEvaluations] + `EvaluationService.ListEvaluations + `__ method. Attributes: @@ -75,29 +80,35 @@ class ListEvaluationsRequest(proto.Message): ``projects/{project}/locations/{location}``. If the caller does not have permission to list - [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation]s + `Evaluation + `__s under this location, regardless of whether or not this - location exists, a ``PERMISSION_DENIED`` error is returned. + 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] + `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 + `__ + must match the call that provided the page token. + Otherwise, an ``INVALID_ARGUMENT`` error is returned. """ parent: str = proto.Field( @@ -116,18 +127,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 +160,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,9 +169,9 @@ 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] - to create. + Required. The `Evaluation + `__ to + create. """ parent: str = proto.Field( @@ -173,7 +187,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 +196,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 +206,30 @@ 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 + [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. + 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] + `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 + `__ + must match the call that provided the page token. + Otherwise, an ``INVALID_ARGUMENT`` error is returned. """ evaluation: str = proto.Field( @@ -229,33 +248,37 @@ 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..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,12 @@ 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,16 +57,18 @@ 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 - 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. @@ -75,24 +77,29 @@ class CheckGroundingRequest(proto.Message): 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 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. + * 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 +130,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. @@ -131,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): @@ -154,35 +161,39 @@ 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. + 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 + 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], + `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..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 @@ -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( @@ -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 abf627df7402..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,44 +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. 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,52 +134,56 @@ class BigQuerySource(proto.Message): Attributes: partition_date (google.type.date_pb2.Date): - BigQuery time partitioned table's \_PARTITIONDATE in + 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. 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( @@ -205,23 +219,23 @@ 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 + `__. """ project_id: str = proto.Field( @@ -247,25 +261,27 @@ 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][a-zA-Z0-9-_]*``. + 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): - 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: @@ -316,28 +332,29 @@ 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. + 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 - 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( @@ -367,29 +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][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. + * ``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( @@ -428,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( @@ -469,19 +485,19 @@ 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. """ @@ -504,33 +520,32 @@ 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 `__. + `here + `__. """ project_id: str = proto.Field( @@ -564,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( @@ -623,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( @@ -672,9 +683,9 @@ 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. + 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``. """ @@ -714,14 +725,12 @@ class ImportUserEventsRequest(proto.Message): 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]): @@ -767,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( @@ -807,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( @@ -846,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. """ @@ -943,93 +947,121 @@ class ImportDocumentsRequest(proto.Message): ``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][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. + 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 + `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 + 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], + `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. + 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. 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): - 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): @@ -1048,14 +1080,13 @@ 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][google.cloud.discoveryengine.v1alpha.Document.id]. + document must have a valid `Document.id + `__. Recommended max of 100 items. """ @@ -1150,18 +1181,19 @@ 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]): - 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( @@ -1178,7 +1210,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 +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 + 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/*. """ @@ -1216,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[ @@ -1248,16 +1281,16 @@ class InlineSource(proto.Message): class ImportSuggestionDenyListEntriesResponse(proto.Message): r"""Response message for - [CompletionService.ImportSuggestionDenyListEntries][google.cloud.discoveryengine.v1alpha.CompletionService.ImportSuggestionDenyListEntries] + `CompletionService.ImportSuggestionDenyListEntries + `__ method. 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. @@ -1280,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( @@ -1305,7 +1338,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,14 +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): @@ -1344,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[ @@ -1387,18 +1421,19 @@ class InlineSource(proto.Message): class ImportCompletionSuggestionsResponse(proto.Message): r"""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. + `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. 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( @@ -1414,23 +1449,25 @@ 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][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 +1493,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,27 +1518,30 @@ 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. + The desired location of errors incurred during the + Import. """ 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,18 +1582,19 @@ class InlineSource(proto.Message): class ImportSampleQueriesResponse(proto.Message): r"""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. + `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. 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( @@ -1576,20 +1618,20 @@ 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][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..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,22 @@ 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][google.cloud.discoveryengine.v1alpha.Project.ServiceTerms]. + ``id`` of `ServiceTerms + `__. """ class ServiceTerms(proto.Message): @@ -57,28 +57,30 @@ 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 - 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 1b8fe4e3315b..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 @@ -32,14 +32,16 @@ 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], - such as ``projects/{project_id_or_number}``. + `Project + `__, such + as ``projects/{project_id_or_number}``. """ name: str = proto.Field( @@ -50,25 +52,28 @@ 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], - 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( @@ -94,25 +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][google.cloud.discoveryengine.v1alpha.Project], - such as ``projects/{project_id_or_number}``. + `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. + 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 f7c0e7ac2f29..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,40 +48,56 @@ 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. + * ``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 - 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( @@ -99,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( @@ -116,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( @@ -162,9 +177,9 @@ 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. + 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 +193,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,37 +206,39 @@ 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): - 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 ``*`` (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. + 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: @@ -269,19 +287,20 @@ class InlineSource(proto.Message): class PurgeDocumentsResponse(proto.Message): r"""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. + `DocumentService.PurgeDocuments + `__ + 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. + 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( @@ -295,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( @@ -342,13 +360,14 @@ 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,16 +379,16 @@ class PurgeSuggestionDenyListEntriesRequest(proto.Message): class PurgeSuggestionDenyListEntriesResponse(proto.Message): r"""Response message for - [CompletionService.PurgeSuggestionDenyListEntries][google.cloud.discoveryengine.v1alpha.CompletionService.PurgeSuggestionDenyListEntries] + `CompletionService.PurgeSuggestionDenyListEntries + `__ method. 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( @@ -385,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( @@ -410,13 +429,14 @@ 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,16 +448,17 @@ class PurgeCompletionSuggestionsRequest(proto.Message): class PurgeCompletionSuggestionsResponse(proto.Message): r"""Response message for - [CompletionService.PurgeCompletionSuggestions][google.cloud.discoveryengine.v1alpha.CompletionService.PurgeCompletionSuggestions] + `CompletionService.PurgeCompletionSuggestions + `__ method. 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( @@ -452,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 10344f5ca79f..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 @@ -31,27 +31,33 @@ class RankingRecord(proto.Message): r"""Record message for - [RankService.Rank][google.cloud.discoveryengine.v1alpha.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.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. + The score of this record based on the given query and + selected model. """ id: str = proto.Field( @@ -74,56 +80,60 @@ class RankingRecord(proto.Message): class RankRequest(proto.Message): r"""Request message for - [RankService.Rank][google.cloud.discoveryengine.v1alpha.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_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. + * ``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 - 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. - - 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. + * 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,8 +171,8 @@ class RankRequest(proto.Message): class RankResponse(proto.Message): r"""Response message for - [RankService.Rank][google.cloud.discoveryengine.v1alpha.RankService.Rank] - method. + `RankService.Rank + `__ 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 db06b8c5820a..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 @@ -38,135 +38,161 @@ 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 + 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 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][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 - 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: - - - (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] + 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`` + `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. - - 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. + * Keys must start with a lowercase letter or + international character. See `Requirements for - labels `__ + labels + `__ for more details. """ @@ -209,42 +235,47 @@ 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][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. + 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. """ 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): 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..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,21 +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. create_time (google.protobuf.timestamp_pb2.Timestamp): Output only. Timestamp the - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery] + `SampleQuery + `__ 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): 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..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 @@ -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. + `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,46 @@ 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 + `SampleQuery + `__s to return. If unspecified, defaults to 100. The maximum - allowed value is 1000. Values above 1000 will be coerced to - 1000. + 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] + `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 + `__ + must match the call that provided the page token. + Otherwise, an ``INVALID_ARGUMENT`` error is returned. """ parent: str = proto.Field( @@ -116,18 +127,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 +160,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,28 +170,34 @@ 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] - to create. + `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], + `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]. + `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 + This field must conform to `RFC-1034 + `__ standard with a + length limit of 63 characters. Otherwise, an ``INVALID_ARGUMENT`` error is returned. """ @@ -198,7 +218,8 @@ class CreateSampleQueryRequest(proto.Message): class UpdateSampleQueryRequest(proto.Message): r"""Request message for - [SampleQueryService.UpdateSampleQuery][google.cloud.discoveryengine.v1alpha.SampleQueryService.UpdateSampleQuery] + `SampleQueryService.UpdateSampleQuery + `__ method. Attributes: @@ -206,17 +227,18 @@ class UpdateSampleQueryRequest(proto.Message): Required. The simple query to update. If the caller does not have permission to update the - [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery], + `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, - 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( @@ -233,24 +255,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], + `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..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,13 +29,14 @@ 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): 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}``. @@ -44,15 +45,17 @@ class SampleQuerySet(proto.Message): 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][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..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 @@ -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. + `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,7 +71,8 @@ class GetSampleQuerySetRequest(proto.Message): class ListSampleQuerySetsRequest(proto.Message): r"""Request message for - [SampleQuerySetService.ListSampleQuerySets][google.cloud.discoveryengine.v1alpha.SampleQuerySetService.ListSampleQuerySets] + `SampleQuerySetService.ListSampleQuerySets + `__ method. Attributes: @@ -76,29 +81,35 @@ class ListSampleQuerySetsRequest(proto.Message): ``projects/{project}/locations/{location}``. If the caller does not have permission to list - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet]s + `SampleQuerySet + `__s under this location, regardless of whether or not this - location exists, a ``PERMISSION_DENIED`` error is returned. + location exists, a ``PERMISSION_DENIED`` error is + returned. page_size (int): Maximum number of - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet]s + `SampleQuerySet + `__s to return. If unspecified, defaults to 100. The maximum - allowed value is 1000. Values above 1000 will be coerced to - 1000. + 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] + `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 + `__ + must match the call that provided the page token. + Otherwise, an ``INVALID_ARGUMENT`` error is returned. """ parent: str = proto.Field( @@ -117,18 +128,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 +163,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,28 +173,34 @@ 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], + `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]. + `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 + This field must conform to `RFC-1034 + `__ standard with a + length limit of 63 characters. Otherwise, an ``INVALID_ARGUMENT`` error is returned. """ @@ -201,7 +221,8 @@ class CreateSampleQuerySetRequest(proto.Message): class UpdateSampleQuerySetRequest(proto.Message): r"""Request message for - [SampleQuerySetService.UpdateSampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySetService.UpdateSampleQuerySet] + `SampleQuerySetService.UpdateSampleQuerySet + `__ method. Attributes: @@ -209,17 +230,20 @@ class UpdateSampleQuerySetRequest(proto.Message): Required. The sample query set to update. If the caller does not have permission to update the - [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet], + `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 - 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( @@ -236,24 +260,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], + `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..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 @@ -56,8 +56,7 @@ class Schema(proto.Message): 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,184 +82,231 @@ 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): - 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], + `INDEXABLE_ENABLED + `__, field values are indexed so that it can be filtered or - faceted in - [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]. + 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 - will skip - [indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option] + `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 + `__ setting, and setting - [indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option] + `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 - setting - [dynamic_facetable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.dynamic_facetable_option] + `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 + `__ 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] + `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. + `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] + `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]. + ``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][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option] + 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] + `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] + 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 option setting, and setting - [completable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.completable_option] + `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 + `__ 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], + `FILTERABLE_ENABLED + `__, field values are filterable by filter expression in - [RecommendationService.Recommend][google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend]. + `RecommendationService.Recommend + `__. If - [FILTERABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption.FILTERABLE_ENABLED] + `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]. + `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] + `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. + 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 + 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. + 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. + 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 - ````. + ```` 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 +326,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 +477,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..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 @@ -40,7 +40,8 @@ class GetSchemaRequest(proto.Message): r"""Request message for - [SchemaService.GetSchema][google.cloud.discoveryengine.v1alpha.SchemaService.GetSchema] + `SchemaService.GetSchema + `__ method. Attributes: @@ -58,32 +59,37 @@ 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 + `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 + `Schema + `__s are returned. 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] + `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] + `SchemaService.ListSchemas + `__ must match the call that provided the page token. """ @@ -103,17 +109,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 +142,30 @@ 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 + Required. The `Schema + `__ to create. schema_id (str): Required. The ID to use for the - [Schema][google.cloud.discoveryengine.v1alpha.Schema], which + `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. """ parent: str = proto.Field( @@ -173,19 +185,20 @@ 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 + 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 + `Schema `__ + is not found, a new `Schema + `__ is created. In this situation, ``update_mask`` is ignored. """ @@ -202,7 +215,8 @@ class UpdateSchemaRequest(proto.Message): class DeleteSchemaRequest(proto.Message): r"""Request message for - [SchemaService.DeleteSchema][google.cloud.discoveryengine.v1alpha.SchemaService.DeleteSchema] + `SchemaService.DeleteSchema + `__ method. Attributes: @@ -225,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( @@ -248,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( @@ -271,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 ec032e3f2105..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 @@ -35,13 +35,13 @@ class SearchRequest(proto.Message): r"""Request message for - [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search] - method. + `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``. @@ -51,218 +51,225 @@ class SearchRequest(proto.Message): 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 + `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``. + * Websites with basic indexing: Default ``10``, Maximum + ``25``. * Websites with advanced indexing: Default + ``25``, Maximum ``50``. - If this field is negative, an ``INVALID_ARGUMENT`` is + * 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] + `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 + `__ + 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 + 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. - If this field is unrecognizable, an ``INVALID_ARGUMENT`` is - returned. + 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 `__ + 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 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. + 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 `__. + 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. + 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 `__. + 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. - + 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: - - ``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 - 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``. 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. + 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] + `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 +278,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. @@ -345,24 +315,29 @@ class SearchRequest(proto.Message): 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. - - 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. + * 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 @@ -370,59 +345,59 @@ class SearchRequest(proto.Message): 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] + `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. - 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): @@ -467,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``. """ @@ -481,13 +456,14 @@ 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][google.cloud.discoveryengine.v1alpha.DataStore], + `DataStore + `__, such as ``projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}``. """ @@ -504,80 +480,85 @@ 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 + 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. + `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. + 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. + 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. + 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 + * "rating", enable_dynamic_position = true - - "price", enable_dynamic_position = false + * "price", enable_dynamic_position = false - - "brands", 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. + 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): @@ -586,59 +567,63 @@ 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. + `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. + 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. + 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. Allowed values are: - - "count desc", which means order by - [SearchResponse.Facet.values.count][google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue.count] - descending. + * "count desc", which means order by + `SearchResponse.Facet.values.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. + * "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 `__; + order + `__; numerical intervals are sorted in the order given by - [FacetSpec.FacetKey.intervals][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.intervals]. + `FacetSpec.FacetKey.intervals + `__. """ key: str = proto.Field( @@ -694,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): @@ -707,90 +691,97 @@ 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 - ranking, but it is not blocked out completely. + 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. + 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 = + 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. + 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): 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 @@ -812,22 +803,25 @@ 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): 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( @@ -884,34 +878,34 @@ 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][google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec.Condition.DISABLED]. + 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): - 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,25 +930,28 @@ 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): - r"""Enum describing under which mode spell correction should - occur. + r"""Enum describing under which mode spell correction should occur. 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 @@ -971,8 +968,7 @@ 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): @@ -982,22 +978,24 @@ class ContentSearchSpec(proto.Message): 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] + `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,24 +1003,24 @@ 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 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. @@ -1047,25 +1045,27 @@ 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. + 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] + 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. @@ -1073,69 +1073,70 @@ class SummarySpec(proto.Message): 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. + 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. + 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. + 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. + 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. + `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): @@ -1143,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( @@ -1162,15 +1162,18 @@ 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( @@ -1220,55 +1223,61 @@ 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 ``max_extractive_answer_count``. + ``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] - is set to - [DataStore.ContentConfig.CONTENT_REQUIRED][google.cloud.discoveryengine.v1alpha.DataStore.ContentConfig.CONTENT_REQUIRED] + `DataStore + `__ is + set to `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_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. + 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. @@ -1298,21 +1307,21 @@ 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] + `SearchRequest.ContentSearchSpec.search_result_mode + `__ is set to - [CHUNKS][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS] + `CHUNKS + `__ 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( @@ -1353,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): @@ -1390,30 +1398,31 @@ 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``. + 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]. + 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): - Server behavior defaults to [Condition.DISABLED][]. + Server behavior defaults to + [Condition.DISABLED][]. DISABLED (1): Disables NL filter extraction. ENABLED (2): @@ -1440,19 +1449,21 @@ 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): - 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): 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): @@ -1471,10 +1482,9 @@ 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 @@ -1484,32 +1494,39 @@ class SessionSpec(proto.Message): 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 + 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. + 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. @@ -1679,72 +1696,79 @@ class SessionSpec(proto.Message): class SearchResponse(proto.Message): r"""Response message for - [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search] - method. + `SearchService.Search + `__ 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 - [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. + `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] + `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 - 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][google.cloud.discoveryengine.v1alpha.SearchRequest.session] + `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. + A list of One Box results. There can be multiple One + Box results of different types. """ class SearchResult(proto.Message): @@ -1752,22 +1776,24 @@ 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. 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): - A set of ranking signals associated with the - result. + A set of ranking signals associated with the result. """ class RankSignals(proto.Message): @@ -1789,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): @@ -1818,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( @@ -1911,7 +1936,8 @@ class Facet(proto.Message): 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]. + `SearchRequest.FacetSpec.FacetKey.key + `__. values (MutableSequence[google.cloud.discoveryengine_v1alpha.types.SearchResponse.Facet.FacetValue]): The facet values for this field. dynamic_facet (bool): @@ -1930,14 +1956,15 @@ 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 + 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]. + [SearchRequest.FacetSpec.FacetKey.intervals + `__. This field is a member of `oneof`_ ``facet_value``. count (int): @@ -1977,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]): @@ -2022,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. """ @@ -2050,13 +2076,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 +2113,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): @@ -2114,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( @@ -2158,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]): @@ -2206,15 +2233,16 @@ class Reference(proto.Message): Title of the document. document (str): Required. - [Document.name][google.cloud.discoveryengine.v1alpha.Document.name] + `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. 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): @@ -2310,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. """ @@ -2331,17 +2359,17 @@ 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 - [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. """ @@ -2355,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): @@ -2390,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( @@ -2415,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): @@ -2447,7 +2467,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. """ @@ -2482,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( @@ -2555,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. @@ -2579,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``. """ @@ -2646,19 +2667,20 @@ 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 - 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( @@ -2671,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 2134c54c126e..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 @@ -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. @@ -93,16 +96,16 @@ class TrainCustomModelRequest(proto.Message): data_store (str): 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. """ @@ -112,38 +115,41 @@ 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 + 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, + 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 + 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). + ``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: + 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`` + * ``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 + 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. """ @@ -191,34 +197,36 @@ class GcsTrainingInput(proto.Message): class TrainCustomModelResponse(proto.Message): r"""Response of the - [TrainCustomModelRequest][google.cloud.discoveryengine.v1alpha.TrainCustomModelRequest]. - This message is returned by the - google.longrunning.Operations.response field. + `TrainCustomModelRequest + `__. 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. - - **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): - Fully qualified name of the - CustomTuningModel. + Fully qualified name of the CustomTuningModel. """ error_samples: MutableSequence[status_pb2.Status] = proto.RepeatedField( @@ -247,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 b375e48b8ce0..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,103 +49,114 @@ 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. 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). + 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] + 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][google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector.vector] + `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] + 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 }; + * 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): @@ -153,88 +164,94 @@ 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. + 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. + 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 - 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. 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. @@ -251,27 +268,28 @@ class MediaConfig(proto.Message): 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: + 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. 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( @@ -294,16 +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 40b86435dce1..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 @@ -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. """ @@ -84,17 +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( @@ -118,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 a4ebfbde229b..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,27 +113,28 @@ 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][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 - 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( @@ -228,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): @@ -352,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. @@ -365,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") @@ -447,60 +442,60 @@ 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][google.cloud.discoveryengine.v1alpha.AssistantService.DownloadSessionFile] + `AssistantService.DownloadSessionFile + `__ URL to download the file. This URL will need the same - credentials as - [AssistantService.ListSessionFileMetadata][google.cloud.discoveryengine.v1alpha.AssistantService.ListSessionFileMetadata] + 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..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 @@ -32,12 +32,15 @@ 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. filter (str): @@ -46,31 +49,35 @@ class ListFilesRequest(proto.Message): fields of the files being filtered. Filter expression is case-sensitive. Currently supported field names are: - - upload_time - - last_add_time - - last_use_time - - file_name - - mime_type + * upload_time + * last_add_time + + * 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. 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 @@ -97,17 +104,19 @@ 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] + 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. """ 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..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,38 +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. 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 + 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 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. 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. """ @@ -94,9 +92,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): @@ -152,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( @@ -217,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 a54f73fddbfc..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 @@ -66,19 +66,21 @@ 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. + [SiteSearchEngine], regardless of whether or not it + exists, a PERMISSION_DENIED error is returned. """ name: str = proto.Field( @@ -89,19 +91,21 @@ 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] - to create. + Required. The `TargetSite + `__ to + create. """ parent: str = proto.Field( @@ -117,7 +121,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. @@ -125,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( @@ -143,7 +148,8 @@ class CreateTargetSiteMetadata(proto.Message): class BatchCreateTargetSitesRequest(proto.Message): r"""Request message for - [SiteSearchEngineService.BatchCreateTargetSites][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.BatchCreateTargetSites] + `SiteSearchEngineService.BatchCreateTargetSites + `__ method. Attributes: @@ -155,8 +161,8 @@ class BatchCreateTargetSitesRequest(proto.Message): 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( @@ -172,23 +178,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. + `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 +210,22 @@ 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 +237,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. @@ -233,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( @@ -251,23 +264,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. + `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 +296,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. @@ -287,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( @@ -305,34 +323,38 @@ 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. 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. + 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. + ``ListTargetSites`` must match the call that provided + the page token. """ parent: str = proto.Field( @@ -351,20 +373,20 @@ 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 - response. + The total number of items matching the request. + This will always be populated in the response. """ @property @@ -390,7 +412,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. @@ -398,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( @@ -416,7 +439,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 +459,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 +480,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 +489,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. @@ -470,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( @@ -488,13 +516,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 +537,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 +546,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. @@ -523,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( @@ -541,21 +573,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] - in ``site_search_engine``. + 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( @@ -570,15 +604,15 @@ 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``. 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): @@ -589,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): @@ -659,7 +692,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. @@ -667,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( @@ -722,7 +754,8 @@ class RecrawlUrisMetadata(proto.Message): class BatchVerifyTargetSitesRequest(proto.Message): r"""Request message for - [SiteSearchEngineService.BatchVerifyTargetSites][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.BatchVerifyTargetSites] + `SiteSearchEngineService.BatchVerifyTargetSites + `__ method. Attributes: @@ -740,7 +773,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 +782,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. @@ -756,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( @@ -774,7 +809,8 @@ class BatchVerifyTargetSitesMetadata(proto.Message): class FetchDomainVerificationStatusRequest(proto.Message): r"""Request message for - [SiteSearchEngineService.FetchDomainVerificationStatus][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.FetchDomainVerificationStatus] + `SiteSearchEngineService.FetchDomainVerificationStatus + `__ method. Attributes: @@ -784,9 +820,9 @@ class FetchDomainVerificationStatusRequest(proto.Message): ``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. 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. @@ -796,8 +832,8 @@ class FetchDomainVerificationStatusRequest(proto.Message): retrieve the subsequent page. When paginating, all other parameters provided to - ``FetchDomainVerificationStatus`` must match the call that - provided the page token. + ``FetchDomainVerificationStatus`` must match the call + that provided the page token. """ site_search_engine: str = proto.Field( @@ -816,21 +852,21 @@ class FetchDomainVerificationStatusRequest(proto.Message): class FetchDomainVerificationStatusResponse(proto.Message): r"""Response message for - [SiteSearchEngineService.FetchDomainVerificationStatus][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.FetchDomainVerificationStatus] + `SiteSearchEngineService.FetchDomainVerificationStatus + `__ method. 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 @@ -856,37 +892,54 @@ 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 + consistent with the `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"] } } + + `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 + `Schema `__ + is used. If provided, validates and updates the + `Schema + `__. If validation fails, an error is returned. """ @@ -913,7 +966,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 +975,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. @@ -929,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( @@ -947,13 +1002,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 +1023,22 @@ 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..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): @@ -49,100 +48,109 @@ 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. + 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. + 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. - 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] + `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] + `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). + 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]. + `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. + 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 @@ -150,30 +158,36 @@ class UserEvent(proto.Message): 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. + 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] + * `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][google.cloud.discoveryengine.v1alpha.RecommendResponse.attribution_token] + `RecommendResponse.attribution_token + `__ to this field. filter (str): The filter syntax consists of an expression language for @@ -181,98 +195,110 @@ class UserEvent(proto.Message): documents being filtered. One example is for ``search`` events, the associated - [SearchRequest][google.cloud.discoveryengine.v1alpha.SearchRequest] + `SearchRequest + `__ may contain a filter expression in - [SearchRequest.filter][google.cloud.discoveryengine.v1alpha.SearchRequest.filter] + `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], + 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] + `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. + 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. 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. + 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. + 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,46 +403,46 @@ 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 - together properly. + 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). + 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: + 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( @@ -447,41 +473,46 @@ 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. 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. + 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 @@ -510,16 +541,18 @@ 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): 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. """ @@ -540,61 +573,67 @@ 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: + 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] + * 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] + `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] + `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,44 +680,43 @@ 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] - 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. + 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: - - ``add-to-cart`` - - ``purchase`` + * ``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( @@ -722,16 +760,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 +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 - [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. - 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..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 @@ -37,25 +37,30 @@ 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. 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( @@ -84,21 +89,20 @@ class CollectUserEventRequest(proto.Message): 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/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..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): @@ -496,13 +496,13 @@ class SearchResult(proto.Message): 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 495c1b461a84..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 @@ -37,7 +37,9 @@ 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 @@ -45,21 +47,20 @@ class Chunk(proto.Message): 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][]. + 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. + 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): @@ -67,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): @@ -76,9 +77,10 @@ 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 + Data representation. + The structured JSON data for the document. It should + conform to the registered `Schema + `__ or an ``INVALID_ARGUMENT`` error is thrown. """ @@ -117,23 +119,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.v1beta.SearchService.Search] - API. + `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]. + `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]. + `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..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 @@ -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 @@ -104,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): @@ -188,33 +190,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.v1beta.UserEvent]. + r"""A custom attribute that is not explicitly modeled in a resource, 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 +239,33 @@ 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. + 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] + `UserEventService.CollectUserEvent + `__ or if - [UserEvent.direct_user_request][google.cloud.discoveryengine.v1beta.UserEvent.direct_user_request] + `UserEvent.direct_user_request + `__ is set. """ @@ -271,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 0a8b684bf6a3..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): @@ -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 @@ -81,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): @@ -95,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 e577c83b84f4..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 @@ -36,65 +36,70 @@ 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 - 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( @@ -121,20 +126,21 @@ class CompleteQueryRequest(proto.Message): class CompleteQueryResponse(proto.Message): r"""Response message for - [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1beta.CompletionService.CompleteQuery] + `CompletionService.CompleteQuery + `__ method. 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. + 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): @@ -144,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. @@ -174,88 +180,96 @@ 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. + 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] + `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 - 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): @@ -283,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): @@ -304,27 +316,29 @@ 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. + 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. + However, other suggestions that are relevant might still + be shown. Setting to 0.0 means no boost applied. The boosting condition is ignored. @@ -386,32 +400,33 @@ class ConditionBoostSpec(proto.Message): class AdvancedCompleteQueryResponse(proto.Message): r"""Response message for - [CompletionService.AdvancedCompleteQuery][google.cloud.discoveryengine.v1beta.CompletionService.AdvancedCompleteQuery] + `CompletionService.AdvancedCompleteQuery + `__ method. 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. + 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 - 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): @@ -421,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( @@ -454,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): @@ -470,7 +485,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 @@ -506,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 18f251314407..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,25 +32,27 @@ 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]): - 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. 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 - [Condition.query_terms][google.cloud.discoveryengine.v1beta.Condition.query_terms] + `Condition.query_terms + `__ is set. This is currently supporting promotion use case. """ @@ -61,12 +63,13 @@ 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. + Whether the search query needs to exactly match the + query term. """ value: str = proto.Field( @@ -121,10 +124,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.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). @@ -149,43 +152,45 @@ 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][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. + 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. + 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): @@ -193,13 +198,14 @@ 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. @@ -229,14 +235,14 @@ 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. @@ -257,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( @@ -271,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 0f75538cf8ef..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,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,11 +79,14 @@ 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 + `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. """ @@ -119,7 +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}`` """ @@ -135,24 +141,24 @@ 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. 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( @@ -180,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 55405fdd47db..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): @@ -107,7 +105,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): @@ -166,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 17b66604760f..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 @@ -51,7 +51,8 @@ class ConverseConversationRequest(proto.Message): r"""Request message for - [ConversationalSearchService.ConverseConversation][google.cloud.discoveryengine.v1beta.ConversationalSearchService.ConverseConversation] + `ConversationalSearchService.ConverseConversation + `__ method. Attributes: @@ -61,71 +62,79 @@ class ConverseConversationRequest(proto.Message): ``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: ``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. - - 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. + * 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. + 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. + 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. + 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 `__ + 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 `__ + information on boosting, see `Boosting + `__ """ name: str = proto.Field( @@ -175,7 +184,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 +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. @@ -242,10 +253,12 @@ 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] - 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. """ @@ -267,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}`` """ @@ -300,29 +313,36 @@ 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. + 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. - 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: - - ``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( @@ -354,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 @@ -375,13 +395,14 @@ 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``. @@ -396,8 +417,8 @@ class AnswerQueryRequest(proto.Message): mode. We support auto session mode: users can use the wildcard - symbol ``-`` as session ID. A new ID will be automatically - generated and assigned. + 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 +432,60 @@ 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 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. + * 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. """ @@ -466,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( @@ -493,16 +521,16 @@ 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. + 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): @@ -547,38 +575,39 @@ class AnswerGenerationSpec(proto.Message): 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. + `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. + 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. + 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. + 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): @@ -586,14 +615,15 @@ class AnswerGenerationSpec(proto.Message): 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. + 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): @@ -601,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( @@ -692,53 +721,56 @@ class SearchParams(proto.Message): 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. + 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. + 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 `__ + 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 `__ + 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 - 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( @@ -816,16 +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): @@ -835,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( @@ -850,9 +882,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 +905,8 @@ class ExtractiveSegment(proto.Message): class ExtractiveAnswer(proto.Message): r"""Extractive answer. - `Guide `__ + `Guide + `__ Attributes: page_identifier (str): @@ -933,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): @@ -1149,22 +1182,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] - to fetch answer information using - [ConversationalSearchService.GetAnswer][google.cloud.discoveryengine.v1beta.ConversationalSearchService.GetAnswer] + `Answer.name + `__ 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][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 +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}`` """ @@ -1206,7 +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. @@ -1231,10 +1272,12 @@ 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 + `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. """ @@ -1272,11 +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( @@ -1295,11 +1339,11 @@ 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. @@ -1307,34 +1351,43 @@ class ListSessionsRequest(proto.Message): 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"". + * ``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: - - ``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( @@ -1366,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 6f67d52fa25d..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,9 +33,10 @@ 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 @@ -45,11 +46,10 @@ class CustomTuningModel(proto.Message): 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 + 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]): 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..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,12 +38,14 @@ 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 @@ -55,67 +57,72 @@ class DataStore(proto.Message): 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][google.cloud.discoveryengine.v1beta.DataStore.industry_vertical]: + 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.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]. + `ContentConfig.NO_CONTENT + `__. create_time (google.protobuf.timestamp_pb2.Timestamp): Output only. Timestamp the - [DataStore][google.cloud.discoveryengine.v1beta.DataStore] - was created at. + `DataStore + `__ 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 - [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 + `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] + 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. + Optional. Stores serving config at DataStore level. """ class ContentConfig(proto.Enum): @@ -126,17 +133,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 @@ -149,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): @@ -193,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( @@ -283,17 +291,18 @@ 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``. + 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`` -> \`\`. + ``HK``, ``en`` -> ``. """ language_code: str = proto.Field( @@ -319,17 +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 - [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): 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: @@ -354,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): @@ -363,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 faf087d44736..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 @@ -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,36 @@ 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] - to create. + 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 + 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. + 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,24 +109,27 @@ 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], - 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.v1beta.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. + `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. """ name: str = proto.Field( @@ -133,7 +140,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. @@ -141,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( @@ -159,7 +167,8 @@ class CreateDataStoreMetadata(proto.Message): class ListDataStoresRequest(proto.Message): r"""Request message for - [DataStoreService.ListDataStores][google.cloud.discoveryengine.v1beta.DataStoreService.ListDataStores] + `DataStoreService.ListDataStores + `__ method. Attributes: @@ -168,30 +177,39 @@ class ListDataStoresRequest(proto.Message): ``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] + `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 + `__ + 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 +232,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 +266,27 @@ 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], - 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.v1beta.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. + `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. """ name: str = proto.Field( @@ -273,27 +297,30 @@ 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] - to update. + 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 - [DataStore][google.cloud.discoveryengine.v1beta.DataStore] - to update does not exist, a NOT_FOUND error is returned. + `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.v1beta.DataStore] - to update. + `DataStore + `__ to + update. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned. @@ -313,7 +340,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. @@ -321,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 d673a125fca2..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,21 +43,23 @@ 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 + 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 + 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 @@ -65,41 +67,44 @@ class Document(proto.Message): 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 + 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. 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,8 +119,8 @@ 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). + 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 @@ -128,21 +133,24 @@ class Content(proto.Message): 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. + 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. @@ -169,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 d5840f2ac08f..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,44 +29,49 @@ 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. 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: - - ``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. + * ``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): @@ -91,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. """ @@ -115,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. @@ -131,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): @@ -149,12 +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 35a4e549e55b..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 @@ -40,24 +40,27 @@ 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], - 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.v1beta.Document], + `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 +71,45 @@ 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 ``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 + `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. - - If this field is negative, an ``INVALID_ARGUMENT`` error is - returned. + 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. 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] + `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 + `__ + must match the call that provided the page token. + Otherwise, an ``INVALID_ARGUMENT`` error is returned. """ parent: str = proto.Field( @@ -119,18 +128,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 +161,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,29 +170,33 @@ 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 + Required. The `Document + `__ to create. document_id (str): Required. The ID to use for the - [Document][google.cloud.discoveryengine.v1beta.Document], - which becomes the final component of the - [Document.name][google.cloud.discoveryengine.v1beta.Document.name]. + `Document + `__, which + becomes the final component of the + `Document.name + `__. If the caller does not have permission to create the - [Document][google.cloud.discoveryengine.v1beta.Document], + `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]. + `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 + This field must conform to `RFC-1034 + `__ standard with a + length limit of 63 characters. Otherwise, an ``INVALID_ARGUMENT`` error is returned. """ @@ -201,7 +217,8 @@ class CreateDocumentRequest(proto.Message): class UpdateDocumentRequest(proto.Message): r"""Request message for - [DocumentService.UpdateDocument][google.cloud.discoveryengine.v1beta.DocumentService.UpdateDocument] + `DocumentService.UpdateDocument + `__ method. Attributes: @@ -209,25 +226,28 @@ class UpdateDocumentRequest(proto.Message): Required. The document to update/create. If the caller does not have permission to update the - [Document][google.cloud.discoveryengine.v1beta.Document], + `Document + `__, regardless of whether or not it exists, a ``PERMISSION_DENIED`` error is returned. - If the - [Document][google.cloud.discoveryengine.v1beta.Document] to + If the `Document + `__ to update does not exist and - [allow_missing][google.cloud.discoveryengine.v1beta.UpdateDocumentRequest.allow_missing] + `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 - 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( @@ -248,24 +268,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], - 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.v1beta.Document], + `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,7 +300,8 @@ class DeleteDocumentRequest(proto.Message): class BatchGetDocumentsMetadataRequest(proto.Message): r"""Request message for - [DocumentService.BatchGetDocumentsMetadata][google.cloud.discoveryengine.v1beta.DocumentService.BatchGetDocumentsMetadata] + `DocumentService.BatchGetDocumentsMetadata + `__ method. Attributes: @@ -285,13 +310,13 @@ class BatchGetDocumentsMetadataRequest(proto.Message): ``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 - uris. + r"""Matcher for the `Document + `__s by exact uris. Attributes: uris (MutableSequence[str]): @@ -304,13 +329,15 @@ class UrisMatcher(proto.Message): ) class FhirMatcher(proto.Message): - r"""Matcher for the - [Document][google.cloud.discoveryengine.v1beta.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} """ @@ -320,9 +347,9 @@ class FhirMatcher(proto.Message): ) class Matcher(proto.Message): - r"""Matcher for the - [Document][google.cloud.discoveryengine.v1beta.Document]s. Currently - supports matching by exact URIs. + r"""Matcher for the `Document + `__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. @@ -368,31 +395,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 +434,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]. + `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 + `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 +475,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..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 @@ -32,7 +32,7 @@ class Engine(proto.Message): r"""Metadata that describes the training and serving parameters of an - [Engine][google.cloud.discoveryengine.v1beta.Engine]. + `Engine `__. This message has `oneof`_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. @@ -44,85 +44,99 @@ 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] + `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] + `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. - + 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 - 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. 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] - can be associated here. + `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. + 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): @@ -132,11 +146,12 @@ 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. @@ -161,64 +176,67 @@ class ChatEngineConfig(proto.Message): 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] + 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 + 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/``. + 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] + 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] + `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] - or - [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines] - API after engine creation. + 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: 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 `__ + 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., 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( @@ -255,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( @@ -274,8 +292,8 @@ class ChatEngineMetadata(proto.Message): 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..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 @@ -45,7 +45,8 @@ class CreateEngineRequest(proto.Message): r"""Request for - [EngineService.CreateEngine][google.cloud.discoveryengine.v1beta.EngineService.CreateEngine] + `EngineService.CreateEngine + `__ method. Attributes: @@ -53,19 +54,20 @@ 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 + 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 + This field must conform to `RFC-1034 + `__ standard with a + length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned. """ @@ -86,7 +88,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. @@ -94,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( @@ -112,23 +115,25 @@ 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. + `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 +144,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. @@ -147,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( @@ -165,14 +171,14 @@ class DeleteEngineMetadata(proto.Message): class GetEngineRequest(proto.Message): r"""Request message for - [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine] - method. + `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 +190,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: @@ -197,6 +204,7 @@ class ListEnginesRequest(proto.Message): Optional. Not supported. filter (str): Optional. Filter by solution type. For example: + solution_type=SOLUTION_TYPE_SEARCH """ @@ -220,13 +228,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,26 +257,28 @@ 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 + 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. + `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. 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. @@ -290,7 +301,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 +318,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}`` """ @@ -316,12 +331,14 @@ 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}`` """ @@ -338,6 +355,7 @@ class TuneEngineMetadata(proto.Message): engine (str): 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..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,46 +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][google.cloud.discoveryengine.v1beta.Evaluation], - in the format of + `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. 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][google.cloud.discoveryengine.v1beta.SampleQuery]s - in the - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet]. + 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): 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][google.cloud.discoveryengine.v1beta.Evaluation] - was created at. + `Evaluation + `__ was + created at. end_time (google.protobuf.timestamp_pb2.Timestamp): Output only. Timestamp the - [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation] - was completed at. + `Evaluation + `__ 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): @@ -107,18 +109,27 @@ class EvaluationSpec(proto.Message): 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: + 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.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] + * `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 +142,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}``. """ @@ -201,79 +213,96 @@ class QualityMetrics(proto.Message): 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 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 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): - Example (top-3): Suppose - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery] + Suppose `SampleQuery + `__ with three retrieved documents (D1, D2, D3) and binary - relevance judgements (1 for relevant, 0 for not relevant): + relevance judgements (1 for relevant, 0 for not + relevant): - Retrieved: [D3 (0), D1 (1), D2 (1)] Ideal: [D1 (1), D2 (1), - D3 (0)] + Retrieved: [D3 (0), D1 (1), D2 (1)] + Ideal: [D1 (1), D2 (1), D3 (0)] - 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 + 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..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 @@ -38,24 +38,28 @@ 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. + `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. """ name: str = proto.Field( @@ -66,7 +70,8 @@ class GetEvaluationRequest(proto.Message): class ListEvaluationsRequest(proto.Message): r"""Request message for - [EvaluationService.ListEvaluations][google.cloud.discoveryengine.v1beta.EvaluationService.ListEvaluations] + `EvaluationService.ListEvaluations + `__ method. Attributes: @@ -75,29 +80,35 @@ class ListEvaluationsRequest(proto.Message): ``projects/{project}/locations/{location}``. If the caller does not have permission to list - [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation]s + `Evaluation + `__s under this location, regardless of whether or not this - location exists, a ``PERMISSION_DENIED`` error is returned. + 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] + `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 + `__ + must match the call that provided the page token. + Otherwise, an ``INVALID_ARGUMENT`` error is returned. """ parent: str = proto.Field( @@ -116,18 +127,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 +160,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,9 +169,9 @@ 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] - to create. + Required. The `Evaluation + `__ to + create. """ parent: str = proto.Field( @@ -173,7 +187,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 +196,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 +206,30 @@ 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 + [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. + 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] + `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 + `__ + must match the call that provided the page token. + Otherwise, an ``INVALID_ARGUMENT`` error is returned. """ evaluation: str = proto.Field( @@ -229,33 +248,37 @@ 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..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,16 +35,14 @@ 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. + 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. """ @@ -79,8 +77,8 @@ 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): @@ -88,18 +86,17 @@ class GenerateGroundedContentRequest(proto.Message): 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): @@ -107,24 +104,29 @@ class GenerateGroundedContentRequest(proto.Message): 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. - - 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. + * Keys must start with a lowercase letter or + international character. See `Google Cloud - Document `__ + Document + `__ for more details. """ @@ -139,35 +141,36 @@ class GenerationSpec(proto.Message): generation. language_code (str): Language code for content. Use language tags defined by - `BCP47 `__. + `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``. """ @@ -227,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``. """ @@ -280,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``. """ @@ -305,9 +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[ @@ -331,20 +331,22 @@ 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. - 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. 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. + If set, safe search is enabled in Vertex AI Search + requests. """ serving_config: str = proto.Field( @@ -468,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): @@ -481,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): @@ -567,22 +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 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``. """ 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): @@ -610,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( @@ -633,17 +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. + 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 +726,12 @@ 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,16 +745,18 @@ 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 - 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. @@ -762,24 +765,29 @@ class CheckGroundingRequest(proto.Message): 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. - - 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. + * Keys must start with a lowercase letter or + international character. See `Google Cloud - Document `__ + Document + `__ for more details. """ @@ -810,7 +818,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. @@ -818,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): @@ -843,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( @@ -859,35 +867,39 @@ 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. + 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 + 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], + `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..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 @@ -52,10 +52,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( @@ -74,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 c1458f15a46d..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,44 +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. 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,52 +134,55 @@ class BigQuerySource(proto.Message): Attributes: partition_date (google.type.date_pb2.Date): - BigQuery time partitioned table's \_PARTITIONDATE in + 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. 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( @@ -205,23 +218,23 @@ 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 + `__. """ project_id: str = proto.Field( @@ -247,25 +260,27 @@ 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][a-zA-Z0-9-_]*``. + 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): - 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: @@ -316,28 +331,29 @@ 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. + 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 - 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( @@ -367,29 +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][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. + * ``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( @@ -428,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( @@ -469,19 +484,19 @@ 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. """ @@ -504,33 +519,32 @@ 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 `__. + `here + `__. """ project_id: str = proto.Field( @@ -564,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( @@ -623,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( @@ -672,9 +682,9 @@ 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. + 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``. """ @@ -714,14 +724,12 @@ class ImportUserEventsRequest(proto.Message): 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]): @@ -767,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( @@ -807,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( @@ -846,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. """ @@ -943,93 +946,121 @@ class ImportDocumentsRequest(proto.Message): ``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][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. + 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 + `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 + 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], + `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. + 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. 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): - 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): @@ -1048,14 +1079,13 @@ 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][google.cloud.discoveryengine.v1beta.Document.id]. + document must have a valid `Document.id + `__. Recommended max of 100 items. """ @@ -1150,18 +1180,19 @@ 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]): - 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( @@ -1178,7 +1209,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 +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 + 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/*. """ @@ -1216,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[ @@ -1248,16 +1280,16 @@ class InlineSource(proto.Message): class ImportSuggestionDenyListEntriesResponse(proto.Message): r"""Response message for - [CompletionService.ImportSuggestionDenyListEntries][google.cloud.discoveryengine.v1beta.CompletionService.ImportSuggestionDenyListEntries] + `CompletionService.ImportSuggestionDenyListEntries + `__ method. 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. @@ -1280,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( @@ -1305,7 +1337,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,14 +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): @@ -1344,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[ @@ -1387,18 +1420,19 @@ class InlineSource(proto.Message): class ImportCompletionSuggestionsResponse(proto.Message): r"""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. + `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. 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( @@ -1414,23 +1448,25 @@ 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][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 +1492,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,28 +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][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. + The desired location of errors incurred during the + Import. """ 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 - to import. Max of 1000 items. + `SampleQuery + `__s to + import. Max of 1000 items. """ sample_queries: MutableSequence[sample_query.SampleQuery] = proto.RepeatedField( @@ -1541,18 +1581,19 @@ class InlineSource(proto.Message): class ImportSampleQueriesResponse(proto.Message): r"""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. + `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. 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( @@ -1576,20 +1617,20 @@ 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][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..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,22 @@ 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][google.cloud.discoveryengine.v1beta.Project.ServiceTerms]. + ``id`` of `ServiceTerms + `__. """ class ServiceTerms(proto.Message): @@ -57,28 +57,30 @@ 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 - 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 45ddb4a7693e..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 @@ -30,25 +30,28 @@ 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 + `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..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,40 +48,56 @@ 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. + * ``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 - 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( @@ -99,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( @@ -116,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( @@ -162,9 +177,9 @@ 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. + 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 +193,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,37 +206,39 @@ 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): - 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 ``*`` (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. + 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: @@ -269,19 +287,20 @@ class InlineSource(proto.Message): class PurgeDocumentsResponse(proto.Message): r"""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. + `DocumentService.PurgeDocuments + `__ + 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. + 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( @@ -295,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( @@ -342,13 +360,14 @@ 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,16 +379,16 @@ class PurgeSuggestionDenyListEntriesRequest(proto.Message): class PurgeSuggestionDenyListEntriesResponse(proto.Message): r"""Response message for - [CompletionService.PurgeSuggestionDenyListEntries][google.cloud.discoveryengine.v1beta.CompletionService.PurgeSuggestionDenyListEntries] + `CompletionService.PurgeSuggestionDenyListEntries + `__ method. 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( @@ -385,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( @@ -410,13 +429,14 @@ 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,16 +448,17 @@ class PurgeCompletionSuggestionsRequest(proto.Message): class PurgeCompletionSuggestionsResponse(proto.Message): r"""Response message for - [CompletionService.PurgeCompletionSuggestions][google.cloud.discoveryengine.v1beta.CompletionService.PurgeCompletionSuggestions] + `CompletionService.PurgeCompletionSuggestions + `__ method. 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( @@ -452,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 8ef6ba5911c0..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 @@ -31,27 +31,33 @@ class RankingRecord(proto.Message): r"""Record message for - [RankService.Rank][google.cloud.discoveryengine.v1beta.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.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. + The score of this record based on the given query and + selected model. """ id: str = proto.Field( @@ -74,56 +80,60 @@ class RankingRecord(proto.Message): class RankRequest(proto.Message): r"""Request message for - [RankService.Rank][google.cloud.discoveryengine.v1beta.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 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 - 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. - - 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. + * 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,8 +171,8 @@ class RankRequest(proto.Message): class RankResponse(proto.Message): r"""Response message for - [RankService.Rank][google.cloud.discoveryengine.v1beta.RankService.Rank] - method. + `RankService.Rank + `__ 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 51d09981d87b..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 @@ -38,135 +38,161 @@ 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 + 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 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][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 - 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: - - - (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] + 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`` + `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. - - 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. + * Keys must start with a lowercase letter or + international character. See `Requirements for - labels `__ + labels + `__ for more details. """ @@ -209,42 +235,47 @@ 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][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. + 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. """ 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): 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..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,21 +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. create_time (google.protobuf.timestamp_pb2.Timestamp): Output only. Timestamp the - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery] - was created at. + `SampleQuery + `__ 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): 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..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 @@ -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. + `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,46 @@ 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] + `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 + `__ + must match the call that provided the page token. + Otherwise, an ``INVALID_ARGUMENT`` error is returned. """ parent: str = proto.Field( @@ -116,18 +127,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 +160,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,28 +170,34 @@ 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] - to create. + `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], + `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]. + `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 + This field must conform to `RFC-1034 + `__ standard with a + length limit of 63 characters. Otherwise, an ``INVALID_ARGUMENT`` error is returned. """ @@ -198,7 +218,8 @@ class CreateSampleQueryRequest(proto.Message): class UpdateSampleQueryRequest(proto.Message): r"""Request message for - [SampleQueryService.UpdateSampleQuery][google.cloud.discoveryengine.v1beta.SampleQueryService.UpdateSampleQuery] + `SampleQueryService.UpdateSampleQuery + `__ method. Attributes: @@ -206,17 +227,18 @@ class UpdateSampleQueryRequest(proto.Message): Required. The simple query to update. If the caller does not have permission to update the - [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery], + `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, - 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( @@ -233,24 +255,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], + `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..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,13 +29,14 @@ 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): 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}``. @@ -44,15 +45,17 @@ class SampleQuerySet(proto.Message): 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][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..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 @@ -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. + `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,7 +71,8 @@ class GetSampleQuerySetRequest(proto.Message): class ListSampleQuerySetsRequest(proto.Message): r"""Request message for - [SampleQuerySetService.ListSampleQuerySets][google.cloud.discoveryengine.v1beta.SampleQuerySetService.ListSampleQuerySets] + `SampleQuerySetService.ListSampleQuerySets + `__ method. Attributes: @@ -76,29 +81,35 @@ class ListSampleQuerySetsRequest(proto.Message): ``projects/{project}/locations/{location}``. If the caller does not have permission to list - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet]s + `SampleQuerySet + `__s under this location, regardless of whether or not this - location exists, a ``PERMISSION_DENIED`` error is returned. + location exists, a ``PERMISSION_DENIED`` error is + returned. page_size (int): Maximum number of - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet]s + `SampleQuerySet + `__s to return. If unspecified, defaults to 100. The maximum - allowed value is 1000. Values above 1000 will be coerced to - 1000. + 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] + `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 + `__ + must match the call that provided the page token. + Otherwise, an ``INVALID_ARGUMENT`` error is returned. """ parent: str = proto.Field( @@ -117,18 +128,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 +163,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,28 +173,34 @@ 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], + `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]. + `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 + This field must conform to `RFC-1034 + `__ standard with a + length limit of 63 characters. Otherwise, an ``INVALID_ARGUMENT`` error is returned. """ @@ -201,7 +221,8 @@ class CreateSampleQuerySetRequest(proto.Message): class UpdateSampleQuerySetRequest(proto.Message): r"""Request message for - [SampleQuerySetService.UpdateSampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySetService.UpdateSampleQuerySet] + `SampleQuerySetService.UpdateSampleQuerySet + `__ method. Attributes: @@ -209,17 +230,19 @@ class UpdateSampleQuerySetRequest(proto.Message): Required. The sample query set to update. If the caller does not have permission to update the - [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet], + `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 - 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( @@ -236,24 +259,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], + `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_service.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/types/schema_service.py index 42437b4bf244..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 @@ -40,8 +40,8 @@ class GetSchemaRequest(proto.Message): r"""Request message for - [SchemaService.GetSchema][google.cloud.discoveryengine.v1beta.SchemaService.GetSchema] - method. + `SchemaService.GetSchema + `__ method. Attributes: name (str): @@ -58,32 +58,35 @@ 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 + 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. page_token (str): A page token, received from a previous - [SchemaService.ListSchemas][google.cloud.discoveryengine.v1beta.SchemaService.ListSchemas] + `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] + `SchemaService.ListSchemas + `__ must match the call that provided the page token. """ @@ -103,17 +106,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 +139,29 @@ 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 + 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,19 +181,20 @@ 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 + 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 + `Schema `__ + is not found, a new `Schema + `__ is created. In this situation, ``update_mask`` is ignored. """ @@ -202,7 +211,8 @@ class UpdateSchemaRequest(proto.Message): class DeleteSchemaRequest(proto.Message): r"""Request message for - [SchemaService.DeleteSchema][google.cloud.discoveryengine.v1beta.SchemaService.DeleteSchema] + `SchemaService.DeleteSchema + `__ method. Attributes: @@ -225,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( @@ -248,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( @@ -271,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 a8bd37079766..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 @@ -35,13 +35,13 @@ class SearchRequest(proto.Message): r"""Request message for - [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] - method. + `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``. @@ -51,222 +51,228 @@ class SearchRequest(proto.Message): 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 + 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] + `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 + `__ + 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 + 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. - If this field is unrecognizable, an ``INVALID_ARGUMENT`` is - returned. + 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 `__ + 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 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. + 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 `__. + 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. + 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 `__. + 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. - + 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: - - ``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 - 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``. 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. + 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] + `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 +281,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. @@ -349,24 +318,29 @@ class SearchRequest(proto.Message): 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. - - 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 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 @@ -374,66 +348,69 @@ class SearchRequest(proto.Message): 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] + `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. 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): - 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): @@ -478,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``. """ @@ -492,20 +469,21 @@ 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][google.cloud.discoveryengine.v1beta.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 + `__ """ data_store: str = proto.Field( @@ -524,80 +502,85 @@ 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 + 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. + `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. + 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. + 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. + 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 + * "rating", enable_dynamic_position = true - - "price", enable_dynamic_position = false + * "price", enable_dynamic_position = false - - "brands", 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. + 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): @@ -606,59 +589,63 @@ 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. + `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. + 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. + 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. Allowed values are: - - "count desc", which means order by - [SearchResponse.Facet.values.count][google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue.count] - descending. + * "count desc", which means order by + `SearchResponse.Facet.values.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. + * "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 `__; + order + `__; numerical intervals are sorted in the order given by - [FacetSpec.FacetKey.intervals][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.intervals]. + `FacetSpec.FacetKey.intervals + `__. """ key: str = proto.Field( @@ -714,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): @@ -727,90 +713,97 @@ 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 - ranking, but it is not blocked out completely. + 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. + 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 = + 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. + 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): 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 @@ -832,22 +825,25 @@ 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): 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( @@ -904,34 +900,34 @@ 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][google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.Condition.DISABLED]. + 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): - 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,25 +952,28 @@ 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): - r"""Enum describing under which mode spell correction should - occur. + r"""Enum describing under which mode spell correction should occur. 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 @@ -991,8 +990,7 @@ 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): @@ -1002,22 +1000,24 @@ class ContentSearchSpec(proto.Message): 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] + `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,24 +1025,24 @@ 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 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. @@ -1067,25 +1067,27 @@ 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. + 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] + 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. @@ -1093,82 +1095,84 @@ class SummarySpec(proto.Message): 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. + 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. + 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. + 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. + 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. + 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. + `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): @@ -1176,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( @@ -1195,15 +1198,18 @@ 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( @@ -1257,55 +1263,61 @@ 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 ``max_extractive_answer_count``. + ``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] - is set to - [DataStore.ContentConfig.CONTENT_REQUIRED][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.CONTENT_REQUIRED] + `DataStore + `__ is + set to `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_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. + 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. @@ -1335,21 +1347,21 @@ 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] + `SearchRequest.ContentSearchSpec.search_result_mode + `__ is set to - [CHUNKS][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS] + `CHUNKS + `__ 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( @@ -1390,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): @@ -1427,30 +1438,31 @@ 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``. + 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]. + 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): - Server behavior defaults to [Condition.DISABLED][]. + Server behavior defaults to + [Condition.DISABLED][]. DISABLED (1): Disables NL filter extraction. ENABLED (2): @@ -1477,19 +1489,21 @@ 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): - 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): 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): @@ -1508,10 +1522,9 @@ 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 @@ -1521,32 +1534,39 @@ class SessionSpec(proto.Message): 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 + 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. + 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. @@ -1569,8 +1589,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 +1600,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,72 +1775,79 @@ class Mode(proto.Enum): class SearchResponse(proto.Message): r"""Response message for - [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] - method. + `SearchService.Search + `__ 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 - [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. + `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] + `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 - 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][google.cloud.discoveryengine.v1beta.SearchRequest.session] + `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. + A list of One Box results. There can be multiple One + Box results of different types. """ class SearchResult(proto.Message): @@ -1825,22 +1855,24 @@ 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. 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): - A set of ranking signals associated with the - result. + A set of ranking signals associated with the result. """ class RankSignals(proto.Message): @@ -1862,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): @@ -1891,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( @@ -1984,7 +2015,8 @@ class Facet(proto.Message): 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]. + `SearchRequest.FacetSpec.FacetKey.key + `__. values (MutableSequence[google.cloud.discoveryengine_v1beta.types.SearchResponse.Facet.FacetValue]): The facet values for this field. dynamic_facet (bool): @@ -2003,14 +2035,15 @@ 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 + 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]. + [SearchRequest.FacetSpec.FacetKey.intervals + `__. This field is a member of `oneof`_ ``facet_value``. count (int): @@ -2050,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]): @@ -2095,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. """ @@ -2123,14 +2155,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 +2193,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 +2206,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``. """ @@ -2189,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( @@ -2233,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]): @@ -2281,15 +2314,16 @@ class Reference(proto.Message): Title of the document. document (str): Required. - [Document.name][google.cloud.discoveryengine.v1beta.Document.name] + `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. 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): @@ -2385,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. """ @@ -2406,17 +2440,17 @@ 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 - [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. """ @@ -2430,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): @@ -2465,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( @@ -2490,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): @@ -2522,7 +2548,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. """ @@ -2557,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( @@ -2630,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. @@ -2654,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``. """ @@ -2721,19 +2748,20 @@ 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 - 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( @@ -2746,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 ca1b175ba108..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 @@ -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. @@ -90,16 +93,16 @@ class TrainCustomModelRequest(proto.Message): data_store (str): 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. """ @@ -109,38 +112,41 @@ 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 + 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, + 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 + 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). + ``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: + 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`` + * ``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 + 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. """ @@ -188,34 +194,36 @@ class GcsTrainingInput(proto.Message): class TrainCustomModelResponse(proto.Message): r"""Response of the - [TrainCustomModelRequest][google.cloud.discoveryengine.v1beta.TrainCustomModelRequest]. - This message is returned by the - google.longrunning.Operations.response field. + `TrainCustomModelRequest + `__. 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. - - **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): - Fully qualified name of the - CustomTuningModel. + Fully qualified name of the CustomTuningModel. """ error_samples: MutableSequence[status_pb2.Status] = proto.RepeatedField( @@ -244,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 c518f8a9b3f9..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,97 +49,105 @@ 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. 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). + 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] + 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][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.vector] + `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] + 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 }; + * 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): @@ -147,99 +155,109 @@ 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. + 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. + 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 - 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): 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. @@ -256,32 +274,32 @@ class MediaConfig(proto.Message): 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: + 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. 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( @@ -308,16 +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 2701dec76cc8..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 @@ -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. """ @@ -84,17 +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( @@ -118,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 013ee90b77c4..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,27 +78,28 @@ 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][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 - 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 87bb9aa78b38..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,38 +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. 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 + 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 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. 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. """ @@ -95,9 +93,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): @@ -153,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( @@ -218,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. """ 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..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 @@ -66,19 +66,21 @@ 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. + [SiteSearchEngine], regardless of whether or not it + exists, a PERMISSION_DENIED error is returned. """ name: str = proto.Field( @@ -89,19 +91,21 @@ 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] - to create. + Required. The `TargetSite + `__ to + create. """ parent: str = proto.Field( @@ -117,7 +121,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. @@ -125,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( @@ -143,7 +148,8 @@ class CreateTargetSiteMetadata(proto.Message): class BatchCreateTargetSitesRequest(proto.Message): r"""Request message for - [SiteSearchEngineService.BatchCreateTargetSites][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.BatchCreateTargetSites] + `SiteSearchEngineService.BatchCreateTargetSites + `__ method. Attributes: @@ -155,8 +161,8 @@ class BatchCreateTargetSitesRequest(proto.Message): 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( @@ -172,24 +178,28 @@ 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. + `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. """ name: str = proto.Field( @@ -200,20 +210,22 @@ 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 +237,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. @@ -233,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( @@ -251,24 +264,28 @@ 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. + `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. """ name: str = proto.Field( @@ -279,7 +296,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. @@ -287,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( @@ -305,34 +323,38 @@ 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. 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. + 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. + ``ListTargetSites`` must match the call that provided + the page token. """ parent: str = proto.Field( @@ -351,20 +373,20 @@ 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 - response. + The total number of items matching the request. + This will always be populated in the response. """ @property @@ -390,7 +412,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. @@ -398,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( @@ -416,7 +439,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,18 +459,20 @@ 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 + Required. The `Sitemap + `__ to create. """ @@ -463,23 +489,26 @@ 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 + `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. + `Sitemap + `__, + regardless of whether or not it exists, a + PERMISSION_DENIED error is returned. - If the requested - [Sitemap][google.cloud.discoveryengine.v1beta.Sitemap] does + If the requested `Sitemap + `__ does not exist, a NOT_FOUND error is returned. """ @@ -491,33 +520,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] - uris. + The `Sitemap + `__ uris. """ uris: MutableSequence[str] = proto.RepeatedField( @@ -526,9 +557,9 @@ class UrisMatcher(proto.Message): ) class Matcher(proto.Message): - r"""Matcher for the - [Sitemap][google.cloud.discoveryengine.v1beta.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 @@ -560,7 +591,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. @@ -568,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( @@ -586,7 +618,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. @@ -594,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( @@ -612,23 +645,25 @@ 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 +681,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 +702,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 +711,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. @@ -681,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( @@ -699,13 +738,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 +759,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 +768,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. @@ -734,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( @@ -752,24 +795,26 @@ 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] - in ``site_search_engine``. + 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,15 +835,15 @@ 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``. 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): @@ -809,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): @@ -879,7 +923,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. @@ -887,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( @@ -964,7 +1006,8 @@ class RecrawlUrisMetadata(proto.Message): class BatchVerifyTargetSitesRequest(proto.Message): r"""Request message for - [SiteSearchEngineService.BatchVerifyTargetSites][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.BatchVerifyTargetSites] + `SiteSearchEngineService.BatchVerifyTargetSites + `__ method. Attributes: @@ -982,7 +1025,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 +1034,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. @@ -998,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( @@ -1016,7 +1061,8 @@ class BatchVerifyTargetSitesMetadata(proto.Message): class FetchDomainVerificationStatusRequest(proto.Message): r"""Request message for - [SiteSearchEngineService.FetchDomainVerificationStatus][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.FetchDomainVerificationStatus] + `SiteSearchEngineService.FetchDomainVerificationStatus + `__ method. Attributes: @@ -1026,9 +1072,9 @@ class FetchDomainVerificationStatusRequest(proto.Message): ``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. 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. @@ -1038,8 +1084,8 @@ class FetchDomainVerificationStatusRequest(proto.Message): retrieve the subsequent page. When paginating, all other parameters provided to - ``FetchDomainVerificationStatus`` must match the call that - provided the page token. + ``FetchDomainVerificationStatus`` must match the call + that provided the page token. """ site_search_engine: str = proto.Field( @@ -1058,21 +1104,21 @@ class FetchDomainVerificationStatusRequest(proto.Message): class FetchDomainVerificationStatusResponse(proto.Message): r"""Response message for - [SiteSearchEngineService.FetchDomainVerificationStatus][google.cloud.discoveryengine.v1beta.SiteSearchEngineService.FetchDomainVerificationStatus] + `SiteSearchEngineService.FetchDomainVerificationStatus + `__ method. 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 5c7918c4a605..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): @@ -49,101 +48,109 @@ 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. + 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. + 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. - 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] - resource name, in the form of + 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. + `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] + `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). + 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]. + `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. + 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 @@ -151,30 +158,36 @@ class UserEvent(proto.Message): 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. + 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] + * `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][google.cloud.discoveryengine.v1beta.RecommendResponse.attribution_token] + `RecommendResponse.attribution_token + `__ to this field. filter (str): The filter syntax consists of an expression language for @@ -182,103 +195,115 @@ class UserEvent(proto.Message): documents being filtered. One example is for ``search`` events, the associated - [SearchRequest][google.cloud.discoveryengine.v1beta.SearchRequest] + `SearchRequest + `__ may contain a filter expression in - [SearchRequest.filter][google.cloud.discoveryengine.v1beta.SearchRequest.filter] + `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], + 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] + `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. + 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. 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. + 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. + 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( @@ -386,46 +411,46 @@ 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 - together properly. + 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). + 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: + 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( @@ -456,41 +481,46 @@ 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. 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. + 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 @@ -519,16 +549,18 @@ 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): 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. """ @@ -549,61 +581,67 @@ 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: + 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] + * 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] + `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] + `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,41 +688,43 @@ 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] - 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. + 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: - - ``add-to-cart`` - - ``purchase`` + * ``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( @@ -728,22 +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 - [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``. 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( @@ -778,20 +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 - [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. - 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..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 @@ -37,25 +37,30 @@ 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. 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( @@ -84,21 +89,20 @@ class CollectUserEventRequest(proto.Message): 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/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": [ {